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..2b7c5ae 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.2.0 +0.4.2 diff --git a/lib/rightscale-api.rb b/lib/rightscale-api.rb new file mode 100644 index 0000000..ba73517 --- /dev/null +++ b/lib/rightscale-api.rb @@ -0,0 +1,18 @@ +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/server_arrays' +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 90% rename from lib/rightscale/client.rb rename to lib/rightscale-api/client.rb index e7c202f..bfacb5e 100644 --- a/lib/rightscale/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/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-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/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..fa013f0 100644 --- a/rightscale-api.gemspec +++ b/rightscale-api.gemspec @@ -1,48 +1,50 @@ # 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.2.0" + 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-01-28} - 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.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", - "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"]) end else + s.add_dependency(%q, [">= 0"]) end end