kitchen-docker_cli 0.9.0 → 0.9.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -1
- data/lib/kitchen/docker_cli/dockerfile_template.rb +4 -2
- data/lib/kitchen/driver/docker_cli.rb +1 -0
- data/lib/kitchen/driver/docker_cli_version.rb +1 -1
- data/spec/kitchen/driver/docker_cli_spec.rb +16 -0
- data/spec/kitchen/driver/dockerfile_nil.erb +1 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a6c75bef1be02229951e309089476996c89eedd4
|
4
|
+
data.tar.gz: 208335c455ac0e33b9288a20c62b6e7b314f66e7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4d76af1e6d52ad14d63af9f278032a7a1191a4d2fc1f98adfc4f043c72f5fc4dc2de54d20a8a768f659c436afa06f464186308945e2c8f5054d4ab7b7f4b6a0f
|
7
|
+
data.tar.gz: 5acc2d85837073b3c7ee3a58f4363ce1e4ea624dd25dcfc92f9c24e0acc42264e081772ede8008772ec2ca60835f856c8dc967138b3e2e98cb41a95fe20c31c3
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
## 0.9.1
|
2
|
+
|
3
|
+
* Bugfix
|
4
|
+
|
1
5
|
## 0.9.0
|
2
6
|
|
3
7
|
* Change custom Dockerfile to ERB template [#11][] [#12][]
|
@@ -58,4 +62,4 @@
|
|
58
62
|
[#11]: https://github.com/marcy-terui/kitchen-docker_cli/issues/11
|
59
63
|
[#12]: https://github.com/marcy-terui/kitchen-docker_cli/issues/12
|
60
64
|
[@grubernaut]: https://github.com/grubernaut
|
61
|
-
[@hd-deman]: https://github.com/hd-deman
|
65
|
+
[@hd-deman]: https://github.com/hd-deman
|
@@ -24,8 +24,10 @@ module Kitchen
|
|
24
24
|
|
25
25
|
class DockerfileTemplate
|
26
26
|
def initialize(vars={}, config={})
|
27
|
-
vars.
|
28
|
-
|
27
|
+
if vars.is_a?(Hash)
|
28
|
+
vars.each do |k, v|
|
29
|
+
instance_variable_set("@#{k.to_s}", v)
|
30
|
+
end
|
29
31
|
end
|
30
32
|
self.class.class_eval <<-EOF
|
31
33
|
def config
|
@@ -232,6 +232,22 @@ describe Kitchen::Driver::DockerCli, "docker_file" do
|
|
232
232
|
ret = <<-EOH
|
233
233
|
FROM ubuntu/12.04
|
234
234
|
ENV LANG ja_JP.UTF-8
|
235
|
+
EOH
|
236
|
+
expect(@docker_cli.send(:docker_file)).to eq ret
|
237
|
+
end
|
238
|
+
end
|
239
|
+
context 'dockerfile template when dockerfile_vars is nil' do
|
240
|
+
let(:config) {
|
241
|
+
{
|
242
|
+
image: "ubuntu/12.04",
|
243
|
+
platform: "ubuntu",
|
244
|
+
dockerfile: File.join(File.dirname(__FILE__), 'dockerfile_nil.erb'),
|
245
|
+
dockerfile_vars: nil
|
246
|
+
}
|
247
|
+
}
|
248
|
+
example do
|
249
|
+
ret = <<-EOH
|
250
|
+
FROM ubuntu/12.04
|
235
251
|
EOH
|
236
252
|
expect(@docker_cli.send(:docker_file)).to eq ret
|
237
253
|
end
|
@@ -0,0 +1 @@
|
|
1
|
+
FROM <%= config[:image] %>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kitchen-docker_cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Masashi Terui
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-06-
|
11
|
+
date: 2015-06-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: test-kitchen
|
@@ -127,6 +127,7 @@ files:
|
|
127
127
|
- lib/kitchen/transport/docker_cli.rb
|
128
128
|
- spec/kitchen/driver/docker_cli_spec.rb
|
129
129
|
- spec/kitchen/driver/dockerfile.erb
|
130
|
+
- spec/kitchen/driver/dockerfile_nil.erb
|
130
131
|
- spec/spec_helper.rb
|
131
132
|
homepage: https://github.com/marcy-terui/kitchen-docker_cli
|
132
133
|
licenses:
|
@@ -155,4 +156,5 @@ summary: A Test Kitchen Driver for Docker native CLI
|
|
155
156
|
test_files:
|
156
157
|
- spec/kitchen/driver/docker_cli_spec.rb
|
157
158
|
- spec/kitchen/driver/dockerfile.erb
|
159
|
+
- spec/kitchen/driver/dockerfile_nil.erb
|
158
160
|
- spec/spec_helper.rb
|