iron_functions 0.0.5 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +0 -0
- data/README.md +8 -9
- data/VERSION +1 -1
- data/docs/App.md +1 -0
- data/docs/AppWrapper.md +0 -0
- data/docs/AppsApi.md +0 -0
- data/docs/AppsWrapper.md +0 -0
- data/docs/Error.md +0 -0
- data/docs/ErrorBody.md +0 -0
- data/docs/NewTask.md +9 -0
- data/docs/NewTasksWrapper.md +0 -0
- data/docs/Route.md +3 -0
- data/docs/RouteWrapper.md +2 -0
- data/docs/RoutesApi.md +4 -4
- data/docs/RoutesWrapper.md +0 -1
- data/docs/Task.md +2 -0
- data/docs/TaskWrapper.md +0 -0
- data/docs/TasksApi.md +2 -2
- data/docs/TasksWrapper.md +0 -0
- data/git_push.sh +0 -0
- data/iron_functions.gemspec +3 -3
- data/lib/iron_functions.rb +3 -4
- data/lib/iron_functions/api/apps_api.rb +2 -2
- data/lib/iron_functions/api/routes_api.rb +7 -7
- data/lib/iron_functions/api/tasks_api.rb +5 -5
- data/lib/iron_functions/api_client.rb +2 -2
- data/lib/iron_functions/api_error.rb +2 -2
- data/lib/iron_functions/configuration.rb +2 -2
- data/lib/iron_functions/models/app.rb +18 -6
- data/lib/iron_functions/models/app_wrapper.rb +2 -2
- data/lib/iron_functions/models/apps_wrapper.rb +2 -2
- data/lib/iron_functions/models/error.rb +2 -2
- data/lib/iron_functions/models/error_body.rb +2 -2
- data/lib/iron_functions/models/new_task.rb +211 -0
- data/lib/iron_functions/models/new_tasks_wrapper.rb +1 -1
- data/lib/iron_functions/models/route.rb +71 -6
- data/lib/iron_functions/models/route_wrapper.rb +21 -3
- data/lib/iron_functions/models/routes_wrapper.rb +3 -13
- data/lib/iron_functions/models/task.rb +24 -3
- data/lib/iron_functions/models/task_wrapper.rb +2 -2
- data/lib/iron_functions/models/tasks_wrapper.rb +1 -1
- data/lib/iron_functions/version.rb +3 -3
- data/spec/api/apps_api_spec.rb +2 -2
- data/spec/api/routes_api_spec.rb +4 -4
- data/spec/api/tasks_api_spec.rb +3 -3
- data/spec/api_client_spec.rb +2 -2
- data/spec/configuration_spec.rb +2 -2
- data/spec/models/app_spec.rb +8 -2
- data/spec/models/app_wrapper_spec.rb +2 -2
- data/spec/models/apps_wrapper_spec.rb +2 -2
- data/spec/models/error_body_spec.rb +2 -2
- data/spec/models/error_spec.rb +2 -2
- data/spec/models/new_task_spec.rb +59 -0
- data/spec/models/new_tasks_wrapper_spec.rb +1 -1
- data/spec/models/route_spec.rb +24 -2
- data/spec/models/route_wrapper_spec.rb +14 -2
- data/spec/models/routes_wrapper_spec.rb +2 -8
- data/spec/models/task_spec.rb +14 -2
- data/spec/models/task_wrapper_spec.rb +2 -2
- data/spec/models/tasks_wrapper_spec.rb +1 -1
- data/spec/spec_helper.rb +2 -2
- metadata +11 -7
@@ -1,9 +1,9 @@
|
|
1
1
|
=begin
|
2
2
|
#IronFunctions
|
3
3
|
|
4
|
-
#
|
4
|
+
#The open source serverless platform.
|
5
5
|
|
6
|
-
OpenAPI spec version: 0.0
|
6
|
+
OpenAPI spec version: 0.1.0
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
|
@@ -28,9 +28,6 @@ module IronFunctions
|
|
28
28
|
class RoutesWrapper
|
29
29
|
attr_accessor :routes
|
30
30
|
|
31
|
-
# Used to paginate results. If this is returned, pass it into the same query again to get more results.
|
32
|
-
attr_accessor :cursor
|
33
|
-
|
34
31
|
attr_accessor :error
|
35
32
|
|
36
33
|
|
@@ -38,7 +35,6 @@ module IronFunctions
|
|
38
35
|
def self.attribute_map
|
39
36
|
{
|
40
37
|
:'routes' => :'routes',
|
41
|
-
:'cursor' => :'cursor',
|
42
38
|
:'error' => :'error'
|
43
39
|
}
|
44
40
|
end
|
@@ -47,7 +43,6 @@ module IronFunctions
|
|
47
43
|
def self.swagger_types
|
48
44
|
{
|
49
45
|
:'routes' => :'Array<Route>',
|
50
|
-
:'cursor' => :'String',
|
51
46
|
:'error' => :'ErrorBody'
|
52
47
|
}
|
53
48
|
end
|
@@ -66,10 +61,6 @@ module IronFunctions
|
|
66
61
|
end
|
67
62
|
end
|
68
63
|
|
69
|
-
if attributes.has_key?(:'cursor')
|
70
|
-
self.cursor = attributes[:'cursor']
|
71
|
-
end
|
72
|
-
|
73
64
|
if attributes.has_key?(:'error')
|
74
65
|
self.error = attributes[:'error']
|
75
66
|
end
|
@@ -96,7 +87,6 @@ module IronFunctions
|
|
96
87
|
return true if self.equal?(o)
|
97
88
|
self.class == o.class &&
|
98
89
|
routes == o.routes &&
|
99
|
-
cursor == o.cursor &&
|
100
90
|
error == o.error
|
101
91
|
end
|
102
92
|
|
@@ -109,7 +99,7 @@ module IronFunctions
|
|
109
99
|
# Calculates hash code according to all attributes.
|
110
100
|
# @return [Fixnum] Hash code
|
111
101
|
def hash
|
112
|
-
[routes,
|
102
|
+
[routes, error].hash
|
113
103
|
end
|
114
104
|
|
115
105
|
# Builds the object from hash
|
@@ -1,9 +1,9 @@
|
|
1
1
|
=begin
|
2
2
|
#IronFunctions
|
3
3
|
|
4
|
-
#
|
4
|
+
#The open source serverless platform.
|
5
5
|
|
6
|
-
OpenAPI spec version: 0.0
|
6
|
+
OpenAPI spec version: 0.1.0
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
|
@@ -26,6 +26,12 @@ require 'date'
|
|
26
26
|
module IronFunctions
|
27
27
|
|
28
28
|
class Task
|
29
|
+
# Name of Docker image to use. This is optional and can be used to override the image defined at the group level.
|
30
|
+
attr_accessor :image
|
31
|
+
|
32
|
+
# Payload for the task. This is what you pass into each task to make it do something.
|
33
|
+
attr_accessor :payload
|
34
|
+
|
29
35
|
# Group this task belongs to.
|
30
36
|
attr_accessor :group_name
|
31
37
|
|
@@ -78,6 +84,8 @@ module IronFunctions
|
|
78
84
|
# Attribute mapping from ruby-style variable name to JSON key.
|
79
85
|
def self.attribute_map
|
80
86
|
{
|
87
|
+
:'image' => :'image',
|
88
|
+
:'payload' => :'payload',
|
81
89
|
:'group_name' => :'group_name',
|
82
90
|
:'error' => :'error',
|
83
91
|
:'reason' => :'reason',
|
@@ -93,6 +101,8 @@ module IronFunctions
|
|
93
101
|
# Attribute type mapping.
|
94
102
|
def self.swagger_types
|
95
103
|
{
|
104
|
+
:'image' => :'String',
|
105
|
+
:'payload' => :'String',
|
96
106
|
:'group_name' => :'String',
|
97
107
|
:'error' => :'String',
|
98
108
|
:'reason' => :'String',
|
@@ -113,6 +123,14 @@ module IronFunctions
|
|
113
123
|
# convert string to symbol for hash key
|
114
124
|
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
115
125
|
|
126
|
+
if attributes.has_key?(:'image')
|
127
|
+
self.image = attributes[:'image']
|
128
|
+
end
|
129
|
+
|
130
|
+
if attributes.has_key?(:'payload')
|
131
|
+
self.payload = attributes[:'payload']
|
132
|
+
end
|
133
|
+
|
116
134
|
if attributes.has_key?(:'group_name')
|
117
135
|
self.group_name = attributes[:'group_name']
|
118
136
|
end
|
@@ -163,6 +181,7 @@ module IronFunctions
|
|
163
181
|
# Check to see if the all the properties in the model are valid
|
164
182
|
# @return true if the model is valid
|
165
183
|
def valid?
|
184
|
+
return false if @image.nil?
|
166
185
|
reason_validator = EnumAttributeValidator.new('String', ["timeout", "killed", "bad_exit", "client_request"])
|
167
186
|
return false unless reason_validator.valid?(@reason)
|
168
187
|
return true
|
@@ -183,6 +202,8 @@ module IronFunctions
|
|
183
202
|
def ==(o)
|
184
203
|
return true if self.equal?(o)
|
185
204
|
self.class == o.class &&
|
205
|
+
image == o.image &&
|
206
|
+
payload == o.payload &&
|
186
207
|
group_name == o.group_name &&
|
187
208
|
error == o.error &&
|
188
209
|
reason == o.reason &&
|
@@ -203,7 +224,7 @@ module IronFunctions
|
|
203
224
|
# Calculates hash code according to all attributes.
|
204
225
|
# @return [Fixnum] Hash code
|
205
226
|
def hash
|
206
|
-
[group_name, error, reason, created_at, started_at, completed_at, retry_of, retry_at, env_vars].hash
|
227
|
+
[image, payload, group_name, error, reason, created_at, started_at, completed_at, retry_of, retry_at, env_vars].hash
|
207
228
|
end
|
208
229
|
|
209
230
|
# Builds the object from hash
|
@@ -1,9 +1,9 @@
|
|
1
1
|
=begin
|
2
2
|
#IronFunctions
|
3
3
|
|
4
|
-
#
|
4
|
+
#The open source serverless platform.
|
5
5
|
|
6
|
-
OpenAPI spec version: 0.0
|
6
|
+
OpenAPI spec version: 0.1.0
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
|
@@ -22,5 +22,5 @@ limitations under the License.
|
|
22
22
|
=end
|
23
23
|
|
24
24
|
module IronFunctions
|
25
|
-
VERSION = "0.0
|
25
|
+
VERSION = "0.1.0"
|
26
26
|
end
|
data/spec/api/apps_api_spec.rb
CHANGED
data/spec/api/routes_api_spec.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
=begin
|
2
2
|
#IronFunctions
|
3
3
|
|
4
|
-
#
|
4
|
+
#The open source serverless platform.
|
5
5
|
|
6
|
-
OpenAPI spec version: 0.0
|
6
|
+
OpenAPI spec version: 0.1.0
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
|
@@ -59,9 +59,9 @@ describe 'RoutesApi' do
|
|
59
59
|
# Create new Route
|
60
60
|
# Create a new route
|
61
61
|
# @param app name of the app.
|
62
|
-
# @param body
|
62
|
+
# @param body One route to post.
|
63
63
|
# @param [Hash] opts the optional parameters
|
64
|
-
# @return [
|
64
|
+
# @return [RouteWrapper]
|
65
65
|
describe 'apps_app_routes_post test' do
|
66
66
|
it "should work" do
|
67
67
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
data/spec/api/tasks_api_spec.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
=begin
|
2
2
|
#IronFunctions
|
3
3
|
|
4
|
-
#
|
4
|
+
#The open source serverless platform.
|
5
5
|
|
6
|
-
OpenAPI spec version: 0.0
|
6
|
+
OpenAPI spec version: 0.1.0
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
|
@@ -48,7 +48,7 @@ describe 'TasksApi' do
|
|
48
48
|
# Gets the next task in the queue, ready for processing. Titan may return <=n tasks. Consumers should start processing tasks in order. Each returned task is set to `status` \"running\" and `started_at` is set to the current time. No other consumer can retrieve this task.
|
49
49
|
# @param [Hash] opts the optional parameters
|
50
50
|
# @option opts [Integer] :n Number of tasks to return.
|
51
|
-
# @return [
|
51
|
+
# @return [TaskWrapper]
|
52
52
|
describe 'tasks_get test' do
|
53
53
|
it "should work" do
|
54
54
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
data/spec/api_client_spec.rb
CHANGED
data/spec/configuration_spec.rb
CHANGED
data/spec/models/app_spec.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
=begin
|
2
2
|
#IronFunctions
|
3
3
|
|
4
|
-
#
|
4
|
+
#The open source serverless platform.
|
5
5
|
|
6
|
-
OpenAPI spec version: 0.0
|
6
|
+
OpenAPI spec version: 0.1.0
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
|
@@ -49,5 +49,11 @@ describe 'App' do
|
|
49
49
|
end
|
50
50
|
end
|
51
51
|
|
52
|
+
describe 'test attribute "config"' do
|
53
|
+
it 'should work' do
|
54
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
52
58
|
end
|
53
59
|
|
data/spec/models/error_spec.rb
CHANGED
@@ -0,0 +1,59 @@
|
|
1
|
+
=begin
|
2
|
+
#IronFunctions
|
3
|
+
|
4
|
+
#The open source serverless platform.
|
5
|
+
|
6
|
+
OpenAPI spec version: 0.1.0
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
|
10
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
11
|
+
you may not use this file except in compliance with the License.
|
12
|
+
You may obtain a copy of the License at
|
13
|
+
|
14
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
15
|
+
|
16
|
+
Unless required by applicable law or agreed to in writing, software
|
17
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
18
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
19
|
+
See the License for the specific language governing permissions and
|
20
|
+
limitations under the License.
|
21
|
+
|
22
|
+
=end
|
23
|
+
|
24
|
+
require 'spec_helper'
|
25
|
+
require 'json'
|
26
|
+
require 'date'
|
27
|
+
|
28
|
+
# Unit tests for IronFunctions::NewTask
|
29
|
+
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
30
|
+
# Please update as you see appropriate
|
31
|
+
describe 'NewTask' do
|
32
|
+
before do
|
33
|
+
# run before each test
|
34
|
+
@instance = IronFunctions::NewTask.new
|
35
|
+
end
|
36
|
+
|
37
|
+
after do
|
38
|
+
# run after each test
|
39
|
+
end
|
40
|
+
|
41
|
+
describe 'test an instance of NewTask' do
|
42
|
+
it 'should create an instact of NewTask' do
|
43
|
+
expect(@instance).to be_instance_of(IronFunctions::NewTask)
|
44
|
+
end
|
45
|
+
end
|
46
|
+
describe 'test attribute "image"' do
|
47
|
+
it 'should work' do
|
48
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
describe 'test attribute "payload"' do
|
53
|
+
it 'should work' do
|
54
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
end
|
59
|
+
|
data/spec/models/route_spec.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
=begin
|
2
2
|
#IronFunctions
|
3
3
|
|
4
|
-
#
|
4
|
+
#The open source serverless platform.
|
5
5
|
|
6
|
-
OpenAPI spec version: 0.0
|
6
|
+
OpenAPI spec version: 0.1.0
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
|
@@ -67,5 +67,27 @@ describe 'Route' do
|
|
67
67
|
end
|
68
68
|
end
|
69
69
|
|
70
|
+
describe 'test attribute "memory"' do
|
71
|
+
it 'should work' do
|
72
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
describe 'test attribute "type"' do
|
77
|
+
it 'should work' do
|
78
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
79
|
+
#validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["sync", "async"])
|
80
|
+
#validator.allowable_values.each do |value|
|
81
|
+
# expect { @instance.type = value }.not_to raise_error
|
82
|
+
#end
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
86
|
+
describe 'test attribute "config"' do
|
87
|
+
it 'should work' do
|
88
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
89
|
+
end
|
90
|
+
end
|
91
|
+
|
70
92
|
end
|
71
93
|
|