fn_ruby 0.1.32 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +19 -12
- data/VERSION +1 -1
- data/docs/Call.md +14 -0
- data/docs/CallApi.md +212 -0
- data/docs/CallWrapper.md +8 -0
- data/docs/CallsWrapper.md +9 -0
- data/docs/Log.md +9 -0
- data/docs/LogApi.md +109 -0
- data/docs/LogWrapper.md +8 -0
- data/docs/Route.md +2 -3
- data/docs/RoutesApi.md +58 -4
- data/fn_ruby-0.1.32.gem +0 -0
- data/fn_ruby.gemspec +2 -2
- data/lib/fn_ruby.rb +9 -7
- data/lib/fn_ruby/api/apps_api.rb +2 -2
- data/lib/fn_ruby/api/call_api.rb +263 -0
- data/lib/fn_ruby/api/log_api.rb +144 -0
- data/lib/fn_ruby/api/routes_api.rb +73 -6
- data/lib/fn_ruby/api_client.rb +2 -2
- data/lib/fn_ruby/api_error.rb +2 -2
- data/lib/fn_ruby/configuration.rb +2 -2
- data/lib/fn_ruby/models/app.rb +2 -2
- data/lib/fn_ruby/models/app_wrapper.rb +2 -2
- data/lib/fn_ruby/models/apps_wrapper.rb +2 -2
- data/lib/fn_ruby/models/call.rb +249 -0
- data/lib/fn_ruby/models/call_wrapper.rb +194 -0
- data/lib/fn_ruby/models/calls_wrapper.rb +204 -0
- data/lib/fn_ruby/models/error.rb +2 -2
- data/lib/fn_ruby/models/error_body.rb +2 -2
- data/lib/fn_ruby/models/log.rb +198 -0
- data/lib/fn_ruby/models/log_wrapper.rb +194 -0
- data/lib/fn_ruby/models/route.rb +7 -13
- data/lib/fn_ruby/models/route_wrapper.rb +2 -2
- data/lib/fn_ruby/models/routes_wrapper.rb +2 -2
- data/lib/fn_ruby/models/version.rb +2 -2
- data/lib/fn_ruby/version.rb +3 -3
- data/spec/api/apps_api_spec.rb +2 -2
- data/spec/api/call_api_spec.rb +87 -0
- data/spec/api/log_api_spec.rb +61 -0
- data/spec/api/routes_api_spec.rb +18 -4
- data/spec/api_client_spec.rb +2 -2
- data/spec/configuration_spec.rb +2 -2
- data/spec/models/app_spec.rb +2 -2
- data/spec/models/app_wrapper_spec.rb +2 -2
- data/spec/models/apps_wrapper_spec.rb +2 -2
- data/spec/models/call_spec.rb +78 -0
- data/spec/models/call_wrapper_spec.rb +42 -0
- data/spec/models/calls_wrapper_spec.rb +48 -0
- data/spec/models/error_body_spec.rb +2 -2
- data/spec/models/error_spec.rb +2 -2
- data/spec/models/log_spec.rb +48 -0
- data/spec/models/log_wrapper_spec.rb +42 -0
- data/spec/models/route_spec.rb +2 -8
- data/spec/models/route_wrapper_spec.rb +2 -2
- data/spec/models/routes_wrapper_spec.rb +2 -2
- data/spec/models/version_spec.rb +2 -2
- data/spec/spec_helper.rb +2 -2
- metadata +31 -2
data/lib/fn_ruby/models/route.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
=begin
|
2
|
-
#
|
2
|
+
#fn
|
3
3
|
|
4
4
|
#The open source serverless platform.
|
5
5
|
|
6
|
-
OpenAPI spec version: 0.
|
6
|
+
OpenAPI spec version: 0.2.0
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
Swagger Codegen version: 2.2.3
|
@@ -33,9 +33,6 @@ module Fn
|
|
33
33
|
# Payload format sent into function.
|
34
34
|
attr_accessor :format
|
35
35
|
|
36
|
-
# Maximum number of hot functions concurrency
|
37
|
-
attr_accessor :max_concurrency
|
38
|
-
|
39
36
|
# Route configuration - overrides application configuration
|
40
37
|
attr_accessor :config
|
41
38
|
|
@@ -76,7 +73,6 @@ module Fn
|
|
76
73
|
:'memory' => :'memory',
|
77
74
|
:'type' => :'type',
|
78
75
|
:'format' => :'format',
|
79
|
-
:'max_concurrency' => :'max_concurrency',
|
80
76
|
:'config' => :'config',
|
81
77
|
:'timeout' => :'timeout',
|
82
78
|
:'idle_timeout' => :'idle_timeout'
|
@@ -92,7 +88,6 @@ module Fn
|
|
92
88
|
:'memory' => :'Integer',
|
93
89
|
:'type' => :'String',
|
94
90
|
:'format' => :'String',
|
95
|
-
:'max_concurrency' => :'Integer',
|
96
91
|
:'config' => :'Hash<String, String>',
|
97
92
|
:'timeout' => :'Integer',
|
98
93
|
:'idle_timeout' => :'Integer'
|
@@ -133,10 +128,6 @@ module Fn
|
|
133
128
|
self.format = attributes[:'format']
|
134
129
|
end
|
135
130
|
|
136
|
-
if attributes.has_key?(:'max_concurrency')
|
137
|
-
self.max_concurrency = attributes[:'max_concurrency']
|
138
|
-
end
|
139
|
-
|
140
131
|
if attributes.has_key?(:'config')
|
141
132
|
if (value = attributes[:'config']).is_a?(Array)
|
142
133
|
self.config = value
|
@@ -145,10 +136,14 @@ module Fn
|
|
145
136
|
|
146
137
|
if attributes.has_key?(:'timeout')
|
147
138
|
self.timeout = attributes[:'timeout']
|
139
|
+
else
|
140
|
+
self.timeout = 30
|
148
141
|
end
|
149
142
|
|
150
143
|
if attributes.has_key?(:'idle_timeout')
|
151
144
|
self.idle_timeout = attributes[:'idle_timeout']
|
145
|
+
else
|
146
|
+
self.idle_timeout = 30
|
152
147
|
end
|
153
148
|
|
154
149
|
end
|
@@ -201,7 +196,6 @@ module Fn
|
|
201
196
|
memory == o.memory &&
|
202
197
|
type == o.type &&
|
203
198
|
format == o.format &&
|
204
|
-
max_concurrency == o.max_concurrency &&
|
205
199
|
config == o.config &&
|
206
200
|
timeout == o.timeout &&
|
207
201
|
idle_timeout == o.idle_timeout
|
@@ -216,7 +210,7 @@ module Fn
|
|
216
210
|
# Calculates hash code according to all attributes.
|
217
211
|
# @return [Fixnum] Hash code
|
218
212
|
def hash
|
219
|
-
[path, image, headers, memory, type, format,
|
213
|
+
[path, image, headers, memory, type, format, config, timeout, idle_timeout].hash
|
220
214
|
end
|
221
215
|
|
222
216
|
# Builds the object from hash
|
data/lib/fn_ruby/version.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
=begin
|
2
|
-
#
|
2
|
+
#fn
|
3
3
|
|
4
4
|
#The open source serverless platform.
|
5
5
|
|
6
|
-
OpenAPI spec version: 0.
|
6
|
+
OpenAPI spec version: 0.2.0
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
Swagger Codegen version: 2.2.3
|
@@ -11,5 +11,5 @@ Swagger Codegen version: 2.2.3
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
module Fn
|
14
|
-
VERSION = "0.
|
14
|
+
VERSION = "0.2.0"
|
15
15
|
end
|
data/spec/api/apps_api_spec.rb
CHANGED
@@ -0,0 +1,87 @@
|
|
1
|
+
=begin
|
2
|
+
#fn
|
3
|
+
|
4
|
+
#The open source serverless platform.
|
5
|
+
|
6
|
+
OpenAPI spec version: 0.2.0
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.2.3
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
|
16
|
+
# Unit tests for Fn::CallApi
|
17
|
+
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
18
|
+
# Please update as you see appropriate
|
19
|
+
describe 'CallApi' do
|
20
|
+
before do
|
21
|
+
# run before each test
|
22
|
+
@instance = Fn::CallApi.new
|
23
|
+
end
|
24
|
+
|
25
|
+
after do
|
26
|
+
# run after each test
|
27
|
+
end
|
28
|
+
|
29
|
+
describe 'test an instance of CallApi' do
|
30
|
+
it 'should create an instance of CallApi' do
|
31
|
+
expect(@instance).to be_instance_of(Fn::CallApi)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
# unit tests for apps_app_calls_call_get
|
36
|
+
# Get call information
|
37
|
+
# Get call information
|
38
|
+
# @param app app name
|
39
|
+
# @param call Call ID.
|
40
|
+
# @param [Hash] opts the optional parameters
|
41
|
+
# @return [CallWrapper]
|
42
|
+
describe 'apps_app_calls_call_get test' do
|
43
|
+
it "should work" do
|
44
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
# unit tests for apps_app_calls_call_log_delete
|
49
|
+
# Delete call log entry
|
50
|
+
# Delete call log entry
|
51
|
+
# @param call Call ID.
|
52
|
+
# @param app App name.
|
53
|
+
# @param [Hash] opts the optional parameters
|
54
|
+
# @return [nil]
|
55
|
+
describe 'apps_app_calls_call_log_delete test' do
|
56
|
+
it "should work" do
|
57
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
# unit tests for apps_app_calls_call_log_get
|
62
|
+
# Get call logs
|
63
|
+
# Get call logs
|
64
|
+
# @param app App Name
|
65
|
+
# @param call Call ID.
|
66
|
+
# @param [Hash] opts the optional parameters
|
67
|
+
# @return [LogWrapper]
|
68
|
+
describe 'apps_app_calls_call_log_get test' do
|
69
|
+
it "should work" do
|
70
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
# unit tests for apps_app_calls_get
|
75
|
+
# Get app-bound calls.
|
76
|
+
# Get app-bound calls can filter to route-bound calls.
|
77
|
+
# @param app App name.
|
78
|
+
# @param [Hash] opts the optional parameters
|
79
|
+
# @option opts [String] :route App route.
|
80
|
+
# @return [CallsWrapper]
|
81
|
+
describe 'apps_app_calls_get test' do
|
82
|
+
it "should work" do
|
83
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
84
|
+
end
|
85
|
+
end
|
86
|
+
|
87
|
+
end
|
@@ -0,0 +1,61 @@
|
|
1
|
+
=begin
|
2
|
+
#fn
|
3
|
+
|
4
|
+
#The open source serverless platform.
|
5
|
+
|
6
|
+
OpenAPI spec version: 0.2.0
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.2.3
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
|
16
|
+
# Unit tests for Fn::LogApi
|
17
|
+
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
18
|
+
# Please update as you see appropriate
|
19
|
+
describe 'LogApi' do
|
20
|
+
before do
|
21
|
+
# run before each test
|
22
|
+
@instance = Fn::LogApi.new
|
23
|
+
end
|
24
|
+
|
25
|
+
after do
|
26
|
+
# run after each test
|
27
|
+
end
|
28
|
+
|
29
|
+
describe 'test an instance of LogApi' do
|
30
|
+
it 'should create an instance of LogApi' do
|
31
|
+
expect(@instance).to be_instance_of(Fn::LogApi)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
# unit tests for apps_app_calls_call_log_delete
|
36
|
+
# Delete call log entry
|
37
|
+
# Delete call log entry
|
38
|
+
# @param call Call ID.
|
39
|
+
# @param app App name.
|
40
|
+
# @param [Hash] opts the optional parameters
|
41
|
+
# @return [nil]
|
42
|
+
describe 'apps_app_calls_call_log_delete test' do
|
43
|
+
it "should work" do
|
44
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
# unit tests for apps_app_calls_call_log_get
|
49
|
+
# Get call logs
|
50
|
+
# Get call logs
|
51
|
+
# @param app App Name
|
52
|
+
# @param call Call ID.
|
53
|
+
# @param [Hash] opts the optional parameters
|
54
|
+
# @return [LogWrapper]
|
55
|
+
describe 'apps_app_calls_call_log_get test' do
|
56
|
+
it "should work" do
|
57
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
end
|
data/spec/api/routes_api_spec.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
=begin
|
2
|
-
#
|
2
|
+
#fn
|
3
3
|
|
4
4
|
#The open source serverless platform.
|
5
5
|
|
6
|
-
OpenAPI spec version: 0.
|
6
|
+
OpenAPI spec version: 0.2.0
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
Swagger Codegen version: 2.2.3
|
@@ -46,7 +46,7 @@ describe 'RoutesApi' do
|
|
46
46
|
|
47
47
|
# unit tests for apps_app_routes_post
|
48
48
|
# Create new Route
|
49
|
-
# Create a new route in an app, if app doesn't exists, it creates the app
|
49
|
+
# Create a new route in an app, if app doesn't exists, it creates the app. Post does not skip validation of zero values.
|
50
50
|
# @param app name of the app.
|
51
51
|
# @param body One route to post.
|
52
52
|
# @param [Hash] opts the optional parameters
|
@@ -84,7 +84,7 @@ describe 'RoutesApi' do
|
|
84
84
|
end
|
85
85
|
|
86
86
|
# unit tests for apps_app_routes_route_patch
|
87
|
-
# Update a Route
|
87
|
+
# Update a Route, Fails if the route or app does not exist. Accepts partial updates / skips validation of zero values.
|
88
88
|
# Update a route
|
89
89
|
# @param app name of the app.
|
90
90
|
# @param route route path.
|
@@ -97,4 +97,18 @@ describe 'RoutesApi' do
|
|
97
97
|
end
|
98
98
|
end
|
99
99
|
|
100
|
+
# unit tests for apps_app_routes_route_put
|
101
|
+
# Create a Route if it does not exist. Update if it does. Will also create app if it does not exist. Put does not skip validation of zero values
|
102
|
+
# Update or Create a route
|
103
|
+
# @param app name of the app.
|
104
|
+
# @param route route path.
|
105
|
+
# @param body One route to post.
|
106
|
+
# @param [Hash] opts the optional parameters
|
107
|
+
# @return [RouteWrapper]
|
108
|
+
describe 'apps_app_routes_route_put test' do
|
109
|
+
it "should work" do
|
110
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
111
|
+
end
|
112
|
+
end
|
113
|
+
|
100
114
|
end
|
data/spec/api_client_spec.rb
CHANGED
data/spec/configuration_spec.rb
CHANGED
data/spec/models/app_spec.rb
CHANGED
@@ -0,0 +1,78 @@
|
|
1
|
+
=begin
|
2
|
+
#fn
|
3
|
+
|
4
|
+
#The open source serverless platform.
|
5
|
+
|
6
|
+
OpenAPI spec version: 0.2.0
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.2.3
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
require 'date'
|
16
|
+
|
17
|
+
# Unit tests for Fn::Call
|
18
|
+
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
19
|
+
# Please update as you see appropriate
|
20
|
+
describe 'Call' do
|
21
|
+
before do
|
22
|
+
# run before each test
|
23
|
+
@instance = Fn::Call.new
|
24
|
+
end
|
25
|
+
|
26
|
+
after do
|
27
|
+
# run after each test
|
28
|
+
end
|
29
|
+
|
30
|
+
describe 'test an instance of Call' do
|
31
|
+
it 'should create an instance of Call' do
|
32
|
+
expect(@instance).to be_instance_of(Fn::Call)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
describe 'test attribute "id"' do
|
36
|
+
it 'should work' do
|
37
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
describe 'test attribute "status"' do
|
42
|
+
it 'should work' do
|
43
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
describe 'test attribute "app_name"' do
|
48
|
+
it 'should work' do
|
49
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
describe 'test attribute "path"' do
|
54
|
+
it 'should work' do
|
55
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
describe 'test attribute "created_at"' do
|
60
|
+
it 'should work' do
|
61
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
describe 'test attribute "started_at"' do
|
66
|
+
it 'should work' do
|
67
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
describe 'test attribute "completed_at"' do
|
72
|
+
it 'should work' do
|
73
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
end
|
78
|
+
|