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 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.resource.all
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.resource true
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.resource.find 6
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/resource).each { |r| require r }
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 resource
20
- @resource ||= Resource.new @connection
19
+ def images
20
+ @images ||= Images.new @connection
21
21
  end
22
22
  end
23
23
  end
@@ -1,5 +1,5 @@
1
1
  module Ogle
2
- class Resource
2
+ class Images
3
3
  def initialize connection
4
4
  @connection = connection
5
5
  end
data/lib/ogle/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Ogle
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
@@ -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::Resource do
12
+ describe Ogle::Images do
13
13
  describe "#all" do
14
14
  before do
15
- VCR.use_cassette "resource_all" do
16
- @response = CONNECTION.resource.all
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 "resource_all_verbose" do
39
- @response = CONNECTION.resource.all true
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 "resource_find" do
70
- @response = CONNECTION.resource.find 6
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 Resource#find verbose shares them.
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.3
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-11 00:00:00 -06:00
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/resource.rb
88
+ - lib/ogle/images.rb
89
89
  - lib/ogle/version.rb
90
90
  - ogle.gemspec
91
- - test/cassettes/resource_all.yml
92
- - test/cassettes/resource_all_verbose.yml
93
- - test/cassettes/resource_find.yml
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/resource_all.yml
126
- - test/cassettes/resource_all_verbose.yml
127
- - test/cassettes/resource_find.yml
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