kumogata2 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/kumogata2/client.rb +1 -0
- data/lib/kumogata2/utils.rb +17 -0
- data/lib/kumogata2/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3831481b8a40e25a73af862f21453988a6c64ff2
|
4
|
+
data.tar.gz: cac8354825262177609380c023b95a2316f8e3bd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c0fa7ca6805c4bdc994d1a6d6d8fe9cb6ae84fd12e6b2e5b202974fa8c3fa2e6f12e44cf5e3b4b93f17de362076235513dff25351943a7367774249d7f974fc5
|
7
|
+
data.tar.gz: 54e84a312792876ab775c80a62840c72a191e5c1bd34c577e7bde6c6c5a04615e7e9d18aff49ce64df7fad6da6e3016eaaf5e8e75f8591e3bf94792df6348e8d
|
data/lib/kumogata2/client.rb
CHANGED
data/lib/kumogata2/utils.rb
CHANGED
@@ -32,5 +32,22 @@ class Kumogata2::Utils
|
|
32
32
|
user_host = [user, host].select {|i| not i.empty? }.join('-')
|
33
33
|
user_host.empty? ? nil : user_host
|
34
34
|
end
|
35
|
+
|
36
|
+
def stringify(obj)
|
37
|
+
case obj
|
38
|
+
when Array
|
39
|
+
obj.map {|v| stringify(v) }
|
40
|
+
when Hash
|
41
|
+
hash = {}
|
42
|
+
|
43
|
+
obj.each do |k, v|
|
44
|
+
hash[stringify(k)] = stringify(v)
|
45
|
+
end
|
46
|
+
|
47
|
+
hash
|
48
|
+
else
|
49
|
+
obj.to_s
|
50
|
+
end
|
51
|
+
end
|
35
52
|
end # of class methods
|
36
53
|
end
|
data/lib/kumogata2/version.rb
CHANGED