From d58b60d339bc5686937897c2497a3d6311176f52 Mon Sep 17 00:00:00 2001 From: Justin Witrick Date: Tue, 27 Nov 2012 14:47:07 -0500 Subject: [PATCH 1/2] Added functionality to allow someone to update an environment --- lib/spice/connection/environments.rb | 11 ++++++++++- spice.gemspec | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/lib/spice/connection/environments.rb b/lib/spice/connection/environments.rb index cf49d5d..0f1ee30 100644 --- a/lib/spice/connection/environments.rb +++ b/lib/spice/connection/environments.rb @@ -22,6 +22,15 @@ def environment(name) Spice::Environment.get_or_new(attributes) end # def environment + # + def update_environment(params=Mash.new) + environment = environment(params[:name]) + + environment.attrs.update Spice::Environment.new(params) + put("/environments/#{environment.name}", environment.attrs) + environment(environment.name) + end + end # module Environments end # class Connection -end # module Spice \ No newline at end of file +end # module Spice diff --git a/spice.gemspec b/spice.gemspec index 223a7eb..c4719e6 100644 --- a/spice.gemspec +++ b/spice.gemspec @@ -15,7 +15,7 @@ Gem::Specification.new do |s| s.rubyforge_project = "spice" s.add_dependency "faraday", "~> 0.8.0" - s.add_dependency "mixlib-authentication", '~> 1.1.4' + s.add_dependency "mixlib-authentication", '~> 1.3.0' s.add_dependency "multi_json", '~> 1.3.6' s.add_development_dependency 'rspec', '>= 2.8.0' From 439bdcaa6eab62da6d9aed75719963f87d57067f Mon Sep 17 00:00:00 2001 From: Justin Witrick Date: Tue, 27 Nov 2012 16:45:37 -0500 Subject: [PATCH 2/2] reverting the update to mixlib-authentication --- spice.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spice.gemspec b/spice.gemspec index c4719e6..223a7eb 100644 --- a/spice.gemspec +++ b/spice.gemspec @@ -15,7 +15,7 @@ Gem::Specification.new do |s| s.rubyforge_project = "spice" s.add_dependency "faraday", "~> 0.8.0" - s.add_dependency "mixlib-authentication", '~> 1.3.0' + s.add_dependency "mixlib-authentication", '~> 1.1.4' s.add_dependency "multi_json", '~> 1.3.6' s.add_development_dependency 'rspec', '>= 2.8.0'