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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7dafb846e9cc1b63b5e0b89ce57791b49ae8728e
4
- data.tar.gz: b9fef170cf4fe05a3ddbf98ff3536b375676e109
3
+ metadata.gz: c584733c4084dbb644918ed0b484941df6f579dd
4
+ data.tar.gz: d2e816d767f7d3162c01b5fd89a349251500b8a7
5
5
  SHA512:
6
- metadata.gz: b5befed9e8edcb8b6d4fe90ecd5b6050d5e88cc6352ed791edb4fce28f96a8ef511d6f75bb7e4e8085734d1d1ef5c8d0721a30888db85fde5beda76b8609184b
7
- data.tar.gz: 669ece1852504ff4ab6a01a0e52dfe3a5d9be64ef0ff1f9fefb34ea276d32650b531844e5ab15569652d912af48f4fd0b9b1dc0a23ea0597488ee25e42261e4c
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(self.class.config)
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, "ws://127.0.0.1:30001"
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
@@ -1,3 +1,3 @@
1
1
  module Grenache
2
- VERSION = '0.2.7'
2
+ VERSION = '0.2.9'
3
3
  end
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.7
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-16 00:00:00.000000000 Z
11
+ date: 2017-06-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: eventmachine