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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 86d1304084493a93678033f12fb9c16782cb72d4
4
- data.tar.gz: 225c65f8e05d2eea4ae1376d4a0dd8028afa52dc
3
+ metadata.gz: a6c75bef1be02229951e309089476996c89eedd4
4
+ data.tar.gz: 208335c455ac0e33b9288a20c62b6e7b314f66e7
5
5
  SHA512:
6
- metadata.gz: a78202c0d1dc6344ac7c79aac2cd11ed7694ced1e475dc687a4dd4af1f238341179a0b24117ecb7ed22ac062928c6f20a5d20ed8685541348147d481ebd7957c
7
- data.tar.gz: b97a94d845e713af5f7336b5a79cbd1b16919f17cc48f00c1c978e5bea59fdb92e6f5c1db23dd89fc7e45a15bfd0ffdbbce243ede8bebb377cb3f174cee422ef
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.each do |k, v|
28
- instance_variable_set("@#{k.to_s}", v)
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
@@ -33,6 +33,7 @@ module Kitchen
33
33
  default_config :privileged, false
34
34
  default_config :instance_host_name, false
35
35
  default_config :transport, "docker_cli"
36
+ default_config :dockerfile_vars, {}
36
37
 
37
38
  default_config :image do |driver|
38
39
  driver.default_image
@@ -21,6 +21,6 @@ module Kitchen
21
21
  module Driver
22
22
 
23
23
  # Version string for DockerCli Kitchen driver
24
- DOCKER_CLI_VERSION = '0.9.0'
24
+ DOCKER_CLI_VERSION = '0.9.1'
25
25
  end
26
26
  end
@@ -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.0
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 00:00:00.000000000 Z
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