docker-spoon 0.2.0 → 0.3.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.
- data/Gemfile.lock +3 -1
- data/README.md +26 -3
- data/docker-spoon.gemspec +1 -0
- data/lib/spoon.rb +2 -1
- data/lib/spoon/version.rb +1 -1
- metadata +18 -2
    
        data/Gemfile.lock
    CHANGED
    
    | @@ -1,9 +1,10 @@ | |
| 1 1 | 
             
            PATH
         | 
| 2 2 | 
             
              remote: .
         | 
| 3 3 | 
             
              specs:
         | 
| 4 | 
            -
                docker-spoon (0. | 
| 4 | 
            +
                docker-spoon (0.3.0)
         | 
| 5 5 | 
             
                  docker-api (~> 1.11)
         | 
| 6 6 | 
             
                  methadone (~> 1.4.0)
         | 
| 7 | 
            +
                  rainbow (~> 2.0)
         | 
| 7 8 |  | 
| 8 9 | 
             
            GEM
         | 
| 9 10 | 
             
              remote: https://rubygems.org/
         | 
| @@ -36,6 +37,7 @@ GEM | |
| 36 37 | 
             
                  bundler
         | 
| 37 38 | 
             
                multi_json (1.10.1)
         | 
| 38 39 | 
             
                multi_test (0.1.1)
         | 
| 40 | 
            +
                rainbow (2.0.0)
         | 
| 39 41 | 
             
                rake (0.9.6)
         | 
| 40 42 | 
             
                rdoc (4.1.1)
         | 
| 41 43 | 
             
                  json (~> 1.4)
         | 
    
        data/README.md
    CHANGED
    
    | @@ -49,11 +49,12 @@ argument. | |
| 49 49 |  | 
| 50 50 | 
             
            ## Usage
         | 
| 51 51 |  | 
| 52 | 
            -
            Spoon has  | 
| 52 | 
            +
            Spoon has 5 major operations it can perform:
         | 
| 53 53 |  | 
| 54 54 | 
             
            - Connect/Create, Connect to an existing spoon container or create a new
         | 
| 55 55 | 
             
              container
         | 
| 56 56 | 
             
            - List, List existing containers
         | 
| 57 | 
            +
            - Network, Show ports forwarded to existing containers
         | 
| 57 58 | 
             
            - Build, Build an image for use as a spoon container
         | 
| 58 59 | 
             
            - Destroy, Destroy an existing spoon container
         | 
| 59 60 |  | 
| @@ -81,6 +82,10 @@ Connecting to `spoon-fortesting` | |
| 81 82 | 
             
            pairing@dockerhost's password:
         | 
| 82 83 | 
             
            ```
         | 
| 83 84 |  | 
| 85 | 
            +
            NOTE: If a container has been stopped due to a machine restart or other
         | 
| 86 | 
            +
            reason, spoon will issue a start to the container & then attempt to ssh
         | 
| 87 | 
            +
            in.
         | 
| 88 | 
            +
             | 
| 84 89 | 
             
            #### Options
         | 
| 85 90 |  | 
| 86 91 | 
             
            - `--url`, The url of the Docker API endpoint. This is in the format
         | 
| @@ -101,9 +106,14 @@ can see only the containers you are interested in. | |
| 101 106 | 
             
            ```shell
         | 
| 102 107 | 
             
            $ spoon -l
         | 
| 103 108 | 
             
            List of available spoon containers:
         | 
| 104 | 
            -
             | 
| 109 | 
            +
                                  booger [ Stopped ]
         | 
| 110 | 
            +
                                    jake [ Running ]
         | 
| 111 | 
            +
                                    test [ Stopped ]
         | 
| 105 112 | 
             
            ```
         | 
| 106 113 |  | 
| 114 | 
            +
            You can connect to Stopped containers in the same way as Running
         | 
| 115 | 
            +
            containers, spoon will re-start them as necessary.
         | 
| 116 | 
            +
             | 
| 107 117 | 
             
            ### Destroy
         | 
| 108 118 |  | 
| 109 119 | 
             
            The `--destroy NAME` option will destroy the specified spoon container. 
         | 
| @@ -114,6 +124,19 @@ Destroying spoon-fortesting | |
| 114 124 | 
             
            Done!
         | 
| 115 125 | 
             
            ```
         | 
| 116 126 |  | 
| 127 | 
            +
            ### Network
         | 
| 128 | 
            +
             | 
| 129 | 
            +
            The `--network NAME` option will show the forwarded ports for a spoon
         | 
| 130 | 
            +
            instance. Any ports listed via `EXPOSE` in your Dockerfile should be
         | 
| 131 | 
            +
            exposed when a spoon container is started. If you are working with
         | 
| 132 | 
            +
            applications in a spoon container you can use this to forward ports &
         | 
| 133 | 
            +
            view what public ports are forwarded for your spoon container.
         | 
| 134 | 
            +
             | 
| 135 | 
            +
            ```
         | 
| 136 | 
            +
            $ spoon -n jake
         | 
| 137 | 
            +
            22 -> 49213
         | 
| 138 | 
            +
            ```
         | 
| 139 | 
            +
             | 
| 117 140 | 
             
            ### Build
         | 
| 118 141 |  | 
| 119 142 | 
             
            The `--build` option will build a docker image from the build directory
         | 
| @@ -156,7 +179,7 @@ directory inside this repository | |
| 156 179 |  | 
| 157 180 | 
             
            ## Contributing
         | 
| 158 181 |  | 
| 159 | 
            -
            1. Fork it ( https://github.com/adnichols/spoon/fork )
         | 
| 182 | 
            +
            1. Fork it ( https://github.com/adnichols/docker-spoon/fork )
         | 
| 160 183 | 
             
            2. Create your feature branch (`git checkout -b my-new-feature`)
         | 
| 161 184 | 
             
            3. Commit your changes (`git commit -am 'Add some feature'`)
         | 
| 162 185 | 
             
            4. Push to the branch (`git push origin my-new-feature`)
         | 
    
        data/docker-spoon.gemspec
    CHANGED
    
    
    
        data/lib/spoon.rb
    CHANGED
    
    | @@ -2,6 +2,7 @@ require "spoon/version" | |
| 2 2 | 
             
            require 'docker'
         | 
| 3 3 | 
             
            require 'json'
         | 
| 4 4 | 
             
            require 'uri'
         | 
| 5 | 
            +
            require 'rainbow'
         | 
| 5 6 |  | 
| 6 7 | 
             
            module Spoon
         | 
| 7 8 | 
             
              include Methadone::Main
         | 
| @@ -141,7 +142,7 @@ module Spoon | |
| 141 142 | 
             
                container_list.each do |container|
         | 
| 142 143 | 
             
                  name = container.info["Names"].first.to_s
         | 
| 143 144 | 
             
                  if name.start_with? "/#{options[:prefix]}"
         | 
| 144 | 
            -
                    running = is_running?(container) ? "Running" : "Stopped"
         | 
| 145 | 
            +
                    running = is_running?(container) ? Rainbow("Running").green : Rainbow("Stopped").red
         | 
| 145 146 | 
             
                    puts "#{remove_prefix(name)} [ #{running} ]".rjust(40)
         | 
| 146 147 | 
             
                  end
         | 
| 147 148 | 
             
                end
         | 
    
        data/lib/spoon/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: docker-spoon
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0. | 
| 4 | 
            +
              version: 0.3.0
         | 
| 5 5 | 
             
              prerelease: 
         | 
| 6 6 | 
             
            platform: ruby
         | 
| 7 7 | 
             
            authors:
         | 
| @@ -9,7 +9,7 @@ authors: | |
| 9 9 | 
             
            autorequire: 
         | 
| 10 10 | 
             
            bindir: bin
         | 
| 11 11 | 
             
            cert_chain: []
         | 
| 12 | 
            -
            date: 2014-07- | 
| 12 | 
            +
            date: 2014-07-24 00:00:00.000000000 Z
         | 
| 13 13 | 
             
            dependencies:
         | 
| 14 14 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 15 15 | 
             
              name: bundler
         | 
| @@ -123,6 +123,22 @@ dependencies: | |
| 123 123 | 
             
                - - ~>
         | 
| 124 124 | 
             
                  - !ruby/object:Gem::Version
         | 
| 125 125 | 
             
                    version: '1.11'
         | 
| 126 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 127 | 
            +
              name: rainbow
         | 
| 128 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 129 | 
            +
                none: false
         | 
| 130 | 
            +
                requirements:
         | 
| 131 | 
            +
                - - ~>
         | 
| 132 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 133 | 
            +
                    version: '2.0'
         | 
| 134 | 
            +
              type: :runtime
         | 
| 135 | 
            +
              prerelease: false
         | 
| 136 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 137 | 
            +
                none: false
         | 
| 138 | 
            +
                requirements:
         | 
| 139 | 
            +
                - - ~>
         | 
| 140 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 141 | 
            +
                    version: '2.0'
         | 
| 126 142 | 
             
            description: Create on-demand pairing environments in Docker
         | 
| 127 143 | 
             
            email:
         | 
| 128 144 | 
             
            - anichols@trumped.org
         |