kitchen-digitalocean 0.9.1 → 0.9.2
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7b195be813c0b4455e274641c9bafe0c525ac78b
|
4
|
+
data.tar.gz: 2cf560048e69eea4f874d83712bd5bcfefa33eea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 57fc52d14b37f39efddf86cccfb6f0abfcfea06cd4baa14f9ddf18714f9e7c832e948021e2113c5efd558dd449f8508f61de9733aff2e37de7caa270153cbada
|
7
|
+
data.tar.gz: e12307e0a2bfa4af8008ba062179b252ef9165c9a7c0eb00a7e36e992c492dcd217049c7c71399a647ca10fa54c3299dfdbd78e7ac69c3069eddb50924e0fd8b
|
data/CHANGELOG.md
CHANGED
@@ -95,8 +95,12 @@ module Kitchen
|
|
95
95
|
state.delete(:hostname)
|
96
96
|
end
|
97
97
|
|
98
|
+
# This method attempts to fetch the platform from a list of well-known
|
99
|
+
# platform => slug mappings, and falls back to using just the platform as
|
100
|
+
# provided if it can't find a mapping.
|
98
101
|
def default_image
|
99
|
-
instance.platform.name
|
102
|
+
platform_to_slug_mapping.fetch(instance.platform.name,
|
103
|
+
instance.platform.name)
|
100
104
|
end
|
101
105
|
|
102
106
|
# Generate what should be a unique server name up to 63 total chars
|
@@ -161,6 +165,24 @@ module Kitchen
|
|
161
165
|
def debug_client_config
|
162
166
|
debug("digitalocean_api_key #{config[:digitalocean_access_token]}")
|
163
167
|
end
|
168
|
+
|
169
|
+
def platform_to_slug_mapping
|
170
|
+
{
|
171
|
+
'centos-5.10' => 'centos-5-8-x64',
|
172
|
+
'centos-6.5' => 'centos-6-5-x64',
|
173
|
+
'centos-7.0' => 'centos-7-0-x64',
|
174
|
+
'debian-6.0' => 'debian-6-0-x64',
|
175
|
+
'debian-7.0' => 'debian-7-0-x64',
|
176
|
+
'debian-8.1' => 'debian-8-x64',
|
177
|
+
'fedora-21' => 'fedora-21-x64',
|
178
|
+
'fedora-22' => 'fedora-22-x64',
|
179
|
+
'freebsd-10.1' => 'freebsd-10-1-x64',
|
180
|
+
'ubuntu-12.04' => 'ubuntu-12-04-x64',
|
181
|
+
'ubuntu-14.04' => 'ubuntu-14-04-x64',
|
182
|
+
'ubuntu-14.10' => 'ubuntu-14-10-x64',
|
183
|
+
'ubuntu-15.04' => 'ubuntu-15-04-x64'
|
184
|
+
}
|
185
|
+
end
|
164
186
|
end
|
165
187
|
end
|
166
188
|
end
|
@@ -85,6 +85,14 @@ describe Kitchen::Driver::Digitalocean do
|
|
85
85
|
end
|
86
86
|
end
|
87
87
|
|
88
|
+
context 'platform name matches a known platform => slug mapping' do
|
89
|
+
let(:platform_name) { 'ubuntu-14.04' }
|
90
|
+
|
91
|
+
it 'matches the correct image slug' do
|
92
|
+
expect(driver[:image]).to eq('ubuntu-14-04-x64')
|
93
|
+
end
|
94
|
+
end
|
95
|
+
|
88
96
|
context 'overridden options' do
|
89
97
|
config = {
|
90
98
|
image: 'debian-7-0-x64',
|
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.
|
4
|
+
version: 0.9.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Greg Fitzgerald
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-07-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: test-kitchen
|