consul-client 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c1729a5c12181f89e6921f85d96d2df356466a7d
4
- data.tar.gz: b52bd63b9e2befc9b9a4d24422195973577362c5
3
+ metadata.gz: 80c1c93480e61e527b232543f56a88de8ffa42f9
4
+ data.tar.gz: abd798f99d22c71b7b382c076dd49d34ad1ecf7e
5
5
  SHA512:
6
- metadata.gz: 0aa261a9c0055617e26a30af166c99b07da4cef43491f1057a4ef597305ef02041af5f7e073f601b3b4f635df9c5011750496cf7a5bc7598d0b83bb55fd2eec1
7
- data.tar.gz: 8201a743e89f3e39a475f41ee1295611b8e6502ce0460c37b939e241c57856783cb09ecc260ee02661274602f27fc3dc2c6e23532f6cc7c7dfdd570906a67240
6
+ metadata.gz: 57384907747b902ffb6638288097d6d020f3132e3c6698bb3ab83cc3694488688c282af15f6c233a3e07f5ce8a333191c660b3021c85537baecb69bffc7078df
7
+ data.tar.gz: da619c7990bd303b3e46af46c9a5bfb7eb02511315bc6300d6dc9248d67991d4d2bc123a021feca54fa5255d617341143fa8ac4b7dee0fabdfb4bc47019adf22
data/README.md CHANGED
@@ -10,6 +10,10 @@ before using for anything real._
10
10
  Usage
11
11
  -----
12
12
 
13
+ It's a gem:
14
+
15
+ gem install consul-client
16
+
13
17
  Simple API usage:
14
18
 
15
19
  ```ruby
@@ -27,3 +31,10 @@ See `example` directory for more:
27
31
 
28
32
  A `Vagrantfile` is provided that makes three
29
33
  Consul nodes, which is handy for playing around.
34
+
35
+ Documentation
36
+ -------------
37
+
38
+ [Comprehensive YARD documentation is
39
+ available](http://rubydoc.info/github/xaviershay/consul-client/master), though
40
+ honestly you're probably better off just working from the `example` directory.
@@ -22,6 +22,6 @@ Gem::Specification.new do |gem|
22
22
  gem.name = "consul-client"
23
23
  gem.require_paths = ["lib"]
24
24
  gem.license = "Apache 2.0"
25
- gem.version = '0.1.0'
25
+ gem.version = '0.1.1'
26
26
  gem.has_rdoc = false
27
27
  end
data/lib/consul/client.rb CHANGED
@@ -54,7 +54,7 @@ module Consul
54
54
  # http = Consul::Client.v1.http(logger: Logger.new($stdout))
55
55
  # puts http.get("/get/self")["Member"]["Name"]
56
56
  def http(host: "localhost", port: 8500, logger: NULL_LOGGER)
57
- HTTP.new(*args)
57
+ HTTP.new(host: host, port: port, logger: logger)
58
58
  end
59
59
  end
60
60
  end
@@ -22,7 +22,7 @@ module Consul
22
22
  # stored at +/kv/web/leader+.
23
23
  def lock(key, &block)
24
24
  session = consul.put("/session/create",
25
- LockDelay: '5s',
25
+ LockDelay: '3s',
26
26
  Checks: ["service:#{name}", "serfHealth"]
27
27
  )["ID"]
28
28
  loop do
@@ -43,7 +43,7 @@ module Consul
43
43
  end
44
44
  # TODO: Figure out why long poll doesn't work.
45
45
  # https://gist.github.com/xaviershay/30128b968bde0e2d3e0b/edit
46
- sleep 2
46
+ sleep 3
47
47
  end
48
48
  end
49
49
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: consul-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Xavier Shay
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-17 00:00:00.000000000 Z
11
+ date: 2014-08-18 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Ruby client library for Consul HTTP API.
14
14
  email: