From ea1bf9861fb3fec20f40f8307799c3023f3bd454 Mon Sep 17 00:00:00 2001 From: threetee Date: Thu, 5 Apr 2012 15:45:18 -0700 Subject: [PATCH 1/2] Brought repo in line with version 0.4.1 on rubygems --- Rakefile | 3 +++ VERSION | 2 +- lib/rightscale-api.rb | 17 +++++++++++++++ lib/{rightscale => rightscale-api}/api.rb | 0 lib/{rightscale => rightscale-api}/client.rb | 0 .../deployments.rb | 0 .../right_scripts.rb | 0 lib/{rightscale => rightscale-api}/servers.rb | 0 .../statuses.rb | 0 lib/rightscale.rb | 17 --------------- rightscale-api.gemspec | 21 +++++++++++-------- 11 files changed, 33 insertions(+), 27 deletions(-) create mode 100644 lib/rightscale-api.rb rename lib/{rightscale => rightscale-api}/api.rb (100%) rename lib/{rightscale => rightscale-api}/client.rb (100%) rename lib/{rightscale => rightscale-api}/deployments.rb (100%) rename lib/{rightscale => rightscale-api}/right_scripts.rb (100%) rename lib/{rightscale => rightscale-api}/servers.rb (100%) rename lib/{rightscale => rightscale-api}/statuses.rb (100%) delete mode 100644 lib/rightscale.rb diff --git a/Rakefile b/Rakefile index 7e88fa5..aee66cd 100644 --- a/Rakefile +++ b/Rakefile @@ -1,3 +1,5 @@ +$LOAD_PATH.unshift File.join(File.dirname(__FILE__), 'lib', 'rightscale-api') + begin require 'jeweler' Jeweler::Tasks.new do |gemspec| @@ -7,6 +9,7 @@ begin gemspec.email = "david.michael@sonymusic.com" gemspec.homepage = "http://github.com/dmichael/rightscale-api" gemspec.authors = ["David Michael"] + gemspec.add_dependency "httparty" end Jeweler::GemcutterTasks.new rescue LoadError diff --git a/VERSION b/VERSION index 0ea3a94..267577d 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.2.0 +0.4.1 diff --git a/lib/rightscale-api.rb b/lib/rightscale-api.rb new file mode 100644 index 0000000..6a28e49 --- /dev/null +++ b/lib/rightscale-api.rb @@ -0,0 +1,17 @@ +require 'pathname' +require 'rubygems' +require 'httparty' +require 'pp' +require 'socket' + +dir = Pathname(__FILE__).dirname.expand_path + +require dir + 'rightscale-api/api' +require dir + 'rightscale-api/client' + +# Management API +require dir + 'rightscale-api/deployments' +require dir + 'rightscale-api/servers' +require dir + 'rightscale-api/right_scripts' +require dir + 'rightscale-api/statuses' + diff --git a/lib/rightscale/api.rb b/lib/rightscale-api/api.rb similarity index 100% rename from lib/rightscale/api.rb rename to lib/rightscale-api/api.rb diff --git a/lib/rightscale/client.rb b/lib/rightscale-api/client.rb similarity index 100% rename from lib/rightscale/client.rb rename to lib/rightscale-api/client.rb diff --git a/lib/rightscale/deployments.rb b/lib/rightscale-api/deployments.rb similarity index 100% rename from lib/rightscale/deployments.rb rename to lib/rightscale-api/deployments.rb diff --git a/lib/rightscale/right_scripts.rb b/lib/rightscale-api/right_scripts.rb similarity index 100% rename from lib/rightscale/right_scripts.rb rename to lib/rightscale-api/right_scripts.rb diff --git a/lib/rightscale/servers.rb b/lib/rightscale-api/servers.rb similarity index 100% rename from lib/rightscale/servers.rb rename to lib/rightscale-api/servers.rb diff --git a/lib/rightscale/statuses.rb b/lib/rightscale-api/statuses.rb similarity index 100% rename from lib/rightscale/statuses.rb rename to lib/rightscale-api/statuses.rb diff --git a/lib/rightscale.rb b/lib/rightscale.rb deleted file mode 100644 index 22b1c3a..0000000 --- a/lib/rightscale.rb +++ /dev/null @@ -1,17 +0,0 @@ -require 'pathname' -require 'rubygems' -require 'httparty' -require 'pp' -require 'socket' - -dir = Pathname(__FILE__).dirname.expand_path - -require dir + 'rightscale/api' -require dir + 'rightscale/client' - -# Management API -require dir + 'rightscale/deployments' -require dir + 'rightscale/servers' -require dir + 'rightscale/right_scripts' -require dir + 'rightscale/statuses' - diff --git a/rightscale-api.gemspec b/rightscale-api.gemspec index 98d2bc9..089bebe 100644 --- a/rightscale-api.gemspec +++ b/rightscale-api.gemspec @@ -5,11 +5,11 @@ Gem::Specification.new do |s| s.name = %q{rightscale-api} - s.version = "0.2.0" + s.version = "0.4.1" s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= s.authors = ["David Michael"] - s.date = %q{2010-01-28} + s.date = %q{2010-03-11} s.description = %q{A Ruby Wrapper for the RightScale API} s.email = %q{david.michael@sonymusic.com} s.extra_rdoc_files = [ @@ -19,13 +19,13 @@ Gem::Specification.new do |s| "README.markdown", "Rakefile", "VERSION", - "lib/rightscale.rb", - "lib/rightscale/api.rb", - "lib/rightscale/client.rb", - "lib/rightscale/deployments.rb", - "lib/rightscale/right_scripts.rb", - "lib/rightscale/servers.rb", - "lib/rightscale/statuses.rb", + "lib/rightscale-api.rb", + "lib/rightscale-api/api.rb", + "lib/rightscale-api/client.rb", + "lib/rightscale-api/deployments.rb", + "lib/rightscale-api/right_scripts.rb", + "lib/rightscale-api/servers.rb", + "lib/rightscale-api/statuses.rb", "pkg/rightscale-api-0.0.1.gem", "rightscale-api.gemspec" ] @@ -40,9 +40,12 @@ Gem::Specification.new do |s| s.specification_version = 3 if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then + s.add_runtime_dependency(%q, [">= 0"]) else + s.add_dependency(%q, [">= 0"]) end else + s.add_dependency(%q, [">= 0"]) end end From 0ed700dad3e257e7ca4499f15509d1f838901487 Mon Sep 17 00:00:00 2001 From: threetee Date: Thu, 5 Apr 2012 16:15:35 -0700 Subject: [PATCH 2/2] Added support for rightscale server_arrays, bumped version to 0.4.2 --- VERSION | 2 +- lib/rightscale-api.rb | 1 + lib/rightscale-api/client.rb | 4 +++ lib/rightscale-api/server_arrays.rb | 5 ++++ rightscale-api.gemspec | 45 ++++++++++++++--------------- 5 files changed, 33 insertions(+), 24 deletions(-) create mode 100644 lib/rightscale-api/server_arrays.rb diff --git a/VERSION b/VERSION index 267577d..2b7c5ae 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.4.1 +0.4.2 diff --git a/lib/rightscale-api.rb b/lib/rightscale-api.rb index 6a28e49..ba73517 100644 --- a/lib/rightscale-api.rb +++ b/lib/rightscale-api.rb @@ -12,6 +12,7 @@ # Management API require dir + 'rightscale-api/deployments' require dir + 'rightscale-api/servers' +require dir + 'rightscale-api/server_arrays' require dir + 'rightscale-api/right_scripts' require dir + 'rightscale-api/statuses' diff --git a/lib/rightscale-api/client.rb b/lib/rightscale-api/client.rb index e7c202f..bfacb5e 100644 --- a/lib/rightscale-api/client.rb +++ b/lib/rightscale-api/client.rb @@ -33,6 +33,10 @@ def deployments def servers @servers ||= Servers.new(self) end + + def server_arrays + @server_arrays ||= ServerArrays.new(self, :resource => 'server_arrays') + end def statuses @statuses ||= Statuses.new(self) diff --git a/lib/rightscale-api/server_arrays.rb b/lib/rightscale-api/server_arrays.rb new file mode 100644 index 0000000..fe0af25 --- /dev/null +++ b/lib/rightscale-api/server_arrays.rb @@ -0,0 +1,5 @@ +module RightScale + # http://support.rightscale.com/15-References/RightScale_API_Reference_Guide/02-Management/09-Server_Arrays + class ServerArrays < API + end +end \ No newline at end of file diff --git a/rightscale-api.gemspec b/rightscale-api.gemspec index 089bebe..fa013f0 100644 --- a/rightscale-api.gemspec +++ b/rightscale-api.gemspec @@ -1,45 +1,44 @@ # Generated by jeweler # DO NOT EDIT THIS FILE DIRECTLY -# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command +# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec' # -*- encoding: utf-8 -*- Gem::Specification.new do |s| - s.name = %q{rightscale-api} - s.version = "0.4.1" + s.name = "rightscale-api" + s.version = "0.4.2" s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= s.authors = ["David Michael"] - s.date = %q{2010-03-11} - s.description = %q{A Ruby Wrapper for the RightScale API} - s.email = %q{david.michael@sonymusic.com} + s.date = "2012-04-05" + s.description = "A Ruby Wrapper for the RightScale API" + s.email = "david.michael@sonymusic.com" s.extra_rdoc_files = [ "README.markdown" ] s.files = [ "README.markdown", - "Rakefile", - "VERSION", - "lib/rightscale-api.rb", - "lib/rightscale-api/api.rb", - "lib/rightscale-api/client.rb", - "lib/rightscale-api/deployments.rb", - "lib/rightscale-api/right_scripts.rb", - "lib/rightscale-api/servers.rb", - "lib/rightscale-api/statuses.rb", - "pkg/rightscale-api-0.0.1.gem", - "rightscale-api.gemspec" + "Rakefile", + "VERSION", + "lib/rightscale-api.rb", + "lib/rightscale-api/api.rb", + "lib/rightscale-api/client.rb", + "lib/rightscale-api/deployments.rb", + "lib/rightscale-api/right_scripts.rb", + "lib/rightscale-api/server_arrays.rb", + "lib/rightscale-api/servers.rb", + "lib/rightscale-api/statuses.rb", + "pkg/rightscale-api-0.0.1.gem", + "rightscale-api.gemspec" ] - s.homepage = %q{http://github.com/dmichael/rightscale-api} - s.rdoc_options = ["--charset=UTF-8"] + s.homepage = "http://github.com/dmichael/rightscale-api" s.require_paths = ["lib"] - s.rubygems_version = %q{1.3.5} - s.summary = %q{A Ruby Wrapper for the RightScale API} + s.rubygems_version = "1.8.15" + s.summary = "A Ruby Wrapper for the RightScale API" if s.respond_to? :specification_version then - current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION s.specification_version = 3 - if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then + if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then s.add_runtime_dependency(%q, [">= 0"]) else s.add_dependency(%q, [">= 0"])