consul_do 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +11 -4
- data/bin/setup +4 -0
- data/circle.yml +0 -2
- data/consul_do.gemspec +1 -1
- data/lib/consul_do/config.rb +6 -2
- data/lib/consul_do/version.rb +1 -1
- 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: eaf53b3f134bde3ccd76c2cbc01b7a96438eff91
|
4
|
+
data.tar.gz: 72ed7795cecde8271e9660bb8b5c39f347c25198
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 86abc466576f29bb9948cd515984df0e8b40ba5480829e2ff76e11c88b115331c4003bf5f6095270f28717acccf9e3a5e5a1e74937b8c31dc741870424a360cc
|
7
|
+
data.tar.gz: 1d993a16794349c9705e1288a28c94f403c8def2ec17fe52c857ab241335aa05a6497198fafe43ff7dfadf23e30d7eec8ab1a0489314b505985e4ed9bd31a88c
|
data/README.md
CHANGED
@@ -27,17 +27,24 @@ Or install it yourself as:
|
|
27
27
|
|
28
28
|
$ consul-do --help
|
29
29
|
Usage: consul-do OPTIONS
|
30
|
-
-k, --key KEY
|
31
|
-
-h, --consul-host HOST
|
32
|
-
-p, --consul-port PORT
|
30
|
+
-k, --key KEY=consul_do Coordination key
|
31
|
+
-h, --consul-host HOST=localhost Consul hostname
|
32
|
+
-p, --consul-port PORT=8500 Consul port
|
33
|
+
-t, --token TOKEN ACL Token
|
33
34
|
--http_proxy http://HOST:PORT
|
34
35
|
Use supplied proxy instead of ENV
|
36
|
+
-v, --verbose Verbose logging
|
35
37
|
|
36
38
|
$ consul-do -k my_key && echo "do stuff"
|
37
39
|
do stuff
|
38
40
|
|
39
41
|
$ consul-do -k not_my_key && echo "don't do stuff"
|
40
42
|
|
43
|
+
## Requirements
|
44
|
+
|
45
|
+
* http access to a host running Consul Agent
|
46
|
+
* Write access to the `service/` key [via ACL, token](https://www.consul.io/docs/internals/acl.html), or consul default wide-open permissions.
|
47
|
+
|
41
48
|
## Development
|
42
49
|
|
43
50
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake rspec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
@@ -46,7 +53,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
46
53
|
|
47
54
|
## Contributing
|
48
55
|
|
49
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
56
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/goldstar/consul_do.
|
50
57
|
|
51
58
|
|
52
59
|
## License
|
data/bin/setup
CHANGED
data/circle.yml
CHANGED
data/consul_do.gemspec
CHANGED
@@ -14,7 +14,7 @@ Gem::Specification.new do |spec|
|
|
14
14
|
spec.homepage = "https://github.com/goldstar/consul_do"
|
15
15
|
spec.license = "MIT"
|
16
16
|
|
17
|
-
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
17
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features|hooks)/}) }
|
18
18
|
spec.bindir = "exe"
|
19
19
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
20
20
|
spec.require_paths = ["lib"]
|
data/lib/consul_do/config.rb
CHANGED
@@ -37,9 +37,13 @@ module ConsulDo
|
|
37
37
|
"consul-do_#{key}_session"
|
38
38
|
end
|
39
39
|
|
40
|
+
def net_http_proxy
|
41
|
+
Net::HTTP.Proxy(proxy.host, proxy.port, proxy.user, proxy.password)
|
42
|
+
end
|
43
|
+
|
40
44
|
def http_client
|
41
|
-
if
|
42
|
-
ConsulDo.log "http_client",
|
45
|
+
if proxy.host && proxy.port
|
46
|
+
ConsulDo.log "http_client", net_http_proxy
|
43
47
|
else
|
44
48
|
ConsulDo.log "http_client", Net::HTTP
|
45
49
|
end
|
data/lib/consul_do/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: consul_do
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jason Scholl
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-09-
|
11
|
+
date: 2015-09-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|