rightscale-api 0.0.1 → 0.2.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.
- data/Rakefile +14 -0
- data/VERSION +1 -1
- data/lib/rightscale/api.rb +3 -2
- data/lib/rightscale/client.rb +12 -2
- data/lib/rightscale/servers.rb +1 -0
- data/lib/rightscale/statuses.rb +13 -13
- data/lib/rightscale.rb +1 -1
- data/pkg/rightscale-api-0.0.1.gem +0 -0
- data/rightscale-api.gemspec +48 -0
- metadata +5 -2
data/Rakefile
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
begin
|
|
2
|
+
require 'jeweler'
|
|
3
|
+
Jeweler::Tasks.new do |gemspec|
|
|
4
|
+
gemspec.name = "rightscale-api"
|
|
5
|
+
gemspec.summary = "A Ruby Wrapper for the RightScale API"
|
|
6
|
+
gemspec.description = "A Ruby Wrapper for the RightScale API"
|
|
7
|
+
gemspec.email = "david.michael@sonymusic.com"
|
|
8
|
+
gemspec.homepage = "http://github.com/dmichael/rightscale-api"
|
|
9
|
+
gemspec.authors = ["David Michael"]
|
|
10
|
+
end
|
|
11
|
+
Jeweler::GemcutterTasks.new
|
|
12
|
+
rescue LoadError
|
|
13
|
+
puts "Jeweler not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
|
|
14
|
+
end
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.0
|
|
1
|
+
0.2.0
|
data/lib/rightscale/api.rb
CHANGED
|
@@ -15,9 +15,10 @@ module RightScale
|
|
|
15
15
|
end
|
|
16
16
|
|
|
17
17
|
def show(identifier)
|
|
18
|
-
puts formatted_uri(identifier)
|
|
18
|
+
# puts formatted_uri(identifier)
|
|
19
19
|
response = client.get formatted_uri(identifier)
|
|
20
|
-
|
|
20
|
+
|
|
21
|
+
return response["#{@singular}"] || response
|
|
21
22
|
end
|
|
22
23
|
|
|
23
24
|
def create
|
data/lib/rightscale/client.rb
CHANGED
|
@@ -8,12 +8,22 @@ module RightScale
|
|
|
8
8
|
end
|
|
9
9
|
|
|
10
10
|
def get(path, options={})
|
|
11
|
+
request :get, path, options
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
def post(path, options={})
|
|
15
|
+
request :post, path, options
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def request(method, path, options={})
|
|
11
19
|
options.merge!({
|
|
12
20
|
:basic_auth => {:username => @email, :password => @password},
|
|
13
21
|
:headers => {'X-API-VERSION' => '1.0'}
|
|
14
22
|
})
|
|
15
|
-
|
|
16
|
-
self.class.
|
|
23
|
+
|
|
24
|
+
response = self.class.send(method, "#{path}", options)
|
|
25
|
+
# puts response.inspect
|
|
26
|
+
return response
|
|
17
27
|
end
|
|
18
28
|
|
|
19
29
|
def deployments
|
data/lib/rightscale/servers.rb
CHANGED
data/lib/rightscale/statuses.rb
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
module RightScale
|
|
2
|
-
class Statuses
|
|
3
|
-
attr_reader :client
|
|
4
|
-
|
|
5
|
-
def initialize(client)
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
end
|
|
10
|
-
|
|
11
|
-
def show(identifier)
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
end
|
|
2
|
+
class Statuses < API
|
|
3
|
+
# attr_reader :client
|
|
4
|
+
#
|
|
5
|
+
# def initialize(client)
|
|
6
|
+
# @client = client
|
|
7
|
+
# @@resource = self.class.name.split('::').last.downcase
|
|
8
|
+
# @@format = 'xml'
|
|
9
|
+
# end
|
|
10
|
+
#
|
|
11
|
+
# def show(identifier)
|
|
12
|
+
# response = client.get("/#{@@resource}/#{identifier}.#{@@format}")
|
|
13
|
+
# return response["#{@@resource.chop}"]
|
|
14
|
+
# end
|
|
15
15
|
end
|
|
16
16
|
end
|
data/lib/rightscale.rb
CHANGED
|
Binary file
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Generated by jeweler
|
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
|
|
4
|
+
# -*- encoding: utf-8 -*-
|
|
5
|
+
|
|
6
|
+
Gem::Specification.new do |s|
|
|
7
|
+
s.name = %q{rightscale-api}
|
|
8
|
+
s.version = "0.2.0"
|
|
9
|
+
|
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
|
11
|
+
s.authors = ["David Michael"]
|
|
12
|
+
s.date = %q{2010-01-28}
|
|
13
|
+
s.description = %q{A Ruby Wrapper for the RightScale API}
|
|
14
|
+
s.email = %q{david.michael@sonymusic.com}
|
|
15
|
+
s.extra_rdoc_files = [
|
|
16
|
+
"README.markdown"
|
|
17
|
+
]
|
|
18
|
+
s.files = [
|
|
19
|
+
"README.markdown",
|
|
20
|
+
"Rakefile",
|
|
21
|
+
"VERSION",
|
|
22
|
+
"lib/rightscale.rb",
|
|
23
|
+
"lib/rightscale/api.rb",
|
|
24
|
+
"lib/rightscale/client.rb",
|
|
25
|
+
"lib/rightscale/deployments.rb",
|
|
26
|
+
"lib/rightscale/right_scripts.rb",
|
|
27
|
+
"lib/rightscale/servers.rb",
|
|
28
|
+
"lib/rightscale/statuses.rb",
|
|
29
|
+
"pkg/rightscale-api-0.0.1.gem",
|
|
30
|
+
"rightscale-api.gemspec"
|
|
31
|
+
]
|
|
32
|
+
s.homepage = %q{http://github.com/dmichael/rightscale-api}
|
|
33
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
|
34
|
+
s.require_paths = ["lib"]
|
|
35
|
+
s.rubygems_version = %q{1.3.5}
|
|
36
|
+
s.summary = %q{A Ruby Wrapper for the RightScale API}
|
|
37
|
+
|
|
38
|
+
if s.respond_to? :specification_version then
|
|
39
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
|
40
|
+
s.specification_version = 3
|
|
41
|
+
|
|
42
|
+
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
|
43
|
+
else
|
|
44
|
+
end
|
|
45
|
+
else
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rightscale-api
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0
|
|
4
|
+
version: 0.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- David Michael
|
|
@@ -9,7 +9,7 @@ autorequire:
|
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
11
|
|
|
12
|
-
date:
|
|
12
|
+
date: 2010-01-28 00:00:00 -05:00
|
|
13
13
|
default_executable:
|
|
14
14
|
dependencies: []
|
|
15
15
|
|
|
@@ -23,6 +23,7 @@ extra_rdoc_files:
|
|
|
23
23
|
- README.markdown
|
|
24
24
|
files:
|
|
25
25
|
- README.markdown
|
|
26
|
+
- Rakefile
|
|
26
27
|
- VERSION
|
|
27
28
|
- lib/rightscale.rb
|
|
28
29
|
- lib/rightscale/api.rb
|
|
@@ -31,6 +32,8 @@ files:
|
|
|
31
32
|
- lib/rightscale/right_scripts.rb
|
|
32
33
|
- lib/rightscale/servers.rb
|
|
33
34
|
- lib/rightscale/statuses.rb
|
|
35
|
+
- pkg/rightscale-api-0.0.1.gem
|
|
36
|
+
- rightscale-api.gemspec
|
|
34
37
|
has_rdoc: true
|
|
35
38
|
homepage: http://github.com/dmichael/rightscale-api
|
|
36
39
|
licenses: []
|