RightScaleAPIHelper 0.4.5 → 0.4.6
Sign up to get free protection for your applications and to get access to all the features.
- data/RightScaleAPIHelper.gemspec +2 -2
- data/VERSION +1 -1
- data/lib/RightScaleAPIHelper.rb +6 -3
- metadata +3 -3
data/RightScaleAPIHelper.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "RightScaleAPIHelper"
|
8
|
-
s.version = "0.4.
|
8
|
+
s.version = "0.4.6"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Eric VanWieren"]
|
12
|
-
s.date = "2012-08-
|
12
|
+
s.date = "2012-08-29"
|
13
13
|
s.description = "Simple wrapper for connecting and using the RightScale API. Eases the use of connecting with a username and password, and then provides an object to do GET, PUT, POST, DELETE requests. Returns an HTTP response."
|
14
14
|
s.email = "eric@codex.org"
|
15
15
|
s.extra_rdoc_files = [
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.4.
|
1
|
+
0.4.6
|
data/lib/RightScaleAPIHelper.rb
CHANGED
@@ -30,8 +30,9 @@ module RightScaleAPIHelper
|
|
30
30
|
# against the RightScale API without authenticating again.
|
31
31
|
# Inputs:
|
32
32
|
# format = xml or js
|
33
|
-
#
|
34
|
-
|
33
|
+
# version = 1.0 # 1.5 to be supported soon
|
34
|
+
# verify_ssl = true|false # For windows machines to prevent SSL error from being thrown.
|
35
|
+
def initialize(account, username, password, format = 'js', version = '1.0', verify_ssl = true)
|
35
36
|
# Set Default Variables
|
36
37
|
rs_url = "https://my.rightscale.com"
|
37
38
|
api_url = '/api/acct/'
|
@@ -41,7 +42,9 @@ module RightScaleAPIHelper
|
|
41
42
|
@formatting = "?format=#{format}"
|
42
43
|
@conn = Net::HTTP.new('my.rightscale.com', 443)
|
43
44
|
@conn.use_ssl=true
|
44
|
-
|
45
|
+
unless verify_ssl
|
46
|
+
@conn.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
47
|
+
end
|
45
48
|
if version != '1.0'
|
46
49
|
raise("Only version 1.0 is supported")
|
47
50
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: RightScaleAPIHelper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.6
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-08-
|
12
|
+
date: 2012-08-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: shoulda
|
@@ -110,7 +110,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
110
110
|
version: '0'
|
111
111
|
segments:
|
112
112
|
- 0
|
113
|
-
hash:
|
113
|
+
hash: 2864747350018541599
|
114
114
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
115
115
|
none: false
|
116
116
|
requirements:
|