grenache-ruby-base 0.2.7 → 0.2.9
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 +4 -4
- data/lib/grenache/base.rb +2 -2
- data/lib/grenache/configurable.rb +3 -2
- data/lib/grenache/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: c584733c4084dbb644918ed0b484941df6f579dd
|
|
4
|
+
data.tar.gz: d2e816d767f7d3162c01b5fd89a349251500b8a7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d484d57baee1bcffdb298489905a7cb18b544a85d4bf0a21722ebeba379ed0fc2cc682b627eaea6e5a042669bf47411a53283f3edfe14bae31c57e1da1562e06
|
|
7
|
+
data.tar.gz: 1f200b0bf1633669e4cf066968f0dbe2d73b5b80f2b1f64460a7bcc058acc48d3478b69b47437ed821a5c2db4549d68a400729b57fc64376433ceff7e9d80bef
|
data/lib/grenache/base.rb
CHANGED
|
@@ -4,7 +4,7 @@ module Grenache
|
|
|
4
4
|
|
|
5
5
|
# Initialize can accept custom configuration parameters
|
|
6
6
|
def initialize(params = {})
|
|
7
|
-
@configuration = Configuration.new(params)
|
|
7
|
+
@configuration = Configuration.new(params) unless params.empty?
|
|
8
8
|
end
|
|
9
9
|
|
|
10
10
|
# Lookup for a specific service `key`
|
|
@@ -47,7 +47,7 @@ module Grenache
|
|
|
47
47
|
end
|
|
48
48
|
|
|
49
49
|
def link
|
|
50
|
-
@link ||= Link.new
|
|
50
|
+
@link ||= Link.new config
|
|
51
51
|
end
|
|
52
52
|
end
|
|
53
53
|
end
|
|
@@ -14,7 +14,7 @@ module Grenache
|
|
|
14
14
|
|
|
15
15
|
# Initialize default values
|
|
16
16
|
def initialize(params = {})
|
|
17
|
-
set_val :grape_address, params, "
|
|
17
|
+
set_val :grape_address, params, "http://127.0.0.1:40001/"
|
|
18
18
|
set_val :timeout, params, 5
|
|
19
19
|
|
|
20
20
|
set_val :auto_announce_interval, params, 5
|
|
@@ -41,6 +41,7 @@ module Grenache
|
|
|
41
41
|
|
|
42
42
|
def set_val(name, params, default)
|
|
43
43
|
method = "#{name}=".to_sym
|
|
44
|
+
|
|
44
45
|
if params[name]
|
|
45
46
|
send(method, params[name])
|
|
46
47
|
else
|
|
@@ -56,7 +57,7 @@ module Grenache
|
|
|
56
57
|
end
|
|
57
58
|
|
|
58
59
|
def config
|
|
59
|
-
self.class.config
|
|
60
|
+
@configuration || self.class.config
|
|
60
61
|
end
|
|
61
62
|
|
|
62
63
|
module ClassMethods
|
data/lib/grenache/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: grenache-ruby-base
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.9
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Bitfinex
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-06-
|
|
11
|
+
date: 2017-06-21 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: eventmachine
|