kitchen-docker_cli 0.13.1 → 0.14.0

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: 7a1a3609b2d7b773c920391bee3bc159e6bb0cf3
4
- data.tar.gz: fa900ccf46df506b136ce27ad05deb805780d55c
3
+ metadata.gz: bf34c6963a7146a8e728654cf0b4d83553353584
4
+ data.tar.gz: a970a92c7193edbcd6fb4745bd00ee1ef8618cd6
5
5
  SHA512:
6
- metadata.gz: 71df0f96e65c3fe44bd9ae36deb3f4501fd8d89b48cd0bf10df0b9d06c37073397f35ff0a229c827c6243622781699d1d571c5a0e080666d281ffe2b84b81e84
7
- data.tar.gz: 67708ec9dd0abccb214d7037935b1afd291d7f3ea3256f280c5d3c1d83da1d400c08b2605c9a6b9daeb994d62ce53fb0e9e24a0ad8fb972b7d96572b1c95c7ee
6
+ metadata.gz: 88dbfa9c5f743e6c7befb74e8df1c940a246fe76df450d82d169fd6d23c4914157cc8b65d5c3843b6aecee8730c273658967840fed9a147567ba276ae996ea0b
7
+ data.tar.gz: e3ede63db8cd4b92d69da5957e2e35193e75d796890dfe9b37ec1edcce859c1cc2d15bf0c81d0f2bb5592dbf70b759ecf94b1a1787e5096bc193082a5bcacbff
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.14.0
2
+
3
+ * Pull request [#21][]: Support `--add-host` option ([@sawanoboly][])
4
+
1
5
  ## 0.13.1
2
6
 
3
7
  - Fix output of `destroy` action in the case of the container does not exist.
@@ -96,6 +100,8 @@
96
100
  [#16]: https://github.com/marcy-terui/kitchen-docker_cli/issues/16
97
101
  [#17]: https://github.com/marcy-terui/kitchen-docker_cli/issues/17
98
102
  [#18]: https://github.com/marcy-terui/kitchen-docker_cli/issues/18
103
+ [#21]: https://github.com/marcy-terui/kitchen-docker_cli/issues/21
99
104
  [@grubernaut]: https://github.com/grubernaut
100
105
  [@hd-deman]: https://github.com/hd-deman
106
+ [@sawanoboly]: https://github.com/sawanoboly
101
107
  [@yewton]: https://github.com/yewton
@@ -83,13 +83,13 @@ module Kitchen
83
83
  end
84
84
 
85
85
  def docker_build_command
86
- cmd = 'build'
86
+ cmd = String.new('build')
87
87
  cmd << ' --no-cache' if config[:no_cache]
88
88
  cmd << ' -'
89
89
  end
90
90
 
91
91
  def docker_run_command(image)
92
- cmd = "run -d -t"
92
+ cmd = String.new("run -d -t")
93
93
  cmd << " --name #{config[:container_name]}" if config[:container_name]
94
94
  cmd << ' -P' if config[:publish_all]
95
95
  cmd << " -m #{config[:memory_limit]}" if config[:memory_limit]
@@ -107,6 +107,7 @@ module Kitchen
107
107
  Array(config[:link]).each { |link| cmd << " --link #{link}" }
108
108
  Array(config[:expose]).each { |exp| cmd << " --expose #{exp}" }
109
109
  Array(config[:dns]).each {|dns| cmd << " --dns #{dns}"}
110
+ Array(config[:add_host]).each {|mapping| cmd << " --add-host #{mapping}"}
110
111
  cmd << " #{image} #{config[:command]}"
111
112
  end
112
113
 
@@ -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.13.1'
24
+ DOCKER_CLI_VERSION = '0.14.0'
25
25
  end
26
26
  end
@@ -126,12 +126,13 @@ describe Kitchen::Driver::DockerCli, "docker_run_command" do
126
126
  :network => 'none',
127
127
  :hostname => 'example.local',
128
128
  :instance_host_name => true,
129
- :dns => ['8.8.8.8', '8.8.4.4']
129
+ :dns => ['8.8.8.8', '8.8.4.4'],
130
+ :add_host => ['myhost:127.0.0.1']
130
131
  }
131
132
  end
132
133
 
133
134
  example do
134
- cmd = "run -d -t --name web -P -m 256m -c 512 --privileged --net none -h example.local -p 80:8080 -p 22:2222 -v /dev:/dev --volumes-from data --link mysql:db --expose 80 --dns 8.8.8.8 --dns 8.8.4.4 test /bin/bash"
135
+ cmd = "run -d -t --name web -P -m 256m -c 512 --privileged --net none -h example.local -p 80:8080 -p 22:2222 -v /dev:/dev --volumes-from data --link mysql:db --expose 80 --dns 8.8.8.8 --dns 8.8.4.4 --add-host myhost:127.0.0.1 test /bin/bash"
135
136
  expect(@docker_cli.docker_run_command('test')).to eq cmd
136
137
  end
137
138
  end
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.13.1
4
+ version: 0.14.0
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-10-08 00:00:00.000000000 Z
11
+ date: 2015-10-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: test-kitchen