ogle 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +3 -3
- data/lib/ogle/client.rb +3 -3
- data/lib/ogle/{resource.rb → images.rb} +1 -1
- data/lib/ogle/version.rb +1 -1
- data/test/lib/ogle/resource_test.rb +8 -8
- metadata +9 -9
- /data/test/cassettes/{resource_all.yml → images_all.yml} +0 -0
- /data/test/cassettes/{resource_all_verbose.yml → images_all_verbose.yml} +0 -0
- /data/test/cassettes/{resource_find.yml → images_find.yml} +0 -0
data/README.md
CHANGED
@@ -23,15 +23,15 @@ Depending on the call you make, glance will sometimes return JSON and others XML
|
|
23
23
|
)
|
24
24
|
|
25
25
|
# This will give a list of all the images
|
26
|
-
response = CONNECTION.
|
26
|
+
response = CONNECTION.images.all
|
27
27
|
puts response
|
28
28
|
|
29
29
|
# This will give a detailed list of all the images
|
30
|
-
response = CONNECTION.
|
30
|
+
response = CONNECTION.images true
|
31
31
|
puts response
|
32
32
|
|
33
33
|
# This will return headers for a specific image as a hash
|
34
|
-
response = CONNECTION.
|
34
|
+
response = CONNECTION.images.find 6
|
35
35
|
puts response
|
36
36
|
|
37
37
|
## Compatability
|
data/lib/ogle/client.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
%w(hugs ogle/
|
1
|
+
%w(hugs ogle/images).each { |r| require r }
|
2
2
|
|
3
3
|
module Ogle
|
4
4
|
class Client
|
@@ -16,8 +16,8 @@ module Ogle
|
|
16
16
|
@connection.raise_5xx = true
|
17
17
|
end
|
18
18
|
|
19
|
-
def
|
20
|
-
@
|
19
|
+
def images
|
20
|
+
@images ||= Images.new @connection
|
21
21
|
end
|
22
22
|
end
|
23
23
|
end
|
data/lib/ogle/version.rb
CHANGED
@@ -9,11 +9,11 @@ def must_have_valid_keys response, keys
|
|
9
9
|
response.keys.delete_if { |k| keys.include? k }.must_be_empty
|
10
10
|
end
|
11
11
|
|
12
|
-
describe Ogle::
|
12
|
+
describe Ogle::Images do
|
13
13
|
describe "#all" do
|
14
14
|
before do
|
15
|
-
VCR.use_cassette "
|
16
|
-
@response = CONNECTION.
|
15
|
+
VCR.use_cassette "images_all" do
|
16
|
+
@response = CONNECTION.images.all
|
17
17
|
end
|
18
18
|
end
|
19
19
|
|
@@ -35,8 +35,8 @@ describe Ogle::Resource do
|
|
35
35
|
|
36
36
|
describe "#all true" do
|
37
37
|
before do
|
38
|
-
VCR.use_cassette "
|
39
|
-
@response = CONNECTION.
|
38
|
+
VCR.use_cassette "images_all_verbose" do
|
39
|
+
@response = CONNECTION.images.all true
|
40
40
|
end
|
41
41
|
end
|
42
42
|
|
@@ -66,13 +66,13 @@ describe Ogle::Resource do
|
|
66
66
|
|
67
67
|
describe "#find" do
|
68
68
|
before do
|
69
|
-
VCR.use_cassette "
|
70
|
-
@response = CONNECTION.
|
69
|
+
VCR.use_cassette "images_find" do
|
70
|
+
@response = CONNECTION.images.find 6
|
71
71
|
end
|
72
72
|
end
|
73
73
|
|
74
74
|
### TODO: May want to refactor these keys into a variable,
|
75
|
-
### TODO: since
|
75
|
+
### TODO: since Images#find verbose shares them.
|
76
76
|
it "returns X-Image-Meta-* headers as a hash" do
|
77
77
|
must_have_valid_keys @response, %w(
|
78
78
|
status
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: ogle
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.0.
|
5
|
+
version: 0.0.4
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Kevin Bringard
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-04-
|
13
|
+
date: 2011-04-12 00:00:00 -06:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
@@ -85,12 +85,12 @@ files:
|
|
85
85
|
- Rakefile
|
86
86
|
- lib/ogle.rb
|
87
87
|
- lib/ogle/client.rb
|
88
|
-
- lib/ogle/
|
88
|
+
- lib/ogle/images.rb
|
89
89
|
- lib/ogle/version.rb
|
90
90
|
- ogle.gemspec
|
91
|
-
- test/cassettes/
|
92
|
-
- test/cassettes/
|
93
|
-
- test/cassettes/
|
91
|
+
- test/cassettes/images_all.yml
|
92
|
+
- test/cassettes/images_all_verbose.yml
|
93
|
+
- test/cassettes/images_find.yml
|
94
94
|
- test/lib/ogle/resource_test.rb
|
95
95
|
- test/test_helper.rb
|
96
96
|
has_rdoc: true
|
@@ -122,8 +122,8 @@ signing_key:
|
|
122
122
|
specification_version: 3
|
123
123
|
summary: Ruby interface for OpenStack Glance
|
124
124
|
test_files:
|
125
|
-
- test/cassettes/
|
126
|
-
- test/cassettes/
|
127
|
-
- test/cassettes/
|
125
|
+
- test/cassettes/images_all.yml
|
126
|
+
- test/cassettes/images_all_verbose.yml
|
127
|
+
- test/cassettes/images_find.yml
|
128
128
|
- test/lib/ogle/resource_test.rb
|
129
129
|
- test/test_helper.rb
|
File without changes
|
File without changes
|
File without changes
|