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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- Y2JkMmViNDAzZDFmZGY5NzEyNjkwYzI2NjM0ODg2ZmVkM2RmZGEwNw==
4
+ MDdmOGUwZWEwZWU3OTk2YjY0ZDE1ZTZmZTk0YzUwOWNmNGFjZjhlMQ==
5
5
  data.tar.gz: !binary |-
6
- ZTlhYmI4OGUzMGJjZWNjNzE2ZGRlYzMxOTFmYTllYmQ2MjFkYjBkNQ==
6
+ OTIxYzU3YWIwMDhjZmVhNGRkMTU1YWJmNTk5MmI4NmNiOTk0ODIyZA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NDJkOTc4MTkyMWI2YjlkNjgxOGVmY2Q1ZjE2MmIyMzdhYmIzNDM1MmM4NWI3
10
- NWExMGQ5M2VkYzM0ODEyNDc3ZjQzYmRmNGRiOGI3ODU4MjgwNTgyZGU2MGQx
11
- NjUxNjAxMmMxMGIwYTU1OWQyOWY3ODM2MzkzOWI4NTUyZDE2ZWY=
9
+ MDk1ODlhODIyMzY2NTcyMjBmMTNlYzA4NjJhODI1Mjg0NjZjYzBiNWMwYmY2
10
+ NjI0NWYzNzc1MWM0NzVkZjhkMGMwOWQ4ZTgyMTRkMTUxMzQ0MjhjYmMyNTZj
11
+ MTZhMGM2YzRmNGEwYWNiZTNhNDMyY2NiYzdiM2E4NmI4YjRkMjk=
12
12
  data.tar.gz: !binary |-
13
- MTQ0ZDgwYWZmNmI3ODE3MmZiMjg1OTIzNWVjMmM0MjViMDFmODA1YWRlMGY0
14
- NTg5OTVmY2ZmY2ZkZmViZTVjMzRmOTc5MzZjYWE4NGZiMjkxYmUwZGJiOGU5
15
- MjFmYTJjNTQ4YzhhNTIwYjUzNGJjYmY0NDYzMjg0MTYyZWU0Yjk=
13
+ YzAzNzBmMTA1ZGIxODYxNDU4NmVkOWMzMmIyZTdiNzBlMTE5NWM4YzNlODFj
14
+ ZGVkMjM5YzZhZWZjM2I2ZDMxNWMyZmZjOTcxMzhhM2IyNDgxODA3OTdmZjAw
15
+ NTg3MTRmMTljY2IzMTdiNzBkMWViMjRmZWNmZjNhY2JjY2I2ZDE=
data/README.md CHANGED
@@ -1,2 +1,42 @@
1
+ [![Gem Version](https://badge.fury.io/rb/capistrano-consul.svg)](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
@@ -12,5 +12,5 @@ Gem::Specification.new do |s|
12
12
  s.require_paths = ["lib"]
13
13
  s.files = `git ls-files`.split("\n")
14
14
 
15
- s.add_runtime_dependency "diplomat"
15
+ s.add_runtime_dependency 'diplomat', '~> 0.13.2'
16
16
  end
@@ -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
- # TODO: pass through ssl opts
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)
@@ -1,5 +1,5 @@
1
1
  module Capistrano
2
2
  module Consul
3
- VERSION = '0.0.2'
3
+ VERSION = '0.0.3'
4
4
  end
5
5
  end
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.2
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: '0'
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: '0'
26
+ version: 0.13.2
27
27
  description: Consul discovery for Capistrano
28
28
  email: ryan.graham@gmail.com
29
29
  executables: []