fog 0.2.27 → 0.2.28

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -1,13 +1,3 @@
1
- source 'http://gemcutter.org'
1
+ source "http://rubygems.org"
2
2
 
3
- gem 'rake'
4
- gem 'builder', '>= 0'
5
- gem 'excon', '>= 0.2.0'
6
- gem 'formatador', ">= 0.0.15"
7
- gem 'json', ">= 0"
8
- gem 'mime-types', ">= 0"
9
- gem 'net-ssh', ">= 0"
10
- gem 'nokogiri', ">= 1.4.3.1"
11
- gem 'rspec', '>= 0'
12
- gem 'ruby-hmac', '>= 0'
13
- gem 'shindo', '>= 0.1.6'
3
+ gemspec
@@ -1,75 +1,48 @@
1
- ---
2
- dependencies:
3
- formatador:
4
- group:
5
- - :default
6
- version: ">= 0.0.15"
7
- rake:
8
- group:
9
- - :default
10
- version: ">= 0"
11
- rspec:
12
- group:
13
- - :default
14
- version: ">= 0"
15
- mime-types:
16
- group:
17
- - :default
18
- version: ">= 0"
19
- ruby-hmac:
20
- group:
21
- - :default
22
- version: ">= 0"
23
- net-ssh:
24
- group:
25
- - :default
26
- version: ">= 0"
27
- json:
28
- group:
29
- - :default
30
- version: ">= 0"
31
- excon:
32
- group:
33
- - :default
34
- version: ">= 0.2.0"
35
- shindo:
36
- group:
37
- - :default
38
- version: ">= 0.1.6"
39
- builder:
40
- group:
41
- - :default
42
- version: ">= 0"
43
- nokogiri:
44
- group:
45
- - :default
46
- version: ">= 1.4.3.1"
47
- specs:
48
- - rake:
49
- version: 0.8.7
50
- - builder:
51
- version: 2.1.2
52
- - excon:
53
- version: 0.2.0
54
- - formatador:
55
- version: 0.0.15
56
- - gestalt:
57
- version: 0.0.11
58
- - json:
59
- version: 1.4.3
60
- - mime-types:
61
- version: "1.16"
62
- - net-ssh:
63
- version: 2.0.23
64
- - nokogiri:
65
- version: 1.4.3.1
66
- - rspec:
67
- version: 1.3.0
68
- - ruby-hmac:
69
- version: 0.4.0
70
- - shindo:
71
- version: 0.1.6
72
- hash: b335ed8d32bece98ea7a84d858b85cbf21025c82
73
- sources:
74
- - Rubygems:
75
- uri: http://gemcutter.org
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ fog (0.2.28)
5
+ builder
6
+ excon (>= 0.2.0)
7
+ formatador (>= 0.0.15)
8
+ json
9
+ mime-types
10
+ net-ssh
11
+ nokogiri (>= 1.4.3.1)
12
+ ruby-hmac
13
+
14
+ GEM
15
+ remote: http://rubygems.org/
16
+ specs:
17
+ builder (2.1.2)
18
+ excon (0.2.0)
19
+ formatador (0.0.15)
20
+ gestalt (0.0.11)
21
+ formatador (>= 0.0.12)
22
+ json (1.4.6)
23
+ mime-types (1.16)
24
+ net-ssh (2.0.23)
25
+ nokogiri (1.4.3.1)
26
+ rake (0.8.7)
27
+ rspec (1.3.0)
28
+ ruby-hmac (0.4.0)
29
+ shindo (0.1.6)
30
+ formatador (>= 0.0.14)
31
+ gestalt (>= 0.0.11)
32
+
33
+ PLATFORMS
34
+ ruby
35
+
36
+ DEPENDENCIES
37
+ builder
38
+ excon (>= 0.2.0)
39
+ fog!
40
+ formatador (>= 0.0.15)
41
+ json
42
+ mime-types
43
+ net-ssh
44
+ nokogiri (>= 1.4.3.1)
45
+ rake
46
+ rspec
47
+ ruby-hmac
48
+ shindo (= 0.1.6)
data/Rakefile CHANGED
@@ -1,5 +1,5 @@
1
1
  require 'rubygems'
2
- require 'rake'
2
+ require 'bundler/setup'
3
3
  require 'date'
4
4
 
5
5
  #############################################################################
@@ -81,7 +81,7 @@ end
81
81
 
82
82
  require 'spec/rake/spectask'
83
83
  Spec::Rake::SpecTask.new(:spec) do |spec|
84
- spec.libs << 'lib' << 'spec'
84
+ spec.libs << 'lib' << 'spec' << File.expand_path("../", __FILE__)
85
85
  spec.spec_opts = ['--colour', "--format", "specdoc"]
86
86
  spec.spec_files = FileList['spec/**/*_spec.rb']
87
87
  end
@@ -7,8 +7,8 @@ Gem::Specification.new do |s|
7
7
  ## If your rubyforge_project name is different, then edit it and comment out
8
8
  ## the sub! line in the Rakefile
9
9
  s.name = 'fog'
10
- s.version = '0.2.27'
11
- s.date = '2010-08-19'
10
+ s.version = '0.2.28'
11
+ s.date = '2010-08-20'
12
12
  s.rubyforge_project = 'fog'
13
13
 
14
14
  ## Make sure your summary is short. The description may be as long
@@ -53,6 +53,7 @@ Gem::Specification.new do |s|
53
53
 
54
54
  ## List your development dependencies here. Development dependencies are
55
55
  ## those that are only needed during development
56
+ s.add_development_dependency('rake')
56
57
  s.add_development_dependency('rspec')
57
58
  s.add_development_dependency('shindo', '0.1.6')
58
59
 
data/lib/fog.rb CHANGED
@@ -41,7 +41,7 @@ require 'fog/vcloud'
41
41
  module Fog
42
42
 
43
43
  unless const_defined?(:VERSION)
44
- VERSION = '0.2.27'
44
+ VERSION = '0.2.28'
45
45
  end
46
46
 
47
47
  module Mock
@@ -32,7 +32,7 @@ module Fog
32
32
  def save
33
33
  requires :volume_id
34
34
 
35
- data = connection.create_snapshot(@volume_id).body
35
+ data = connection.create_snapshot(@volume_id, @description).body
36
36
  new_attributes = data.reject {|key,value| key == 'requestId'}
37
37
  merge_attributes(new_attributes)
38
38
  true
@@ -24,11 +24,13 @@ describe 'Fog::AWS::EC2::Snapshot' do
24
24
  snapshot = AWS[:ec2].snapshots.new(
25
25
  'snapshotId' => 'snap-00000000',
26
26
  'startTime' => 'now',
27
- 'volumeId' => 'vol-00000000'
27
+ 'volumeId' => 'vol-00000000',
28
+ 'description' => 'taken for safety'
28
29
  )
29
30
  snapshot.id.should == 'snap-00000000'
30
31
  snapshot.created_at.should == 'now'
31
32
  snapshot.volume_id.should == 'vol-00000000'
33
+ snapshot.description.should == 'taken for safety'
32
34
  end
33
35
 
34
36
  end
@@ -60,16 +62,18 @@ describe 'Fog::AWS::EC2::Snapshot' do
60
62
 
61
63
  describe "#save" do
62
64
 
63
- before(:each) do
64
- @snapshot = @volume.snapshots.new
65
- end
66
-
67
65
  it "should persist the snapshot" do
66
+ @snapshot = @volume.snapshots.new
68
67
  AWS[:ec2].snapshots.get(@snapshot.id).should be_nil
69
68
  @snapshot.save.should be_true
70
69
  AWS[:ec2].snapshots.get(@snapshot.id).should_not be_nil
71
70
  end
72
71
 
72
+ it "should allow a description" do
73
+ @snapshot = @volume.snapshots.create(:description => 'taken for safety')
74
+ AWS[:ec2].snapshots.get(@snapshot.id).description.should == 'taken for safety'
75
+ end
76
+
73
77
  end
74
78
 
75
79
  end
@@ -1,16 +1,13 @@
1
1
  require 'spec'
2
2
  require 'open-uri'
3
-
4
- current_directory = File.dirname(__FILE__)
5
- require "#{current_directory}/../lib/fog"
6
- require "#{current_directory}/../lib/fog/bin"
3
+ require 'fog'
4
+ require 'fog/bin'
5
+ require 'fog/vcloud/bin'
7
6
 
8
7
  if ENV["FOG_MOCK"] == "true"
9
8
  Fog.mock!
10
9
  end
11
10
 
12
- require "#{current_directory}/../lib/fog/vcloud/bin"
13
-
14
11
  module AWS
15
12
  class << self
16
13
  def [](service)
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 2
8
- - 27
9
- version: 0.2.27
8
+ - 28
9
+ version: 0.2.28
10
10
  platform: ruby
11
11
  authors:
12
12
  - geemus (Wesley Beary)
@@ -14,25 +14,25 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-08-19 00:00:00 -07:00
17
+ date: 2010-08-20 00:00:00 -07:00
18
18
  default_executable: fog
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
- name: builder
22
21
  prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
22
+ type: :runtime
23
+ version_requirements: &id001 !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - ">="
26
26
  - !ruby/object:Gem::Version
27
27
  segments:
28
28
  - 0
29
29
  version: "0"
30
- type: :runtime
31
- version_requirements: *id001
30
+ requirement: *id001
31
+ name: builder
32
32
  - !ruby/object:Gem::Dependency
33
- name: excon
34
33
  prerelease: false
35
- requirement: &id002 !ruby/object:Gem::Requirement
34
+ type: :runtime
35
+ version_requirements: &id002 !ruby/object:Gem::Requirement
36
36
  requirements:
37
37
  - - ">="
38
38
  - !ruby/object:Gem::Version
@@ -41,12 +41,12 @@ dependencies:
41
41
  - 2
42
42
  - 0
43
43
  version: 0.2.0
44
- type: :runtime
45
- version_requirements: *id002
44
+ requirement: *id002
45
+ name: excon
46
46
  - !ruby/object:Gem::Dependency
47
- name: formatador
48
47
  prerelease: false
49
- requirement: &id003 !ruby/object:Gem::Requirement
48
+ type: :runtime
49
+ version_requirements: &id003 !ruby/object:Gem::Requirement
50
50
  requirements:
51
51
  - - ">="
52
52
  - !ruby/object:Gem::Version
@@ -55,48 +55,48 @@ dependencies:
55
55
  - 0
56
56
  - 15
57
57
  version: 0.0.15
58
- type: :runtime
59
- version_requirements: *id003
58
+ requirement: *id003
59
+ name: formatador
60
60
  - !ruby/object:Gem::Dependency
61
- name: json
62
61
  prerelease: false
63
- requirement: &id004 !ruby/object:Gem::Requirement
62
+ type: :runtime
63
+ version_requirements: &id004 !ruby/object:Gem::Requirement
64
64
  requirements:
65
65
  - - ">="
66
66
  - !ruby/object:Gem::Version
67
67
  segments:
68
68
  - 0
69
69
  version: "0"
70
- type: :runtime
71
- version_requirements: *id004
70
+ requirement: *id004
71
+ name: json
72
72
  - !ruby/object:Gem::Dependency
73
- name: mime-types
74
73
  prerelease: false
75
- requirement: &id005 !ruby/object:Gem::Requirement
74
+ type: :runtime
75
+ version_requirements: &id005 !ruby/object:Gem::Requirement
76
76
  requirements:
77
77
  - - ">="
78
78
  - !ruby/object:Gem::Version
79
79
  segments:
80
80
  - 0
81
81
  version: "0"
82
- type: :runtime
83
- version_requirements: *id005
82
+ requirement: *id005
83
+ name: mime-types
84
84
  - !ruby/object:Gem::Dependency
85
- name: net-ssh
86
85
  prerelease: false
87
- requirement: &id006 !ruby/object:Gem::Requirement
86
+ type: :runtime
87
+ version_requirements: &id006 !ruby/object:Gem::Requirement
88
88
  requirements:
89
89
  - - ">="
90
90
  - !ruby/object:Gem::Version
91
91
  segments:
92
92
  - 0
93
93
  version: "0"
94
- type: :runtime
95
- version_requirements: *id006
94
+ requirement: *id006
95
+ name: net-ssh
96
96
  - !ruby/object:Gem::Dependency
97
- name: nokogiri
98
97
  prerelease: false
99
- requirement: &id007 !ruby/object:Gem::Requirement
98
+ type: :runtime
99
+ version_requirements: &id007 !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - ">="
102
102
  - !ruby/object:Gem::Version
@@ -106,36 +106,48 @@ dependencies:
106
106
  - 3
107
107
  - 1
108
108
  version: 1.4.3.1
109
- type: :runtime
110
- version_requirements: *id007
109
+ requirement: *id007
110
+ name: nokogiri
111
111
  - !ruby/object:Gem::Dependency
112
- name: ruby-hmac
113
112
  prerelease: false
114
- requirement: &id008 !ruby/object:Gem::Requirement
113
+ type: :runtime
114
+ version_requirements: &id008 !ruby/object:Gem::Requirement
115
115
  requirements:
116
116
  - - ">="
117
117
  - !ruby/object:Gem::Version
118
118
  segments:
119
119
  - 0
120
120
  version: "0"
121
- type: :runtime
122
- version_requirements: *id008
121
+ requirement: *id008
122
+ name: ruby-hmac
123
123
  - !ruby/object:Gem::Dependency
124
- name: rspec
125
124
  prerelease: false
126
- requirement: &id009 !ruby/object:Gem::Requirement
125
+ type: :development
126
+ version_requirements: &id009 !ruby/object:Gem::Requirement
127
127
  requirements:
128
128
  - - ">="
129
129
  - !ruby/object:Gem::Version
130
130
  segments:
131
131
  - 0
132
132
  version: "0"
133
+ requirement: *id009
134
+ name: rake
135
+ - !ruby/object:Gem::Dependency
136
+ prerelease: false
133
137
  type: :development
134
- version_requirements: *id009
138
+ version_requirements: &id010 !ruby/object:Gem::Requirement
139
+ requirements:
140
+ - - ">="
141
+ - !ruby/object:Gem::Version
142
+ segments:
143
+ - 0
144
+ version: "0"
145
+ requirement: *id010
146
+ name: rspec
135
147
  - !ruby/object:Gem::Dependency
136
- name: shindo
137
148
  prerelease: false
138
- requirement: &id010 !ruby/object:Gem::Requirement
149
+ type: :development
150
+ version_requirements: &id011 !ruby/object:Gem::Requirement
139
151
  requirements:
140
152
  - - "="
141
153
  - !ruby/object:Gem::Version
@@ -144,8 +156,8 @@ dependencies:
144
156
  - 1
145
157
  - 6
146
158
  version: 0.1.6
147
- type: :development
148
- version_requirements: *id010
159
+ requirement: *id011
160
+ name: shindo
149
161
  description: The Ruby cloud computing library.
150
162
  email: geemus@gmail.com
151
163
  executables: