nsicloudooo 0.3.0 → 0.3.1
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/VERSION +1 -1
- data/lib/nsicloudooo/client.rb +8 -0
- data/lib/nsicloudooo/errors.rb +3 -0
- data/lib/nsicloudooo/fake_server.rb +2 -0
- data/nsicloudooo.gemspec +3 -3
- data/spec/nsicloudooo_spec.rb +6 -1
- metadata +4 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.1
|
data/lib/nsicloudooo/client.rb
CHANGED
@@ -135,6 +135,13 @@ module NSICloudooo
|
|
135
135
|
#
|
136
136
|
# @yield a Configuration object (see {NSICloudooo::Client::Configuration})
|
137
137
|
#
|
138
|
+
# @example
|
139
|
+
# NSICloudooo::Client.configure do
|
140
|
+
# user "why"
|
141
|
+
# password "chunky"
|
142
|
+
# host "localhost"
|
143
|
+
# port "8888"
|
144
|
+
# end
|
138
145
|
def self.configure(&block)
|
139
146
|
Configuration.instance_eval(&block)
|
140
147
|
end
|
@@ -170,6 +177,7 @@ module NSICloudooo
|
|
170
177
|
raise NSICloudooo::Errors::Client::KeyNotFoundError if response.code == "404"
|
171
178
|
raise NSICloudooo::Errors::Client::MalformedRequestError if response.code == "400"
|
172
179
|
raise NSICloudooo::Errors::Client::AuthenticationError if response.code == "401"
|
180
|
+
raise NSICloudooo::Errors::Client::QueueServiceConnectionError if response.code == "503"
|
173
181
|
if response.code == "500" and response.body.include?("SAM")
|
174
182
|
raise NSICloudooo::Errors::Client::SAMConnectionError
|
175
183
|
end
|
data/lib/nsicloudooo/errors.rb
CHANGED
data/nsicloudooo.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "nsicloudooo"
|
8
|
-
s.version = "0.3.
|
8
|
+
s.version = "0.3.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Douglas Camata"]
|
12
|
-
s.date = "2012-05-
|
12
|
+
s.date = "2012-05-25"
|
13
13
|
s.description = "A simple gem to access a nsi.cloudooo node"
|
14
14
|
s.email = "d.camata@gmail.com"
|
15
15
|
s.extra_rdoc_files = [
|
@@ -37,7 +37,7 @@ Gem::Specification.new do |s|
|
|
37
37
|
s.homepage = "http://github.com/nsi-iff/nsicloudooo-ruby.git"
|
38
38
|
s.licenses = ["MIT"]
|
39
39
|
s.require_paths = ["lib"]
|
40
|
-
s.rubygems_version = "1.8.
|
40
|
+
s.rubygems_version = "1.8.21"
|
41
41
|
s.summary = "A simple gem to access a nsi.cloudooo node"
|
42
42
|
|
43
43
|
if s.respond_to? :specification_version then
|
data/spec/nsicloudooo_spec.rb
CHANGED
@@ -86,9 +86,14 @@ describe NSICloudooo do
|
|
86
86
|
@nsicloudooo.grains_keys_for(key)["files"].should have(0).files
|
87
87
|
end
|
88
88
|
|
89
|
-
it "raises an error
|
89
|
+
it "raises an error when trying to verify if non-existing key is done" do
|
90
90
|
expect { @nsicloudooo.done("dont")["done"].should be_false }.to raise_error(NSICloudooo::Errors::Client::KeyNotFoundError)
|
91
91
|
end
|
92
|
+
|
93
|
+
it "raises an error when the server can't connect to the queue service" do
|
94
|
+
expect { @nsicloudooo.granulate(:file => 'document', :filename => 'queue error' ).should be_false }.to raise_error(NSICloudooo::Errors::Client::QueueServiceConnectionError)
|
95
|
+
end
|
96
|
+
|
92
97
|
end
|
93
98
|
|
94
99
|
context "get configuration" do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nsicloudooo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
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-05-
|
12
|
+
date: 2012-05-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: sinatra
|
@@ -146,7 +146,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
146
146
|
version: '0'
|
147
147
|
segments:
|
148
148
|
- 0
|
149
|
-
hash: -
|
149
|
+
hash: -2541024177996774123
|
150
150
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
151
151
|
none: false
|
152
152
|
requirements:
|
@@ -155,7 +155,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
155
155
|
version: '0'
|
156
156
|
requirements: []
|
157
157
|
rubyforge_project:
|
158
|
-
rubygems_version: 1.8.
|
158
|
+
rubygems_version: 1.8.21
|
159
159
|
signing_key:
|
160
160
|
specification_version: 3
|
161
161
|
summary: A simple gem to access a nsi.cloudooo node
|