commit
stringlengths
40
40
old_file
stringlengths
4
237
new_file
stringlengths
4
237
old_contents
stringlengths
1
4.24k
new_contents
stringlengths
1
4.87k
subject
stringlengths
15
778
message
stringlengths
15
8.75k
lang
stringclasses
266 values
license
stringclasses
13 values
repos
stringlengths
5
127k
69efcb859896e91d312d8b07e551511816c72cf6
regtests/asf-requests-tests.ads
regtests/asf-requests-tests.ads
----------------------------------------------------------------------- -- asf-requests-tests - Unit tests for requests -- Copyright (C) 2012 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Util.Tests; package ASF.Requests.Tests is procedure Add_Tests (Suite : in Util.Tests.Access_Test_Suite); type Test is new Util.Tests.Test with null record; -- Test the Split_Header procedure. procedure Test_Split_Header (T : in out Test); -- Test the Accept_Locales procedure. procedure Test_Accept_Locales (T : in out Test); end ASF.Requests.Tests;
----------------------------------------------------------------------- -- asf-requests-tests - Unit tests for requests -- Copyright (C) 2012, 2015 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Util.Tests; package ASF.Requests.Tests is procedure Add_Tests (Suite : in Util.Tests.Access_Test_Suite); type Test is new Util.Tests.Test with null record; -- Test the Split_Header procedure. procedure Test_Split_Header (T : in out Test); -- Test the Accept_Locales procedure. procedure Test_Accept_Locales (T : in out Test); -- Test the Set_Attribute procedure. procedure Test_Set_Attribute (T : in out Test); end ASF.Requests.Tests;
Declare the Test_Set_Attribute procedure to check the Set/Get/Remove attribute
Declare the Test_Set_Attribute procedure to check the Set/Get/Remove attribute
Ada
apache-2.0
stcarrez/ada-asf,stcarrez/ada-asf,stcarrez/ada-asf
95880958f105d4b3a56bfffe99308c2e53c9554b
src/util-processes-tools.ads
src/util-processes-tools.ads
----------------------------------------------------------------------- -- util-processes-tools -- System specific and low level operations -- Copyright (C) 2018 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Util.Strings.Vectors; package Util.Processes.Tools is -- Execute the command and append the output in the vector array. -- The program output is read line by line and the standard input is closed. -- Return the program exit status. procedure Execute (Command : in String; Output : in out Util.Strings.Vectors.Vector; Status : out Integer); end Util.Processes.Tools;
----------------------------------------------------------------------- -- util-processes-tools -- System specific and low level operations -- Copyright (C) 2018 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Util.Strings.Vectors; with Util.Streams.Pipes; package Util.Processes.Tools is -- Execute the command and append the output in the vector array. -- The program output is read line by line and the standard input is closed. -- Return the program exit status. procedure Execute (Command : in String; Output : in out Util.Strings.Vectors.Vector; Status : out Integer); procedure Execute (Command : in String; Input_Path : in String; Output : in out Util.Strings.Vectors.Vector; Status : out Integer); procedure Execute (Command : in String; Process : in out Util.Streams.Pipes.Pipe_Stream; Output : in out Util.Strings.Vectors.Vector; Status : out Integer); end Util.Processes.Tools;
Declare more Execute procedures as helper to launch a command and get the output
Declare more Execute procedures as helper to launch a command and get the output
Ada
apache-2.0
stcarrez/ada-util,stcarrez/ada-util
95be7c3737b22b8f447dfed41202288270d31d37
awa/plugins/awa-blogs/regtests/awa-blogs-tests.ads
awa/plugins/awa-blogs/regtests/awa-blogs-tests.ads
----------------------------------------------------------------------- -- awa-blogs-tests -- Unit tests for blogs module -- Copyright (C) 2011 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Util.Tests; package AWA.Blogs.Tests is procedure Add_Tests (Suite : in Util.Tests.Access_Test_Suite); type Test is new Util.Tests.Test with null record; -- Test creation of blog by simulating web requests. procedure Test_Create_Blog (T : in out Test); end AWA.Blogs.Tests;
----------------------------------------------------------------------- -- awa-blogs-tests -- Unit tests for blogs module -- Copyright (C) 2017 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Util.Tests; with Ada.Strings.Unbounded; package AWA.Blogs.Tests is procedure Add_Tests (Suite : in Util.Tests.Access_Test_Suite); type Test is new Util.Tests.Test with record Blog_Ident : Ada.Strings.Unbounded.Unbounded_String; Post_Ident : Ada.Strings.Unbounded.Unbounded_String; Post_Uri : Ada.Strings.Unbounded.Unbounded_String; end record; -- Get some access on the blog as anonymous users. procedure Verify_Anonymous (T : in out Test; Post : in String); -- Test access to the blog as anonymous user. procedure Test_Anonymous_Access (T : in out Test); -- Test creation of blog by simulating web requests. procedure Test_Create_Blog (T : in out Test); -- Test updating a post by simulating web requests. procedure Test_Update_Post (T : in out Test); end AWA.Blogs.Tests;
Declare two new unit tests Test_Update_Post and Test_Anonymous_Access
Declare two new unit tests Test_Update_Post and Test_Anonymous_Access
Ada
apache-2.0
stcarrez/ada-awa,stcarrez/ada-awa,stcarrez/ada-awa,stcarrez/ada-awa
5a3538c864f35bc5184b009d674572c3c67066a6
src/mysql/ado-mysql.adb
src/mysql/ado-mysql.adb
----------------------------------------------------------------------- -- ado-mysql -- Database Drivers -- Copyright (C) 2019 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with ADO.Configs; with ADO.Connections.Mysql; package body ADO.Mysql is -- ------------------------------ -- Initialize the drivers and the library by reading the property file -- and configure the runtime with it. -- ------------------------------ procedure Initialize (Config : in String) is begin ADO.Configs.Initialize (Config); ADO.Connections.Mysql.Initialize; end Initialize; -- ------------------------------ -- Initialize the drivers and the library and configure the runtime with the given properties. -- ------------------------------ procedure Initialize (Config : in Util.Properties.Manager'Class) is begin ADO.Configs.Initialize (Config); ADO.Connections.Mysql.Initialize; end Initialize; end ADO.Mysql;
----------------------------------------------------------------------- -- ado-mysql -- Database Drivers -- Copyright (C) 2019 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with ADO.Configs; with ADO.Connections.Mysql; package body ADO.Mysql is -- ------------------------------ -- Initialize the Mysql driver. -- ------------------------------ procedure Initialize is begin ADO.Connections.Mysql.Initialize; end Initialize; -- ------------------------------ -- Initialize the drivers and the library by reading the property file -- and configure the runtime with it. -- ------------------------------ procedure Initialize (Config : in String) is begin ADO.Configs.Initialize (Config); Initialize; end Initialize; -- ------------------------------ -- Initialize the drivers and the library and configure the runtime with the given properties. -- ------------------------------ procedure Initialize (Config : in Util.Properties.Manager'Class) is begin ADO.Configs.Initialize (Config); Initialize; end Initialize; end ADO.Mysql;
Implement the Initialize procedure and use it
Implement the Initialize procedure and use it
Ada
apache-2.0
stcarrez/ada-ado
fb8f7f1cf7a663a6ff22cbd2255abb8b7de8ebae
awa/regtests/awa_harness.adb
awa/regtests/awa_harness.adb
----------------------------------------------------------------------- -- AWA - Unit tests -- Copyright (C) 2009, 2010, 2011 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with AWA.Testsuite; with Util.Tests; with AWA.Tests; procedure AWA_Harness is procedure Harness is new Util.Tests.Harness (AWA.Testsuite.Suite, AWA.Tests.Initialize); begin Harness ("awa-tests.xml"); end AWA_Harness;
----------------------------------------------------------------------- -- AWA - Unit tests -- Copyright (C) 2009, 2010, 2011, 2012 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with AWA.Testsuite; with Util.Tests; with AWA.Tests; procedure AWA_Harness is procedure Harness is new Util.Tests.Harness (AWA.Testsuite.Suite, AWA.Tests.Initialize, AWA.Tests.Finish); begin Harness ("awa-tests.xml"); end AWA_Harness;
Call the Finish procedure after executing the testsuite Finish will destroy the AWA application that was allocated dynamically
Call the Finish procedure after executing the testsuite Finish will destroy the AWA application that was allocated dynamically
Ada
apache-2.0
stcarrez/ada-awa,stcarrez/ada-awa,stcarrez/ada-awa,stcarrez/ada-awa
689e10214201b442c0563f6c0044e726ac1c28f2
regtests/security-testsuite.adb
regtests/security-testsuite.adb
----------------------------------------------------------------------- -- Security testsuite - Ada Security Test suite -- Copyright (C) 2011, 2012 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Security.OpenID.Tests; with Security.Permissions.Tests; with Security.Policies.Tests; package body Security.Testsuite is Tests : aliased Util.Tests.Test_Suite; function Suite return Util.Tests.Access_Test_Suite is Ret : constant Util.Tests.Access_Test_Suite := Tests'Access; begin Security.OpenID.Tests.Add_Tests (Ret); Security.Permissions.Tests.Add_Tests (Ret); Security.Policies.Tests.Add_Tests (Ret); return Ret; end Suite; end Security.Testsuite;
----------------------------------------------------------------------- -- Security testsuite - Ada Security Test suite -- Copyright (C) 2011, 2012, 2013 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Security.OpenID.Tests; with Security.Permissions.Tests; with Security.Policies.Tests; with Security.OAuth.JWT.Tests; package body Security.Testsuite is Tests : aliased Util.Tests.Test_Suite; function Suite return Util.Tests.Access_Test_Suite is Ret : constant Util.Tests.Access_Test_Suite := Tests'Access; begin Security.OAuth.JWT.Tests.Add_Tests (Ret); Security.OpenID.Tests.Add_Tests (Ret); Security.Permissions.Tests.Add_Tests (Ret); Security.Policies.Tests.Add_Tests (Ret); return Ret; end Suite; end Security.Testsuite;
Add the new unit tests
Add the new unit tests
Ada
apache-2.0
Letractively/ada-security
ca75e6900380036a05c5ce6330dc232c0c79af27
mat/src/mat-formats.ads
mat/src/mat-formats.ads
----------------------------------------------------------------------- -- mat-formats - Format various types for the console or GUI interface -- Copyright (C) 2015 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Ada.Strings.Unbounded; with MAT.Types; package MAT.Formats is -- Format the address into a string. function Addr (Value : in MAT.Types.Target_Addr) return String; -- Format the size into a string. function Size (Value : in MAT.Types.Target_Size) return String; -- Format a file, line, function information into a string. function Location (File : in Ada.Strings.Unbounded.Unbounded_String; Line : in Natural; Func : in Ada.Strings.Unbounded.Unbounded_String) return String; end MAT.Formats;
----------------------------------------------------------------------- -- mat-formats - Format various types for the console or GUI interface -- Copyright (C) 2015 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Ada.Strings.Unbounded; with MAT.Types; with MAT.Events.Targets; package MAT.Formats is -- Format the address into a string. function Addr (Value : in MAT.Types.Target_Addr) return String; -- Format the size into a string. function Size (Value : in MAT.Types.Target_Size) return String; -- Format a file, line, function information into a string. function Location (File : in Ada.Strings.Unbounded.Unbounded_String; Line : in Natural; Func : in Ada.Strings.Unbounded.Unbounded_String) return String; -- Format a short description of the event. function Event (Item : in MAT.Events.Targets.Probe_Event_Type; Related : in MAT.Events.Targets.Target_Event_Vector) return String; end MAT.Formats;
Declare the Event function to format an event in a printable short description
Declare the Event function to format an event in a printable short description
Ada
apache-2.0
stcarrez/mat,stcarrez/mat,stcarrez/mat
225ddf74376da5a89f53dbcde8eea57064ecee76
src/gen-commands-distrib.ads
src/gen-commands-distrib.ads
----------------------------------------------------------------------- -- gen-commands-distrib -- Distrib command for dynamo -- Copyright (C) 2012 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- package Gen.Commands.Distrib is -- ------------------------------ -- Distrib Command -- ------------------------------ type Command is new Gen.Commands.Command with null record; -- Execute the command with the arguments. procedure Execute (Cmd : in Command; Generator : in out Gen.Generator.Handler); -- Write the help associated with the command. procedure Help (Cmd : in Command; Generator : in out Gen.Generator.Handler); end Gen.Commands.Distrib;
----------------------------------------------------------------------- -- gen-commands-distrib -- Distrib command for dynamo -- Copyright (C) 2012, 2017 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- package Gen.Commands.Distrib is -- ------------------------------ -- Distrib Command -- ------------------------------ type Command is new Gen.Commands.Command with null record; -- Execute the command with the arguments. overriding procedure Execute (Cmd : in Command; Name : in String; Args : in Argument_List'Class; Generator : in out Gen.Generator.Handler); -- Write the help associated with the command. overriding procedure Help (Cmd : in Command; Generator : in out Gen.Generator.Handler); end Gen.Commands.Distrib;
Update to use the new command implementation
Update to use the new command implementation
Ada
apache-2.0
stcarrez/dynamo,stcarrez/dynamo,stcarrez/dynamo
f16023ad92a6be1cf7665cdc9c6cc44e4b920d21
src/gen-commands.ads
src/gen-commands.ads
----------------------------------------------------------------------- -- gen-commands -- Commands for dynamo -- Copyright (C) 2011, 2012, 2017 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Util.Commands.Drivers; with Gen.Generator; package Gen.Commands is package Drivers is new Util.Commands.Drivers (Context_Type => Gen.Generator.Handler, Driver_Name => "gen-commands"); subtype Command is Drivers.Command_Type; subtype Command_Access is Drivers.Command_Access; subtype Argument_List is Util.Commands.Argument_List; Driver : Drivers.Driver_Type; -- Print dynamo short usage. procedure Short_Help_Usage; end Gen.Commands;
----------------------------------------------------------------------- -- gen-commands -- Commands for dynamo -- Copyright (C) 2011, 2012, 2017, 2018 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Util.Commands.Drivers; with Util.Commands.Parsers; with Gen.Generator; package Gen.Commands is package Drivers is new Util.Commands.Drivers (Context_Type => Gen.Generator.Handler, Config_Parser => Util.Commands.Parsers.No_Parser, Driver_Name => "gen-commands"); subtype Command is Drivers.Command_Type; subtype Command_Access is Drivers.Command_Access; subtype Argument_List is Util.Commands.Argument_List; Driver : Drivers.Driver_Type; -- Print dynamo short usage. procedure Short_Help_Usage; end Gen.Commands;
Update to use the No_Parser for commands
Update to use the No_Parser for commands
Ada
apache-2.0
stcarrez/dynamo,stcarrez/dynamo,stcarrez/dynamo
012dc4bd70fdfd05692dcf8de01d1bb8eefff8cc
awa/plugins/awa-workspaces/src/awa-workspaces.ads
awa/plugins/awa-workspaces/src/awa-workspaces.ads
----------------------------------------------------------------------- -- awa-workspaces -- Module workspaces -- Copyright (C) 2011, 2012 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- -- == Introduction == -- The *workspaces* plugin defines a workspace area for other plugins. -- -- == Data Model == -- @include Workspace.hbm.xml -- package AWA.Workspaces is end AWA.Workspaces;
----------------------------------------------------------------------- -- awa-workspaces -- Module workspaces -- Copyright (C) 2011, 2012 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- -- == Introduction == -- The *workspaces* plugin defines a workspace area for other plugins. -- -- == Ada Beans == -- @include workspaces.xml -- -- == Data Model == -- @include Workspace.hbm.xml -- package AWA.Workspaces is end AWA.Workspaces;
Add the Ada beans in the workspace documentation
Add the Ada beans in the workspace documentation
Ada
apache-2.0
Letractively/ada-awa,tectronics/ada-awa,tectronics/ada-awa,Letractively/ada-awa,tectronics/ada-awa,Letractively/ada-awa
0b34b35ce477b31573529b60f8bf2f4eab3c0138
src/base/beans/util-beans-objects-time.ads
src/base/beans/util-beans-objects-time.ads
----------------------------------------------------------------------- -- Util.Beans.Objects.Time -- Helper conversion for Ada Calendar Time -- Copyright (C) 2010 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Ada.Calendar; package Util.Beans.Objects.Time is -- Create an object from the given value. function To_Object (Value : in Ada.Calendar.Time) return Object; -- Convert the object into a time. -- Raises Constraint_Error if the object cannot be converter to the target type. function To_Time (Value : in Object) return Ada.Calendar.Time; -- Force the object to be a time. function Cast_Time (Value : Object) return Object; end Util.Beans.Objects.Time;
----------------------------------------------------------------------- -- util-beans-objects-time -- Helper conversion for Ada Calendar Time -- Copyright (C) 2010, 2019 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Ada.Calendar; with Util.Nullables; package Util.Beans.Objects.Time is -- Create an object from the given value. function To_Object (Value : in Ada.Calendar.Time) return Object; function To_Object (Value : in Nullables.Nullable_Time) return Object; -- Convert the object into a time. -- Raises Constraint_Error if the object cannot be converter to the target type. function To_Time (Value : in Object) return Ada.Calendar.Time; function To_Time (Value : in Object) return Nullables.Nullable_Time; -- Force the object to be a time. function Cast_Time (Value : Object) return Object; end Util.Beans.Objects.Time;
Add To_Object and To_Time with a Nullable_Time type
Add To_Object and To_Time with a Nullable_Time type
Ada
apache-2.0
stcarrez/ada-util,stcarrez/ada-util
e4ea0b00f0f9deb3c8aca8acce9c64b3ed159280
awa/plugins/awa-tags/src/awa-tags.ads
awa/plugins/awa-tags/src/awa-tags.ads
----------------------------------------------------------------------- -- awa-tags -- Tags management -- Copyright (C) 2013 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- -- == Introduction == -- The <b>Tags</b> module allows to associate general purpose tags to any database entity. -- -- == Model == -- [http://ada-awa.googlecode.com/svn/wiki/awa_tags_model.png] -- -- @include awa-tags-modules.ads package AWA.Tags is pragma Pure; end AWA.Tags;
----------------------------------------------------------------------- -- awa-tags -- Tags management -- Copyright (C) 2013 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- -- == Introduction == -- The <b>Tags</b> module allows to associate general purpose tags to any database entity. -- It provides a JSF component that allows to insert easily a list of tags in a page and -- in a form. An application can use the bean types defined in <tt>AWA.Tags.Beans</tt> -- to define the tags and it will use the <tt>awa:tagList</tt> component to display them. -- -- == Model == -- [http://ada-awa.googlecode.com/svn/wiki/awa_tags_model.png] -- -- @include awa-tags-modules.ads -- @include awa-tags-beans.ads -- @include awa-tags-components.ads -- package AWA.Tags is pragma Pure; end AWA.Tags;
Document the Tags plugin in AWA
Document the Tags plugin in AWA
Ada
apache-2.0
stcarrez/ada-awa,stcarrez/ada-awa,stcarrez/ada-awa,stcarrez/ada-awa
3d649c52302f22085d57e3422b43f295ed936779
src/gen-commands-database.ads
src/gen-commands-database.ads
----------------------------------------------------------------------- -- gen-commands-database -- Database creation from application model -- Copyright (C) 2011 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- package Gen.Commands.Database is -- ------------------------------ -- Database Creation Command -- ------------------------------ -- This command creates the database for the application. type Command is new Gen.Commands.Command with null record; -- Execute the command with the arguments. procedure Execute (Cmd : in Command; Generator : in out Gen.Generator.Handler); -- Write the help associated with the command. procedure Help (Cmd : in Command; Generator : in out Gen.Generator.Handler); end Gen.Commands.Database;
----------------------------------------------------------------------- -- gen-commands-database -- Database creation from application model -- Copyright (C) 2011, 2017 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- package Gen.Commands.Database is -- ------------------------------ -- Database Creation Command -- ------------------------------ -- This command creates the database for the application. type Command is new Gen.Commands.Command with null record; -- Execute the command with the arguments. overriding procedure Execute (Cmd : in Command; Name : in String; Args : in Argument_List'Class; Generator : in out Gen.Generator.Handler); -- Write the help associated with the command. overriding procedure Help (Cmd : in Command; Generator : in out Gen.Generator.Handler); end Gen.Commands.Database;
Update to use the new command implementation
Update to use the new command implementation
Ada
apache-2.0
stcarrez/dynamo,stcarrez/dynamo,stcarrez/dynamo
c44636eef7002c239dde452cab4d5ae3bfc2f16e
src/gen-commands-propset.ads
src/gen-commands-propset.ads
----------------------------------------------------------------------- -- gen-commands-propset -- Set a property on dynamo project -- Copyright (C) 2011 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- package Gen.Commands.Propset is -- ------------------------------ -- Propset Command -- ------------------------------ -- This command sets a property in the dynamo project configuration. type Command is new Gen.Commands.Command with null record; -- Execute the command with the arguments. procedure Execute (Cmd : in Command; Generator : in out Gen.Generator.Handler); -- Write the help associated with the command. procedure Help (Cmd : in Command; Generator : in out Gen.Generator.Handler); end Gen.Commands.Propset;
----------------------------------------------------------------------- -- gen-commands-propset -- Set a property on dynamo project -- Copyright (C) 2011, 2017 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- package Gen.Commands.Propset is -- ------------------------------ -- Propset Command -- ------------------------------ -- This command sets a property in the dynamo project configuration. type Command is new Gen.Commands.Command with null record; -- Execute the command with the arguments. overriding procedure Execute (Cmd : in Command; Name : in String; Args : in Argument_List'Class; Generator : in out Gen.Generator.Handler); -- Write the help associated with the command. overriding procedure Help (Cmd : in Command; Generator : in out Gen.Generator.Handler); end Gen.Commands.Propset;
Update to use the new command implementation
Update to use the new command implementation
Ada
apache-2.0
stcarrez/dynamo,stcarrez/dynamo,stcarrez/dynamo
31f10974b069933e9c0691f9e45d740bc6373484
tools/druss-commands-devices.ads
tools/druss-commands-devices.ads
----------------------------------------------------------------------- -- druss-commands-devices -- Print information about the devices -- Copyright (C) 2017 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- package Druss.Commands.Devices is type Command_Type is new Druss.Commands.Drivers.Command_Type with null record; procedure Do_List (Command : in Command_Type; Args : in Argument_List'Class; Context : in out Context_Type); -- Execute a status command to report information about the Bbox. overriding procedure Execute (Command : in Command_Type; Name : in String; Args : in Argument_List'Class; Context : in out Context_Type); -- Write the help associated with the command. overriding procedure Help (Command : in Command_Type; Context : in out Context_Type); end Druss.Commands.Devices;
----------------------------------------------------------------------- -- druss-commands-devices -- Print information about the devices -- Copyright (C) 2017 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- package Druss.Commands.Devices is type Command_Type is new Druss.Commands.Drivers.Command_Type with null record; procedure Do_List (Command : in Command_Type; Args : in Argument_List'Class; Selector : in Device_Selector_Type; Context : in out Context_Type); -- Execute a status command to report information about the Bbox. overriding procedure Execute (Command : in Command_Type; Name : in String; Args : in Argument_List'Class; Context : in out Context_Type); -- Write the help associated with the command. overriding procedure Help (Command : in Command_Type; Context : in out Context_Type); end Druss.Commands.Devices;
Add a device selector to the Do_List procedure
Add a device selector to the Do_List procedure
Ada
apache-2.0
stcarrez/bbox-ada-api
233b030fe6c6e48276b77d6a35bf0f692b00f325
src/ado-schemas-databases.ads
src/ado-schemas-databases.ads
----------------------------------------------------------------------- -- ado-schemas-databases -- Database creation -- Copyright (C) 2018 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Util.Strings.Vectors; with ADO.Sessions; with ADO.Configs; package ADO.Schemas.Databases is -- Create the database and initialize it with the schema SQL file. procedure Create_Database (Session : in out Sessions.Master_Session; Config : in Configs.Configuration'Class; Schema_Path : in String; Messages : out Util.Strings.Vectors.Vector); end ADO.Schemas.Databases;
----------------------------------------------------------------------- -- ado-schemas-databases -- Database creation -- Copyright (C) 2018 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Util.Strings.Vectors; with ADO.Sessions.Sources; package ADO.Schemas.Databases is -- Create the database and initialize it with the schema SQL file. -- The `Admin` parameter describes the database connection with administrator access. -- The `Config` parameter describes the target database connection: this is the -- database that must be created and configured. The `Schema_Path` is the path -- of the SQL file that can be used to populate the database with the schema. -- The `Messages` vector will contain the messages produced during the setup and -- configuration of the database. -- -- For the `sqlite` driver, the `Admin` parameter is not used. procedure Create_Database (Admin : in ADO.Sessions.Sources.Data_Source'Class; Config : in ADO.Sessions.Sources.Data_Source'Class; Schema_Path : in String; Messages : out Util.Strings.Vectors.Vector); end ADO.Schemas.Databases;
Update the Create_Database to use a Data_Source as configuration parameters
Update the Create_Database to use a Data_Source as configuration parameters
Ada
apache-2.0
stcarrez/ada-ado
9496af418a57a78692fc1585c2cf4c2e2ca201a3
resources/scripts/api/gitlab.ads
resources/scripts/api/gitlab.ads
-- Copyright 2021 Jeff Foley. All rights reserved. -- Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. name = "GitLab" type = "api" function start() set_rate_limit(1) end function check() local c local cfg = datasrc_config() if cfg ~= nil then c = cfg.credentials end if (c ~= nil and c.key ~= nil and c.key ~= "") then return true end return false end function vertical(ctx, domain) local c local cfg = datasrc_config() if cfg ~= nil then c = cfg.credentials end if (c == nil or c.key == nil or c.key == "") then return end local scopes = {"issues", "blobs", "notes"} for _, s in pairs(scopes) do scrape(ctx, { url=build_url(domain, s), headers={['PRIVATE-TOKEN']=c.key}, }) end end function build_url(domain, scope) return "https://gitlab.com/api/v4/search?scope=" .. scope .. "&search=" .. domain end
-- Copyright 2021 Jeff Foley. All rights reserved. -- Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. name = "GitLab" type = "api" function start() set_rate_limit(1) end function check() local c local cfg = datasrc_config() if cfg ~= nil then c = cfg.credentials end if (c ~= nil and c.key ~= nil and c.key ~= "") then return true end return false end function vertical(ctx, domain) local c local cfg = datasrc_config() if cfg ~= nil then c = cfg.credentials end if (c == nil or c.key == nil or c.key == "") then return end local scopes = {"issues", "blobs", "notes"} for _, s in pairs(scopes) do scrape(ctx, { url=build_url(domain, s), headers={['PRIVATE-TOKEN']=c.key}, }) end end function build_url(domain, scope) return "https://gitlab.com/api/v4/search?scope=" .. scope .. "&search=" .. domain:gsub("%.", "[.]") end
Fix Gitlab data source script
Fix Gitlab data source script
Ada
apache-2.0
caffix/amass,caffix/amass
f8c0c5014e96fbeb001cb9d3e00e4f695ca9a456
ibv_message_passing_ada_project/source/coverage_for_ada_task/coverage_for_ada_task.adb
ibv_message_passing_ada_project/source/coverage_for_ada_task/coverage_for_ada_task.adb
-- @file coverage_for_ada_task.adb -- @date 28 May 2022 -- @author Chester Gillon -- @brief Example program to test getting coverage for an Ada task with Ada.Text_IO; procedure Coverage_For_Ada_Task is task Print_Task is entry Print; end Print_Task; task body Print_Task is begin loop select accept Print do Ada.Text_IO.Put_Line ("In task Print_Task"); end Print; or terminate; end select; end loop; end Print_Task; begin for index in 1..3 loop Print_Task.Print; end loop; Ada.Text_IO.Put_Line ("In main"); end Coverage_For_Ada_Task;
-- @file coverage_for_ada_task.adb -- @date 28 May 2022 -- @author Chester Gillon -- @brief Example program to test getting coverage for an Ada task with Ada.Text_IO; procedure Coverage_For_Ada_Task is generic Name : String; package Generic_Name is procedure Display_Name; end Generic_Name; package body Generic_Name is procedure Display_Name is begin Ada.Text_IO.Put_Line ("My name is " & Name); end Display_Name; end Generic_Name; task Print_Task is entry Print; end Print_Task; task body Print_Task is begin loop select accept Print do Ada.Text_IO.Put_Line ("In task Print_Task"); end Print; or terminate; end select; end loop; end Print_Task; package Package_A is new Generic_Name ("A"); package Package_B is new Generic_Name ("B"); begin Package_A.Display_Name; for index in 1..3 loop Print_Task.Print; end loop; Package_B.Display_Name; Ada.Text_IO.Put_Line ("In main"); end Coverage_For_Ada_Task;
Add coverage test for simple generic package
Add coverage test for simple generic package
Ada
mit
Chester-Gillon/ibv_message_passing,Chester-Gillon/ibv_message_passing,Chester-Gillon/ibv_message_passing
26441e9cc26bebfa7c85b0711f59facb415ba5fd
t0032.adb
t0032.adb
-- t0032.adb - Tue Jan 14 20:20:46 2014 -- -- (c) Warren W. Gay VE3WWG [email protected] -- -- Protected under the following license: -- GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 with Ada.Text_IO; with Posix; use Posix; procedure T0032 is use Ada.Text_IO; Res : s_rusage; Error : errno_t; pragma Volatile(Error); begin Put_Line("Test 0032 - Getrlimit/Setrlimit"); Error := 0; for X in 0..999999 loop if Error < 32000 then Error := Error + 1; else Error := 0; end if; end loop; Getrusage(RUSAGE_SELF,Res,Error); pragma Assert(Error = 0); pragma Assert(Res.ru_utime.tv_sec >= 0); pragma Assert(Res.ru_utime.tv_usec > 0 or else Res.ru_utime.tv_sec > 0); Put_Line("Test 0032 Passed."); end T0032;
-- t0032.adb - Tue Jan 14 20:20:46 2014 -- -- (c) Warren W. Gay VE3WWG [email protected] -- -- Protected under the following license: -- GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 with Ada.Text_IO; with Posix; use Posix; procedure T0032 is use Ada.Text_IO; Res : s_rusage; Error : errno_t; pragma Volatile(Error); begin Put_Line("Test 0032 - Getrlimit/Setrlimit"); Error := 0; for X in 0..9999999 loop if Error < 32000 then Error := Error + 1; else Error := 0; end if; end loop; Getrusage(RUSAGE_SELF,Res,Error); pragma Assert(Error = 0); pragma Assert(Res.ru_utime.tv_sec >= 0); pragma Assert(Res.ru_utime.tv_usec > 0 or else Res.ru_utime.tv_sec > 0); Put_Line("Test 0032 Passed."); end T0032;
Increase loop for FreeBSD test
Increase loop for FreeBSD test
Ada
lgpl-2.1
ve3wwg/adafpx,ve3wwg/adafpx
8548eca4d803a079f89ee0a0249108b48f800e74
src/asf-security.ads
src/asf-security.ads
----------------------------------------------------------------------- -- asf-security -- ASF Security -- Copyright (C) 2012 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with EL.Functions; package ASF.Security is -- EL function name exposed by Set_Functions. HAS_PERMISSION_FN : constant String := "hasPermission"; -- URI for the EL functions exposed by the security package (See Set_Functions). AUTH_NAMESPACE_URI : constant String := "http://code.google.com/p/ada-asf/auth"; -- Register a set of functions in the namespace -- xmlns:fn="http://code.google.com/p/ada-asf/auth" -- Functions: -- hasPermission(NAME) -- Returns True if the permission NAME is granted procedure Set_Functions (Mapper : in out EL.Functions.Function_Mapper'Class); end ASF.Security;
----------------------------------------------------------------------- -- asf-security -- ASF Security -- Copyright (C) 2012 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with EL.Functions; package ASF.Security is -- EL function name exposed by Set_Functions. HAS_PERMISSION_FN : constant String := "hasPermission"; -- URI for the EL functions exposed by the security package (See Set_Functions). AUTH_NAMESPACE_URI : constant String := "http://code.google.com/p/ada-asf/auth"; -- Register a set of functions in the namespace -- xmlns:fn="http://code.google.com/p/ada-asf/auth" -- Functions: -- hasPermission(NAME) -- Returns True if the permission NAME is granted procedure Set_Functions (Mapper : in out EL.Functions.Function_Mapper'Class); end ASF.Security;
Package ASF.Security moved to Servlet.Security
Package ASF.Security moved to Servlet.Security
Ada
apache-2.0
stcarrez/ada-asf,stcarrez/ada-asf,stcarrez/ada-asf
6f371af13a8ba870eee9b1ad5c3b256adc39e763
awa/plugins/awa-blogs/src/awa-blogs.ads
awa/plugins/awa-blogs/src/awa-blogs.ads
----------------------------------------------------------------------- -- awa-blogs -- Blogs module -- Copyright (C) 2011 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- -- == Introduction == -- The *blogs* plugin is a small blog application which allows users to publish articles. -- -- @include blogs.xml -- -- == Model == -- [http://ada-awa.googlecode.com/svn/wiki/awa_blogs_model.png] -- -- @include Blog.hbm.xml -- package AWA.Blogs is end AWA.Blogs;
----------------------------------------------------------------------- -- awa-blogs -- Blogs module -- Copyright (C) 2011 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- -- == Introduction == -- The *blogs* plugin is a small blog application which allows users to publish articles. -- -- == Ada Beans == -- @include blogs.xml -- -- == Queries == -- @include blog-admin-post-list.xml -- @include blog-post-list.xml -- @include blog-list.xml -- -- == Model == -- [http://ada-awa.googlecode.com/svn/wiki/awa_blogs_model.png] -- -- @include Blog.hbm.xml -- package AWA.Blogs is end AWA.Blogs;
Add the specific queries and Ada beans in the documentation
Add the specific queries and Ada beans in the documentation
Ada
apache-2.0
stcarrez/ada-awa,stcarrez/ada-awa,stcarrez/ada-awa,stcarrez/ada-awa
e9f4160d35e7a5cc739ee49b7040ae1091f9d007
awa/plugins/awa-blogs/src/awa-blogs.ads
awa/plugins/awa-blogs/src/awa-blogs.ads
----------------------------------------------------------------------- -- awa-blogs -- Blogs module -- Copyright (C) 2011 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- -- == Introduction == -- The *blogs* plugin is a small blog application which allows users to publish articles. -- -- @include blogs.xml -- -- == Model == -- [http://ada-awa.googlecode.com/svn/wiki/awa_blogs_model.png] -- -- @include Blog.hbm.xml -- package AWA.Blogs is end AWA.Blogs;
----------------------------------------------------------------------- -- awa-blogs -- Blogs module -- Copyright (C) 2011 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- -- == Introduction == -- The *blogs* plugin is a small blog application which allows users to publish articles. -- -- == Ada Beans == -- @include blogs.xml -- -- == Queries == -- @include blog-admin-post-list.xml -- @include blog-post-list.xml -- @include blog-list.xml -- -- == Model == -- [http://ada-awa.googlecode.com/svn/wiki/awa_blogs_model.png] -- -- @include Blog.hbm.xml -- package AWA.Blogs is end AWA.Blogs;
Add the specific queries and Ada beans in the documentation
Add the specific queries and Ada beans in the documentation
Ada
apache-2.0
tectronics/ada-awa,Letractively/ada-awa,Letractively/ada-awa,tectronics/ada-awa,tectronics/ada-awa,Letractively/ada-awa
2833042551b4031f930f280c89dbaf1695ec0359
awa/plugins/awa-storages/src/awa-storages.ads
awa/plugins/awa-storages/src/awa-storages.ads
----------------------------------------------------------------------- -- awa-storages -- Storage module -- Copyright (C) 2012 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- -- == Introduction == -- The <b>Storages</b> module provides a set of storage services allowing an application -- to store data files, documents, images in a persistent area. -- -- == Data Model == -- @include Storages.hbm.xml package AWA.Storages is end AWA.Storages;
----------------------------------------------------------------------- -- awa-storages -- Storage module -- Copyright (C) 2012 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- -- == Introduction == -- The <b>Storages</b> module provides a set of storage services allowing an application -- to store data files, documents, images in a persistent area. -- -- == Ada Beans == -- @include storages.xml -- -- == Data Model == -- @include Storages.hbm.xml package AWA.Storages is end AWA.Storages;
Add the Ada beans in the Storages plugin documentation
Add the Ada beans in the Storages plugin documentation
Ada
apache-2.0
Letractively/ada-awa,Letractively/ada-awa,tectronics/ada-awa,tectronics/ada-awa,Letractively/ada-awa,tectronics/ada-awa
2efb5be733d8c5694781fd4c0e47520d141a1f41
tools/druss-commands-wifi.ads
tools/druss-commands-wifi.ads
----------------------------------------------------------------------- -- druss-commands-wifi -- Wifi related commands -- Copyright (C) 2017 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- package Druss.Commands.Wifi is type Command_Type is new Druss.Commands.Drivers.Command_Type with null record; -- Execute a command to control or get status about the Wifi. overriding procedure Execute (Command : in Command_Type; Name : in String; Args : in Argument_List'Class; Context : in out Context_Type); -- Write the help associated with the command. overriding procedure Help (Command : in Command_Type; Context : in out Context_Type); end Druss.Commands.Wifi;
----------------------------------------------------------------------- -- druss-commands-wifi -- Wifi related commands -- Copyright (C) 2017 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- package Druss.Commands.Wifi is type Command_Type is new Druss.Commands.Drivers.Command_Type with null record; -- Enable or disable with wifi radio. procedure Set_Enable (Command : in Command_Type; Args : in Argument_List'Class; Value : in String; Context : in out Context_Type); -- Execute the wifi 'status' command to print the Wifi current status. procedure Do_Status (Command : in Command_Type; Args : in Argument_List'Class; Context : in out Context_Type); -- Execute a command to control or get status about the Wifi. overriding procedure Execute (Command : in Command_Type; Name : in String; Args : in Argument_List'Class; Context : in out Context_Type); -- Write the help associated with the command. overriding procedure Help (Command : in Command_Type; Context : in out Context_Type); end Druss.Commands.Wifi;
Declare the Set_Enable and Do_Status operations
Declare the Set_Enable and Do_Status operations
Ada
apache-2.0
stcarrez/bbox-ada-api
9772acdb4718191e696148306a9a5e4b81382403
test/FrontendAda/negative_field_offset.adb
test/FrontendAda/negative_field_offset.adb
-- RUN: %llvmgcc -c %s with System; procedure Negative_Field_Offset (N : Integer) is type String_Pointer is access String; -- Force use of a thin pointer. for String_Pointer'Size use System.Word_Size; P : String_Pointer; begin P := new String (1 .. N); end;
-- RUN: %llvmgcc -c %s with System; procedure Negative_Field_Offset (N : Integer) is type String_Pointer is access String; -- Force use of a thin pointer. for String_Pointer'Size use System.Word_Size; P : String_Pointer; procedure Q (P : String_Pointer) is begin P (1) := 'Z'; end; begin P := new String (1 .. N); Q (P); end;
Check that accessing a struct field that occurs before the start of the struct (!) works correctly.
Check that accessing a struct field that occurs before the start of the struct (!) works correctly. git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@84853 91177308-0d34-0410-b5e6-96231b3b80d8
Ada
bsd-2-clause
dslab-epfl/asap,dslab-epfl/asap,dslab-epfl/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,chubbymaggie/asap,apple/swift-llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,apple/swift-llvm,dslab-epfl/asap,apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,chubbymaggie/asap,chubbymaggie/asap,llvm-mirror/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,chubbymaggie/asap,llvm-mirror/llvm,apple/swift-llvm,apple/swift-llvm,llvm-mirror/llvm,chubbymaggie/asap,chubbymaggie/asap,apple/swift-llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,dslab-epfl/asap,llvm-mirror/llvm
8418a148e1b87f0a87e6771384069b20b3ad4866
src/security.ads
src/security.ads
----------------------------------------------------------------------- -- security -- Security -- Copyright (C) 2010, 2011, 2012 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- -- == Introduction == -- -- -- @include security-contexts.ads -- @include security-controllers.ads package Security is end Security;
----------------------------------------------------------------------- -- security -- Security -- Copyright (C) 2010, 2011, 2012 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- -- == Introduction == -- The <tt>Security</tt> package provides security frameworks that allows -- an application to use OpenID or OAuth security frameworks. This security -- framework was first developed within the Ada Server Faces project. -- -- @include security-permissions.ads -- @include security-openid.ads -- @include security-oauth.ads -- @include security-contexts.ads -- @include security-controllers.ads package Security is end Security;
Add the permission in the documentation
Add the permission in the documentation
Ada
apache-2.0
Letractively/ada-security
0323d352d90970d5a86901fd42cf1cf0010eb12c
examples/usart_interruptive_echo/src/main.adb
examples/usart_interruptive_echo/src/main.adb
#if MCU="ATMEGA2560" then with AVR.USART; with AVR.INTERRUPTS; #end if; procedure Main is -- Out_Flag_Char : Character; begin #if MCU="ATMEGA2560" then AVR.INTERRUPTS.Disable; AVR.USART.Initialize (In_Port => AVR.USART.USART1, In_Setup => (Sync_Mode => AVR.USART.ASYNCHRONOUS, Double_Speed => True, Baud_Rate => 9600, Data_Bits => AVR.USART.BITS_8, Parity => AVR.USART.NONE, Stop_Bits => 1, Model => AVR.USART.INTERRUPTIVE)); AVR.USART.Put_Line (Port => AVR.USART.USART1, Data => "#### Initialization ok. ####"); AVR.INTERRUPTS.Enable; loop -- Out_Flag_Char := AVR.USART.Get; -- AVR.USART.Put -- (Port => AVR.USART.USART1, -- Data => Out_Flag_Char); null; end loop; #else null; #end if; end Main;
#if MCU="ATMEGA2560" then with AVR.USART; with AVR.INTERRUPTS; #end if; procedure Main is Counter : Long_Integer := 0; Out_Buffer : AVR.USART.Buffer_64_Type; begin #if MCU="ATMEGA2560" then AVR.INTERRUPTS.Disable; AVR.USART.Initialize (In_Port => AVR.USART.USART1, In_Setup => (Sync_Mode => AVR.USART.ASYNCHRONOUS, Double_Speed => True, Baud_Rate => 9600, Data_Bits => AVR.USART.BITS_8, Parity => AVR.USART.NONE, Stop_Bits => 1, Model => AVR.USART.INTERRUPTIVE)); AVR.USART.Put_Line (Port => AVR.USART.USART1, Data => "#### Initialization ok. ####"); AVR.INTERRUPTS.Enable; loop Counter := Counter + 1; if AVR.USART.Get_Raw_Buffer (In_Port => AVR.USART.USART1, Out_Data => Out_Buffer) then AVR.USART.Put_Buffer (In_Port => AVR.USART.USART1); end if; end loop; #else null; #end if; end Main;
Read from usart1 in interruptive mode.
Read from usart1 in interruptive mode.
Ada
mit
pvrego/adaino,pvrego/adaino
9c2ffadf3fb29c01739edc1509e3cb45a0dedd73
src/babel-base.ads
src/babel-base.ads
----------------------------------------------------------------------- -- babel-base -- File filters -- Copyright (C) 2014 Stephane.Carrez -- Written by Stephane.Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- package Babel.Base is end Babel.Base;
----------------------------------------------------------------------- -- babel-base -- Database for files -- Copyright (C) 2014 Stephane.Carrez -- Written by Stephane.Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Ada.Finalization; with ADO; package Babel.Base is type Database is abstract new Ada.Finalization.Limited_Controlled with private; private type Database is abstract new Ada.Finalization.Limited_Controlled with record Name : Integer; end record; end Babel.Base;
Define the abstract Database type to represent the database of backup files
Define the abstract Database type to represent the database of backup files
Ada
apache-2.0
stcarrez/babel
b8d99d444be9277ac70b052bc3f94fc20e4bcfe5
awa/awaunit/awa-tests-helpers.ads
awa/awaunit/awa-tests-helpers.ads
----------------------------------------------------------------------- -- awa-tests-helpers - Helpers for AWA unit tests -- Copyright (C) 2011, 2017 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with ASF.Responses.Mockup; with Ada.Strings.Unbounded; package AWA.Tests.Helpers is -- Extract from the Location header the part that is after the given base string. -- If the Location header does not start with the base string, returns the empty -- string. function Extract_Redirect (Reply : in ASF.Responses.Mockup.Response'Class; Base : in String) return String; function Extract_Redirect (Reply : in ASF.Responses.Mockup.Response'Class; Base : in String) return Ada.Strings.Unbounded.Unbounded_String; end AWA.Tests.Helpers;
----------------------------------------------------------------------- -- awa-tests-helpers - Helpers for AWA unit tests -- Copyright (C) 2011, 2017 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with ASF.Responses.Mockup; with Ada.Strings.Unbounded; package AWA.Tests.Helpers is -- Extract from the Location header the part that is after the given base string. -- If the Location header does not start with the base string, returns the empty -- string. function Extract_Redirect (Reply : in ASF.Responses.Mockup.Response'Class; Base : in String) return String; function Extract_Redirect (Reply : in ASF.Responses.Mockup.Response'Class; Base : in String) return Ada.Strings.Unbounded.Unbounded_String; -- Extract from the response content a link with a given title. function Extract_Link (Content : in String; Title : in String) return String; end AWA.Tests.Helpers;
Declare the Extract_Link function to extract a href from a HTML response
Declare the Extract_Link function to extract a href from a HTML response
Ada
apache-2.0
stcarrez/ada-awa,stcarrez/ada-awa,stcarrez/ada-awa,stcarrez/ada-awa
74f4071f8cacf6671e0387d5beaa133e5b7a2927
src/asf-components-ajax-factory.ads
src/asf-components-ajax-factory.ads
----------------------------------------------------------------------- -- components-ajax-factory -- Factory for AJAX Components -- Copyright (C) 2011 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with ASF.Factory; package ASF.Components.Ajax.Factory is use ASF; -- Get the Ajax component factory. function Definition return ASF.Factory.Factory_Bindings_Access; end ASF.Components.Ajax.Factory;
----------------------------------------------------------------------- -- components-ajax-factory -- Factory for AJAX Components -- Copyright (C) 2011, 2018 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with ASF.Factory; package ASF.Components.Ajax.Factory is -- Register the Ajax component factory. procedure Register (Factory : in out ASF.Factory.Component_Factory); end ASF.Components.Ajax.Factory;
Change the Definition function into a Register procedure
Change the Definition function into a Register procedure
Ada
apache-2.0
stcarrez/ada-asf,stcarrez/ada-asf,stcarrez/ada-asf
a54ef28f1ba98cadc3572310adf2884a2aeb59c1
awa/plugins/awa-votes/regtests/awa-votes-modules-tests.ads
awa/plugins/awa-votes/regtests/awa-votes-modules-tests.ads
----------------------------------------------------------------------- -- awa-votes-modules-tests -- Unit tests for vote service -- Copyright (C) 2013 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Util.Tests; with AWA.Tests; package AWA.Votes.Modules.Tests is procedure Add_Tests (Suite : in Util.Tests.Access_Test_Suite); type Test is new AWA.Tests.Test with record Manager : AWA.Votes.Modules.Vote_Module_Access; end record; -- Test vote. procedure Test_Vote_Up (T : in out Test); end AWA.Votes.Modules.Tests;
----------------------------------------------------------------------- -- awa-votes-modules-tests -- Unit tests for vote service -- Copyright (C) 2013 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Util.Tests; with AWA.Tests; package AWA.Votes.Modules.Tests is procedure Add_Tests (Suite : in Util.Tests.Access_Test_Suite); type Test is new AWA.Tests.Test with record Manager : AWA.Votes.Modules.Vote_Module_Access; end record; -- Test vote. procedure Test_Vote_Up (T : in out Test); -- Test vote. procedure Test_Vote_Undo (T : in out Test); end AWA.Votes.Modules.Tests;
Add unit test for undo vote
Add unit test for undo vote
Ada
apache-2.0
stcarrez/ada-awa,stcarrez/ada-awa,stcarrez/ada-awa,stcarrez/ada-awa
1a999614af4680bd7f6db1b7b5ba4bc669740872
mat/src/mat-targets.ads
mat/src/mat-targets.ads
----------------------------------------------------------------------- -- Targets - Representation of target information -- Copyright (C) 2014 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with MAT.Types; with Ada.Strings.Unbounded; with MAT.Memory.Targets; with MAT.Readers; package MAT.Targets is type Target_Type is tagged limited private; type Target_Type_Access is access all Target_Type'Class; -- Initialize the target object to manage the memory slots, the stack frames -- and setup the reader to analyze the memory and other events. procedure Initialize (Target : in out Target_Type; Reader : in out MAT.Readers.Manager_Base'Class); private type Target_Type is tagged limited record Memory : MAT.Memory.Targets.Target_Memory; end record; end MAT.Targets;
----------------------------------------------------------------------- -- Targets - Representation of target information -- Copyright (C) 2014 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with MAT.Types; with Ada.Strings.Unbounded; with MAT.Memory.Targets; with MAT.Symbols.Targets; with MAT.Readers; package MAT.Targets is -- type Target_Type is tagged limited private; type Target_Type is tagged limited record Memory : MAT.Memory.Targets.Target_Memory; Symbols : MAT.Symbols.Targets.Target_Symbols; end record; type Target_Type_Access is access all Target_Type'Class; -- Initialize the target object to manage the memory slots, the stack frames -- and setup the reader to analyze the memory and other events. procedure Initialize (Target : in out Target_Type; Reader : in out MAT.Readers.Manager_Base'Class); -- -- private -- -- type Target_Type is tagged limited record -- Memory : MAT.Memory.Targets.Target_Memory; -- end record; end MAT.Targets;
Add the symbols in the target object
Add the symbols in the target object
Ada
apache-2.0
stcarrez/mat,stcarrez/mat,stcarrez/mat
955ee4407f9d071729cf67278695300e06262722
regtests/util-streams-tests.ads
regtests/util-streams-tests.ads
----------------------------------------------------------------------- -- util-streams-tests -- Unit tests for encoding buffered streams -- Copyright (C) 2017, 2019 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Util.Tests; with Util.Encoders.AES; package Util.Streams.Tests is procedure Add_Tests (Suite : in Util.Tests.Access_Test_Suite); type Test is new Util.Tests.Test with null record; procedure Test_AES (T : in out Test; Item : in String; Count : in Positive; Mode : in Util.Encoders.AES.AES_Mode; Label : in String); procedure Test_Base64_Stream (T : in out Test); end Util.Streams.Tests;
----------------------------------------------------------------------- -- util-streams-tests -- Unit tests for encoding buffered streams -- Copyright (C) 2017, 2019, 2021 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Util.Tests; with Util.Encoders.AES; package Util.Streams.Tests is procedure Add_Tests (Suite : in Util.Tests.Access_Test_Suite); type Test is new Util.Tests.Test with null record; procedure Test_AES (T : in out Test; Item : in String; Count : in Positive; Mode : in Util.Encoders.AES.AES_Mode; Label : in String); procedure Test_Base64_Stream (T : in out Test); procedure Test_Copy_Stream (T : in out Test); end Util.Streams.Tests;
Declare the Test_Copy_Stream procedure to test the Util.Streams.Copy procedures
Declare the Test_Copy_Stream procedure to test the Util.Streams.Copy procedures
Ada
apache-2.0
stcarrez/ada-util,stcarrez/ada-util
d603fd0bb2519543a4f128dde437863325ef1c66
awa/plugins/awa-counters/src/awa-counters-definition.ads
awa/plugins/awa-counters/src/awa-counters-definition.ads
----------------------------------------------------------------------- -- awa-counters-definition -- Counter definition -- Copyright (C) 2015 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- -- The <tt>AWA.Counters.Definition</tt> package is instantiated for each counter definition. generic Table : ADO.Schemas.Class_Mapping_Access; Field : String; package AWA.Counters.Definition is Def_Name : aliased constant String := Field; package Def is new Counter_Arrays.Definition (Counter_Def '(Table, Def_Name'Access)); -- Get the counter definition index. function Index return Counter_Index_Type renames Def.Kind; end AWA.Counters.Definition;
----------------------------------------------------------------------- -- awa-counters-definition -- Counter definition -- Copyright (C) 2015 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- -- The <tt>AWA.Counters.Definition</tt> package is instantiated for each counter definition. generic Table : ADO.Schemas.Class_Mapping_Access; Field : String; package AWA.Counters.Definition is Def_Name : aliased constant String := Field; -- Get the counter definition index. function Index return Counter_Index_Type; private package Def is new Counter_Arrays.Definition (Counter_Def '(Table, Def_Name'Access)); -- Get the counter definition index. function Index return Counter_Index_Type renames Def.Kind; end AWA.Counters.Definition;
Move the Counter_Arrays.Definition package instantiation in the private part
Move the Counter_Arrays.Definition package instantiation in the private part
Ada
apache-2.0
stcarrez/ada-awa,stcarrez/ada-awa,stcarrez/ada-awa,stcarrez/ada-awa
44c319c4ab59e5dabc029a4f187256e6484f58d9
src/sqlite/ado-sqlite.adb
src/sqlite/ado-sqlite.adb
----------------------------------------------------------------------- -- ado-sqlite -- SQLite Database Drivers -- Copyright (C) 2019 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with ADO.Configs; with ADO.Connections.Sqlite; package body ADO.Sqlite is -- ------------------------------ -- Initialize the drivers and the library by reading the property file -- and configure the runtime with it. -- ------------------------------ procedure Initialize (Config : in String) is begin ADO.Configs.Initialize (Config); ADO.Connections.Sqlite.Initialize; end Initialize; -- ------------------------------ -- Initialize the drivers and the library and configure the runtime with the given properties. -- ------------------------------ procedure Initialize (Config : in Util.Properties.Manager'Class) is begin ADO.Configs.Initialize (Config); ADO.Connections.Sqlite.Initialize; end Initialize; end ADO.Sqlite;
----------------------------------------------------------------------- -- ado-sqlite -- SQLite Database Drivers -- Copyright (C) 2019 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with ADO.Configs; with ADO.Connections.Sqlite; package body ADO.Sqlite is -- ------------------------------ -- Initialize the SQLite driver. -- ------------------------------ procedure Initialize is begin ADO.Connections.Sqlite.Initialize; end Initialize; -- ------------------------------ -- Initialize the drivers and the library by reading the property file -- and configure the runtime with it. -- ------------------------------ procedure Initialize (Config : in String) is begin ADO.Configs.Initialize (Config); Initialize; end Initialize; -- ------------------------------ -- Initialize the drivers and the library and configure the runtime with the given properties. -- ------------------------------ procedure Initialize (Config : in Util.Properties.Manager'Class) is begin ADO.Configs.Initialize (Config); Initialize; end Initialize; end ADO.Sqlite;
Implement the Initialize procedure and use it
Implement the Initialize procedure and use it
Ada
apache-2.0
stcarrez/ada-ado
8c5858c3859a982abaed7ea3b2aebe1e92667ad1
src/babel-base.ads
src/babel-base.ads
----------------------------------------------------------------------- -- babel-base -- Database for files -- Copyright (C) 2014 Stephane.Carrez -- Written by Stephane.Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Ada.Finalization; with ADO; with Babel.Files; package Babel.Base is type Database is abstract new Ada.Finalization.Limited_Controlled with private; type Database_Access is access all Database'Class; -- Insert the file in the database. procedure Insert (Into : in out Database; File : in Babel.Files.File_Type) is abstract; private type Database is abstract new Ada.Finalization.Limited_Controlled with record Name : Integer; end record; end Babel.Base;
----------------------------------------------------------------------- -- babel-base -- Database for files -- Copyright (C) 2014 Stephane.Carrez -- Written by Stephane.Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Ada.Finalization; with ADO; with Babel.Files; package Babel.Base is type Database is abstract new Ada.Finalization.Limited_Controlled with private; type Database_Access is access all Database'Class; -- Insert the file in the database. procedure Insert (Into : in out Database; File : in Babel.Files.File_Type) is abstract; procedure Iterate (From : in Database; Process : not null access procedure (File : in Babel.Files.File_Type)) is abstract; procedure Copy (Into : in out Database'Class; From : in Database'Class); private type Database is abstract new Ada.Finalization.Limited_Controlled with record Name : Integer; end record; end Babel.Base;
Declare the Iterate and Copy procedures
Declare the Iterate and Copy procedures
Ada
apache-2.0
stcarrez/babel
ec9594bdf26c1d6a71b30dd376f746f0d3999a6f
src/gen-commands-model.ads
src/gen-commands-model.ads
----------------------------------------------------------------------- -- gen-commands-model -- Model creation command for dynamo -- Copyright (C) 2011 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- package Gen.Commands.Model is -- ------------------------------ -- Model Creation Command -- ------------------------------ -- This command adds a model file to the web application. type Command is new Gen.Commands.Command with null record; -- Execute the command with the arguments. procedure Execute (Cmd : in Command; Generator : in out Gen.Generator.Handler); -- Write the help associated with the command. procedure Help (Cmd : in Command; Generator : in out Gen.Generator.Handler); end Gen.Commands.Model;
----------------------------------------------------------------------- -- gen-commands-model -- Model creation command for dynamo -- Copyright (C) 2011, 2017 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- package Gen.Commands.Model is -- ------------------------------ -- Model Creation Command -- ------------------------------ -- This command adds a model file to the web application. type Command is new Gen.Commands.Command with null record; -- Execute the command with the arguments. overriding procedure Execute (Cmd : in Command; Name : in String; Args : in Argument_List'Class; Generator : in out Gen.Generator.Handler); -- Write the help associated with the command. overriding procedure Help (Cmd : in Command; Generator : in out Gen.Generator.Handler); end Gen.Commands.Model;
Update to use the new command implementation
Update to use the new command implementation
Ada
apache-2.0
stcarrez/dynamo,stcarrez/dynamo,stcarrez/dynamo
ee209a391c4829f918c315179d01e778235a93c1
regtests/ado-schemas-tests.ads
regtests/ado-schemas-tests.ads
----------------------------------------------------------------------- -- schemas Tests -- Test loading of database schema -- Copyright (C) 2009, 2010, 2011, 2015 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Util.Tests; package ADO.Schemas.Tests is procedure Add_Tests (Suite : in Util.Tests.Access_Test_Suite); type Test is new Util.Tests.Test with null record; -- Test reading the entity cache and the Find_Entity_Type operation procedure Test_Find_Entity_Type (T : in out Test); -- Test calling Find_Entity_Type with an invalid table. procedure Test_Find_Entity_Type_Error (T : in out Test); -- Test the Load_Schema operation and check the result schema. procedure Test_Load_Schema (T : in out Test); end ADO.Schemas.Tests;
----------------------------------------------------------------------- -- schemas Tests -- Test loading of database schema -- Copyright (C) 2009, 2010, 2011, 2015 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Util.Tests; package ADO.Schemas.Tests is procedure Add_Tests (Suite : in Util.Tests.Access_Test_Suite); type Test is new Util.Tests.Test with null record; -- Test reading the entity cache and the Find_Entity_Type operation procedure Test_Find_Entity_Type (T : in out Test); -- Test calling Find_Entity_Type with an invalid table. procedure Test_Find_Entity_Type_Error (T : in out Test); -- Test the Load_Schema operation and check the result schema. procedure Test_Load_Schema (T : in out Test); -- Test the Table_Cursor operations and check the result schema. procedure Test_Table_Iterator (T : in out Test); end ADO.Schemas.Tests;
Declare Test_Table_Iterator procedure to test the table iterator
Declare Test_Table_Iterator procedure to test the table iterator
Ada
apache-2.0
stcarrez/ada-ado
ce0281f49c4ba2ddb05804df0431a5489107284d
src/asf-streams-json.adb
src/asf-streams-json.adb
----------------------------------------------------------------------- -- asf-streams-json -- JSON Print streams for servlets -- Copyright (C) 2016 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Util.Serialize.IO.JSON; package body ASF.Streams.JSON is -- ------------------------------ -- Initialize the stream -- ------------------------------ procedure Initialize (Stream : in out Print_Stream; To : in ASF.Streams.Print_Stream'Class) is begin Stream.Initialize (To.Target); end Initialize; end ASF.Streams.JSON;
----------------------------------------------------------------------- -- asf-streams-json -- JSON Print streams for servlets -- Copyright (C) 2016, 2017 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- package body ASF.Streams.JSON is -- ------------------------------ -- Initialize the stream -- ------------------------------ procedure Initialize (Stream : in out Print_Stream; To : in ASF.Streams.Print_Stream'Class) is begin Stream.Initialize (To.Target); end Initialize; end ASF.Streams.JSON;
Remove unused with clause Util.Serialize.IO.JSON
Remove unused with clause Util.Serialize.IO.JSON
Ada
apache-2.0
stcarrez/ada-asf,stcarrez/ada-asf,stcarrez/ada-asf
6b2e3a8e9276050f46a5425823a8ed39f3747f91
tools/druss-config.ads
tools/druss-config.ads
----------------------------------------------------------------------- -- druss-config -- Configuration management for Druss -- Copyright (C) 2017 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Util.Properties; with Druss.Gateways; package Druss.Config is -- Initialize the configuration. procedure Initialize; -- Get the configuration parameter. function Get (Name : in String) return String; -- Initalize the list of gateways from the configuration file. procedure Get_Gateways (List : in out Druss.Gateways.Gateway_Vector); end Druss.Config;
----------------------------------------------------------------------- -- druss-config -- Configuration management for Druss -- Copyright (C) 2017 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Druss.Gateways; package Druss.Config is -- Initialize the configuration. procedure Initialize (Path : in String); -- Get the configuration parameter. function Get (Name : in String) return String; -- Initalize the list of gateways from the configuration file. procedure Get_Gateways (List : in out Druss.Gateways.Gateway_Vector); end Druss.Config;
Add a Path parameter to the Initialize procedure
Add a Path parameter to the Initialize procedure
Ada
apache-2.0
stcarrez/bbox-ada-api
0c030d1de447711c6b0636f64d8dfc65ed35babb
src/gen-commands-database.ads
src/gen-commands-database.ads
----------------------------------------------------------------------- -- gen-commands-database -- Database creation from application model -- Copyright (C) 2011, 2017, 2018 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- package Gen.Commands.Database is -- ------------------------------ -- Database Creation Command -- ------------------------------ -- This command creates the database for the application. type Command is new Gen.Commands.Command with null record; -- Execute the command with the arguments. overriding procedure Execute (Cmd : in out Command; Name : in String; Args : in Argument_List'Class; Generator : in out Gen.Generator.Handler); -- Write the help associated with the command. overriding procedure Help (Cmd : in out Command; Generator : in out Gen.Generator.Handler); end Gen.Commands.Database;
----------------------------------------------------------------------- -- gen-commands-database -- Database creation from application model -- Copyright (C) 2011, 2017, 2018, 2019 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- package Gen.Commands.Database is -- ------------------------------ -- Database Creation Command -- ------------------------------ -- This command creates the database for the application. type Command is new Gen.Commands.Command with null record; -- Execute the command with the arguments. overriding procedure Execute (Cmd : in out Command; Name : in String; Args : in Argument_List'Class; Generator : in out Gen.Generator.Handler); -- Write the help associated with the command. overriding procedure Help (Cmd : in out Command; Name : in String; Generator : in out Gen.Generator.Handler); end Gen.Commands.Database;
Add Name parameter to the Help procedure
Add Name parameter to the Help procedure
Ada
apache-2.0
stcarrez/dynamo,stcarrez/dynamo,stcarrez/dynamo
de321942df923f89366c4b60d58036d939cd7e06
orka/src/orka/interface/orka-atomics.ads
orka/src/orka/interface/orka-atomics.ads
-- SPDX-License-Identifier: Apache-2.0 -- -- Copyright (c) 2017 onox <[email protected]> -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. package Orka.Atomics is pragma Pure; protected type Counter (Initial_Value : Natural) is procedure Add (Addition : Natural); procedure Increment; procedure Decrement (Zero : out Boolean); procedure Reset; function Count return Natural; private Value : Natural := Initial_Value; end Counter; end Orka.Atomics;
-- SPDX-License-Identifier: Apache-2.0 -- -- Copyright (c) 2017 onox <[email protected]> -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. package Orka.Atomics is pragma Pure; protected type Counter (Initial_Value : Natural) is pragma Lock_Free; procedure Add (Addition : Natural); procedure Increment; procedure Decrement (Zero : out Boolean); procedure Reset; function Count return Natural; private Value : Natural := Initial_Value; end Counter; end Orka.Atomics;
Make protected type Counter lock free
orka: Make protected type Counter lock free Signed-off-by: onox <[email protected]>
Ada
apache-2.0
onox/orka
aa02552f0c12d01ba0b9e63ca22d6d562611a000
src/gen-commands-propset.ads
src/gen-commands-propset.ads
----------------------------------------------------------------------- -- gen-commands-propset -- Set a property on dynamo project -- Copyright (C) 2011, 2017, 2018 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- package Gen.Commands.Propset is -- ------------------------------ -- Propset Command -- ------------------------------ -- This command sets a property in the dynamo project configuration. type Command is new Gen.Commands.Command with null record; -- Execute the command with the arguments. overriding procedure Execute (Cmd : in out Command; Name : in String; Args : in Argument_List'Class; Generator : in out Gen.Generator.Handler); -- Write the help associated with the command. overriding procedure Help (Cmd : in Command; Generator : in out Gen.Generator.Handler); end Gen.Commands.Propset;
----------------------------------------------------------------------- -- gen-commands-propset -- Set a property on dynamo project -- Copyright (C) 2011, 2017, 2018 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- package Gen.Commands.Propset is -- ------------------------------ -- Propset Command -- ------------------------------ -- This command sets a property in the dynamo project configuration. type Command is new Gen.Commands.Command with null record; -- Execute the command with the arguments. overriding procedure Execute (Cmd : in out Command; Name : in String; Args : in Argument_List'Class; Generator : in out Gen.Generator.Handler); -- Write the help associated with the command. overriding procedure Help (Cmd : in out Command; Generator : in out Gen.Generator.Handler); end Gen.Commands.Propset;
Update to use an in out parameter for Help procedure
Update to use an in out parameter for Help procedure
Ada
apache-2.0
stcarrez/dynamo,stcarrez/dynamo,stcarrez/dynamo
26e68a922285d96b523d6d265e3b32b7f7e1a99d
src/wiki-parsers-markdown.ads
src/wiki-parsers-markdown.ads
----------------------------------------------------------------------- -- wiki-parsers-markdown -- Markdown parser operations -- Copyright (C) 2016 - 2022 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- private package Wiki.Parsers.Markdown is pragma Preelaborate; subtype Parser_Type is Parser; -- Parse a markdown table/column. -- Example: -- | col1 | col2 | ... | colN | procedure Parse_Table (P : in out Parser; Token : in Wiki.Strings.WChar); procedure Parse_Line (Parser : in out Parser_Type; Text : in Wiki.Buffers.Buffer_Access); procedure Parse_Inline_Text (Parser : in out Parser_Type; Text : in Wiki.Buffers.Buffer_Access); end Wiki.Parsers.Markdown;
----------------------------------------------------------------------- -- wiki-parsers-markdown -- Markdown parser operations -- Copyright (C) 2016 - 2022 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- private package Wiki.Parsers.Markdown is pragma Preelaborate; subtype Parser_Type is Parser; procedure Parse_Line (Parser : in out Parser_Type; Text : in Wiki.Buffers.Buffer_Access); procedure Parse_Inline_Text (Parser : in out Parser_Type; Text : in Wiki.Buffers.Buffer_Access); end Wiki.Parsers.Markdown;
Remove declaration of internal Parse_Table procedure
Remove declaration of internal Parse_Table procedure
Ada
apache-2.0
stcarrez/ada-wiki,stcarrez/ada-wiki
6818a85e4d41cb6d11aa9bdd1ef06b15f5f03b44
src/gen-commands-generate.ads
src/gen-commands-generate.ads
----------------------------------------------------------------------- -- gen-commands-generate -- Generate command for dynamo -- Copyright (C) 2011 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- package Gen.Commands.Generate is -- ------------------------------ -- Generator Command -- ------------------------------ type Command is new Gen.Commands.Command with null record; -- Execute the command with the arguments. procedure Execute (Cmd : in Command; Generator : in out Gen.Generator.Handler); -- Write the help associated with the command. procedure Help (Cmd : in Command; Generator : in out Gen.Generator.Handler); end Gen.Commands.Generate;
----------------------------------------------------------------------- -- gen-commands-generate -- Generate command for dynamo -- Copyright (C) 2011, 2017 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- package Gen.Commands.Generate is -- ------------------------------ -- Generator Command -- ------------------------------ type Command is new Gen.Commands.Command with null record; -- Execute the command with the arguments. overriding procedure Execute (Cmd : in Command; Name : in String; Args : in Argument_List'Class; Generator : in out Gen.Generator.Handler); -- Write the help associated with the command. overriding procedure Help (Cmd : in Command; Generator : in out Gen.Generator.Handler); end Gen.Commands.Generate;
Update to use the new command implementation
Update to use the new command implementation
Ada
apache-2.0
stcarrez/dynamo,stcarrez/dynamo,stcarrez/dynamo
ad2daf98cb80fb425c86a4927ea73ce16b752333
src/wiki-helpers-parser.ads
src/wiki-helpers-parser.ads
----------------------------------------------------------------------- -- wiki-helpers-parser -- Generic procedure for the wiki parser -- Copyright (C) 2016 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Wiki.Strings; with Wiki.Documents; with Wiki.Streams; generic type Engine_Type is limited private; type Element_Type is limited private; with function Element (Item : in Element_Type; Pos : in Natural) return Wiki.Strings.WChar is <>; with function Length (Item : in Element_Type) return Natural is <>; with procedure Parse (Engine : in out Engine_Type; Stream : in Wiki.Streams.Input_Stream_Access; Doc : in out Wiki.Documents.Document) is <>; procedure Wiki.Helpers.Parser (Engine : in out Engine_Type; Content : in Element_Type; Doc : in out Wiki.Documents.Document); pragma Preelaborate (Wiki.Helpers.Parser);
----------------------------------------------------------------------- -- wiki-helpers-parser -- Generic procedure for the wiki parser -- Copyright (C) 2016 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Wiki.Strings; with Wiki.Documents; with Wiki.Streams; generic type Engine_Type is limited private; type Element_Type (<>) is limited private; with procedure Element (Item : in Element_Type; Pos : in out Natural; Char : out Wiki.Strings.WChar) is <>; with function Length (Item : in Element_Type) return Natural is <>; with procedure Parse (Engine : in out Engine_Type; Stream : in Wiki.Streams.Input_Stream_Access; Doc : in out Wiki.Documents.Document) is <>; procedure Wiki.Helpers.Parser (Engine : in out Engine_Type; Content : in Element_Type; Doc : in out Wiki.Documents.Document); pragma Preelaborate (Wiki.Helpers.Parser);
Change the Element operation to a procedure that gets and updates the position
Change the Element operation to a procedure that gets and updates the position
Ada
apache-2.0
stcarrez/ada-wiki,stcarrez/ada-wiki
1bf422dc6949d3fdf4a63040b9be0af2d92ce86e
ARM/STMicro/STM32/components/lcd/rortech_stm32f7disco/stm32-lcd.ads
ARM/STMicro/STM32/components/lcd/rortech_stm32f7disco/stm32-lcd.ads
with STM32.LTDC; with STM32.LCDInit; package STM32.LCD is new STM32.LTDC (LCD_Width => 480, LCD_Height => 272, LCD_HSync => 41, LCD_HBP => 13, LCD_HFP => 32, LCD_VSYNC => 10, LCD_VBP => 2, LCD_VFP => 2, PLLSAI_N => 429, PLLSAI_R => 5, DivR => 2, Pre_LTDC_Initialize => STM32.LCDInit.Initialize, Post_LTDC_Initialize => STM32.LCDInit.Post_Init);
with STM32.LTDC; with STM32.LCDInit; package STM32.LCD is new STM32.LTDC (LCD_Width => 480, LCD_Height => 272, LCD_HSync => 41, LCD_HBP => 13, LCD_HFP => 32, LCD_VSYNC => 10, LCD_VBP => 2, LCD_VFP => 2, PLLSAI_N => 200, PLLSAI_R => 5, DivR => 2, Pre_LTDC_Initialize => STM32.LCDInit.Initialize, Post_LTDC_Initialize => STM32.LCDInit.Post_Init);
Fix LCD too slow on the STM32F7-Disco.
Fix LCD too slow on the STM32F7-Disco.
Ada
bsd-3-clause
lambourg/Ada_Drivers_Library,AdaCore/Ada_Drivers_Library,Fabien-Chouteau/Ada_Drivers_Library,Fabien-Chouteau/Ada_Drivers_Library,simonjwright/Ada_Drivers_Library,AdaCore/Ada_Drivers_Library,ellamosi/Ada_BMP_Library,simonjwright/Ada_Drivers_Library
b68c3779eb4d9f2043bb97e60fa34ca4e9a215c5
src/asf-helpers-beans.ads
src/asf-helpers-beans.ads
----------------------------------------------------------------------- -- asf-helpers-beans -- Helper packages to write ASF applications -- Copyright (C) 2012 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Util.Beans.Basic; package ASF.Helpers.Beans is -- Get a bean instance associated under the given name from the current faces context. -- A null value is returned if the bean does not exist or is not of the good type. generic type Element_Type is new Util.Beans.Basic.Readonly_Bean with private; type Element_Access is access all Element_Type'Class; function Get_Bean (Name : in String) return Element_Access; end ASF.Helpers.Beans;
----------------------------------------------------------------------- -- asf-helpers-beans -- Helper packages to write ASF applications -- Copyright (C) 2012, 2017 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Util.Beans.Basic; with ASF.Requests; package ASF.Helpers.Beans is -- Get a bean instance associated under the given name from the current faces context. -- A null value is returned if the bean does not exist or is not of the good type. generic type Element_Type is new Util.Beans.Basic.Readonly_Bean with private; type Element_Access is access all Element_Type'Class; function Get_Bean (Name : in String) return Element_Access; -- Get a bean instance associated under the given name from the request. -- A null value is returned if the bean does not exist or is not of the good type. generic type Element_Type is new Util.Beans.Basic.Readonly_Bean with private; type Element_Access is access all Element_Type'Class; function Get_Request_Bean (Request : in ASF.Requests.Request'Class; Name : in String) return Element_Access; end ASF.Helpers.Beans;
Declare the Get_Request_Bean generic function
Declare the Get_Request_Bean generic function
Ada
apache-2.0
stcarrez/ada-asf,stcarrez/ada-asf,stcarrez/ada-asf
431d39042769bfb6005b2b9ea0350bb3982b4dac
src/gen-commands-layout.ads
src/gen-commands-layout.ads
----------------------------------------------------------------------- -- gen-commands-layout -- Layout creation command for dynamo -- Copyright (C) 2011, 2017, 2018 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- package Gen.Commands.Layout is -- ------------------------------ -- Layout Creation Command -- ------------------------------ -- This command adds a XHTML layout to the web application. type Command is new Gen.Commands.Command with null record; -- Execute the command with the arguments. overriding procedure Execute (Cmd : in out Command; Name : in String; Args : in Argument_List'Class; Generator : in out Gen.Generator.Handler); -- Write the help associated with the command. overriding procedure Help (Cmd : in out Command; Generator : in out Gen.Generator.Handler); end Gen.Commands.Layout;
----------------------------------------------------------------------- -- gen-commands-layout -- Layout creation command for dynamo -- Copyright (C) 2011, 2017, 2018, 2019 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- package Gen.Commands.Layout is -- ------------------------------ -- Layout Creation Command -- ------------------------------ -- This command adds a XHTML layout to the web application. type Command is new Gen.Commands.Command with null record; -- Execute the command with the arguments. overriding procedure Execute (Cmd : in out Command; Name : in String; Args : in Argument_List'Class; Generator : in out Gen.Generator.Handler); -- Write the help associated with the command. overriding procedure Help (Cmd : in out Command; Name : in String; Generator : in out Gen.Generator.Handler); end Gen.Commands.Layout;
Add Name parameter to the Help procedure
Add Name parameter to the Help procedure
Ada
apache-2.0
stcarrez/dynamo,stcarrez/dynamo,stcarrez/dynamo
15592ccd524fe7003ddea8f74285b424cc1f8f66
src/gen-commands-plugins.ads
src/gen-commands-plugins.ads
----------------------------------------------------------------------- -- gen-commands-plugins -- Plugin creation and management commands for dynamo -- Copyright (C) 2012, 2017, 2018 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- package Gen.Commands.Plugins is -- ------------------------------ -- Generator Command -- ------------------------------ type Command is new Gen.Commands.Command with null record; -- Execute the command with the arguments. overriding procedure Execute (Cmd : in out Command; Name : in String; Args : in Argument_List'Class; Generator : in out Gen.Generator.Handler); -- Write the help associated with the command. overriding procedure Help (Cmd : in out Command; Generator : in out Gen.Generator.Handler); end Gen.Commands.Plugins;
----------------------------------------------------------------------- -- gen-commands-plugins -- Plugin creation and management commands for dynamo -- Copyright (C) 2012, 2017, 2018, 2019 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- package Gen.Commands.Plugins is -- ------------------------------ -- Generator Command -- ------------------------------ type Command is new Gen.Commands.Command with null record; -- Execute the command with the arguments. overriding procedure Execute (Cmd : in out Command; Name : in String; Args : in Argument_List'Class; Generator : in out Gen.Generator.Handler); -- Write the help associated with the command. overriding procedure Help (Cmd : in out Command; Name : in String; Generator : in out Gen.Generator.Handler); end Gen.Commands.Plugins;
Add Name parameter to the Help procedure
Add Name parameter to the Help procedure
Ada
apache-2.0
stcarrez/dynamo,stcarrez/dynamo,stcarrez/dynamo
bcffe2bfc9a85fadcfd69015b3f2b56b33228c45
src/babel-base.ads
src/babel-base.ads
----------------------------------------------------------------------- -- babel-base -- Database for files -- Copyright (C) 2014 Stephane.Carrez -- Written by Stephane.Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Ada.Finalization; with ADO; package Babel.Base is type Database is abstract new Ada.Finalization.Limited_Controlled with private; private type Database is abstract new Ada.Finalization.Limited_Controlled with record Name : Integer; end record; end Babel.Base;
----------------------------------------------------------------------- -- babel-base -- Database for files -- Copyright (C) 2014 Stephane.Carrez -- Written by Stephane.Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Ada.Finalization; with ADO; with Babel.Files; package Babel.Base is type Database is abstract new Ada.Finalization.Limited_Controlled with private; -- Insert the file in the database. procedure Insert (Into : in out Database; File : in Babel.Files.File_Type) is abstract; private type Database is abstract new Ada.Finalization.Limited_Controlled with record Name : Integer; end record; end Babel.Base;
Define the Insert operation on the Database abstract type
Define the Insert operation on the Database abstract type
Ada
apache-2.0
stcarrez/babel
2e6b5e880fe1f45d39331661543dae568a3f613e
tools/druss-commands-ping.ads
tools/druss-commands-ping.ads
----------------------------------------------------------------------- -- druss-commands-ping -- Ping devices from the gateway -- Copyright (C) 2017 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- package Druss.Commands.Ping is type Command_Type is new Druss.Commands.Drivers.Command_Type with null record; procedure Do_Ping (Command : in Command_Type; Args : in Argument_List'Class; Context : in out Context_Type); -- Execute a ping from the gateway to each device. overriding procedure Execute (Command : in Command_Type; Name : in String; Args : in Argument_List'Class; Context : in out Context_Type); -- Write the help associated with the command. overriding procedure Help (Command : in Command_Type; Context : in out Context_Type); end Druss.Commands.Ping;
----------------------------------------------------------------------- -- druss-commands-ping -- Ping devices from the gateway -- Copyright (C) 2017 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- package Druss.Commands.Ping is type Command_Type is new Druss.Commands.Drivers.Command_Type with null record; procedure Do_Ping (Command : in Command_Type; Args : in Argument_List'Class; Selector : in Device_Selector_Type; Context : in out Context_Type); -- Execute a ping from the gateway to each device. overriding procedure Execute (Command : in Command_Type; Name : in String; Args : in Argument_List'Class; Context : in out Context_Type); -- Write the help associated with the command. overriding procedure Help (Command : in Command_Type; Context : in out Context_Type); end Druss.Commands.Ping;
Add a device selector to the Do_Ping procedure
Add a device selector to the Do_Ping procedure
Ada
apache-2.0
stcarrez/bbox-ada-api
f2c66ba99bd0dc5aaf84b5764b59b24e6f5486f4
src/gen-commands-generate.ads
src/gen-commands-generate.ads
----------------------------------------------------------------------- -- gen-commands-generate -- Generate command for dynamo -- Copyright (C) 2011, 2017, 2018 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- package Gen.Commands.Generate is -- ------------------------------ -- Generator Command -- ------------------------------ type Command is new Gen.Commands.Command with null record; -- Execute the command with the arguments. overriding procedure Execute (Cmd : in out Command; Name : in String; Args : in Argument_List'Class; Generator : in out Gen.Generator.Handler); -- Write the help associated with the command. overriding procedure Help (Cmd : in out Command; Generator : in out Gen.Generator.Handler); end Gen.Commands.Generate;
----------------------------------------------------------------------- -- gen-commands-generate -- Generate command for dynamo -- Copyright (C) 2011, 2017, 2018, 2019 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- package Gen.Commands.Generate is -- ------------------------------ -- Generator Command -- ------------------------------ type Command is new Gen.Commands.Command with null record; -- Execute the command with the arguments. overriding procedure Execute (Cmd : in out Command; Name : in String; Args : in Argument_List'Class; Generator : in out Gen.Generator.Handler); -- Write the help associated with the command. overriding procedure Help (Cmd : in out Command; Name : in String; Generator : in out Gen.Generator.Handler); end Gen.Commands.Generate;
Add Name parameter to the Help procedure
Add Name parameter to the Help procedure
Ada
apache-2.0
stcarrez/dynamo,stcarrez/dynamo,stcarrez/dynamo
f1549e07ad371d50186db25711292fc3fb7d1803
src/gen-commands-model.ads
src/gen-commands-model.ads
----------------------------------------------------------------------- -- gen-commands-model -- Model creation command for dynamo -- Copyright (C) 2011, 2017, 2018 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- package Gen.Commands.Model is -- ------------------------------ -- Model Creation Command -- ------------------------------ -- This command adds a model file to the web application. type Command is new Gen.Commands.Command with null record; -- Execute the command with the arguments. overriding procedure Execute (Cmd : in out Command; Name : in String; Args : in Argument_List'Class; Generator : in out Gen.Generator.Handler); -- Write the help associated with the command. overriding procedure Help (Cmd : in out Command; Generator : in out Gen.Generator.Handler); end Gen.Commands.Model;
----------------------------------------------------------------------- -- gen-commands-model -- Model creation command for dynamo -- Copyright (C) 2011, 2017, 2018, 2019 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- package Gen.Commands.Model is -- ------------------------------ -- Model Creation Command -- ------------------------------ -- This command adds a model file to the web application. type Command is new Gen.Commands.Command with null record; -- Execute the command with the arguments. overriding procedure Execute (Cmd : in out Command; Name : in String; Args : in Argument_List'Class; Generator : in out Gen.Generator.Handler); -- Write the help associated with the command. overriding procedure Help (Cmd : in out Command; Name : in String; Generator : in out Gen.Generator.Handler); end Gen.Commands.Model;
Add Name parameter to the Help procedure
Add Name parameter to the Help procedure
Ada
apache-2.0
stcarrez/dynamo,stcarrez/dynamo,stcarrez/dynamo
37917bb9370ede46abcb209ab7235462d3a90875
lumen.ads
lumen.ads
-- Lumen -- A simple graphical user interface library based on OpenGL -- -- Chip Richards, NiEstu, Phoenix AZ, Spring 2010 -- Lumen would not be possible without the support and contributions of a cast -- of thousands, including and primarily Rod Kay. -- This code is covered by the ISC License: -- -- Copyright (c) 2010, NiEstu -- -- Permission to use, copy, modify, and/or distribute this software for any -- purpose with or without fee is hereby granted, provided that the above -- copyright notice and this permission notice appear in all copies. -- -- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY -- SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -- IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. package Lumen is pragma Pure (Lumen); end Lumen;
-- Lumen -- A simple graphical user interface library based on OpenGL -- -- Chip Richards, NiEstu, Phoenix AZ, Spring 2010 -- Lumen would not be possible without the support and contributions of a cast -- of thousands, including and primarily Rod Kay. -- This code is covered by the ISC License: -- -- Copyright (c) 2010, NiEstu -- -- Permission to use, copy, modify, and/or distribute this software for any -- purpose with or without fee is hereby granted, provided that the above -- copyright notice and this permission notice appear in all copies. -- -- The software is provided "as is" and the author disclaims all warranties -- with regard to this software including all implied warranties of -- merchantability and fitness. In no event shall the author be liable for any -- special, direct, indirect, or consequential damages or any damages -- whatsoever resulting from loss of use, data or profits, whether in an -- action of contract, negligence or other tortious action, arising out of or -- in connection with the use or performance of this software. package Lumen is pragma Pure (Lumen); end Lumen;
Change license text to mixed case instead of SHOUTING it
Change license text to mixed case instead of SHOUTING it
Ada
isc
darkestkhan/lumen2,darkestkhan/lumen
b92bccd7ab3b96d73c78b48966ad152cf9aa628d
src/asf-components-html-factory.ads
src/asf-components-html-factory.ads
----------------------------------------------------------------------- -- html-factory -- Factory for HTML UI Components -- Copyright (C) 2009, 2010 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with ASF.Factory; package ASF.Components.Html.Factory is use ASF; -- Get the HTML component factory. function Definition return ASF.Factory.Factory_Bindings_Access; end ASF.Components.Html.Factory;
----------------------------------------------------------------------- -- html-factory -- Factory for HTML UI Components -- Copyright (C) 2009, 2010, 2018 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with ASF.Factory; package ASF.Components.Html.Factory is -- Register the HTML component factory. procedure Register (Factory : in out ASF.Factory.Component_Factory); end ASF.Components.Html.Factory;
Change the Definition function into a Register procedure
Change the Definition function into a Register procedure
Ada
apache-2.0
stcarrez/ada-asf,stcarrez/ada-asf,stcarrez/ada-asf
1f75cb5f92bd5ed8b546955ba065ef30d8531ef7
src/sys/os-win32/util-systems-constants.ads
src/sys/os-win32/util-systems-constants.ads
-- Generated by utildgen.c from system includes with Interfaces.C; package Util.Systems.Constants is pragma Pure; -- Flags used when opening a file with open/creat. O_RDONLY : constant Interfaces.C.int := 8#000000#; O_WRONLY : constant Interfaces.C.int := 8#000001#; O_RDWR : constant Interfaces.C.int := 8#000002#; O_CREAT : constant Interfaces.C.int := 8#000400#; O_EXCL : constant Interfaces.C.int := 8#002000#; O_TRUNC : constant Interfaces.C.int := 8#001000#; O_APPEND : constant Interfaces.C.int := 8#000010#; DLL_OPTIONS : constant String := ""; SYMBOL_PREFIX : constant String := ""; end Util.Systems.Constants;
-- Generated by utildgen.c from system includes with Interfaces.C; package Util.Systems.Constants is pragma Pure; -- Flags used when opening a file with open/creat. O_RDONLY : constant Interfaces.C.int := 8#000000#; O_WRONLY : constant Interfaces.C.int := 8#000001#; O_RDWR : constant Interfaces.C.int := 8#000002#; O_CREAT : constant Interfaces.C.int := 8#000400#; O_EXCL : constant Interfaces.C.int := 8#002000#; O_TRUNC : constant Interfaces.C.int := 8#001000#; O_APPEND : constant Interfaces.C.int := 8#000010#; O_CLOEXEC : constant Interfaces.C.int := 0; O_SYNC : constant Interfaces.C.int := 0; O_DIRECT : constant Interfaces.C.int := 0; DLL_OPTIONS : constant String := ""; SYMBOL_PREFIX : constant String := ""; end Util.Systems.Constants;
Fix O_CLOEXEC undefined in keystore-io-files.adb (win32)
Fix O_CLOEXEC undefined in keystore-io-files.adb (win32)
Ada
apache-2.0
stcarrez/ada-util,stcarrez/ada-util
ec084716b9199c3b823ecbec044a841f2baa5c2d
src/util-dates-iso8601.ads
src/util-dates-iso8601.ads
----------------------------------------------------------------------- -- util-dates-iso8601 -- ISO8601 dates -- Copyright (C) 2011, 2013 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Ada.Calendar; package Util.Dates.ISO8601 is -- Parses an ISO8601 date and return it as a calendar time. -- Raises Constraint_Error if the date format is not recognized. function Value (Date : in String) return Ada.Calendar.Time; -- Return the ISO8601 date. function Image (Date : in Ada.Calendar.Time) return String; function Image (Date : in Date_Record) return String; end Util.Dates.ISO8601;
----------------------------------------------------------------------- -- util-dates-iso8601 -- ISO8601 dates -- Copyright (C) 2011, 2013, 2016 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Ada.Calendar; package Util.Dates.ISO8601 is type Precision_Type is (YEAR, MONTH, DAY, HOUR, MINUTE, SECOND, SUBSECOND); -- Parses an ISO8601 date and return it as a calendar time. -- Raises Constraint_Error if the date format is not recognized. function Value (Date : in String) return Ada.Calendar.Time; -- Return the ISO8601 date. function Image (Date : in Ada.Calendar.Time) return String; function Image (Date : in Date_Record) return String; function Image (Date : in Ada.Calendar.Time; Precision : in Precision_Type) return String; function Image (Date : in Date_Record; Precision : in Precision_Type) return String; end Util.Dates.ISO8601;
Declare Precision_Type enumeration Declare new Image function
Declare Precision_Type enumeration Declare new Image function
Ada
apache-2.0
stcarrez/ada-util,stcarrez/ada-util
7e0a6f0575cc39219eacd23c2f58f084530e4466
awa/src/awa.ads
awa/src/awa.ads
----------------------------------------------------------------------- -- awa -- Ada Web Application -- Copyright (C) 2009 - 2020 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- -- = AWA Core == -- -- @include awa-applications.ads -- @include awa-modules.ads -- @include awa-permissions.ads -- @include awa-events.ads -- @include awa.xml package AWA is pragma Pure; end AWA;
----------------------------------------------------------------------- -- awa -- Ada Web Application -- Copyright (C) 2009 - 2020 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- -- = AWA Core == -- -- @include awa-applications.ads -- @include awa-modules.ads -- @include awa-permissions.ads -- @include awa-events.ads -- @include awa-commands.ads -- @include awa.xml package AWA is pragma Pure; end AWA;
Include the AWA commands documentation
Include the AWA commands documentation
Ada
apache-2.0
stcarrez/ada-awa,stcarrez/ada-awa,stcarrez/ada-awa,stcarrez/ada-awa
58868546577bd497edaa337d1d0a59c7bda8a408
src/util-events.ads
src/util-events.ads
----------------------------------------------------------------------- -- util-events -- Events -- Copyright (C) 2001, 2002, 2003, 2009, 2010 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Ada.Calendar; package Util.Events is type Event is tagged private; -- Get the time identifying when the event was created. function Get_Time (Ev : Event) return Ada.Calendar.Time; type Event_Listener is limited interface; private type Event is tagged record Date : Ada.Calendar.Time := Ada.Calendar.Clock; end record; end Util.Events;
----------------------------------------------------------------------- -- util-events -- Events -- Copyright (C) 2001, 2002, 2003, 2009, 2010, 2011 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Ada.Calendar; package Util.Events is type Event is tagged limited private; -- Get the time identifying when the event was created. function Get_Time (Ev : Event) return Ada.Calendar.Time; type Event_Listener is limited interface; private type Event is tagged limited record Date : Ada.Calendar.Time := Ada.Calendar.Clock; end record; end Util.Events;
Change the Event type to a limited type
Change the Event type to a limited type
Ada
apache-2.0
stcarrez/ada-util,stcarrez/ada-util
926364568a81d03a08a83fdf83d1e442e657c176
awa/plugins/awa-votes/regtests/awa-votes-modules-tests.ads
awa/plugins/awa-votes/regtests/awa-votes-modules-tests.ads
----------------------------------------------------------------------- -- awa-votes-modules-tests -- Unit tests for vote service -- Copyright (C) 2013 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Util.Tests; with AWA.Tests; package AWA.Votes.Modules.Tests is procedure Add_Tests (Suite : in Util.Tests.Access_Test_Suite); type Test is new AWA.Tests.Test with record Manager : AWA.Votes.Modules.Vote_Module_Access; end record; -- Test vote. procedure Test_Vote_Up (T : in out Test); end AWA.Votes.Modules.Tests;
----------------------------------------------------------------------- -- awa-votes-modules-tests -- Unit tests for vote service -- Copyright (C) 2013 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Util.Tests; with AWA.Tests; package AWA.Votes.Modules.Tests is procedure Add_Tests (Suite : in Util.Tests.Access_Test_Suite); type Test is new AWA.Tests.Test with record Manager : AWA.Votes.Modules.Vote_Module_Access; end record; -- Test vote. procedure Test_Vote_Up (T : in out Test); -- Test vote. procedure Test_Vote_Undo (T : in out Test); end AWA.Votes.Modules.Tests;
Add unit test for undo vote
Add unit test for undo vote
Ada
apache-2.0
tectronics/ada-awa,Letractively/ada-awa,tectronics/ada-awa,Letractively/ada-awa,tectronics/ada-awa,Letractively/ada-awa
e7d02a1cc2114950c4a4c4e6fe6620879c395bd9
src/asf-components-core-factory.ads
src/asf-components-core-factory.ads
----------------------------------------------------------------------- -- core-factory -- Factory for UI Core Components -- Copyright (C) 2009, 2010 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with ASF.Factory; package ASF.Components.Core.Factory is use ASF; -- Get the Core component factory. function Definition return ASF.Factory.Factory_Bindings_Access; end ASF.Components.Core.Factory;
----------------------------------------------------------------------- -- core-factory -- Factory for UI Core Components -- Copyright (C) 2009, 2010, 2018 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with ASF.Factory; package ASF.Components.Core.Factory is -- Register the Core component factory. procedure Register (Factory : in out ASF.Factory.Component_Factory); end ASF.Components.Core.Factory;
Change the Definition function into a Register procedure
Change the Definition function into a Register procedure
Ada
apache-2.0
stcarrez/ada-asf,stcarrez/ada-asf,stcarrez/ada-asf
4f069f1ea3979f0b4bed3f91fb2134724e206f65
regtests/util-serialize-io-json-tests.ads
regtests/util-serialize-io-json-tests.ads
----------------------------------------------------------------------- -- serialize-io-json-tests -- Unit tests for JSON parser -- Copyright (C) 2011 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Util.Tests; package Util.Serialize.IO.JSON.Tests is procedure Add_Tests (Suite : in Util.Tests.Access_Test_Suite); type Test is new Util.Tests.Test with null record; procedure Test_Parse_Error (T : in out Test); procedure Test_Parser (T : in out Test); end Util.Serialize.IO.JSON.Tests;
----------------------------------------------------------------------- -- serialize-io-json-tests -- Unit tests for JSON parser -- Copyright (C) 2011, 2016 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Util.Tests; package Util.Serialize.IO.JSON.Tests is procedure Add_Tests (Suite : in Util.Tests.Access_Test_Suite); type Test is new Util.Tests.Test with null record; procedure Test_Parse_Error (T : in out Test); procedure Test_Parser (T : in out Test); -- Generate some output stream for the test. procedure Write_Stream (Stream : in out Util.Serialize.IO.Output_Stream'Class); -- Test the JSON output stream generation. procedure Test_Output (T : in out Test); end Util.Serialize.IO.JSON.Tests;
Declare Test_Output and Write_Stream procedures
Declare Test_Output and Write_Stream procedures
Ada
apache-2.0
stcarrez/ada-util,stcarrez/ada-util
b474166df879b452873d9e50e9292498b7ba711f
mat/src/matp.adb
mat/src/matp.adb
----------------------------------------------------------------------- -- mat-types -- Global types -- Copyright (C) 2014 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Ada.IO_Exceptions; with MAT.Commands; with MAT.Targets; with MAT.Consoles.Text; with MAT.Readers.Streams.Sockets; procedure Matp is Target : MAT.Targets.Target_Type; Console : aliased MAT.Consoles.Text.Console_Type; Server : MAT.Readers.Streams.Sockets.Socket_Listener_Type; begin Target.Console (Console'Unchecked_Access); Target.Initialize_Options; MAT.Commands.Initialize_Files (Target); Server.Start (Options.Address); MAT.Commands.Interactive (Target); Server.Stop; exception when Ada.IO_Exceptions.End_Error | MAT.Targets.Usage_Error => Server.Stop; end Matp;
----------------------------------------------------------------------- -- mat-types -- Global types -- Copyright (C) 2014 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Ada.IO_Exceptions; with MAT.Commands; with MAT.Targets; with MAT.Consoles.Text; with MAT.Readers.Streams.Sockets; procedure Matp is Target : MAT.Targets.Target_Type; Console : aliased MAT.Consoles.Text.Console_Type; Server : MAT.Readers.Streams.Sockets.Socket_Listener_Type; begin Target.Console (Console'Unchecked_Access); Target.Initialize_Options; MAT.Commands.Initialize_Files (Target); Target.Start; MAT.Commands.Interactive (Target); Server.Stop; exception when Ada.IO_Exceptions.End_Error | MAT.Targets.Usage_Error => Server.Stop; end Matp;
Update to call the target Start procedure
Update to call the target Start procedure
Ada
apache-2.0
stcarrez/mat,stcarrez/mat,stcarrez/mat
f62527203709bd722a16c19bfa579322cb33ad3d
awa/plugins/awa-questions/regtests/awa-questions-services-tests.ads
awa/plugins/awa-questions/regtests/awa-questions-services-tests.ads
----------------------------------------------------------------------- -- awa-questions-services-tests -- Unit tests for question service -- Copyright (C) 2013 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Util.Tests; with AWA.Tests; package AWA.Questions.Services.Tests is procedure Add_Tests (Suite : in Util.Tests.Access_Test_Suite); type Test is new AWA.Tests.Test with record Manager : AWA.Questions.Services.Question_Service_Access; end record; -- Test creation of a question. procedure Test_Create_Question (T : in out Test); -- Test list of questions. procedure Test_List_Questions (T : in out Test); end AWA.Questions.Services.Tests;
----------------------------------------------------------------------- -- awa-questions-services-tests -- Unit tests for question service -- Copyright (C) 2013 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Util.Tests; with AWA.Tests; package AWA.Questions.Services.Tests is procedure Add_Tests (Suite : in Util.Tests.Access_Test_Suite); type Test is new AWA.Tests.Test with record Manager : AWA.Questions.Services.Question_Service_Access; end record; -- Test creation of a question. procedure Test_Create_Question (T : in out Test); -- Test list of questions. procedure Test_List_Questions (T : in out Test); -- Test anonymous user voting for a question. procedure Test_Question_Vote_Anonymous (T : in out Test); -- Test voting for a question. procedure Test_Question_Vote (T : in out Test); private -- Do a vote on a question through the question vote bean. procedure Do_Vote (T : in out Test); end AWA.Questions.Services.Tests;
Add unit tests for the questionVote bean
Add unit tests for the questionVote bean
Ada
apache-2.0
Letractively/ada-awa,tectronics/ada-awa,Letractively/ada-awa,tectronics/ada-awa,tectronics/ada-awa,Letractively/ada-awa
b6b6d68814fc5833de259c95dc5979112a3646b8
mat/regtests/mat-testsuite.adb
mat/regtests/mat-testsuite.adb
----------------------------------------------------------------------- -- mat-testsuite - MAT Testsuite -- Copyright (C) 2014 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with MAT.Readers.Tests; with MAT.Targets.Tests; package body MAT.Testsuite is Tests : aliased Util.Tests.Test_Suite; function Suite return Util.Tests.Access_Test_Suite is Result : constant Util.Tests.Access_Test_Suite := Tests'Access; begin MAT.Readers.Tests.Add_Tests (Result); MAT.Targets.Tests.Add_Tests (Result); return Result; end Suite; end MAT.Testsuite;
----------------------------------------------------------------------- -- mat-testsuite - MAT Testsuite -- Copyright (C) 2014 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with MAT.Readers.Tests; with MAT.Targets.Tests; with MAT.Frames.Tests; package body MAT.Testsuite is Tests : aliased Util.Tests.Test_Suite; function Suite return Util.Tests.Access_Test_Suite is Result : constant Util.Tests.Access_Test_Suite := Tests'Access; begin MAT.Frames.Tests.Add_Tests (Result); MAT.Readers.Tests.Add_Tests (Result); MAT.Targets.Tests.Add_Tests (Result); return Result; end Suite; end MAT.Testsuite;
Add the stack frames unit tests
Add the stack frames unit tests
Ada
apache-2.0
stcarrez/mat,stcarrez/mat,stcarrez/mat
acb5908775e0ec0c3c897b1f0296d55c3db9f8ff
testutil/aunit/util-test_caller.adb
testutil/aunit/util-test_caller.adb
----------------------------------------------------------------------- -- AUnit utils - Helper for writing unit tests -- Copyright (C) 2009, 2010, 2011 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- package body Util.Test_Caller is procedure Add_Test (Suite : in Util.Tests.Access_Test_Suite; Test_Name : in String; Method : in Caller.Test_Method) is begin Suite.Add_Test (Caller.Create (Test_Name, Method)); end Add_Test; end Util.Test_Caller;
----------------------------------------------------------------------- -- AUnit utils - Helper for writing unit tests -- Copyright (C) 2009, 2010, 2011, 2013 Stephane Carrez -- Written by Stephane Carrez ([email protected]) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- package body Util.Test_Caller is procedure Add_Test (Suite : in Util.Tests.Access_Test_Suite; Test_Name : in String; Method : in Caller.Test_Method) is begin if Util.Tests.Is_Test_Enabled (Test_Name) then Suite.Add_Test (Caller.Create (Test_Name, Method)); end if; end Add_Test; end Util.Test_Caller;
Use the Is_Test_Enabled function to ignore or take into account the test when it is added in the testsuite.
Use the Is_Test_Enabled function to ignore or take into account the test when it is added in the testsuite.
Ada
apache-2.0
Letractively/ada-util,Letractively/ada-util,flottokarotto/ada-util,flottokarotto/ada-util
e91ebec06bf858ee75cac5ccd264f2a9369d502c
rts/boards/i386/adainclude/last_chance_handler.ads
rts/boards/i386/adainclude/last_chance_handler.ads
-- -*- Mode: Ada -*- -- Filename : last_chance_handler.ads -- Description : Definition of the exception handler for the kernel. -- Author : Luke A. Guest -- Created On : Thu Jun 14 12:06:21 2012 -- Licence : See LICENCE in the root directory. with System; procedure Last_Chance_Handler (Source_Location : System.Address; Line : Integer); pragma Export (C, Last_Chance_Handler, "__gnat_last_chance_handler");
-- -*- Mode: Ada -*- -- Filename : last_chance_handler.ads -- Description : Definition of the exception handler for the kernel. -- Author : Luke A. Guest -- Created On : Thu Jun 14 12:06:21 2012 -- Licence : See LICENCE in the root directory. with System; procedure Last_Chance_Handler (Source_Location : System.Address; Line : Integer); pragma Export (C, Last_Chance_Handler, "__gnat_last_chance_handler"); pragma Preelaborate (Last_Chance_Handler);
Make this package Preelaborate so a-except can depend on it.
Make this package Preelaborate so a-except can depend on it.
Ada
bsd-2-clause
Lucretia/tamp2,Lucretia/bare_bones,robdaemon/bare_bones
a79e9939c6512db4827fc831f2689871d99cfc26
Base/Change/Context.agda
Base/Change/Context.agda
module Base.Change.Context {Type : Set} (ΔType : Type → Type) where -- Transform a context of values into a context of values and -- changes. open import Base.Syntax.Context Type ΔContext : Context → Context ΔContext ∅ = ∅ ΔContext (τ • Γ) = ΔType τ • τ • ΔContext Γ -- like ΔContext, but ΔType τ and τ are swapped ΔContext′ : Context → Context ΔContext′ ∅ = ∅ ΔContext′ (τ • Γ) = τ • ΔType τ • ΔContext′ Γ Γ≼ΔΓ : ∀ {Γ} → Γ ≼ ΔContext Γ Γ≼ΔΓ {∅} = ∅ Γ≼ΔΓ {τ • Γ} = drop ΔType τ • keep τ • Γ≼ΔΓ
module Base.Change.Context {Type : Set} (ΔType : Type → Type) where open import Base.Syntax.Context Type -- Transform a context of values into a context of values and -- changes. ΔContext : Context → Context ΔContext ∅ = ∅ ΔContext (τ • Γ) = ΔType τ • τ • ΔContext Γ -- like ΔContext, but ΔType τ and τ are swapped ΔContext′ : Context → Context ΔContext′ ∅ = ∅ ΔContext′ (τ • Γ) = τ • ΔType τ • ΔContext′ Γ Γ≼ΔΓ : ∀ {Γ} → Γ ≼ ΔContext Γ Γ≼ΔΓ {∅} = ∅ Γ≼ΔΓ {τ • Γ} = drop ΔType τ • keep τ • Γ≼ΔΓ
Move function-specific comment right before function
Move function-specific comment right before function Currently, this seems a comment about the whole module. Old-commit-hash: c25e918e712496981adfe4c74f94a8d80e8e5052
Agda
mit
inc-lc/ilc-agda
2971c097d16d13188929ef857808539310db0b8e
meaning.agda
meaning.agda
module meaning where open import Level record Meaning (Syntax : Set) {ℓ : Level} : Set (suc ℓ) where constructor meaning field {Semantics} : Set ℓ ⟦_⟧ : Syntax → Semantics open Meaning {{...}} public
module meaning where open import Level record Meaning (Syntax : Set) {ℓ : Level} : Set (suc ℓ) where constructor meaning field {Semantics} : Set ℓ ⟨_⟩⟦_⟧ : Syntax → Semantics open Meaning {{...}} public renaming (⟨_⟩⟦_⟧ to ⟦_⟧) open Meaning public using (⟨_⟩⟦_⟧)
Improve printing of resolved overloading.
Improve printing of resolved overloading. After this change, the semantic brackets will contain the syntactic thing even if Agda displays explicitly resolved overloaded notation. Old-commit-hash: c8cbc43ed8e715342e0cc3bccc98e0be2dd23560
Agda
mit
inc-lc/ilc-agda
bfcd2eb5d4fab7bcb698719c3f02fc2aea768cf3
lib/Data/Tree/Binary.agda
lib/Data/Tree/Binary.agda
{-# OPTIONS --without-K #-} open import Type hiding (★) module Data.Tree.Binary where data BinTree {a} (A : ★ a) : ★ a where empty : BinTree A leaf : A → BinTree A fork : (ℓ r : BinTree A) → BinTree A
{-# OPTIONS --without-K #-} open import Type hiding (★) open import Level open import Data.Zero open import Data.Sum module Data.Tree.Binary where data BinTree {a} (A : ★ a) : ★ a where empty : BinTree A leaf : A → BinTree A fork : (ℓ r : BinTree A) → BinTree A Any : ∀ {a p}{A : ★ a}(P : A → ★ p) → BinTree A → ★ p Any P empty = Lift 𝟘 Any P (leaf x) = P x Any P (fork ts ts₁) = Any P ts ⊎ Any P ts₁
Add Any predicate for binary tree
Add Any predicate for binary tree
Agda
bsd-3-clause
crypto-agda/agda-nplib
a79e9939c6512db4827fc831f2689871d99cfc26
Base/Change/Context.agda
Base/Change/Context.agda
module Base.Change.Context {Type : Set} (ΔType : Type → Type) where -- Transform a context of values into a context of values and -- changes. open import Base.Syntax.Context Type ΔContext : Context → Context ΔContext ∅ = ∅ ΔContext (τ • Γ) = ΔType τ • τ • ΔContext Γ -- like ΔContext, but ΔType τ and τ are swapped ΔContext′ : Context → Context ΔContext′ ∅ = ∅ ΔContext′ (τ • Γ) = τ • ΔType τ • ΔContext′ Γ Γ≼ΔΓ : ∀ {Γ} → Γ ≼ ΔContext Γ Γ≼ΔΓ {∅} = ∅ Γ≼ΔΓ {τ • Γ} = drop ΔType τ • keep τ • Γ≼ΔΓ
module Base.Change.Context {Type : Set} (ΔType : Type → Type) where open import Base.Syntax.Context Type -- Transform a context of values into a context of values and -- changes. ΔContext : Context → Context ΔContext ∅ = ∅ ΔContext (τ • Γ) = ΔType τ • τ • ΔContext Γ -- like ΔContext, but ΔType τ and τ are swapped ΔContext′ : Context → Context ΔContext′ ∅ = ∅ ΔContext′ (τ • Γ) = τ • ΔType τ • ΔContext′ Γ Γ≼ΔΓ : ∀ {Γ} → Γ ≼ ΔContext Γ Γ≼ΔΓ {∅} = ∅ Γ≼ΔΓ {τ • Γ} = drop ΔType τ • keep τ • Γ≼ΔΓ
Move function-specific comment right before function
Move function-specific comment right before function Currently, this seems a comment about the whole module. Old-commit-hash: c25e918e712496981adfe4c74f94a8d80e8e5052
Agda
mit
inc-lc/ilc-agda
2971c097d16d13188929ef857808539310db0b8e
meaning.agda
meaning.agda
module meaning where open import Level record Meaning (Syntax : Set) {ℓ : Level} : Set (suc ℓ) where constructor meaning field {Semantics} : Set ℓ ⟦_⟧ : Syntax → Semantics open Meaning {{...}} public
module meaning where open import Level record Meaning (Syntax : Set) {ℓ : Level} : Set (suc ℓ) where constructor meaning field {Semantics} : Set ℓ ⟨_⟩⟦_⟧ : Syntax → Semantics open Meaning {{...}} public renaming (⟨_⟩⟦_⟧ to ⟦_⟧) open Meaning public using (⟨_⟩⟦_⟧)
Improve printing of resolved overloading.
Improve printing of resolved overloading. After this change, the semantic brackets will contain the syntactic thing even if Agda displays explicitly resolved overloaded notation. Old-commit-hash: c8cbc43ed8e715342e0cc3bccc98e0be2dd23560
Agda
mit
inc-lc/ilc-agda
bfcd2eb5d4fab7bcb698719c3f02fc2aea768cf3
lib/Data/Tree/Binary.agda
lib/Data/Tree/Binary.agda
{-# OPTIONS --without-K #-} open import Type hiding (★) module Data.Tree.Binary where data BinTree {a} (A : ★ a) : ★ a where empty : BinTree A leaf : A → BinTree A fork : (ℓ r : BinTree A) → BinTree A
{-# OPTIONS --without-K #-} open import Type hiding (★) open import Level open import Data.Zero open import Data.Sum module Data.Tree.Binary where data BinTree {a} (A : ★ a) : ★ a where empty : BinTree A leaf : A → BinTree A fork : (ℓ r : BinTree A) → BinTree A Any : ∀ {a p}{A : ★ a}(P : A → ★ p) → BinTree A → ★ p Any P empty = Lift 𝟘 Any P (leaf x) = P x Any P (fork ts ts₁) = Any P ts ⊎ Any P ts₁
Add Any predicate for binary tree
Add Any predicate for binary tree
Agda
bsd-3-clause
crypto-agda/agda-nplib
07ab552eb3a92d88c26b178dd58f45c06a497826
src/main/antlr/WorkflowCatalogQueryLanguage.g4
src/main/antlr/WorkflowCatalogQueryLanguage.g4
grammar WorkflowCatalogQueryLanguage; @header { package org.ow2.proactive.workflow_catalog.rest.query; } clause: ATTRIBUTE OPERATOR VALUE ; clauses: clause ( CONJUNCTION clause )* ; statement: '(' clauses ')' | clauses ; ATTRIBUTE: ([a-z] | [A-Z])+ ([_.]+ ([a-z] | [A-Z] | [0-9])*)* ; CONJUNCTION: 'AND' | 'OR' ; OPERATOR: '!=' | '=' ; VALUE: '"' (~[\t\n])* '"' ; WHITESPACE: [ \t\r\n]+ -> skip ; // skip spaces, tabs, newlines
grammar WorkflowCatalogQueryLanguage; @header { package org.ow2.proactive.workflow_catalog.rest.query; } // PARSER expression : and_expression ; and_expression : or_expression (AND or_expression)* ; or_expression : clause (OR clause)* ; clause : (AttributeLiteral COMPARE_OPERATOR StringLiteral) | LPAREN and_expression RPAREN ; // LEXER AND : 'AND' | '&&' ; OR : 'OR' | '||' ; COMPARE_OPERATOR : '!=' | '=' ; LPAREN : '(' ; RPAREN : ')' ; StringLiteral : '"' (~["\\\r\n] | '\\' (. | EOF))* '"' ; AttributeLiteral : LETTER (LETTER | DIGIT | '_' | '.')* ; WS : [ \t\r\n]+ -> skip ; fragment DIGIT: [0-9]; fragment LETTER: LOWERCASE | UPPERCASE; fragment LOWERCASE: [a-z]; fragment UPPERCASE: [A-Z];
Update grammar for our Workflow Catalog Query Language (WCQL)
Update grammar for our Workflow Catalog Query Language (WCQL)
ANTLR
agpl-3.0
ow2-proactive/catalog,laurianed/catalog,laurianed/catalog,gparanthoen/workflow-catalog,yinan-liu/workflow-catalog,lpellegr/workflow-catalog,ShatalovYaroslav/catalog,ow2-proactive/catalog,laurianed/workflow-catalog,ow2-proactive/workflow-catalog,laurianed/catalog,ow2-proactive/catalog,paraita/workflow-catalog,ShatalovYaroslav/catalog,ShatalovYaroslav/catalog
7815a5a8ef4360f64bc790e73dd4aa3360ddb261
robozonky-strategy-natural/src/main/antlr4/imports/InvestmentSize.g4
robozonky-strategy-natural/src/main/antlr4/imports/InvestmentSize.g4
grammar InvestmentSize; import Tokens; @header { import com.github.robozonky.strategy.natural.*; } investmentSizeExpression returns [Collection<InvestmentSize> result]: { Collection<InvestmentSize> result = new LinkedHashSet<>(); } (i=investmentSizeRatingExpression { result.add($i.result); })+ { $result = result; } ; investmentSizeRatingExpression returns [InvestmentSize result] : 'Do úvěrů v ratingu ' r=ratingExpression ' investovat' i=investmentSizeRatingSubExpression { $result = new InvestmentSize($r.result, $i.result); } ;
grammar InvestmentSize; import Tokens; @header { import com.github.robozonky.strategy.natural.*; } investmentSizeExpression returns [Collection<InvestmentSize> result]: { Collection<InvestmentSize> result = new LinkedHashSet<>(); } (i=investmentSizeRatingExpression { result.add($i.result); })* { $result = result; } ; investmentSizeRatingExpression returns [InvestmentSize result] : 'Do úvěrů v ratingu ' r=ratingExpression ' investovat' i=investmentSizeRatingSubExpression { $result = new InvestmentSize($r.result, $i.result); } ;
Make investment size spec optional
Make investment size spec optional
ANTLR
apache-2.0
triceo/zonkybot,triceo/zonkybot,triceo/robozonky,RoboZonky/robozonky,triceo/robozonky,RoboZonky/robozonky
e1b9c9441cd5b3050dcbcd6d1b3bbf90baf775f4
java-vtl-parser/src/main/antlr4/imports/Relational.g4
java-vtl-parser/src/main/antlr4/imports/Relational.g4
grammar Relational; relationalExpression : unionExpression ; unionExpression : 'union' '(' datasetExpression (',' datasetExpression )* ')' ; datasetExpression : 'datasetExpr' NUM+; NUM : '0'..'9' ; WS : [ \t\n\t] -> skip ;
grammar Relational; relationalExpression : unionExpression | joinExpression ; unionExpression : 'union' '(' datasetExpression (',' datasetExpression )* ')' ; datasetExpression : 'datasetExpr' NUM+; joinExpression : '[' (INNER | OUTER | CROSS ) datasetExpression (',' datasetExpression )* ']' joinClause (',' joinClause)* ; joinClause : joinCalc | joinFilter | joinKeep | joinRename ; // | joinDrop // | joinUnfold // | joinFold ; joinCalc : 'TODO' ; joinFilter : 'TODO' ; joinKeep : 'TODO' ; joinRename : 'TODO' ; INNER : 'inner' ; OUTER : 'outer' ; CROSS : 'cross' ; NUM : '0'..'9' ; WS : [ \t\n\t] -> skip ;
Add joinExpression to the relationalExpression
Add joinExpression to the relationalExpression
ANTLR
apache-2.0
statisticsnorway/java-vtl,hadrienk/java-vtl,hadrienk/java-vtl,statisticsnorway/java-vtl,statisticsnorway/java-vtl,hadrienk/java-vtl,statisticsnorway/java-vtl
71fb6f4f004cf36f99ab540b6120f32b77b81655
Code/src/main/antlr4/nl/utwente/group10/haskell/typeparser/Type.g4
Code/src/main/antlr4/nl/utwente/group10/haskell/typeparser/Type.g4
grammar Type; CT : [A-Z][a-z]+ ; VT : [a-z]+ ; WS : [ \t\r\n]+ -> skip ; type : functionType | compoundType; // function type functionType : compoundType ('->' type)+ ; compoundType : concreteType | tupleType | listType | parenType ; tupleType : '(' type (',' type)+ ')' ; // tuple type, k>=2 listType : '[' type ']' ; // list type parenType : '(' type ')' ; // parenthesised constructor concreteType : constantType | variableType ; constantType : CT ; variableType : VT ;
grammar Type; CT : [A-Z][a-z]+ ; VT : [a-z]+ ; WS : [ \t\r\n]+ -> skip ; type : functionType | compoundType ; // function type functionType : compoundType '->' type ; compoundType : constantType | variableType | tupleType | listType | parenType ; tupleType : '(' type (',' type)+ ')' ; // tuple type, k>=2 listType : '[' type ']' ; // list type parenType : '(' type ')' ; // type with parentheses constantType : CT ; variableType : VT ;
Change antler grammar to support new type API
Change antler grammar to support new type API
ANTLR
mit
andrewdavidmackenzie/viskell,viskell/viskell,wandernauta/viskell
18e55457fb1e3b0a8033e9d002da0950482d08c3
Grammar/Expression.g4
Grammar/Expression.g4
grammar Expression; expression : sign = ('-' | '+') expression | subExpresion | left = expression op = POW right = expression | left = expression op = ( MULT | DIV ) right = expression | left = expression op = ( ADD | SUB ) right = expression | function | value = ( IDENT | CONST ) ; subExpresion : LPAREN expression RPAREN ; function : name = IDENT LPAREN paramFirst = expression ( ',' paramRest += expression )* RPAREN ; CONST : INTEGER | DECIMAL; INTEGER : [0-9]+; DECIMAL : [0-9]+'.'[0-9]+; IDENT : [_A-Za-z#][_.A-Za-z#]*; LPAREN : '('; RPAREN : ')'; MULT : '*'; DIV : '/'; ADD : '+'; SUB : '-'; POW : '^'; WS : [ \r\t\u000C\n]+ -> skip ;
grammar Expression; expression : sign = ('-' | '+') expression | subExpresion | left = expression op = POW right = expression | left = expression op = ( MULT | DIV ) right = expression | left = expression op = ( ADD | SUB ) right = expression | function | value = ( IDENT | CONST ) ; subExpresion : LPAREN expression RPAREN ; function : name = IDENT LPAREN paramFirst = expression ( ',' paramRest += expression )* RPAREN ; CONST : INTEGER | DECIMAL; INTEGER : [0-9]+; DECIMAL : [0-9]+'.'[0-9]+; IDENT : [_#A-Za-z][_#.A-Za-z0-9]*; LPAREN : '('; RPAREN : ')'; MULT : '*'; DIV : '/'; ADD : '+'; SUB : '-'; POW : '^'; WS : [ \r\t\u000C\n]+ -> skip ;
Allow numeric digits also in the identifier names.
Allow numeric digits also in the identifier names.
ANTLR
apache-2.0
GillSoftLimited/GillSoft.ExpressionEvaluator
519c14139cf90aa85d76fea7e8fd296a487def47
java-vtl-parser/src/main/antlr4/kohl/hadrien/vtl/parser/VTL.g4
java-vtl-parser/src/main/antlr4/kohl/hadrien/vtl/parser/VTL.g4
/*- * #%L * Java VTL * %% * Copyright (C) 2016 Hadrien Kohl * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * #L% */ grammar VTL; import Atoms, Clauses, Conditional, Relational; start : statement+ EOF; /* Assignment */ statement : variableRef ':=' datasetExpression; exprMember : datasetExpression ('#' componentID)? ; /* Expressions */ datasetExpression : <assoc=right>datasetExpression clauseExpression #withClause | relationalExpression #withRelational | getExpression #withGet | putExpression #withPut | exprAtom #withAtom ; componentID : IDENTIFIER; getExpression : 'get' '(' datasetId ')'; putExpression : 'put(todo)'; datasetId : STRING_CONSTANT ; WS : [ \n\r\t\u000C] -> skip ;
/*- * #%L * Java VTL * %% * Copyright (C) 2016 Hadrien Kohl * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * #L% */ grammar VTL; import Atoms, Clauses, Conditional, Relational; start : statement+ EOF; /* Assignment */ statement : variableRef ':=' datasetExpression; exprMember : datasetExpression ('#' componentID)? ; /* Expressions */ datasetExpression : <assoc=right>datasetExpression clauseExpression #withClause | relationalExpression #withRelational | getExpression #withGet | putExpression #withPut | exprAtom #withAtom ; componentID : IDENTIFIER; getExpression : 'get' '(' datasetId ')'; putExpression : 'put(todo)'; datasetId : STRING_CONSTANT ; WS : [ \n\r\t\u000C] -> skip ; COMMENT : '/*' .*? '*/' -> skip;
Add comment to the parser grammar
Add comment to the parser grammar
ANTLR
apache-2.0
hadrienk/java-vtl,statisticsnorway/java-vtl,statisticsnorway/java-vtl,statisticsnorway/java-vtl,hadrienk/java-vtl,statisticsnorway/java-vtl,hadrienk/java-vtl
3a92e65e95143653dbbd4b9029e7d7827aca0d76
Code/src/main/antlr4/nl/utwente/group10/haskell/typeparser/Type.g4
Code/src/main/antlr4/nl/utwente/group10/haskell/typeparser/Type.g4
grammar Type; CT : [A-Z][a-z]+ ; VT : [a-z]+ ; WS : [ \t\r\n]+ -> skip ; type : typeClasses ? innerType ; innerType : functionType | compoundType ; // function type functionType : compoundType '->' innerType ; compoundType : constantType | variableType | tupleType | listType | parenType ; tupleType : '(' innerType (',' innerType)+ ')' ; // tuple type, k>=2 listType : '[' innerType ']' ; // list type parenType : '(' innerType ')' ; // type with parentheses constantType : typeConstructor (WS* innerType)* ; typeConstructor : CT ; variableType : VT ; typeClasses : '(' typeWithClass (',' typeWithClass)* ')' '=>' | typeWithClass '=>' ; typeWithClass : typeClass WS* classedType ; classedType : VT ; typeClass : CT ;
grammar Type; CT : [A-Z][A-Za-z]+ ; VT : [a-z]+ ; WS : [ \t\r\n]+ -> skip ; type : (typeClasses '=>')? innerType ; innerType : functionType | compoundType ; // function type functionType : compoundType '->' innerType ; compoundType : constantType | variableType | tupleType | listType | parenType ; tupleType : '(' innerType (',' innerType)+ ')' ; // tuple type, k>=2 listType : '[' innerType ']' ; // list type parenType : '(' innerType ')' ; // type with parentheses constantType : typeConstructor (innerType)* ; typeConstructor : CT ; variableType : VT ; typeClasses : '(' typeWithClass (',' typeWithClass)* ')' | typeWithClass ; typeWithClass : typeClass classedType ; classedType : VT ; typeClass : CT ;
Fix issue with lexing type classes with an uppercase character after the first position
Fix issue with lexing type classes with an uppercase character after the first position
ANTLR
mit
viskell/viskell,andrewdavidmackenzie/viskell,wandernauta/viskell
dc0a2c12f9cc5fdaf1d695b18cb926dea0ef9ad1
src/main/antlr/WorkflowCatalogQueryLanguage.g4
src/main/antlr/WorkflowCatalogQueryLanguage.g4
grammar WorkflowCatalogQueryLanguage; @header { package org.ow2.proactive.workflow_catalog.rest.query.parser; } // PARSER expression : and_expression ; and_expression : or_expression (AND or_expression)* ; or_expression : clause (OR clause)* ; clause : (AttributeLiteral COMPARE_OPERATOR StringLiteral) | LPAREN and_expression RPAREN ; // LEXER AND : 'AND' | '&&' ; OR : 'OR' | '||' ; COMPARE_OPERATOR : '!=' | '=' ; LPAREN : '(' ; RPAREN : ')' ; StringLiteral : '"' (~["\\\r\n] | '\\' (. | EOF))* '"' ; AttributeLiteral : LETTER (LETTER | DIGIT | '_' | '.')* ; WS : [ \t\r\n]+ -> skip ; fragment DIGIT: [0-9]; fragment LETTER: LOWERCASE | UPPERCASE; fragment LOWERCASE: [a-z]; fragment UPPERCASE: [A-Z];
grammar WorkflowCatalogQueryLanguage; @header { package org.ow2.proactive.workflow_catalog.rest.query.parser; } // PARSER expression : and_expression ; and_expression : or_expression (AND or_expression)* ; or_expression : clause (OR clause)* ; clause : (AttributeLiteral COMPARE_OPERATOR StringLiteral) #finalClause | LPAREN and_expression RPAREN #parenthesedClause ; // LEXER AND : 'AND' | '&&' ; OR : 'OR' | '||' ; COMPARE_OPERATOR : '!=' | '=' ; LPAREN : '(' ; RPAREN : ')' ; StringLiteral : '"' (~["\\\r\n] | '\\' (. | EOF))* '"' ; AttributeLiteral : LETTER (LETTER | DIGIT | '_' | '.')* ; WS : [ \t\r\n]+ -> skip ; fragment DIGIT: [0-9]; fragment LETTER: LOWERCASE | UPPERCASE; fragment LOWERCASE: [a-z]; fragment UPPERCASE: [A-Z];
Add aliases to clauses subterms
Add aliases to clauses subterms
ANTLR
agpl-3.0
gparanthoen/workflow-catalog,ShatalovYaroslav/catalog,yinan-liu/workflow-catalog,lpellegr/workflow-catalog,ShatalovYaroslav/catalog,laurianed/workflow-catalog,ow2-proactive/catalog,ow2-proactive/catalog,laurianed/catalog,paraita/workflow-catalog,ow2-proactive/workflow-catalog,laurianed/catalog,ow2-proactive/catalog,laurianed/catalog,ShatalovYaroslav/catalog
c222c0812214366a829b8ebccb11c84d08358e2f
CIV/Ccs/CcsLexer.g4
CIV/Ccs/CcsLexer.g4
lexer grammar CcsLexer; TERM: ';'; NIL: '0'; COMMA: ','; DIV : '/' ; DEF: '='; PAR: '|'; PREFIX: '.'; CHOICE: '+'; TAU: 'tau'; LBRACE : '{' ; RBRACE : '}' ; MUL : '*' ; SETDEF : 'set ' ; LPAREN : '(' ; RPAREN : ')' ; LBRACK : '[' ; RBRACK : ']' ; T__1 : '\\' ; COACTION: '\''[a-z][A-Za-z0-9]*; ACTION: [a-z][A-Za-z0-9]*; fragment InputCharacter: ~[\r\n\u0085\u2028\u2029]; COMMENT : MUL InputCharacter+ | MUL ; IDENTIFIER : [A-Z][A-Za-z0-9]* ; //RENAMINGS : RENAMING ',' RENAMINGS; //RENAMING : ACTION ACTION; // ignore whitespace WHITESPACE : [ \r\n\t] + -> channel (HIDDEN);
lexer grammar CcsLexer; TERM: ';'; NIL: '0'; COMMA: ','; DIV : '/' ; DEF: '='; PAR: '|'; PREFIX: '.'; CHOICE: '+'; TAU: 'tau'; LBRACE : '{' ; RBRACE : '}' ; MUL : '*' ; SETDEF : 'set ' ; LPAREN : '(' ; RPAREN : ')' ; LBRACK : '[' ; RBRACK : ']' ; T__1 : '\\' ; COACTION: '\''[a-z][A-Za-z0-9]*; ACTION: [a-z][A-Za-z0-9]*; fragment InputCharacter: ~[\r\n\u0085\u2028\u2029]; COMMENT : MUL InputCharacter+ | MUL ; IDENTIFIER : [A-Z][A-Za-z0-9]* ; // ignore whitespace WHITESPACE : [ \r\n\t] + -> channel (HIDDEN);
Remove useless stuff from lever grammar
Remove useless stuff from lever grammar
ANTLR
mit
lou1306/CIV,lou1306/CIV
54bdd611119013f3b8094a681883f58ef261c6c2
Code/src/main/antlr4/nl/utwente/group10/haskell/typeparser/Type.g4
Code/src/main/antlr4/nl/utwente/group10/haskell/typeparser/Type.g4
grammar Type; CT : [A-Z][a-z]+ ; VT : [a-z]+ ; WS : [ \t\r\n]+ -> skip ; baseType : typeClasses ? type ; type : functionType | compoundType ; // function type functionType : compoundType '->' type ; compoundType : constantType | variableType | tupleType | listType | parenType ; tupleType : '(' type (',' type)+ ')' ; // tuple type, k>=2 listType : '[' type ']' ; // list type parenType : '(' type ')' ; // type with parentheses constantType : typeConstructor (WS* type)* ; typeConstructor : CT ; variableType : VT ; typeClasses : '(' typeWithClass (',' typeWithClass)* ')' '=>' ; typeWithClass : typeClass WS* classedType ; classedType : VT ; typeClass : CT ;
grammar Type; CT : [A-Z][a-z]+ ; VT : [a-z]+ ; WS : [ \t\r\n]+ -> skip ; type : typeClasses ? innerType ; innerType : functionType | compoundType ; // function type functionType : compoundType '->' innerType ; compoundType : constantType | variableType | tupleType | listType | parenType ; tupleType : '(' innerType (',' innerType)+ ')' ; // tuple type, k>=2 listType : '[' innerType ']' ; // list type parenType : '(' innerType ')' ; // type with parentheses constantType : typeConstructor (WS* innerType)* ; typeConstructor : CT ; variableType : VT ; typeClasses : '(' typeWithClass (',' typeWithClass)* ')' '=>' ; typeWithClass : typeClass WS* classedType ; classedType : VT ; typeClass : CT ;
Fix bug in Antlr grammar
Fix bug in Antlr grammar
ANTLR
mit
viskell/viskell,andrewdavidmackenzie/viskell,wandernauta/viskell
85b7e11fc4a86cd7bdc7878f86b597657b543bbd
src/antlr/PTP.g4
src/antlr/PTP.g4
grammar PTP; @header { package pt.up.fe.iart.proj1.parser; } map : stmt+ ; stmt : node_stmt #node | edge_stmt #edge ; edge_stmt : 'Edge' '(' from=node_stmt ',' to=node_stmt ',' weight=(INT|REAL) ')'; node_stmt : 'GasStation' '(' position ')' #GasStation | 'GenericLocation' '(' position ')' #GenericLocation | 'PatientLocation' '(' position ')' #PatientLocation | 'Filiation' '(' position ',' bool ')' #Filiation ; position : '(' x=INT ',' y=INT ')' ; bool : 'true' | 'false' ; INT: [0-9]+ ; REAL: [0-9]+ '.' [0-9]* ; WS : [ \t\r\n]+ -> skip;
grammar PTP; @header { package pt.up.fe.iart.proj1.parser; } map : stmt+ ; stmt : node_stmt #node | edge_stmt #edge ; edge_stmt : 'Edge' '(' from=node_stmt ',' to=node_stmt ',' weight=(INT|REAL) ')'; node_stmt : 'GasStation' '(' position ')' #GasStation | 'GenericLocation' '(' position ')' #GenericLocation | 'PatientLocation' '(' position ')' #PatientLocation | 'Filiation' '(' position ',' bool ')' #Filiation ; position : '(' x=INT ',' y=INT ')' ; bool : 'true' | 'false' ; INT: [0-9]+ ; REAL: [0-9]+ '.' [0-9]* ; WS : [ \t\r\n]+ -> skip; COMMENT : '/*' .*? '*/' -> skip ; LINE_COMMENT : '//' .*? '\r'? '\n' -> skip ;
Add comments to input grammar.
Add comments to input grammar.
ANTLR
mit
migulorama/feup-iart-2014,migulorama/feup-iart-2014
9776dff4dbcafe4ee9b13d52fde5fbbdc2a0f6f2
Code/src/main/antlr4/nl/utwente/group10/haskell/typeparser/Type.g4
Code/src/main/antlr4/nl/utwente/group10/haskell/typeparser/Type.g4
grammar Type; CT : [A-Z][a-z]+ ; VT : [a-z]+ ; WS : [ \t\r\n]+ -> skip ; type : typeClasses ? innerType ; innerType : functionType | compoundType ; // function type functionType : compoundType '->' innerType ; compoundType : constantType | variableType | tupleType | listType | parenType ; tupleType : '(' innerType (',' innerType)+ ')' ; // tuple type, k>=2 listType : '[' innerType ']' ; // list type parenType : '(' innerType ')' ; // type with parentheses constantType : typeConstructor (WS* innerType)* ; typeConstructor : CT ; variableType : VT ; typeClasses : '(' typeWithClass (',' typeWithClass)* ')' '=>' ; typeWithClass : typeClass WS* classedType ; classedType : VT ; typeClass : CT ;
grammar Type; CT : [A-Z][a-z]+ ; VT : [a-z]+ ; WS : [ \t\r\n]+ -> skip ; type : typeClasses ? innerType ; innerType : functionType | compoundType ; // function type functionType : compoundType '->' innerType ; compoundType : constantType | variableType | tupleType | listType | parenType ; tupleType : '(' innerType (',' innerType)+ ')' ; // tuple type, k>=2 listType : '[' innerType ']' ; // list type parenType : '(' innerType ')' ; // type with parentheses constantType : typeConstructor (WS* innerType)* ; typeConstructor : CT ; variableType : VT ; typeClasses : '(' typeWithClass (',' typeWithClass)* ')' '=>' | typeWithClass '=>' ; typeWithClass : typeClass WS* classedType ; classedType : VT ; typeClass : CT ;
Add single type class notation to type parser
Add single type class notation to type parser
ANTLR
mit
viskell/viskell,wandernauta/viskell,andrewdavidmackenzie/viskell
b879e117963635056adf1d2029e3d4e6d44eede4
sites/default.vhost
sites/default.vhost
server { server_name default; root /var/www/public; index main.php; client_max_body_size 100M; fastcgi_read_timeout 1800; location / { try_files $uri $uri/ /index.php$is_args$args; } location /status { access_log off; allow 172.17.0.0/16; deny all; include /etc/nginx/fastcgi_params; fastcgi_param SCRIPT_FILENAME /status; fastcgi_pass unix:/var/run/php5-fpm.sock; } location /ping { access_log off; allow all; include fastcgi_params; fastcgi_param SCRIPT_FILENAME /ping; fastcgi_pass unix:/Var/run/php5-fpm.sock; } location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ { expires max; log_not_found off; access_log off; } location ~ \.php$ { try_files $uri =404; include fastcgi_params; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_pass unix:/var/run/php5-fpm.sock; } }
server { server_name default; root /var/www/public; index main.php; client_max_body_size 100M; fastcgi_read_timeout 1800; location / { try_files $uri $uri.html $uri/ @extensionless-php; } location @extensionless-php { rewrite ^(.*)$ $1.php last; } location /status { access_log off; allow 172.17.0.0/16; deny all; include /etc/nginx/fastcgi_params; fastcgi_param SCRIPT_FILENAME /status; fastcgi_pass unix:/var/run/php5-fpm.sock; } location /ping { access_log off; allow all; include fastcgi_params; fastcgi_param SCRIPT_FILENAME /ping; fastcgi_pass unix:/Var/run/php5-fpm.sock; } location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ { expires max; log_not_found off; access_log off; } location ~ \.php$ { try_files $uri =404; include fastcgi_params; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_pass unix:/var/run/php5-fpm.sock; } }
Remove .php extensions from url
Remove .php extensions from url
ApacheConf
mit
hector-valdivia/docker-php-mongodb-mysql-nginx
ce95cbae420b99535cdc20c267ab3af809841a3e
examples/apache2/default.vhost
examples/apache2/default.vhost
WSGIPythonPath /path/to/repo/FuzzManager/server <VirtualHost *:80> ServerName fuzzmanager.your.domain Alias /static/ /path/to/repo/FuzzManager/server/crashmanager/static/ Alias /tests/ /path/to/repo/FuzzManager/server/tests/ WSGIScriptAlias / /path/to/repo/FuzzManager/server/server/wsgi.py WSGIPassAuthorization On <Location /> AuthType Basic AuthName "LDAP Login" AuthBasicProvider file ldap AuthUserFile /path/to/.htpasswd # Your LDAP configuration here, including Require directives # This user is used by clients to download test cases and signatures Require user fuzzmanager </Location> <Location /crashmanager/rest/> Satisfy Any Allow from all </Location> <Directory /path/to/repo/FuzzManager/server> <Files wsgi.py> Order deny,allow Allow from all </Files> </Directory> </VirtualHost>
WSGIDaemonProcess fuzzmanager.your.domain python-path=/path/to/repo/FuzzManager/server WSGIProcessGroup fuzzmanager.your.domain WSGIApplicationGroup %{GLOBAL} <VirtualHost *:80> ServerName fuzzmanager.your.domain Alias /static/ /path/to/repo/FuzzManager/server/crashmanager/static/ Alias /tests/ /path/to/repo/FuzzManager/server/tests/ WSGIScriptAlias / /path/to/repo/FuzzManager/server/server/wsgi.py process-group=fuzzmanager.your.domain WSGIPassAuthorization On <Location /> AuthType Basic AuthName "LDAP Login" AuthBasicProvider file ldap AuthUserFile /path/to/.htpasswd # Your LDAP configuration here, including Require directives # This user is used by clients to download test cases and signatures Require user fuzzmanager </Location> <Location /crashmanager/rest/> Satisfy Any Allow from all </Location> <Location /ec2spotmanager/rest/> Satisfy Any Allow from all </Location> <Directory /path/to/repo/FuzzManager/server> <Files wsgi.py> Order deny,allow Allow from all </Files> </Directory> </VirtualHost>
Update example vhost file for Apache2
Update example vhost file for Apache2
ApacheConf
mpl-2.0
MozillaSecurity/FuzzManager,MozillaSecurity/FuzzManager,MozillaSecurity/FuzzManager,MozillaSecurity/FuzzManager
da4e577306c8e56a1caf1cac2fbea49003a1e720
apiary.apib
apiary.apib
FORMAT: 1A HOST: https://neighbor.ly/api/ # Neighbor.ly Here you will find how to integrate an application with Neighbor.ly. Check our [Dashboard source code](https://github.com/neighborly/neighborly-dashboard) for a real use case. # Sessions Your first stop when integrating with Neighborly. For a lot of endpoints, you are expected to provide an `access_token`, managed by this section. ## Sessions [/sessions] ### Create a session [POST] + Request { "email": "[email protected]", "password": "your-really-strong-password" } + Header Accept: application/vnd.api+json;revision=1 + Response 201 (application/json) { "access_token": "Ndf6kxgLfr_KMhAg8wMpm7Yit2cvHkv9oI8qIXWiHmZdeqI1h0cmn8p4wCEhoZS-AQY", "user_id": 1 } + Response 400 (application/json) {} + Response 401 (application/json) {}
FORMAT: 1A HOST: https://neighbor.ly/api/ # Neighbor.ly Here you will find how to integrate an application with Neighbor.ly. Check our [Dashboard source code](https://github.com/neighborly/neighborly-dashboard) for a real use case. # Sessions Your first stop when integrating with Neighborly. For a lot of endpoints, you are expected to provide an `access_token`, managed by this section. ## Sessions [/sessions] ### Create a session [POST] + Request + Header Accept: application/vnd.api+json;revision=1 + Body { "email": "[email protected]", "password": "your-really-strong-password" } + Response 201 (application/json) { "access_token": "Ndf6kxgLfr_KMhAg8wMpm7Yit2cvHkv9oI8qIXWiHmZdeqI1h0cmn8p4wCEhoZS-AQY", "user_id": 1 } + Response 400 (application/json) {} + Response 401 (application/json) {}
Add body section to create a new session
[DOC] Add body section to create a new session
API Blueprint
mit
FromUte/dune-api
e692e248adb849c0ba0f1b0bf50598c355a2af13
apiary.apib
apiary.apib
# Lion API Lion is a basic localization service using `git` as the backend for storing translations. ## Request headers All requests to Lion must include the following headers: - `Lion-Api-Version` # Group Projects ## Project collection [/projects] ### List projects [GET] List all configured projects + Request (application/json) + Header Lion-Api-Version: v1 + Response 200 (application/json) + Header Lion-Api-Version: v1 + Body { "projects": [ "projectA": { "name" "projectA" // All project details } ] } ## Project management [/project/{name}] + Parameters + name (required, string) ... Project name ### Get project [GET] Fetch project details, given the projects' name. + Request (application/json) + Header Lion-Api-Version: v1 + Response 200 (application/json) + Header Lion-Api-Version: v1 + Body { "name": "Project name", "resources": [ "resource1", "..." ] } + Response 404 (application/json) + Header Lion-Api-Version: v1
# Lion API Lion is a basic localization service using `git` as the backend for storing translations. ## Request headers Requests should have the `Lion-Api-Version` header set. The current API version is `v1`. If the header is not set, it is assumed to be the latest version. Example header: - `Lion-Api-Version: v1` # Group Projects ## Project collection [/projects] ### List projects [GET] List all configured projects + Request (application/json) + Header Lion-Api-Version: v1 + Response 200 (application/json) + Header Lion-Api-Version: v1 + Body { "projects": [ "projectA": { "name" "projectA" // All project details } ] } ## Project management [/project/{name}] + Parameters + name (required, string) ... Project name ### Get project [GET] Fetch project details, given the projects' name. + Request (application/json) + Header Lion-Api-Version: v1 + Response 200 (application/json) + Header Lion-Api-Version: v1 + Body { "name": "Project name", "resources": [ "resource1", "..." ] } + Response 404 (application/json) + Header Lion-Api-Version: v1
Make the API version optional in the request
Make the API version optional in the request
API Blueprint
mit
sebdah/lion
390fe21cca8b9cf9d89e083a0924e5ca2249668b
apiary.apib
apiary.apib
FORMAT: 1A HOST: https://www.moneyadviceservice.org.uk # Money Advice Service API for the Money Advice Service. # Articles Article related resources of the **Money Advice Service**. ## Article [/articles/{id}] A single Article object with all its details + Parameters + id (required, string, `foo-bar`) ... String `id` of the Article to perform action with. Has example value. ### Retrieve a Article [GET] + Response 200 (application/json) + Header Link: <https://www.moneyadviceservice.org.uk/cy/articles/ble-i-gael-cyngor-am-ddim-ynghylch-dyled>; rel="alternate"; hreflang="cy"; title="Ble i gael cyngor am ddim ynghylch dyled" + Body { "url": "https://www.moneyadviceservice.org.uk/en/articles/where-to-go-to-get-free-debt-advice", "title": "Where to go to get free debt advice", "description": "Find out where you can get free, confidential help if you are struggling with debt" }
FORMAT: 1A HOST: https://www.moneyadviceservice.org.uk # Money Advice Service API for the Money Advice Service. # Articles Article related resources of the **Money Advice Service**. ## Article [/articles/{id}] A single Article object with all its details + Parameters + id (required, string, `foo-bar`) ... String `id` of the Article to perform action with. Has example value. ### Retrieve a Article [GET] + Response 200 (application/json) + Header Link: <https://www.moneyadviceservice.org.uk/cy/articles/ble-i-gael-cyngor-am-ddim-ynghylch-dyled>; rel="alternate"; hreflang="cy"; title="Ble i gael cyngor am ddim ynghylch dyled" + Body { "url": "https://www.moneyadviceservice.org.uk/en/articles/where-to-go-to-get-free-debt-advice", "title": "Where to go to get free debt advice", "description": "Find out where you can get free, confidential help if you are struggling with debt", "body": "<h2>Watch out for companies that aren't charities</h2><p>Look out for companies with misleading names that sound like debt charities but are actually commercial businesses.</p><p>Never ever pay for services from this type of company.</p>" }
Add article body to API Blueprint
Add article body to API Blueprint
API Blueprint
mit
moneyadviceservice/frontend,moneyadviceservice/frontend,moneyadviceservice/frontend,moneyadviceservice/frontend
843c0ce0539fd33f1f5d9da851466c5856ad5911
apiary.apib
apiary.apib
FORMAT: 1A HOST: https://orgmanager.miguelpiedrafita.com/api # Orgmanager API The Orgmanager API allows you to integrate Orgmanager with other applications and projects. ## Questions Collection [/questions] ### List All Questions [GET] + Response 200 (application/json) [ { "question": "Favourite programming language?", "published_at": "2015-08-05T08:40:51.620Z", "choices": [ { "choice": "Swift", "votes": 2048 }, { "choice": "Python", "votes": 1024 }, { "choice": "Objective-C", "votes": 512 }, { "choice": "Ruby", "votes": 256 } ] } ] ### Create a New Question [POST] You may create your own question using this action. It takes a JSON object containing a question and a collection of answers in the form of choices. + Request (application/json) { "question": "Favourite programming language?", "choices": [ "Swift", "Python", "Objective-C", "Ruby" ] } + Response 201 (application/json) + Headers Location: /questions/2 + Body { "question": "Favourite programming language?", "published_at": "2015-08-05T08:40:51.620Z", "choices": [ { "choice": "Swift", "votes": 0 }, { "choice": "Python", "votes": 0 }, { "choice": "Objective-C", "votes": 0 }, { "choice": "Ruby", "votes": 0 } ] }
FORMAT: 1A HOST: https://orgmanager.miguelpiedrafita.com/api # Orgmanager API The Orgmanager API allows you to integrate Orgmanager with other applications and projects. ## User Data [/user] ### Get user info [GET] + Response 200 (application/json) { "id":1, "name":"Miguel Piedrafita", "email":"[email protected]", "github_username":"m1guelpf", "created_at":"2017-01-25 18:44:32", "updated_at":"2017-02-16 19:40:50" } ## User Organizations [/user/orgs] ### Get user organizations [GET] + Response 200 (application/json) { "id":1, "name":"Test Organization", "url":"https:\/\/api.github.com\/orgs\/test-org", "description":null, "avatar":"https:\/\/miguelpiedrafita.com\/logo.png", "invitecount":100 }
Add /user and /user/orgs api endpoints to api docs
:memo: Add /user and /user/orgs api endpoints to api docs
API Blueprint
mpl-2.0
orgmanager/orgmanager,orgmanager/orgmanager,orgmanager/orgmanager
ee013b2a4ccd066ce1357ed01e541f0d620283c0
apiary.apib
apiary.apib
FORMAT: 1A HOST: https://www.moneyadviceservice.org.uk # Money Advice Service API for the Money Advice Service. # Articles Article related resources of the **Money Advice Service**. ## Article [/articles/{id}] A single Article object with all its details + Parameters + id (required, string, `foo-bar`) ... String `id` of the Article to perform action with. Has example value. ### Retrieve a Article [GET] + Response 200 (application/json) + Header Link: <https://www.moneyadviceservice.org.uk/cy/articles/ble-i-gael-cyngor-am-ddim-ynghylch-dyled>; rel="alternate"; hreflang="cy"; title="Ble i gael cyngor am ddim ynghylch dyled" + Body { "url": "https://www.moneyadviceservice.org.uk/en/articles/where-to-go-to-get-free-debt-advice", "title": "Where to go to get free debt advice", "description": "Find out where you can get free, confidential help if you are struggling with debt", "body": "<h2>Watch out for companies that aren't charities</h2><p>Look out for companies with misleading names that sound like debt charities but are actually commercial businesses.</p><p>Never ever pay for services from this type of company.</p>" }
FORMAT: 1A HOST: https://www.moneyadviceservice.org.uk # Money Advice Service API for the Money Advice Service. # Articles Article related resources of the **Money Advice Service**. ## Article [/{locale}/articles/{id}] A single Article object with all its details + Parameters + locale = `en` (optional, string, `cy`) ... Locale of the Article. + id (required, string, `foo-bar`) ... ID of the Article. ### Retrieve a Article [GET] + Response 200 (application/json) + Header Link: <https://www.moneyadviceservice.org.uk/cy/articles/ble-i-gael-cyngor-am-ddim-ynghylch-dyled>; rel="alternate"; hreflang="cy"; title="Ble i gael cyngor am ddim ynghylch dyled" + Body { "url": "https://www.moneyadviceservice.org.uk/en/articles/where-to-go-to-get-free-debt-advice", "title": "Where to go to get free debt advice", "description": "Find out where you can get free, confidential help if you are struggling with debt", "body": "<h2>Watch out for companies that aren't charities</h2><p>Look out for companies with misleading names that sound like debt charities but are actually commercial businesses.</p><p>Never ever pay for services from this type of company.</p>" }
Add locale to API Blueprint
Add locale to API Blueprint
API Blueprint
mit
moneyadviceservice/frontend,moneyadviceservice/frontend,moneyadviceservice/frontend,moneyadviceservice/frontend
74f27459b24a4fdf9615147f6b720b2bd62616e9
apiary.apib
apiary.apib
FORMAT: 1A HOST: https://api.moneyadviceservice.org.uk # Money Advice Service API for the Money Advice Service. # Articles Article related resources of the **Money Advice Service**. ## Article [/articles/{id}] A single Article object with all its details + Parameters + id (required, string, `foo-bar`) ... String `id` of the Article to perform action with. Has example value. ### Retrieve a Article [GET] + Response 200 (application/json) + Header Link: <https://www.moneyadviceservice.org.uk/cy/articles/ble-i-gael-cyngor-am-ddim-ynghylch-dyled>; rel="alternate"; hreflang="cy"; title="Ble i gael cyngor am ddim ynghylch dyled" + Body { "id": "where-to-go-to-get-free-debt-advice", "title": "Where to go to get free debt advice", "description": "Find out where you can get free, confidential help if you are struggling with debt" }
FORMAT: 1A HOST: https://www.moneyadviceservice.org.uk # Money Advice Service API for the Money Advice Service. # Articles Article related resources of the **Money Advice Service**. ## Article [/articles/{id}] A single Article object with all its details + Parameters + id (required, string, `foo-bar`) ... String `id` of the Article to perform action with. Has example value. ### Retrieve a Article [GET] + Response 200 (application/json) + Header Link: <https://www.moneyadviceservice.org.uk/cy/articles/ble-i-gael-cyngor-am-ddim-ynghylch-dyled>; rel="alternate"; hreflang="cy"; title="Ble i gael cyngor am ddim ynghylch dyled" + Body { "url": "https://www.moneyadviceservice.org.uk/en/articles/where-to-go-to-get-free-debt-advice", "title": "Where to go to get free debt advice", "description": "Find out where you can get free, confidential help if you are struggling with debt" }
Add URLs to API Blueprint
Add URLs to API Blueprint
API Blueprint
mit
moneyadviceservice/frontend,moneyadviceservice/frontend,moneyadviceservice/frontend,moneyadviceservice/frontend
4371d7b37d7dd7736e30daec9ac1279d4f8ff209
apiary.apib
apiary.apib
FORMAT: 1A HOST: https://www.moneyadviceservice.org.uk # Money Advice Service API for the Money Advice Service. # Articles Article related resources of the **Money Advice Service**. ## Article [/{locale}/articles/{id}] A single Article object with all its details + Parameters + locale = `en` (optional, string, `cy`) ... Locale of the Article. + id (required, string, `where-to-go-to-get-free-debt-advice`) ... ID of the Article. ### Retrieve a Article [GET] + Response 200 (application/json) + Header Link: <https://www.moneyadviceservice.org.uk/cy/articles/ble-i-gael-cyngor-am-ddim-ynghylch-dyled>; rel="alternate"; hreflang="cy"; title="Ble i gael cyngor am ddim ynghylch dyled" + Body { "url": "https://www.moneyadviceservice.org.uk/en/articles/where-to-go-to-get-free-debt-advice", "title": "Where to go to get free debt advice", "description": "Find out where you can get free, confidential help if you are struggling with debt", "body": "<h2>Watch out for companies that aren't charities</h2><p>Look out for companies with misleading names that sound like debt charities but are actually commercial businesses.</p><p>Never ever pay for services from this type of company.</p>" }
FORMAT: 1A HOST: https://www.moneyadviceservice.org.uk # Money Advice Service API for the Money Advice Service. # Articles Article related resources of the **Money Advice Service**. ## Article [/{locale}/articles/{id}] A single Article object with all its details + Parameters + locale = `en` (optional, string, `en`) ... Locale of the Article. + id (required, string, `where-to-go-to-get-free-debt-advice`) ... ID of the Article. ### Retrieve a Article [GET] + Response 200 (application/json) + Header Link: <https://www.moneyadviceservice.org.uk/cy/articles/ble-i-gael-cyngor-am-ddim-ynghylch-dyled>; rel="alternate"; hreflang="cy"; title="Ble i gael cyngor am ddim ynghylch dyled" + Body { "url": "https://www.moneyadviceservice.org.uk/en/articles/where-to-go-to-get-free-debt-advice", "title": "Where to go to get free debt advice", "description": "Find out where you can get free, confidential help if you are struggling with debt", "body": "<h2>Watch out for companies that aren't charities</h2><p>Look out for companies with misleading names that sound like debt charities but are actually commercial businesses.</p><p>Never ever pay for services from this type of company.</p>" }
Fix locale example for API Blueprint
Fix locale example for API Blueprint
API Blueprint
mit
moneyadviceservice/frontend,moneyadviceservice/frontend,moneyadviceservice/frontend,moneyadviceservice/frontend
c7ef38c2709beda905574f61d62ea58c31258785
apiary.apib
apiary.apib
FORMAT: 1A HOST: https://api.moneyadviceservice.org.uk # Money Advice Service API for the Money Advice Service's API. # Group Articles Article related resources of the **Money Advice Service** ## Articles Collection [/articles] ### List all Articles [GET] + Response 200 (application/json) [{ "id": 1, "content": "Jogging in park" }, { "id": 2, "content": "Pick-up posters from post-office" }] ## Article [/articles/{id}] A single Article object with all its details + Parameters + slug (required, string, `the-article`) ... String `id` of the Article to perform action with. Has example value. ### Retrieve a Article [GET] + Response 200 (application/json) + Header X-My-Header: The Value + Body { "slug": "the-article", "title": "Pick-up posters from post-office", content: "<p>La de da</p>" }
FORMAT: 1A HOST: https://api.moneyadviceservice.org.uk # Money Advice Service API for the Money Advice Service. # Articles Article related resources of the **Money Advice Service**. ## Article [/articles/{id}] A single Article object with all its details + Parameters + id (required, string, `foo-bar`) ... String `id` of the Article to perform action with. Has example value. ### Retrieve a Article [GET] + Response 200 (application/json) + Header X-My-Header: The Value + Body { "id": "where-to-go-to-get-free-debt-advice", "title": "Where to go to get free debt advice" }
Remove articles collection from API blueprint
Remove articles collection from API blueprint
API Blueprint
mit
moneyadviceservice/frontend,moneyadviceservice/frontend,moneyadviceservice/frontend,moneyadviceservice/frontend
b27491ea42a293d1fd77375a6e24e6926dd36b27
apiary.apib
apiary.apib
FORMAT: 1A HOST: https://www.moneyadviceservice.org.uk # Money Advice Service API for the Money Advice Service. # Articles Article related resources of the **Money Advice Service**. ## Article [/articles/{id}] A single Article object with all its details + Parameters + id (required, string, `foo-bar`) ... String `id` of the Article to perform action with. Has example value. ### Retrieve a Article [GET] + Response 200 (application/json) + Header Link: <https://www.moneyadviceservice.org.uk/cy/articles/ble-i-gael-cyngor-am-ddim-ynghylch-dyled>; rel="alternate"; hreflang="cy"; title="Ble i gael cyngor am ddim ynghylch dyled" + Body { "url": "https://www.moneyadviceservice.org.uk/en/articles/where-to-go-to-get-free-debt-advice", "title": "Where to go to get free debt advice", "description": "Find out where you can get free, confidential help if you are struggling with debt", "body": "<h2>Watch out for companies that aren't charities</h2><p>Look out for companies with misleading names that sound like debt charities but are actually commercial businesses.</p><p>Never ever pay for services from this type of company.</p>" }
FORMAT: 1A HOST: https://www.moneyadviceservice.org.uk # Money Advice Service API for the Money Advice Service. # Articles Article related resources of the **Money Advice Service**. ## Article [/{locale}/articles/{id}] A single Article object with all its details + Parameters + locale = `en` (optional, string, `cy`) ... Locale of the Article. + id (required, string, `foo-bar`) ... ID of the Article. ### Retrieve a Article [GET] + Response 200 (application/json) + Header Link: <https://www.moneyadviceservice.org.uk/cy/articles/ble-i-gael-cyngor-am-ddim-ynghylch-dyled>; rel="alternate"; hreflang="cy"; title="Ble i gael cyngor am ddim ynghylch dyled" + Body { "url": "https://www.moneyadviceservice.org.uk/en/articles/where-to-go-to-get-free-debt-advice", "title": "Where to go to get free debt advice", "description": "Find out where you can get free, confidential help if you are struggling with debt", "body": "<h2>Watch out for companies that aren't charities</h2><p>Look out for companies with misleading names that sound like debt charities but are actually commercial businesses.</p><p>Never ever pay for services from this type of company.</p>" }
Add locale to API Blueprint
Add locale to API Blueprint
API Blueprint
mit
moneyadviceservice/frontend,moneyadviceservice/frontend,moneyadviceservice/frontend,moneyadviceservice/frontend
8b6b8d8d5bbd20a7ae5750d3fb635a2049072cd7
apiary.apib
apiary.apib
FORMAT: 1A HOST: https://api.moneyadviceservice.org.uk # Money Advice Service API for the Money Advice Service. # Articles Article related resources of the **Money Advice Service**. ## Article [/articles/{id}] A single Article object with all its details + Parameters + id (required, string, `foo-bar`) ... String `id` of the Article to perform action with. Has example value. ### Retrieve a Article [GET] + Response 200 (application/json) + Header X-My-Header: The Value + Body { "id": "where-to-go-to-get-free-debt-advice", "title": "Where to go to get free debt advice" }
FORMAT: 1A HOST: https://api.moneyadviceservice.org.uk # Money Advice Service API for the Money Advice Service. # Articles Article related resources of the **Money Advice Service**. ## Article [/articles/{id}] A single Article object with all its details + Parameters + id (required, string, `foo-bar`) ... String `id` of the Article to perform action with. Has example value. ### Retrieve a Article [GET] + Response 200 (application/json) + Header Link: <https://www.moneyadviceservice.org.uk/cy/articles/ble-i-gael-cyngor-am-ddim-ynghylch-dyled>; rel="alternate"; hreflang="cy"; title="Ble i gael cyngor am ddim ynghylch dyled" + Body { "id": "where-to-go-to-get-free-debt-advice", "title": "Where to go to get free debt advice" }
Add link header to API Blueprint
Add link header to API Blueprint
API Blueprint
mit
moneyadviceservice/frontend,moneyadviceservice/frontend,moneyadviceservice/frontend,moneyadviceservice/frontend
084318af5e97a97a8dbe519fa36fb8986de44c97
apiary.apib
apiary.apib
FORMAT: 1A HOST: https://www.moneyadviceservice.org.uk # Money Advice Service API for the Money Advice Service. # Articles Article related resources of the **Money Advice Service**. ## Article [/articles/{id}] A single Article object with all its details + Parameters + id (required, string, `foo-bar`) ... String `id` of the Article to perform action with. Has example value. ### Retrieve a Article [GET] + Response 200 (application/json) + Header Link: <https://www.moneyadviceservice.org.uk/cy/articles/ble-i-gael-cyngor-am-ddim-ynghylch-dyled>; rel="alternate"; hreflang="cy"; title="Ble i gael cyngor am ddim ynghylch dyled" + Body { "url": "https://www.moneyadviceservice.org.uk/en/articles/where-to-go-to-get-free-debt-advice", "title": "Where to go to get free debt advice", "description": "Find out where you can get free, confidential help if you are struggling with debt" }
FORMAT: 1A HOST: https://www.moneyadviceservice.org.uk # Money Advice Service API for the Money Advice Service. # Articles Article related resources of the **Money Advice Service**. ## Article [/articles/{id}] A single Article object with all its details + Parameters + id (required, string, `foo-bar`) ... String `id` of the Article to perform action with. Has example value. ### Retrieve a Article [GET] + Response 200 (application/json) + Header Link: <https://www.moneyadviceservice.org.uk/cy/articles/ble-i-gael-cyngor-am-ddim-ynghylch-dyled>; rel="alternate"; hreflang="cy"; title="Ble i gael cyngor am ddim ynghylch dyled" + Body { "url": "https://www.moneyadviceservice.org.uk/en/articles/where-to-go-to-get-free-debt-advice", "title": "Where to go to get free debt advice", "description": "Find out where you can get free, confidential help if you are struggling with debt", "body": "<h2>Watch out for companies that aren't charities</h2><p>Look out for companies with misleading names that sound like debt charities but are actually commercial businesses.</p><p>Never ever pay for services from this type of company.</p>" }
Add article body to API Blueprint
Add article body to API Blueprint
API Blueprint
mit
moneyadviceservice/frontend,moneyadviceservice/frontend,moneyadviceservice/frontend,moneyadviceservice/frontend
689bb1f568ac437dc82d7e6a9e75f3a80840e64c
apiary.apib
apiary.apib
# Lion API Lion is a basic localization service using `git` as the backend for storing translations. ## Request headers Requests should have the `Lion-Api-Version` header set. The current API version is `v1`. If the header is not set, it is assumed to be the latest version. Example header: - `Lion-Api-Version: v1` # Group Projects ## Project collection [/projects] ### List projects [GET] List all configured projects + Request (application/json) + Header Lion-Api-Version: v1 + Response 200 (application/json) + Header Lion-Api-Version: v1 + Body { "projects": [ "projectA": { "name" "projectA" // All project details } ] } ## Project management [/project/{name}] + Parameters + name (required, string) ... Project name ### Get project [GET] Fetch project details, given the projects' name. + Request (application/json) + Header Lion-Api-Version: v1 + Response 200 (application/json) + Header Lion-Api-Version: v1 + Body { "name": "Project name", "resources": [ "resource1", "..." ] } + Response 404 (application/json) + Header Lion-Api-Version: v1
# Lion API Lion is a basic localization service using `git` as the backend for storing translations. ## Request headers Requests should have the `Lion-Api-Version` header set. The current API version is `v1`. If the header is not set, it is assumed to be the latest version. Example header: - `Lion-Api-Version: v1` # Group Projects ## Project collection [/projects] ### List projects [GET] List all configured projects + Request (application/json) + Header Lion-Api-Version: v1 + Response 200 (application/json) + Header Lion-Api-Version: v1 + Body { "projects": [ "projectA": { "name" "projectA" // All project details ... } ] } ## Project management [/project/{slug}] + Parameters + slug (required, string) ... Project slug ### Get project [GET] Fetch project details, given the projects' name. + Request (application/json) + Header Lion-Api-Version: v1 + Response 200 (application/json) + Header Lion-Api-Version: v1 + Body { "name": "Project name", "slug": "project-name", "resources": [ "resource1", "..." ] } + Response 404 (application/json) + Header Lion-Api-Version: v1
Substitute name with slug for fetching projects
Substitute name with slug for fetching projects
API Blueprint
mit
sebdah/lion