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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fb5540a3229d5f4102d1d96eb3f126e6a84a7828
4
- data.tar.gz: 15b8e947a3be07b0b2432be90ade1f813b2072c3
3
+ metadata.gz: 3831481b8a40e25a73af862f21453988a6c64ff2
4
+ data.tar.gz: cac8354825262177609380c023b95a2316f8e3bd
5
5
  SHA512:
6
- metadata.gz: 56fd1a43761ac31258d23e7dce325531c517f61a63daf17d4cd60396145d5e41fbcd650a530ddd625b7be6e6910554914ea65f5a9d129afed834aea763146262
7
- data.tar.gz: 1eeee2ea9d80d9266b68e4aef6a5d6e7cc208291b3f05d25f5a193ff6e598feb3f653c378e4ab0d9e97fb7a28420a14fd7286e74cd35ead7626d669c88316835
6
+ metadata.gz: c0fa7ca6805c4bdc994d1a6d6d8fe9cb6ae84fd12e6b2e5b202974fa8c3fa2e6f12e44cf5e3b4b93f17de362076235513dff25351943a7367774249d7f974fc5
7
+ data.tar.gz: 54e84a312792876ab775c80a62840c72a191e5c1bd34c577e7bde6c6c5a04615e7e9d18aff49ce64df7fad6da6e3016eaaf5e8e75f8591e3bf94792df6348e8d
@@ -87,6 +87,7 @@ class Kumogata2::Client
87
87
  template = open_template(path_or_url)
88
88
  end
89
89
 
90
+ template = Kumogata2::Utils.stringify(template)
90
91
  JSON.pretty_generate(template)
91
92
  end
92
93
 
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Kumogata2
2
- VERSION = '0.1.3'
2
+ VERSION = '0.1.4'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kumogata2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Genki Sugawara