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 +2 -12
- data/Gemfile.lock +48 -75
- data/Rakefile +2 -2
- data/fog.gemspec +3 -2
- data/lib/fog.rb +1 -1
- data/lib/fog/aws/models/ec2/snapshot.rb +1 -1
- data/spec/aws/models/ec2/snapshot_spec.rb +9 -5
- data/spec/spec_helper.rb +3 -6
- metadata +54 -42
data/Gemfile
CHANGED
@@ -1,13 +1,3 @@
|
|
1
|
-
source
|
1
|
+
source "http://rubygems.org"
|
2
2
|
|
3
|
-
|
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
|
data/Gemfile.lock
CHANGED
@@ -1,75 +1,48 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
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 '
|
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
|
data/fog.gemspec
CHANGED
@@ -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.
|
11
|
-
s.date = '2010-08-
|
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
@@ -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
|
data/spec/spec_helper.rb
CHANGED
@@ -1,16 +1,13 @@
|
|
1
1
|
require 'spec'
|
2
2
|
require 'open-uri'
|
3
|
-
|
4
|
-
|
5
|
-
require
|
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
|
-
-
|
9
|
-
version: 0.2.
|
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-
|
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
|
-
|
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
|
-
|
31
|
-
|
30
|
+
requirement: *id001
|
31
|
+
name: builder
|
32
32
|
- !ruby/object:Gem::Dependency
|
33
|
-
name: excon
|
34
33
|
prerelease: false
|
35
|
-
|
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
|
-
|
45
|
-
|
44
|
+
requirement: *id002
|
45
|
+
name: excon
|
46
46
|
- !ruby/object:Gem::Dependency
|
47
|
-
name: formatador
|
48
47
|
prerelease: false
|
49
|
-
|
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
|
-
|
59
|
-
|
58
|
+
requirement: *id003
|
59
|
+
name: formatador
|
60
60
|
- !ruby/object:Gem::Dependency
|
61
|
-
name: json
|
62
61
|
prerelease: false
|
63
|
-
|
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
|
-
|
71
|
-
|
70
|
+
requirement: *id004
|
71
|
+
name: json
|
72
72
|
- !ruby/object:Gem::Dependency
|
73
|
-
name: mime-types
|
74
73
|
prerelease: false
|
75
|
-
|
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
|
-
|
83
|
-
|
82
|
+
requirement: *id005
|
83
|
+
name: mime-types
|
84
84
|
- !ruby/object:Gem::Dependency
|
85
|
-
name: net-ssh
|
86
85
|
prerelease: false
|
87
|
-
|
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
|
-
|
95
|
-
|
94
|
+
requirement: *id006
|
95
|
+
name: net-ssh
|
96
96
|
- !ruby/object:Gem::Dependency
|
97
|
-
name: nokogiri
|
98
97
|
prerelease: false
|
99
|
-
|
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
|
-
|
110
|
-
|
109
|
+
requirement: *id007
|
110
|
+
name: nokogiri
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
|
-
name: ruby-hmac
|
113
112
|
prerelease: false
|
114
|
-
|
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
|
-
|
122
|
-
|
121
|
+
requirement: *id008
|
122
|
+
name: ruby-hmac
|
123
123
|
- !ruby/object:Gem::Dependency
|
124
|
-
name: rspec
|
125
124
|
prerelease: false
|
126
|
-
|
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:
|
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
|
-
|
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
|
-
|
148
|
-
|
159
|
+
requirement: *id011
|
160
|
+
name: shindo
|
149
161
|
description: The Ruby cloud computing library.
|
150
162
|
email: geemus@gmail.com
|
151
163
|
executables:
|