kitchen-digitalocean 0.7.0 → 0.7.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2962e0d424072f44969958a36b4b5dd1a447b087
4
- data.tar.gz: 83119613368027f4c88802cf2496d4f76be47a87
3
+ metadata.gz: 3e06a2ba847e4cd0f88dfb84e5e55a78128fa1c4
4
+ data.tar.gz: 25b7d7c2a9497b63daba9d67f2da898a00d9d186
5
5
  SHA512:
6
- metadata.gz: ad93eeb4021fe0a181e5667fbb25932f35e5447a7212cf51c0c5804ef54bf0b7fb22fd339151d83c785607e759449089b017d4e10774711a2227249cc9ba4d51
7
- data.tar.gz: 7673f18201fe215ed05d4df71d9ad3e55585e6c7f9558ef1630900a86b9d19a7252e6229c15c17023f5199887574253d33bd22579415cc2f8e48ec42c717843b
6
+ metadata.gz: e2dd106437360adcc7f0c08f2594e7c4eb01987d2e213dee43a637012098855ff0fdf322719ede1f64c3615fdc974aa7a8247d49917a01dc95b88aa20943956c
7
+ data.tar.gz: ccdbd4b1cc6ce58e90502c04f72c2d4124d917da3192ea3753d2a5223f0e4d5d4317a81e9e5940a0005fc704cba018ad766fd7d4df73b97459e24d506b80cfbb
data/.rubocop.yml CHANGED
@@ -3,3 +3,6 @@ Documentation:
3
3
 
4
4
  Semicolon:
5
5
  Enabled: false
6
+
7
+ Style/ClassLength:
8
+ Enabled: false
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 0.7.1 / 2014-06-23
2
+
3
+ * [@RoboticCheese](https://github.com/RoboticCheese) [PR #16] Use the 64-bit CentOS 6.5 image.
4
+ *
1
5
  # 0.7.0 / 2014-05-20
2
6
 
3
7
  * [@zhann](https://github.com/Zhann) [PR #15] Makes hostnames RFC compatible
data/Rakefile CHANGED
@@ -7,7 +7,7 @@ desc 'Run Cane to check quality metrics'
7
7
  Cane::RakeTask.new
8
8
 
9
9
  desc 'Run RuboCop on the lib directory'
10
- Rubocop::RakeTask.new(:rubocop) do |task|
10
+ RuboCop::RakeTask.new(:rubocop) do |task|
11
11
  task.patterns = ['lib/**/*.rb']
12
12
  # don't abort rake on failure
13
13
  task.fail_on_error = false
@@ -6,7 +6,7 @@
6
6
  "ubuntu-13.10": "3101918",
7
7
  "ubuntu-14.04": "3240036",
8
8
  "centos-5.8": "1601",
9
- "centos-6.5": "3448674",
9
+ "centos-6.5": "3448641",
10
10
  "centos-6.4": "562354",
11
11
  "debian-6.0": "12573",
12
12
  "debian-7.0": "3445812",
@@ -8,14 +8,14 @@ Gem::Specification.new do |spec|
8
8
  spec.version = Kitchen::Driver::DIGITALOCEAN_VERSION
9
9
  spec.authors = ['Greg Fitzgerald']
10
10
  spec.email = ['greg@gregf.org']
11
- spec.description = 'Kitchen::Driver::DigitalOcean - A Test Kitchen Driver for Digital Ocean'
11
+ spec.description = 'A Test Kitchen Driver for Digital Ocean'
12
12
  spec.summary = spec.description
13
13
  spec.homepage = 'https://github.com/test-kitchen/kitchen-digitalocean'
14
14
  spec.license = 'Apache 2.0'
15
15
 
16
16
  spec.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
17
- spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
- spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
17
+ spec.executables = []
18
+ spec.test_files = spec.files.grep(/^(test|spec|features)/)
19
19
  spec.require_paths = ['lib']
20
20
 
21
21
  spec.add_dependency 'test-kitchen', '~> 1.0'
@@ -31,7 +31,7 @@ module Kitchen
31
31
  default_config :username, 'root'
32
32
  default_config :port, '22'
33
33
 
34
- default_config :private_networking do |driver|
34
+ default_config :private_networking do
35
35
  true
36
36
  end
37
37
 
@@ -51,15 +51,15 @@ module Kitchen
51
51
  driver.default_name
52
52
  end
53
53
 
54
- default_config :digitalocean_client_id do |driver|
54
+ default_config :digitalocean_client_id do
55
55
  ENV['DIGITALOCEAN_CLIENT_ID']
56
56
  end
57
57
 
58
- default_config :digitalocean_api_key do |driver|
58
+ default_config :digitalocean_api_key do
59
59
  ENV['DIGITALOCEAN_API_KEY']
60
60
  end
61
61
 
62
- default_config :ssh_key_ids do |driver|
62
+ default_config :ssh_key_ids do
63
63
  ENV['DIGITALOCEAN_SSH_KEY_IDS'] || ENV['SSH_KEY_IDS']
64
64
  end
65
65
 
@@ -19,7 +19,7 @@
19
19
  module Kitchen
20
20
  module Driver
21
21
  # Version string for Digital Ocean Kitchen driver
22
- DIGITALOCEAN_VERSION = '0.7.0'
22
+ DIGITALOCEAN_VERSION = '0.7.1'
23
23
  end
24
24
  end
25
25
 
@@ -48,7 +48,7 @@ describe Kitchen::Driver::Digitalocean do
48
48
  before(:each) do
49
49
  ENV['DIGITALOCEAN_CLIENT_ID'] = 'clientid'
50
50
  ENV['DIGITALOCEAN_API_KEY'] = 'apikey'
51
- ENV['SSH_KEY_IDS'] = '1234'
51
+ ENV['DIGITALOCEAN_SSH_KEY_IDS'] = '1234'
52
52
  end
53
53
 
54
54
  describe '#initialize'do
@@ -129,9 +129,9 @@ describe Kitchen::Driver::Digitalocean do
129
129
  let(:driver) do
130
130
  d = Kitchen::Driver::Digitalocean.new(config)
131
131
  d.instance = instance
132
- d.stub(:default_name).and_return('a_monkey!')
133
- d.stub(:create_server).and_return(server)
134
- d.stub(:wait_for_sshd).with('1.2.3.4').and_return(true)
132
+ allow(d).to receive(:default_name).and_return('a_monkey!')
133
+ allow(d).to receive(:create_server).and_return(server)
134
+ allow(d).to receive(:wait_for_sshd).with('1.2.3.4').and_return(true)
135
135
  d
136
136
  end
137
137
 
@@ -171,14 +171,14 @@ describe Kitchen::Driver::Digitalocean do
171
171
  let(:driver) do
172
172
  d = Kitchen::Driver::Digitalocean.new(config)
173
173
  d.instance = instance
174
- d.stub(:compute).and_return(compute)
174
+ allow(d).to receive(:compute).and_return(compute)
175
175
  d
176
176
  end
177
177
 
178
178
  context 'a live server that needs to be destroyed' do
179
179
  it 'destroys the server' do
180
- state.should_receive(:delete).with(:server_id)
181
- state.should_receive(:delete).with(:hostname)
180
+ expect(state).to receive(:delete).with(:server_id)
181
+ expect(state).to receive(:delete).with(:hostname)
182
182
  driver.destroy(state)
183
183
  end
184
184
  end
@@ -187,9 +187,9 @@ describe Kitchen::Driver::Digitalocean do
187
187
  let(:state) { Hash.new }
188
188
 
189
189
  it 'does nothing' do
190
- driver.stub(:compute)
191
- driver.should_not_receive(:compute)
192
- state.should_not_receive(:delete)
190
+ allow(driver).to receive(:compute)
191
+ expect(driver).not_to receive(:compute)
192
+ expect(state).not_to receive(:delete)
193
193
  driver.destroy(state)
194
194
  end
195
195
  end
@@ -197,14 +197,14 @@ describe Kitchen::Driver::Digitalocean do
197
197
  context 'a server that was already destroyed' do
198
198
  let(:servers) do
199
199
  s = double('servers')
200
- s.stub(:get).with('12345').and_return(nil)
200
+ allow(s).to receive(:get).with('12345').and_return(nil)
201
201
  s
202
202
  end
203
203
  let(:compute) { double(servers: servers) }
204
204
  let(:driver) do
205
205
  d = Kitchen::Driver::Digitalocean.new(config)
206
206
  d.instance = instance
207
- d.stub(:compute).and_return(compute)
207
+ allow(d).to receive(:compute).and_return(compute)
208
208
  d
209
209
  end
210
210
 
@@ -219,13 +219,13 @@ describe Kitchen::Driver::Digitalocean do
219
219
  let(:config) do
220
220
  {
221
221
  digitalocean_client_id: 'monkey',
222
- digitalocean_api_key: 'potato',
222
+ digitalocean_api_key: 'potato'
223
223
  }
224
224
  end
225
225
 
226
226
  context 'all requirements provided' do
227
227
  it 'creates a new compute connection' do
228
- Fog::Compute.stub(:new) { |arg| arg }
228
+ allow(Fog::Compute).to receive(:new) { |arg| arg }
229
229
  expect(driver.send(:compute)).to be_a(Hash)
230
230
  end
231
231
  end
@@ -264,20 +264,20 @@ describe Kitchen::Driver::Digitalocean do
264
264
  end
265
265
  before(:each) do
266
266
  @expected = config.merge(name: config[:server_name])
267
- @expected.delete_if do |k, v|
267
+ @expected.delete_if do |k, _v|
268
268
  k == :server_name
269
269
  end
270
270
  end
271
271
  let(:servers) do
272
272
  s = double('servers')
273
- s.stub(:create) { |arg| arg }
273
+ allow(s).to receive(:create) { |arg| arg }
274
274
  s
275
275
  end
276
276
  let(:compute) { double(servers: servers) }
277
277
  let(:driver) do
278
278
  d = Kitchen::Driver::Digitalocean.new(config)
279
279
  d.instance = instance
280
- d.stub(:compute).and_return(compute)
280
+ allow(d).to receive(:compute).and_return(compute)
281
281
  d
282
282
  end
283
283
 
@@ -308,8 +308,8 @@ describe Kitchen::Driver::Digitalocean do
308
308
 
309
309
  describe '#default_name' do
310
310
  before(:each) do
311
- Etc.stub(:getlogin).and_return('user')
312
- Socket.stub(:gethostname).and_return('host')
311
+ allow(Etc).to receive(:getlogin).and_return('user')
312
+ allow(Socket).to receive(:gethostname).and_return('host')
313
313
  end
314
314
 
315
315
  it 'generates a name' do
data/spec/spec_helper.rb CHANGED
@@ -17,7 +17,6 @@
17
17
  # limitations under the License.
18
18
 
19
19
  require 'rspec'
20
- require 'rspec/autorun'
21
20
  require_relative '../lib/kitchen/driver/digitalocean'
22
21
 
23
22
  RSpec.configure do |config|
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kitchen-digitalocean
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Greg Fitzgerald
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-20 00:00:00.000000000 Z
11
+ date: 2014-06-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: test-kitchen
@@ -108,7 +108,7 @@ dependencies:
108
108
  - - ">="
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
- description: Kitchen::Driver::DigitalOcean - A Test Kitchen Driver for Digital Ocean
111
+ description: A Test Kitchen Driver for Digital Ocean
112
112
  email:
113
113
  - greg@gregf.org
114
114
  executables: []
@@ -149,10 +149,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
149
149
  version: '0'
150
150
  requirements: []
151
151
  rubyforge_project:
152
- rubygems_version: 2.2.2
152
+ rubygems_version: 2.3.0
153
153
  signing_key:
154
154
  specification_version: 4
155
- summary: Kitchen::Driver::DigitalOcean - A Test Kitchen Driver for Digital Ocean
155
+ summary: A Test Kitchen Driver for Digital Ocean
156
156
  test_files:
157
157
  - spec/kitchen/driver/digitalocean_spec.rb
158
158
  - spec/spec_helper.rb