ebisu_connection 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/ebisu_connection/slaves.rb +8 -8
- data/lib/ebisu_connection/version.rb +1 -1
- metadata +4 -4
@@ -9,12 +9,12 @@ module EbisuConnection
|
|
9
9
|
case conf
|
10
10
|
when String
|
11
11
|
@hostname, weight = conf.split(/\s*,\s*/)
|
12
|
-
edit_spec = {
|
12
|
+
edit_spec = {"host" => @hostname}
|
13
13
|
when Hash
|
14
|
-
conf =
|
15
|
-
weight = conf.delete(
|
14
|
+
conf = stringify_keys(conf)
|
15
|
+
weight = conf.delete("weight")
|
16
16
|
edit_spec = conf
|
17
|
-
@hostname = conf[
|
17
|
+
@hostname = conf["host"]
|
18
18
|
else
|
19
19
|
raise ArgumentError, "slaves config is invalid"
|
20
20
|
end
|
@@ -37,12 +37,12 @@ module EbisuConnection
|
|
37
37
|
|
38
38
|
private
|
39
39
|
|
40
|
-
def
|
41
|
-
|
40
|
+
def stringify_keys(hash)
|
41
|
+
stringify_hash = {}
|
42
42
|
hash.each do |k,v|
|
43
|
-
|
43
|
+
stringify_hash[k.to_s] = v
|
44
44
|
end
|
45
|
-
|
45
|
+
stringify_hash
|
46
46
|
end
|
47
47
|
end
|
48
48
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ebisu_connection
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 15
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 8
|
10
|
+
version: 0.0.8
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- tsukasaoishi
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2014-
|
18
|
+
date: 2014-03-12 00:00:00 +09:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|