runpuppet 1.0.0.rc6 → 1.0.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/{README.rdoc → README.md} +29 -17
- data/VERSION +1 -1
- data/bin/runpuppet +1 -1
- data/runpuppet.gemspec +6 -5
- data/test/config_test.rb +7 -2
- data/test/fixtures/shell/arp_eth0_dc.txt +7 -0
- data/test/fixtures/shell/arp_eth0_ec2.txt +2 -0
- data/test/fixtures/shell/ip_addr_list_eth0.txt +3 -3
- data/test/helper.rb +1 -1
- metadata +11 -14
- data/test/fixtures/shell/arp_eth0.txt +0 -2
    
        data/{README.rdoc → README.md}
    RENAMED
    
    | @@ -1,43 +1,55 @@ | |
| 1 | 
            -
             | 
| 1 | 
            +
            # runpuppet
         | 
| 2 2 |  | 
| 3 | 
            +
            This is the companion for our puppet_controller, a light-weight web-service to coordinate local puppet runs on servers.
         | 
| 4 | 
            +
             | 
| 5 | 
            +
            ### Installation
         | 
| 6 | 
            +
             | 
| 7 | 
            +
                $ gem install runpuppet
         | 
| 8 | 
            +
             | 
| 9 | 
            +
             | 
| 10 | 
            +
            ### Config
         | 
| 11 | 
            +
                $ cat /etc/runpuppet.yml:
         | 
| 3 12 |  | 
| 4 | 
            -
            cat /etc/runpuppet.yml:
         | 
| 5 13 | 
             
                puppet_controller_url: http://user:pass@example.com
         | 
| 6 | 
            -
                command:cd /etc/puppet/repo && git fetch && git checkout -f origin/@@branch@@ && puppet  | 
| 14 | 
            +
                command:cd /etc/puppet/repo && git fetch && git checkout -f origin/@@branch@@ && puppet apply /etc/puppet/repo/manifests/site.pp
         | 
| 15 | 
            +
                verbose_command:cd /etc/puppet/repo && git fetch && git checkout -f origin/@@branch@@ && puppet apply -v --debug --logdest console --modulepath /etc/puppet/repo/modules /etc/puppet/repo/manifests/site.pp
         | 
| 7 16 | 
             
                branch: staging
         | 
| 8 17 | 
             
                local_ip: 192.168.10.10
         | 
| 9 18 | 
             
                >>>> or grab IP from a network interface
         | 
| 10 19 | 
             
                local_ip_interface: vmbr0
         | 
| 11 20 | 
             
                lock_file: /tmp/runpuppet.lock
         | 
| 12 21 |  | 
| 22 | 
            +
            ## Development
         | 
| 13 23 |  | 
| 14 24 | 
             
            ### Run tests
         | 
| 15 25 |  | 
| 16 | 
            -
             | 
| 26 | 
            +
                $ sh/test
         | 
| 17 27 |  | 
| 18 28 |  | 
| 19 | 
            -
             | 
| 29 | 
            +
            ### Start console
         | 
| 20 30 |  | 
| 21 | 
            -
             | 
| 31 | 
            +
                $ sh/c
         | 
| 22 32 |  | 
| 23 | 
            -
             | 
| 33 | 
            +
            ### Playing in console
         | 
| 24 34 |  | 
| 25 | 
            -
             | 
| 35 | 
            +
                @ctx = Runpuppet.setup_context({})
         | 
| 26 36 |  | 
| 27 | 
            -
             | 
| 28 | 
            -
             | 
| 37 | 
            +
                # client
         | 
| 38 | 
            +
                @ctx.client
         | 
| 29 39 |  | 
| 30 | 
            -
             | 
| 31 | 
            -
             | 
| 40 | 
            +
                # config
         | 
| 41 | 
            +
                @ctx.config
         | 
| 32 42 |  | 
| 33 | 
            -
             | 
| 34 | 
            -
             | 
| 43 | 
            +
                # agent ### HTTP agent
         | 
| 44 | 
            +
                @ctx.agent
         | 
| 35 45 |  | 
| 36 46 |  | 
| 47 | 
            +
            ### Release the gem
         | 
| 48 | 
            +
                # on master branch
         | 
| 49 | 
            +
                $ sh/release
         | 
| 37 50 |  | 
| 38 | 
            -
            This is the companion for our puppet_controller, a light-weight web-service to coordinate local puppet runs on servers.
         | 
| 39 51 |  | 
| 40 | 
            -
             | 
| 52 | 
            +
            ## Contributing to runpuppet
         | 
| 41 53 |  | 
| 42 54 | 
             
            * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
         | 
| 43 55 | 
             
            * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
         | 
| @@ -47,7 +59,7 @@ This is the companion for our puppet_controller, a light-weight web-service to c | |
| 47 59 | 
             
            * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
         | 
| 48 60 | 
             
            * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
         | 
| 49 61 |  | 
| 50 | 
            -
             | 
| 62 | 
            +
            ## Copyright
         | 
| 51 63 |  | 
| 52 64 | 
             
            Copyright (c) 2012 Roman Heinrich. See LICENSE.txt for
         | 
| 53 65 | 
             
            further details.
         | 
    
        data/VERSION
    CHANGED
    
    | @@ -1 +1 @@ | |
| 1 | 
            -
            1.0.0 | 
| 1 | 
            +
            1.0.0
         | 
    
        data/bin/runpuppet
    CHANGED
    
    | @@ -19,7 +19,7 @@ Options: | |
| 19 19 | 
             
            BANNER
         | 
| 20 20 |  | 
| 21 21 | 
             
              opts.on("-h", "--help","Show this.") { puts opts; exit }
         | 
| 22 | 
            -
              opts.on("--readme", 'Show Readme'){ puts File.read(File.join(File.dirname(__FILE__), '..', 'README. | 
| 22 | 
            +
              opts.on("--readme", 'Show Readme'){ puts File.read(File.join(File.dirname(__FILE__), '..', 'README.md')); exit }
         | 
| 23 23 | 
             
              opts.on('--version', 'Show Version'){ puts Runpuppet::VERSION; exit}
         | 
| 24 24 | 
             
              opts.on('--try', 'Runs only if selected on puppet_controller'){ options[:try] = true }
         | 
| 25 25 | 
             
              opts.on('-f', '--facts', 'Report facts'){ options[:facts] = true }
         | 
    
        data/runpuppet.gemspec
    CHANGED
    
    | @@ -5,9 +5,9 @@ | |
| 5 5 |  | 
| 6 6 | 
             
            Gem::Specification.new do |s|
         | 
| 7 7 | 
             
              s.name = "runpuppet"
         | 
| 8 | 
            -
              s.version = "1.0.0 | 
| 8 | 
            +
              s.version = "1.0.0"
         | 
| 9 9 |  | 
| 10 | 
            -
              s.required_rubygems_version = Gem::Requirement.new(" | 
| 10 | 
            +
              s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
         | 
| 11 11 | 
             
              s.authors = ["Roman Heinrich"]
         | 
| 12 12 | 
             
              s.date = "2012-11-09"
         | 
| 13 13 | 
             
              s.description = "Is the local client to the puppet_controller"
         | 
| @@ -15,14 +15,14 @@ Gem::Specification.new do |s| | |
| 15 15 | 
             
              s.executables = ["runpuppet"]
         | 
| 16 16 | 
             
              s.extra_rdoc_files = [
         | 
| 17 17 | 
             
                "LICENSE.txt",
         | 
| 18 | 
            -
                "README. | 
| 18 | 
            +
                "README.md"
         | 
| 19 19 | 
             
              ]
         | 
| 20 20 | 
             
              s.files = [
         | 
| 21 21 | 
             
                ".document",
         | 
| 22 22 | 
             
                "Gemfile",
         | 
| 23 23 | 
             
                "Gemfile.lock",
         | 
| 24 24 | 
             
                "LICENSE.txt",
         | 
| 25 | 
            -
                "README. | 
| 25 | 
            +
                "README.md",
         | 
| 26 26 | 
             
                "Rakefile",
         | 
| 27 27 | 
             
                "VERSION",
         | 
| 28 28 | 
             
                "bin/runpuppet",
         | 
| @@ -43,7 +43,8 @@ Gem::Specification.new do |s| | |
| 43 43 | 
             
                "test/client_test.rb",
         | 
| 44 44 | 
             
                "test/config_test.rb",
         | 
| 45 45 | 
             
                "test/fixtures/runpuppet.yml",
         | 
| 46 | 
            -
                "test/fixtures/shell/ | 
| 46 | 
            +
                "test/fixtures/shell/arp_eth0_dc.txt",
         | 
| 47 | 
            +
                "test/fixtures/shell/arp_eth0_ec2.txt",
         | 
| 47 48 | 
             
                "test/fixtures/shell/ip_addr_list_eth0.txt",
         | 
| 48 49 | 
             
                "test/helper.rb"
         | 
| 49 50 | 
             
              ]
         | 
    
        data/test/config_test.rb
    CHANGED
    
    | @@ -53,10 +53,15 @@ describe 'Config' do | |
| 53 53 | 
             
              end
         | 
| 54 54 |  | 
| 55 55 | 
             
              describe :is_ec2? do
         | 
| 56 | 
            -
                it ' | 
| 57 | 
            -
                  @config.stubs(:read_shell).returns(shell_fixture(' | 
| 56 | 
            +
                it 'is true for arp output from EC2' do
         | 
| 57 | 
            +
                  @config.stubs(:read_shell).returns(shell_fixture('arp_eth0_ec2.txt'))
         | 
| 58 58 | 
             
                  @config.is_ec2?.must_be :>, 0
         | 
| 59 59 | 
             
                end
         | 
| 60 | 
            +
             | 
| 61 | 
            +
                it 'is false for arp output from another data center' do
         | 
| 62 | 
            +
                  @config.stubs(:read_shell).returns(shell_fixture('arp_eth0_dc.txt'))
         | 
| 63 | 
            +
                  @config.is_ec2?.must_be_nil
         | 
| 64 | 
            +
                end
         | 
| 60 65 | 
             
              end
         | 
| 61 66 |  | 
| 62 67 | 
             
              describe :parse_local_ip_from_interface do
         | 
| @@ -0,0 +1,7 @@ | |
| 1 | 
            +
            Address                  HWtype  HWaddress           Flags Mask            Iface
         | 
| 2 | 
            +
            10.10.40.1               ether   fa:16:3e:59:8d:93   C                     eth0
         | 
| 3 | 
            +
            10.10.40.4               ether   fa:16:3e:6f:fc:3b   C                     eth0
         | 
| 4 | 
            +
            10.10.40.12              ether   fa:16:3e:63:ee:8f   C                     eth0
         | 
| 5 | 
            +
            10.10.40.64              ether   fa:16:3e:52:ad:58   C                     eth0
         | 
| 6 | 
            +
            10.10.40.54              ether   fa:16:3e:05:12:b0   C                     eth0
         | 
| 7 | 
            +
            10.10.40.61              ether   fa:16:3e:41:c3:89   C                     eth0
         | 
| @@ -1,5 +1,5 @@ | |
| 1 1 | 
             
            2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
         | 
| 2 | 
            -
                link/ether  | 
| 3 | 
            -
                inet 10.10.10.10/24 scope  | 
| 4 | 
            -
                inet6 fe80:: | 
| 2 | 
            +
                link/ether fa:16:3e:55:5a:80 brd ff:ff:ff:ff:ff:ff
         | 
| 3 | 
            +
                inet 10.10.10.10/24 brd 10.10.10.255 scope global eth0
         | 
| 4 | 
            +
                inet6 fe80::f816:3eff:fe55:5a80/64 scope link tentative dadfailed
         | 
| 5 5 | 
             
                   valid_lft forever preferred_lft forever
         | 
    
        data/test/helper.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | @@ -1,15 +1,13 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification 
         | 
| 2 2 | 
             
            name: runpuppet
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version 
         | 
| 4 | 
            -
              hash:  | 
| 5 | 
            -
              prerelease:  | 
| 4 | 
            +
              hash: 23
         | 
| 5 | 
            +
              prerelease: 
         | 
| 6 6 | 
             
              segments: 
         | 
| 7 7 | 
             
              - 1
         | 
| 8 8 | 
             
              - 0
         | 
| 9 9 | 
             
              - 0
         | 
| 10 | 
            -
               | 
| 11 | 
            -
              - 6
         | 
| 12 | 
            -
              version: 1.0.0.rc6
         | 
| 10 | 
            +
              version: 1.0.0
         | 
| 13 11 | 
             
            platform: ruby
         | 
| 14 12 | 
             
            authors: 
         | 
| 15 13 | 
             
            - Roman Heinrich
         | 
| @@ -131,13 +129,13 @@ extensions: [] | |
| 131 129 |  | 
| 132 130 | 
             
            extra_rdoc_files: 
         | 
| 133 131 | 
             
            - LICENSE.txt
         | 
| 134 | 
            -
            - README. | 
| 132 | 
            +
            - README.md
         | 
| 135 133 | 
             
            files: 
         | 
| 136 134 | 
             
            - .document
         | 
| 137 135 | 
             
            - Gemfile
         | 
| 138 136 | 
             
            - Gemfile.lock
         | 
| 139 137 | 
             
            - LICENSE.txt
         | 
| 140 | 
            -
            - README. | 
| 138 | 
            +
            - README.md
         | 
| 141 139 | 
             
            - Rakefile
         | 
| 142 140 | 
             
            - VERSION
         | 
| 143 141 | 
             
            - bin/runpuppet
         | 
| @@ -158,7 +156,8 @@ files: | |
| 158 156 | 
             
            - test/client_test.rb
         | 
| 159 157 | 
             
            - test/config_test.rb
         | 
| 160 158 | 
             
            - test/fixtures/runpuppet.yml
         | 
| 161 | 
            -
            - test/fixtures/shell/ | 
| 159 | 
            +
            - test/fixtures/shell/arp_eth0_dc.txt
         | 
| 160 | 
            +
            - test/fixtures/shell/arp_eth0_ec2.txt
         | 
| 162 161 | 
             
            - test/fixtures/shell/ip_addr_list_eth0.txt
         | 
| 163 162 | 
             
            - test/helper.rb
         | 
| 164 163 | 
             
            homepage: http://github.com/dawanda/runpuppet
         | 
| @@ -181,14 +180,12 @@ required_ruby_version: !ruby/object:Gem::Requirement | |
| 181 180 | 
             
            required_rubygems_version: !ruby/object:Gem::Requirement 
         | 
| 182 181 | 
             
              none: false
         | 
| 183 182 | 
             
              requirements: 
         | 
| 184 | 
            -
              - - " | 
| 183 | 
            +
              - - ">="
         | 
| 185 184 | 
             
                - !ruby/object:Gem::Version 
         | 
| 186 | 
            -
                  hash:  | 
| 185 | 
            +
                  hash: 3
         | 
| 187 186 | 
             
                  segments: 
         | 
| 188 | 
            -
                  -  | 
| 189 | 
            -
                   | 
| 190 | 
            -
                  - 1
         | 
| 191 | 
            -
                  version: 1.3.1
         | 
| 187 | 
            +
                  - 0
         | 
| 188 | 
            +
                  version: "0"
         | 
| 192 189 | 
             
            requirements: []
         | 
| 193 190 |  | 
| 194 191 | 
             
            rubyforge_project: 
         |