capistrano-consul 0.0.2 → 0.0.3
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 +8 -8
 - data/README.md +40 -0
 - data/capistrano-consul.gemspec +1 -1
 - data/lib/capistrano/consul.rb +2 -2
 - data/lib/capistrano/consul/version.rb +1 -1
 - metadata +5 -5
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,15 +1,15 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            !binary "U0hBMQ==":
         
     | 
| 
       3 
3 
     | 
    
         
             
              metadata.gz: !binary |-
         
     | 
| 
       4 
     | 
    
         
            -
                 
     | 
| 
      
 4 
     | 
    
         
            +
                MDdmOGUwZWEwZWU3OTk2YjY0ZDE1ZTZmZTk0YzUwOWNmNGFjZjhlMQ==
         
     | 
| 
       5 
5 
     | 
    
         
             
              data.tar.gz: !binary |-
         
     | 
| 
       6 
     | 
    
         
            -
                 
     | 
| 
      
 6 
     | 
    
         
            +
                OTIxYzU3YWIwMDhjZmVhNGRkMTU1YWJmNTk5MmI4NmNiOTk0ODIyZA==
         
     | 
| 
       7 
7 
     | 
    
         
             
            SHA512:
         
     | 
| 
       8 
8 
     | 
    
         
             
              metadata.gz: !binary |-
         
     | 
| 
       9 
     | 
    
         
            -
                 
     | 
| 
       10 
     | 
    
         
            -
                 
     | 
| 
       11 
     | 
    
         
            -
                 
     | 
| 
      
 9 
     | 
    
         
            +
                MDk1ODlhODIyMzY2NTcyMjBmMTNlYzA4NjJhODI1Mjg0NjZjYzBiNWMwYmY2
         
     | 
| 
      
 10 
     | 
    
         
            +
                NjI0NWYzNzc1MWM0NzVkZjhkMGMwOWQ4ZTgyMTRkMTUxMzQ0MjhjYmMyNTZj
         
     | 
| 
      
 11 
     | 
    
         
            +
                MTZhMGM2YzRmNGEwYWNiZTNhNDMyY2NiYzdiM2E4NmI4YjRkMjk=
         
     | 
| 
       12 
12 
     | 
    
         
             
              data.tar.gz: !binary |-
         
     | 
| 
       13 
     | 
    
         
            -
                 
     | 
| 
       14 
     | 
    
         
            -
                 
     | 
| 
       15 
     | 
    
         
            -
                 
     | 
| 
      
 13 
     | 
    
         
            +
                YzAzNzBmMTA1ZGIxODYxNDU4NmVkOWMzMmIyZTdiNzBlMTE5NWM4YzNlODFj
         
     | 
| 
      
 14 
     | 
    
         
            +
                ZGVkMjM5YzZhZWZjM2I2ZDMxNWMyZmZjOTcxMzhhM2IyNDgxODA3OTdmZjAw
         
     | 
| 
      
 15 
     | 
    
         
            +
                NTg3MTRmMTljY2IzMTdiNzBkMWViMjRmZWNmZjNhY2JjY2I2ZDE=
         
     | 
    
        data/README.md
    CHANGED
    
    | 
         @@ -1,2 +1,42 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            [](http://badge.fury.io/rb/capistrano-consul)
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
       1 
3 
     | 
    
         
             
            # capistrano-consul
         
     | 
| 
       2 
4 
     | 
    
         
             
            Capistrano plugin to populate roles with hosts from consul
         
     | 
| 
      
 5 
     | 
    
         
            +
             
     | 
| 
      
 6 
     | 
    
         
            +
            ## Installation
         
     | 
| 
      
 7 
     | 
    
         
            +
             
     | 
| 
      
 8 
     | 
    
         
            +
            Add this line to your application's Gemfile:
         
     | 
| 
      
 9 
     | 
    
         
            +
             
     | 
| 
      
 10 
     | 
    
         
            +
                gem 'capistrano-consul'
         
     | 
| 
      
 11 
     | 
    
         
            +
             
     | 
| 
      
 12 
     | 
    
         
            +
            And then execute:
         
     | 
| 
      
 13 
     | 
    
         
            +
             
     | 
| 
      
 14 
     | 
    
         
            +
                $ bundle
         
     | 
| 
      
 15 
     | 
    
         
            +
             
     | 
| 
      
 16 
     | 
    
         
            +
            ## Usage
         
     | 
| 
      
 17 
     | 
    
         
            +
            ```ruby
         
     | 
| 
      
 18 
     | 
    
         
            +
                # config/deploy/<development|stage|prod>.rb
         
     | 
| 
      
 19 
     | 
    
         
            +
                set :consul_url, 'http://192.168.22.30:8500'
         
     | 
| 
      
 20 
     | 
    
         
            +
             
     | 
| 
      
 21 
     | 
    
         
            +
                set :ssl_options, { ssl: {
         
     | 
| 
      
 22 
     | 
    
         
            +
                                      client_cert:  OpenSSL::X509::Certificate.new(File.read('./cert.pem')),
         
     | 
| 
      
 23 
     | 
    
         
            +
                                      client_key: OpenSSL::PKey::RSA.new(File.read('./key.pem'), '')
         
     | 
| 
      
 24 
     | 
    
         
            +
                                    }
         
     | 
| 
      
 25 
     | 
    
         
            +
                                  }
         
     | 
| 
      
 26 
     | 
    
         
            +
            ```
         
     | 
| 
      
 27 
     | 
    
         
            +
             
     | 
| 
      
 28 
     | 
    
         
            +
            ```ruby
         
     | 
| 
      
 29 
     | 
    
         
            +
                # Capfile or config/deploy.rb
         
     | 
| 
      
 30 
     | 
    
         
            +
                require 'capistrano-consul'
         
     | 
| 
      
 31 
     | 
    
         
            +
             
     | 
| 
      
 32 
     | 
    
         
            +
                # Give "cache" role to hosts publishing memcached service
         
     | 
| 
      
 33 
     | 
    
         
            +
                service 'memcached', :cache
         
     | 
| 
      
 34 
     | 
    
         
            +
            ```
         
     | 
| 
      
 35 
     | 
    
         
            +
             
     | 
| 
      
 36 
     | 
    
         
            +
            ## Contributing
         
     | 
| 
      
 37 
     | 
    
         
            +
             
     | 
| 
      
 38 
     | 
    
         
            +
            1. Fork it
         
     | 
| 
      
 39 
     | 
    
         
            +
            2. Create your feature branch (`git checkout -b my-new-feature`)
         
     | 
| 
      
 40 
     | 
    
         
            +
            3. Commit your changes (`git commit -am 'Add some feature'`)
         
     | 
| 
      
 41 
     | 
    
         
            +
            4. Push to the branch (`git push origin my-new-feature`)
         
     | 
| 
      
 42 
     | 
    
         
            +
            5. Create new Pull Request
         
     | 
    
        data/capistrano-consul.gemspec
    CHANGED
    
    
    
        data/lib/capistrano/consul.rb
    CHANGED
    
    | 
         @@ -13,8 +13,8 @@ module Capistrano 
     | 
|
| 
       13 
13 
     | 
    
         | 
| 
       14 
14 
     | 
    
         
             
                      def service(service_name, *roles)
         
     | 
| 
       15 
15 
     | 
    
         
             
                        Diplomat.configure do |config|
         
     | 
| 
       16 
     | 
    
         
            -
                          config.url = fetch(:consul_url)
         
     | 
| 
       17 
     | 
    
         
            -
                           
     | 
| 
      
 16 
     | 
    
         
            +
                          config.url = fetch(:consul_url, "http://localhost:8500")
         
     | 
| 
      
 17 
     | 
    
         
            +
                          config.options = fetch(:ssl_options, {})
         
     | 
| 
       18 
18 
     | 
    
         
             
                        end
         
     | 
| 
       19 
19 
     | 
    
         | 
| 
       20 
20 
     | 
    
         
             
                        @nodes = Diplomat::Service.get(service_name, :all)
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: capistrano-consul
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0.0. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.0.3
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Ryan Graham
         
     | 
| 
         @@ -14,16 +14,16 @@ dependencies: 
     | 
|
| 
       14 
14 
     | 
    
         
             
              name: diplomat
         
     | 
| 
       15 
15 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
       16 
16 
     | 
    
         
             
                requirements:
         
     | 
| 
       17 
     | 
    
         
            -
                - -  
     | 
| 
      
 17 
     | 
    
         
            +
                - - ~>
         
     | 
| 
       18 
18 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       19 
     | 
    
         
            -
                    version:  
     | 
| 
      
 19 
     | 
    
         
            +
                    version: 0.13.2
         
     | 
| 
       20 
20 
     | 
    
         
             
              type: :runtime
         
     | 
| 
       21 
21 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       22 
22 
     | 
    
         
             
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
       23 
23 
     | 
    
         
             
                requirements:
         
     | 
| 
       24 
     | 
    
         
            -
                - -  
     | 
| 
      
 24 
     | 
    
         
            +
                - - ~>
         
     | 
| 
       25 
25 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       26 
     | 
    
         
            -
                    version:  
     | 
| 
      
 26 
     | 
    
         
            +
                    version: 0.13.2
         
     | 
| 
       27 
27 
     | 
    
         
             
            description: Consul discovery for Capistrano
         
     | 
| 
       28 
28 
     | 
    
         
             
            email: ryan.graham@gmail.com
         
     | 
| 
       29 
29 
     | 
    
         
             
            executables: []
         
     |