iron_functions 0.0.5 → 0.1.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.
Files changed (63) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +0 -0
  3. data/README.md +8 -9
  4. data/VERSION +1 -1
  5. data/docs/App.md +1 -0
  6. data/docs/AppWrapper.md +0 -0
  7. data/docs/AppsApi.md +0 -0
  8. data/docs/AppsWrapper.md +0 -0
  9. data/docs/Error.md +0 -0
  10. data/docs/ErrorBody.md +0 -0
  11. data/docs/NewTask.md +9 -0
  12. data/docs/NewTasksWrapper.md +0 -0
  13. data/docs/Route.md +3 -0
  14. data/docs/RouteWrapper.md +2 -0
  15. data/docs/RoutesApi.md +4 -4
  16. data/docs/RoutesWrapper.md +0 -1
  17. data/docs/Task.md +2 -0
  18. data/docs/TaskWrapper.md +0 -0
  19. data/docs/TasksApi.md +2 -2
  20. data/docs/TasksWrapper.md +0 -0
  21. data/git_push.sh +0 -0
  22. data/iron_functions.gemspec +3 -3
  23. data/lib/iron_functions.rb +3 -4
  24. data/lib/iron_functions/api/apps_api.rb +2 -2
  25. data/lib/iron_functions/api/routes_api.rb +7 -7
  26. data/lib/iron_functions/api/tasks_api.rb +5 -5
  27. data/lib/iron_functions/api_client.rb +2 -2
  28. data/lib/iron_functions/api_error.rb +2 -2
  29. data/lib/iron_functions/configuration.rb +2 -2
  30. data/lib/iron_functions/models/app.rb +18 -6
  31. data/lib/iron_functions/models/app_wrapper.rb +2 -2
  32. data/lib/iron_functions/models/apps_wrapper.rb +2 -2
  33. data/lib/iron_functions/models/error.rb +2 -2
  34. data/lib/iron_functions/models/error_body.rb +2 -2
  35. data/lib/iron_functions/models/new_task.rb +211 -0
  36. data/lib/iron_functions/models/new_tasks_wrapper.rb +1 -1
  37. data/lib/iron_functions/models/route.rb +71 -6
  38. data/lib/iron_functions/models/route_wrapper.rb +21 -3
  39. data/lib/iron_functions/models/routes_wrapper.rb +3 -13
  40. data/lib/iron_functions/models/task.rb +24 -3
  41. data/lib/iron_functions/models/task_wrapper.rb +2 -2
  42. data/lib/iron_functions/models/tasks_wrapper.rb +1 -1
  43. data/lib/iron_functions/version.rb +3 -3
  44. data/spec/api/apps_api_spec.rb +2 -2
  45. data/spec/api/routes_api_spec.rb +4 -4
  46. data/spec/api/tasks_api_spec.rb +3 -3
  47. data/spec/api_client_spec.rb +2 -2
  48. data/spec/configuration_spec.rb +2 -2
  49. data/spec/models/app_spec.rb +8 -2
  50. data/spec/models/app_wrapper_spec.rb +2 -2
  51. data/spec/models/apps_wrapper_spec.rb +2 -2
  52. data/spec/models/error_body_spec.rb +2 -2
  53. data/spec/models/error_spec.rb +2 -2
  54. data/spec/models/new_task_spec.rb +59 -0
  55. data/spec/models/new_tasks_wrapper_spec.rb +1 -1
  56. data/spec/models/route_spec.rb +24 -2
  57. data/spec/models/route_wrapper_spec.rb +14 -2
  58. data/spec/models/routes_wrapper_spec.rb +2 -8
  59. data/spec/models/task_spec.rb +14 -2
  60. data/spec/models/task_wrapper_spec.rb +2 -2
  61. data/spec/models/tasks_wrapper_spec.rb +1 -1
  62. data/spec/spec_helper.rb +2 -2
  63. metadata +11 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8d8021159998d0afaee676abf78c94502054ba96
4
- data.tar.gz: 24fc834bab9ef8e55fd05e63abf5ac65e9da4bb8
3
+ metadata.gz: 5f91bfe3f26558a2b0246c4991791673a58f5bc8
4
+ data.tar.gz: ae84cef32f7bbf7dd39da6783fd3195ff7076eae
5
5
  SHA512:
6
- metadata.gz: 8e74c0f983772aed1876eabfe4a1e67f906f6a8ca7c0170506e20c7c68383e24d157b0e7e456fd81e1751b5581ba15d2cdcf840959f9c392b39b9f62f9fd017f
7
- data.tar.gz: 2535377d2b45f11f5f6e074aa2639c8f4fc3f4ee8629468e78e41daf86153f59490fc43f814bb03cf22b8c4d1f9309c4a69753f132a6d605d7ed0a4af0aaaa42
6
+ metadata.gz: 4176881bc84a303ca75a24fee2f788724a5dce6f292353720a567b3e00b48e924977addeb9cf519b7fa0e4cfd7c8068ca6ca45b62f6bec7713fda7b9974b71ff
7
+ data.tar.gz: eedc64326be922588feb1c281babe276b85127ea59dd5c0d67f020b865721a5995d952d6020834a2eb72e4751a6025edcaa0ad530fb607abfcf4dc59d65cbb6c
data/LICENSE CHANGED
File without changes
data/README.md CHANGED
@@ -2,13 +2,13 @@
2
2
 
3
3
  IronFunctions - the Ruby gem for the IronFunctions
4
4
 
5
- null
5
+ The open source serverless platform.
6
6
 
7
7
  This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
8
8
 
9
- - API version: 0.0.5
10
- - Package version: 0.0.5
11
- - Build date: 2016-10-14T04:20:12.388Z
9
+ - API version: 0.1.0
10
+ - Package version: 0.1.0
11
+ - Build date: 2016-11-15T21:38:16.488Z
12
12
  - Build package: class io.swagger.codegen.languages.RubyClientCodegen
13
13
 
14
14
  ## Installation
@@ -24,15 +24,15 @@ gem build iron_functions.gemspec
24
24
  Then either install the gem locally:
25
25
 
26
26
  ```shell
27
- gem install ./iron_functions-0.0.5.gem
27
+ gem install ./iron_functions-0.1.0.gem
28
28
  ```
29
- (for development, run `gem install --dev ./iron_functions-0.0.5.gem` to install the development dependencies)
29
+ (for development, run `gem install --dev ./iron_functions-0.1.0.gem` to install the development dependencies)
30
30
 
31
31
  or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
32
32
 
33
33
  Finally add this to the Gemfile:
34
34
 
35
- gem 'iron_functions', '~> 0.0.5'
35
+ gem 'iron_functions', '~> 0.1.0'
36
36
 
37
37
  ### Install from Git
38
38
 
@@ -94,13 +94,12 @@ Class | Method | HTTP request | Description
94
94
  - [IronFunctions::AppsWrapper](docs/AppsWrapper.md)
95
95
  - [IronFunctions::Error](docs/Error.md)
96
96
  - [IronFunctions::ErrorBody](docs/ErrorBody.md)
97
- - [IronFunctions::NewTasksWrapper](docs/NewTasksWrapper.md)
97
+ - [IronFunctions::NewTask](docs/NewTask.md)
98
98
  - [IronFunctions::Route](docs/Route.md)
99
99
  - [IronFunctions::RouteWrapper](docs/RouteWrapper.md)
100
100
  - [IronFunctions::RoutesWrapper](docs/RoutesWrapper.md)
101
101
  - [IronFunctions::Task](docs/Task.md)
102
102
  - [IronFunctions::TaskWrapper](docs/TaskWrapper.md)
103
- - [IronFunctions::TasksWrapper](docs/TasksWrapper.md)
104
103
 
105
104
 
106
105
  ## Documentation for Authorization
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.5
1
+ 0.1.0
@@ -4,5 +4,6 @@
4
4
  Name | Type | Description | Notes
5
5
  ------------ | ------------- | ------------- | -------------
6
6
  **name** | **String** | Name of this app. Must be different than the image name. Can ony contain alphanumeric, -, and _. | [optional]
7
+ **config** | **Hash<String, String>** | Application configuration | [optional]
7
8
 
8
9
 
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -0,0 +1,9 @@
1
+ # IronFunctions::NewTask
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **image** | **String** | Name of Docker image to use. This is optional and can be used to override the image defined at the group level. |
7
+ **payload** | **String** | Payload for the task. This is what you pass into each task to make it do something. | [optional]
8
+
9
+
File without changes
@@ -7,5 +7,8 @@ Name | Type | Description | Notes
7
7
  **path** | **String** | URL path that will be matched to this route | [optional]
8
8
  **image** | **String** | Name of Docker image to use in this route. You should include the image tag, which should be a version number, to be more accurate. Can be overridden on a per route basis with route.image. | [optional]
9
9
  **headers** | **String** | Map of http headers that will be sent with the response | [optional]
10
+ **memory** | **Integer** | Max usable memory for this route (MiB). | [optional]
11
+ **type** | **String** | Route type | [optional]
12
+ **config** | **Hash<String, String>** | Route configuration - overrides application configuration | [optional]
10
13
 
11
14
 
@@ -3,6 +3,8 @@
3
3
  ## Properties
4
4
  Name | Type | Description | Notes
5
5
  ------------ | ------------- | ------------- | -------------
6
+ **message** | **String** | | [optional]
7
+ **error** | [**ErrorBody**](ErrorBody.md) | | [optional]
6
8
  **route** | [**Route**](Route.md) | |
7
9
 
8
10
 
@@ -58,7 +58,7 @@ No authorization required
58
58
 
59
59
 
60
60
  # **apps_app_routes_post**
61
- > RoutesWrapper apps_app_routes_post(app, body)
61
+ > RouteWrapper apps_app_routes_post(app, body)
62
62
 
63
63
  Create new Route
64
64
 
@@ -73,7 +73,7 @@ api_instance = IronFunctions::RoutesApi.new
73
73
 
74
74
  app = "app_example" # String | name of the app.
75
75
 
76
- body = IronFunctions::NewRoutesWrapper.new # NewRoutesWrapper | Array of routes to post.
76
+ body = IronFunctions::RouteWrapper.new # RouteWrapper | One route to post.
77
77
 
78
78
 
79
79
  begin
@@ -90,11 +90,11 @@ end
90
90
  Name | Type | Description | Notes
91
91
  ------------- | ------------- | ------------- | -------------
92
92
  **app** | **String**| name of the app. |
93
- **body** | [**NewRoutesWrapper**](NewRoutesWrapper.md)| Array of routes to post. |
93
+ **body** | [**RouteWrapper**](RouteWrapper.md)| One route to post. |
94
94
 
95
95
  ### Return type
96
96
 
97
- [**RoutesWrapper**](RoutesWrapper.md)
97
+ [**RouteWrapper**](RouteWrapper.md)
98
98
 
99
99
  ### Authorization
100
100
 
@@ -4,7 +4,6 @@
4
4
  Name | Type | Description | Notes
5
5
  ------------ | ------------- | ------------- | -------------
6
6
  **routes** | [**Array<Route>**](Route.md) | |
7
- **cursor** | **String** | Used to paginate results. If this is returned, pass it into the same query again to get more results. | [optional]
8
7
  **error** | [**ErrorBody**](ErrorBody.md) | | [optional]
9
8
 
10
9
 
@@ -3,6 +3,8 @@
3
3
  ## Properties
4
4
  Name | Type | Description | Notes
5
5
  ------------ | ------------- | ------------- | -------------
6
+ **image** | **String** | Name of Docker image to use. This is optional and can be used to override the image defined at the group level. |
7
+ **payload** | **String** | Payload for the task. This is what you pass into each task to make it do something. | [optional]
6
8
  **group_name** | **String** | Group this task belongs to. | [optional]
7
9
  **error** | **String** | The error message, if status is 'error'. This is errors due to things outside the task itself. Errors from user code will be found in the log. | [optional]
8
10
  **reason** | **String** | Machine usable reason for task being in this state. Valid values for error status are `timeout | killed | bad_exit`. Valid values for cancelled status are `client_request`. For everything else, this is undefined. | [optional]
File without changes
@@ -8,7 +8,7 @@ Method | HTTP request | Description
8
8
 
9
9
 
10
10
  # **tasks_get**
11
- > TasksWrapper tasks_get(opts)
11
+ > TaskWrapper tasks_get(opts)
12
12
 
13
13
  Get next task.
14
14
 
@@ -42,7 +42,7 @@ Name | Type | Description | Notes
42
42
 
43
43
  ### Return type
44
44
 
45
- [**TasksWrapper**](TasksWrapper.md)
45
+ [**TaskWrapper**](TaskWrapper.md)
46
46
 
47
47
  ### Authorization
48
48
 
File without changes
File without changes
@@ -23,8 +23,8 @@ limitations under the License.
23
23
 
24
24
  =end
25
25
 
26
- $:.push File.expand_path("../lib", __FILE__)
27
- require "iron_functions/version"
26
+ # $:.push File.expand_path("lib", __FILE__)
27
+ require_relative "lib/iron_functions/version"
28
28
 
29
29
  Gem::Specification.new do |s|
30
30
  s.name = "iron_functions"
@@ -35,7 +35,7 @@ Gem::Specification.new do |s|
35
35
  s.homepage = "https://github.com/iron-io/functions_ruby"
36
36
  s.summary = "Ruby gem for IronFunctions"
37
37
  s.description = "Ruby gem for IronFunctions."
38
- s.license = "Apache 2.0"
38
+ s.license = "Apache-2.0"
39
39
 
40
40
  s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
41
41
  s.add_runtime_dependency 'json', '~> 1.8', '>= 1.8.3'
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #IronFunctions
3
3
 
4
- #null
4
+ #The open source serverless platform.
5
5
 
6
- OpenAPI spec version: 0.0.5
6
+ OpenAPI spec version: 0.1.0
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
 
@@ -33,13 +33,12 @@ require 'iron_functions/models/app_wrapper'
33
33
  require 'iron_functions/models/apps_wrapper'
34
34
  require 'iron_functions/models/error'
35
35
  require 'iron_functions/models/error_body'
36
- require 'iron_functions/models/new_tasks_wrapper'
36
+ require 'iron_functions/models/new_task'
37
37
  require 'iron_functions/models/route'
38
38
  require 'iron_functions/models/route_wrapper'
39
39
  require 'iron_functions/models/routes_wrapper'
40
40
  require 'iron_functions/models/task'
41
41
  require 'iron_functions/models/task_wrapper'
42
- require 'iron_functions/models/tasks_wrapper'
43
42
 
44
43
  # APIs
45
44
  require 'iron_functions/api/apps_api'
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #IronFunctions
3
3
 
4
- #null
4
+ #The open source serverless platform.
5
5
 
6
- OpenAPI spec version: 0.0.5
6
+ OpenAPI spec version: 0.1.0
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
 
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #IronFunctions
3
3
 
4
- #null
4
+ #The open source serverless platform.
5
5
 
6
- OpenAPI spec version: 0.0.5
6
+ OpenAPI spec version: 0.1.0
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
 
@@ -91,9 +91,9 @@ module IronFunctions
91
91
  # Create new Route
92
92
  # Create a new route
93
93
  # @param app name of the app.
94
- # @param body Array of routes to post.
94
+ # @param body One route to post.
95
95
  # @param [Hash] opts the optional parameters
96
- # @return [RoutesWrapper]
96
+ # @return [RouteWrapper]
97
97
  def apps_app_routes_post(app, body, opts = {})
98
98
  data, _status_code, _headers = apps_app_routes_post_with_http_info(app, body, opts)
99
99
  return data
@@ -102,9 +102,9 @@ module IronFunctions
102
102
  # Create new Route
103
103
  # Create a new route
104
104
  # @param app name of the app.
105
- # @param body Array of routes to post.
105
+ # @param body One route to post.
106
106
  # @param [Hash] opts the optional parameters
107
- # @return [Array<(RoutesWrapper, Fixnum, Hash)>] RoutesWrapper data, response status code and response headers
107
+ # @return [Array<(RouteWrapper, Fixnum, Hash)>] RouteWrapper data, response status code and response headers
108
108
  def apps_app_routes_post_with_http_info(app, body, opts = {})
109
109
  if @api_client.config.debugging
110
110
  @api_client.config.logger.debug "Calling API: RoutesApi.apps_app_routes_post ..."
@@ -142,7 +142,7 @@ module IronFunctions
142
142
  :form_params => form_params,
143
143
  :body => post_body,
144
144
  :auth_names => auth_names,
145
- :return_type => 'RoutesWrapper')
145
+ :return_type => 'RouteWrapper')
146
146
  if @api_client.config.debugging
147
147
  @api_client.config.logger.debug "API called: RoutesApi#apps_app_routes_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
148
148
  end
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #IronFunctions
3
3
 
4
- #null
4
+ #The open source serverless platform.
5
5
 
6
- OpenAPI spec version: 0.0.5
6
+ OpenAPI spec version: 0.1.0
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
 
@@ -35,7 +35,7 @@ module IronFunctions
35
35
  # 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.
36
36
  # @param [Hash] opts the optional parameters
37
37
  # @option opts [Integer] :n Number of tasks to return. (default to 1)
38
- # @return [TasksWrapper]
38
+ # @return [TaskWrapper]
39
39
  def tasks_get(opts = {})
40
40
  data, _status_code, _headers = tasks_get_with_http_info(opts)
41
41
  return data
@@ -45,7 +45,7 @@ module IronFunctions
45
45
  # Gets the next task in the queue, ready for processing. Titan may return &lt;&#x3D;n tasks. Consumers should start processing tasks in order. Each returned task is set to &#x60;status&#x60; \&quot;running\&quot; and &#x60;started_at&#x60; is set to the current time. No other consumer can retrieve this task.
46
46
  # @param [Hash] opts the optional parameters
47
47
  # @option opts [Integer] :n Number of tasks to return.
48
- # @return [Array<(TasksWrapper, Fixnum, Hash)>] TasksWrapper data, response status code and response headers
48
+ # @return [Array<(TaskWrapper, Fixnum, Hash)>] TaskWrapper data, response status code and response headers
49
49
  def tasks_get_with_http_info(opts = {})
50
50
  if @api_client.config.debugging
51
51
  @api_client.config.logger.debug "Calling API: TasksApi.tasks_get ..."
@@ -80,7 +80,7 @@ module IronFunctions
80
80
  :form_params => form_params,
81
81
  :body => post_body,
82
82
  :auth_names => auth_names,
83
- :return_type => 'TasksWrapper')
83
+ :return_type => 'TaskWrapper')
84
84
  if @api_client.config.debugging
85
85
  @api_client.config.logger.debug "API called: TasksApi#tasks_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
86
86
  end
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #IronFunctions
3
3
 
4
- #null
4
+ #The open source serverless platform.
5
5
 
6
- OpenAPI spec version: 0.0.5
6
+ OpenAPI spec version: 0.1.0
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
 
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #IronFunctions
3
3
 
4
- #null
4
+ #The open source serverless platform.
5
5
 
6
- OpenAPI spec version: 0.0.5
6
+ OpenAPI spec version: 0.1.0
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
 
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #IronFunctions
3
3
 
4
- #null
4
+ #The open source serverless platform.
5
5
 
6
- OpenAPI spec version: 0.0.5
6
+ OpenAPI spec version: 0.1.0
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
 
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #IronFunctions
3
3
 
4
- #null
4
+ #The open source serverless platform.
5
5
 
6
- OpenAPI spec version: 0.0.5
6
+ OpenAPI spec version: 0.1.0
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
 
@@ -29,18 +29,23 @@ module IronFunctions
29
29
  # Name of this app. Must be different than the image name. Can ony contain alphanumeric, -, and _.
30
30
  attr_accessor :name
31
31
 
32
+ # Application configuration
33
+ attr_accessor :config
34
+
32
35
 
33
36
  # Attribute mapping from ruby-style variable name to JSON key.
34
37
  def self.attribute_map
35
38
  {
36
- :'name' => :'name'
39
+ :'name' => :'name',
40
+ :'config' => :'config'
37
41
  }
38
42
  end
39
43
 
40
44
  # Attribute type mapping.
41
45
  def self.swagger_types
42
46
  {
43
- :'name' => :'String'
47
+ :'name' => :'String',
48
+ :'config' => :'Hash<String, String>'
44
49
  }
45
50
  end
46
51
 
@@ -56,6 +61,12 @@ module IronFunctions
56
61
  self.name = attributes[:'name']
57
62
  end
58
63
 
64
+ if attributes.has_key?(:'config')
65
+ if (value = attributes[:'config']).is_a?(Array)
66
+ self.config = value
67
+ end
68
+ end
69
+
59
70
  end
60
71
 
61
72
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -76,7 +87,8 @@ module IronFunctions
76
87
  def ==(o)
77
88
  return true if self.equal?(o)
78
89
  self.class == o.class &&
79
- name == o.name
90
+ name == o.name &&
91
+ config == o.config
80
92
  end
81
93
 
82
94
  # @see the `==` method
@@ -88,7 +100,7 @@ module IronFunctions
88
100
  # Calculates hash code according to all attributes.
89
101
  # @return [Fixnum] Hash code
90
102
  def hash
91
- [name].hash
103
+ [name, config].hash
92
104
  end
93
105
 
94
106
  # Builds the object from hash
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #IronFunctions
3
3
 
4
- #null
4
+ #The open source serverless platform.
5
5
 
6
- OpenAPI spec version: 0.0.5
6
+ OpenAPI spec version: 0.1.0
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9