kitchen-digitalocean 0.9.6 → 0.9.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b70876d187f3362289af3456f71a1e31b268fee0
4
- data.tar.gz: 2d440b38f1a7fb6a42986792023b5ffd7642f507
3
+ metadata.gz: a184ed0628c0c56d93f6e686da994bd9e73d99dd
4
+ data.tar.gz: 17ab01c615490ddef9b6e8c909acf7b25d9169c7
5
5
  SHA512:
6
- metadata.gz: 14fae95e6efc2f644e44f9022eed7c944216d60de720fc65b77bd3a26b54aa5e701a63ea5a638178166e46732db80b561c2886ed8f7ebda6e69715b1dee9c3d9
7
- data.tar.gz: ea678c283970baaa67f815d910b357741b9d5f38728038db712a52181e58509234d5caba86b0931a4d0a1d78d74a4da05e56371275862280d11b76de6202c16b
6
+ metadata.gz: d17976083ca86b7f51027f7797a98eb47c2597e0a3b080e6886c72fcd7f8f2cce5af406b2fffb0daf342c2d25876cf479ab55d816a370565e28cf7cd331f3222
7
+ data.tar.gz: 7dcd9d97dd88b92617d5ff6d3a8b4f8954896ae7fd386fc26a5914941152842872ad1c9506fb155a00af81baad65e0d4820915547dd5a2067c26eee465625804
data/README.md CHANGED
@@ -46,7 +46,7 @@ At minimum, you'll need to tell test-kitchen to use the digitalocean driver.
46
46
  driver:
47
47
  name: digitalocean
48
48
  platforms:
49
- - name: ubuntu-12-10-x64
49
+ - name: ubuntu-17
50
50
  ```
51
51
 
52
52
  You also have the option of providing your credentials from environment variables.
@@ -105,6 +105,46 @@ driver:
105
105
  - ipv6: true
106
106
  ```
107
107
 
108
+ # Image abbrevations we use
109
+
110
+ This is a list of abbreviate image names we provide
111
+
112
+ ```
113
+ centos-6
114
+ centos-7
115
+ coreos-stable
116
+ oreos-beta
117
+ coreos-alpha
118
+ debian-7
119
+ ebian-8
120
+ debian-9
121
+ fedora-24
122
+ fedora-25
123
+ fedora-26
124
+ reebsd-11.1
125
+ freebsd-11.0
126
+ freebsd-10.3
127
+ ubuntu-14
128
+ ubuntu-16
129
+ ubuntu-17
130
+ ```
131
+
132
+ # Regions
133
+
134
+ ```
135
+ nyc1 New York 1
136
+ sfo1 San Francisco 1
137
+ ams2 Amsterdam 2
138
+ sgp1 Singapore 1
139
+ lon1 London 1
140
+ nyc3 New York 3
141
+ ams3 Amsterdam 3
142
+ fra1 Frankfurt 1
143
+ tor1 Toronto 1
144
+ sfo2 San Francisco 2
145
+ blr1 Bangalore 1
146
+ ```
147
+
108
148
  # Development
109
149
 
110
150
  * Source hosted at [GitHub](https://github.com/test-kitchen/kitchen-digitalocean)
@@ -18,15 +18,15 @@ Gem::Specification.new do |spec|
18
18
  spec.test_files = spec.files.grep(/^(test|spec|features)/)
19
19
  spec.require_paths = ['lib']
20
20
 
21
- spec.add_dependency 'test-kitchen', '~> 1.2'
22
- spec.add_dependency 'droplet_kit', '~> 2.0'
21
+ spec.add_dependency 'test-kitchen', '~> 1.17'
22
+ spec.add_dependency 'droplet_kit', '~> 2.2'
23
23
 
24
24
  spec.add_development_dependency 'bundler', '~> 1.0'
25
25
  spec.add_development_dependency 'rake', '~> 10.0'
26
- spec.add_development_dependency 'rubocop', '~> 0.30'
26
+ spec.add_development_dependency 'rubocop', '~> 0.49'
27
27
  spec.add_development_dependency 'cane', '~> 2.6'
28
28
  spec.add_development_dependency 'countloc', '~> 0.4'
29
- spec.add_development_dependency 'rspec', '~> 3.0'
29
+ spec.add_development_dependency 'rspec', '~> 3.6'
30
30
  spec.add_development_dependency 'webmock', '~> 1.2'
31
31
  spec.add_development_dependency 'simplecov', '~> 0.9'
32
32
  spec.add_development_dependency 'simplecov-console', '~> 0.2'
@@ -1,4 +1,5 @@
1
1
  # -*- encoding: utf-8 -*-
2
+
2
3
  #
3
4
  # Author:: Greg Fitzgerald (<greg@gregf.org>)
4
5
  #
@@ -33,8 +34,8 @@ module Kitchen
33
34
  default_config :port, '22'
34
35
  default_config :region, 'nyc2'
35
36
  default_config :size, '512mb'
36
- default_config(:image) { |driver| driver.default_image }
37
- default_config(:server_name) { |driver| driver.default_name }
37
+ default_config(:image, &:default_image)
38
+ default_config(:server_name, &:default_name)
38
39
  default_config :private_networking, true
39
40
  default_config :ipv6, false
40
41
  default_config :user_data, nil
@@ -61,12 +62,13 @@ module Kitchen
61
62
  sleep 8
62
63
  droplet = client.droplets.find(id: state[:server_id])
63
64
 
64
- break if droplet && droplet.networks[:v4] && droplet.networks[:v4].any? { |n| n[:type] == 'public' }
65
+ break if droplet && droplet.networks[:v4] &&
66
+ droplet.networks[:v4].any? { |n| n[:type] == 'public' }
65
67
  end
66
68
  droplet ||= client.droplets.find(id: state[:server_id])
67
69
 
68
70
  state[:hostname] = droplet.networks[:v4]
69
- .find { |n| n[:type] == 'public' }['ip_address']
71
+ .find { |n| n[:type] == 'public' }['ip_address']
70
72
 
71
73
  wait_for_sshd(state[:hostname]); print "(ssh ready)\n"
72
74
  debug("digitalocean:create #{state[:hostname]}")
@@ -80,13 +82,14 @@ module Kitchen
80
82
  loop do
81
83
  droplet = client.droplets.find(id: state[:server_id])
82
84
 
83
- break if !droplet
85
+ break unless droplet
84
86
  if droplet.status != 'new'
85
87
  client.droplets.delete(id: state[:server_id])
86
88
  break
87
89
  end
88
90
 
89
- info("Waiting on Digital Ocean instance <#{state[:server_id]}> to be active to destroy it, retrying in 8 seconds")
91
+ info("Waiting on Digital Ocean instance <#{state[:server_id]}>
92
+ to be active to destroy it, retrying in 8 seconds")
90
93
  sleep 8
91
94
  end
92
95
 
@@ -117,7 +120,7 @@ module Kitchen
117
120
  (Etc.getlogin || 'nologin').gsub(/\W/, '')[0..14],
118
121
  Socket.gethostname.gsub(/\W/, '')[0..22],
119
122
  Array.new(7) { rand(36).to_s(36) }.join
120
- ].join('-').gsub(/_/, '-')
123
+ ].join('-').tr('_', '-')
121
124
  end
122
125
 
123
126
  private
@@ -169,25 +172,23 @@ module Kitchen
169
172
 
170
173
  def platform_to_slug_mapping
171
174
  {
172
- 'centos-5.10' => 'centos-5-8-x64',
173
- 'centos-6.7' => 'centos-6-5-x64',
174
- 'centos-7.1' => 'centos-7-0-x64',
175
- 'coreos-835.9.0' => 'coreos-stable-x64',
176
- 'coreos-877.1.0' => 'coreos-beta-x64',
177
- 'coreos-891.0.0' => 'coreos-alpha-x64',
178
- 'debian-6.0' => 'debian-6-0-x64',
179
- 'debian-7.9' => 'debian-7-0-x64',
180
- 'debian-8.2' => 'debian-8-x64',
181
- 'fedora-21' => 'fedora-21-x64',
182
- 'fedora-22' => 'fedora-22-x64',
183
- 'fedora-23' => 'fedora-23-x64',
184
- 'freebsd-10.1' => 'freebsd-10-1-x64',
185
- 'freebsd-10.2' => 'freebsd-10-2-x64',
186
- 'ubuntu-12.04' => 'ubuntu-12-04-x64',
187
- 'ubuntu-14.04' => 'ubuntu-14-04-x64',
188
- 'ubuntu-15.04' => 'ubuntu-15-04-x64',
189
- 'ubuntu-15.10' => 'ubuntu-15-10-x64',
190
- 'ubuntu-16.04' => 'ubuntu-16-04-x64',
175
+ 'centos-6' => 'centos-6-x64',
176
+ 'centos-7' => 'centos-7-x64',
177
+ 'coreos-stable' => 'coreos-stable-x64',
178
+ 'coreos-beta' => 'coreos-beta-x64',
179
+ 'coreos-alpha' => 'coreos-alpha-x64',
180
+ 'debian-7' => 'debian-7-x64',
181
+ 'debian-8' => 'debian-8-x64',
182
+ 'debian-9' => 'debian-9-x64',
183
+ 'fedora-24' => 'fedora-24-x64',
184
+ 'fedora-25' => 'fedora-25-x64',
185
+ 'fedora-26' => 'fedora-26-x64',
186
+ 'freebsd-11.1' => 'freebsd-11-1-x64-zfs',
187
+ 'freebsd-11.0' => 'freebsd-11-0-x64-zfs',
188
+ 'freebsd-10.3' => 'freebsd-10-3-x64-zfs',
189
+ 'ubuntu-14' => 'ubuntu-14-04-x64',
190
+ 'ubuntu-16' => 'ubuntu-16-04-x64',
191
+ 'ubuntu-17' => 'ubuntu-17-04-x64'
191
192
  }
192
193
  end
193
194
  end
@@ -1,4 +1,5 @@
1
1
  # -*- encoding: utf-8 -*-
2
+
2
3
  #
3
4
  # Author:: Greg Fitzgerald (<greg@gregf.org>)
4
5
  #
@@ -19,7 +20,7 @@
19
20
  module Kitchen
20
21
  module Driver
21
22
  # Version string for Digital Ocean Kitchen driver
22
- DIGITALOCEAN_VERSION = '0.9.6'
23
+ DIGITALOCEAN_VERSION = '0.9.7'.freeze
23
24
  end
24
25
  end
25
26
 
@@ -86,10 +86,10 @@ describe Kitchen::Driver::Digitalocean do
86
86
  end
87
87
 
88
88
  context 'platform name matches a known platform => slug mapping' do
89
- let(:platform_name) { 'ubuntu-14.04' }
89
+ let(:platform_name) { 'ubuntu-17' }
90
90
 
91
91
  it 'matches the correct image slug' do
92
- expect(driver[:image]).to eq('ubuntu-14-04-x64')
92
+ expect(driver[:image]).to eq('ubuntu-17-04-x64')
93
93
  end
94
94
  end
95
95
 
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.9.6
4
+ version: 0.9.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Greg Fitzgerald
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-07-27 00:00:00.000000000 Z
11
+ date: 2017-09-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: test-kitchen
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.2'
19
+ version: '1.17'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.2'
26
+ version: '1.17'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: droplet_kit
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '2.0'
33
+ version: '2.2'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '2.0'
40
+ version: '2.2'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -72,14 +72,14 @@ dependencies:
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '0.30'
75
+ version: '0.49'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '0.30'
82
+ version: '0.49'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: cane
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -114,14 +114,14 @@ dependencies:
114
114
  requirements:
115
115
  - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: '3.0'
117
+ version: '3.6'
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: '3.0'
124
+ version: '3.6'
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: webmock
127
127
  requirement: !ruby/object:Gem::Requirement
@@ -222,7 +222,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
222
222
  version: '0'
223
223
  requirements: []
224
224
  rubyforge_project:
225
- rubygems_version: 2.6.12
225
+ rubygems_version: 2.6.13
226
226
  signing_key:
227
227
  specification_version: 4
228
228
  summary: A Test Kitchen Driver for Digital Ocean