kitchen-docker_cli 0.13.1 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/kitchen/driver/docker_cli.rb +3 -2
- data/lib/kitchen/driver/docker_cli_version.rb +1 -1
- data/spec/kitchen/driver/docker_cli_spec.rb +3 -2
- metadata +2 -2
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: bf34c6963a7146a8e728654cf0b4d83553353584
         | 
| 4 | 
            +
              data.tar.gz: a970a92c7193edbcd6fb4745bd00ee1ef8618cd6
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 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 |  | 
| @@ -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. | 
| 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- | 
| 11 | 
            +
            date: 2015-10-15 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: test-kitchen
         |