Permalink
Browse files

Fixed dependencies to lock in net-http-persistent.

  • Loading branch information...
1 parent f165d4e commit e5b4dce8c4728294a7a1e6d8e83c559ebcec16db @treeder treeder committed Oct 11, 2016
Showing with 44 additions and 3 deletions.
  1. +27 −0 Gemfile.lock
  2. +2 −2 iron_worker.gemspec
  3. +4 −0 lib/iron_worker/api_client.rb
  4. +10 −0 lib/iron_worker/client.rb
  5. +1 −1 lib/iron_worker/version.rb
View
@@ -0,0 +1,27 @@
+PATH
+ remote: .
+ specs:
+ iron_worker (3.4.1)
+ iron_core (>= 1.0.12, < 2)
+ json (~> 1.8, > 1.8.1)
+ rest (~> 3.0, >= 3.0.8)
+
+GEM
+ specs:
+ iron_core (1.0.12)
+ rest (>= 3.0.8)
+ json (1.8.3)
+ net-http-persistent (2.9.4)
+ netrc (0.11.0)
+ rest (3.0.8)
+ net-http-persistent (>= 2.9.1, < 3)
+ netrc
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ iron_worker!
+
+BUNDLED WITH
+ 1.13.3
View
@@ -16,8 +16,8 @@ Gem::Specification.new do |gem|
gem.required_rubygems_version = ">= 1.3.6"
gem.required_ruby_version = Gem::Requirement.new(">= 1.9")
- gem.add_runtime_dependency "iron_core", "~> 1.0", ">= 1.0.9"
- gem.add_runtime_dependency 'rest', '~> 3.0', ">= 3.0.6"
+ gem.add_runtime_dependency "iron_core", ">= 1.0.12", '< 2'
+ gem.add_runtime_dependency 'rest', '~> 3.0', ">= 3.0.8"
gem.add_runtime_dependency "json", "~> 1.8", "> 1.8.1"
end
@@ -50,6 +50,10 @@ def codes_get(id)
parse_response(get("projects/#{@project_id}/codes/#{id}"))
end
+ def codes_register(name, options)
+ parse_response(post("projects/#{@project_id}/codes", options))
+ end
+
def codes_create(name, file, runtime, runner, options)
parse_response(post_file("projects/#{@project_id}/codes", :file, File.new(file, 'rb'), :data, {:name => name, :runtime => runtime, :file_name => runner}.merge(options)))
end
View
@@ -96,6 +96,16 @@ def codes_get(code_id)
OpenStruct.new(c)
end
+ # For registering docker images: http://dev.iron.io/worker/reference/api/#upload_or_update_a_code_package
+ # Just need name and options[:image] = x
+ def codes_register(name, options={})
+ IronCore::Logger.debug 'IronWorker', "Calling codes.register with code='#{code.to_s}' and options='#{options.to_s}'"
+
+ res = @api.codes_register(name, options)
+ OpenStruct.new(res)
+ end
+
+ # TODO: we should remove all this, legecy stuff.
def codes_create(code, options = {})
IronCore::Logger.debug 'IronWorker', "Calling codes.create with code='#{code.to_s}' and options='#{options.to_s}'"
@@ -1,5 +1,5 @@
module IronWorker
- VERSION = "3.4.0"
+ VERSION = "3.4.1"
def self.version
VERSION

0 comments on commit e5b4dce

Please sign in to comment.