kumogata2-plugin-ruby 0.1.4 → 0.1.5

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: 3c8a4c551b7d34c428383a4afdc7f4f48b288440
4
- data.tar.gz: 2b03eed82e053c20b808aa09adee67a26d433d5d
3
+ metadata.gz: '059ea5c4ca7287173b25aee11ba648f0db1a5e10'
4
+ data.tar.gz: 7fca869aa437f28f879778697a8ca245168d8de8
5
5
  SHA512:
6
- metadata.gz: bf2f8e35d97812e54fe9cce095a57922cda95e5c39fbe3f4bdbdc42ac4b5d8cf05e1d1e48a1881d3ca2304688ce24f86bab6df8e8bc82d162e13289d45167e96
7
- data.tar.gz: d1d6e600e3471ce3225485673cc433491fa53f48c6665860fc59f6cb9b1cd6f38a45f70ada53277bdc97a5ebb8cfe6c5284c8a36c72fe17208c7fefff450b090
6
+ metadata.gz: efab081981cf5f32f9c0f09bf939d323b32c14afbc3a016d23c5c692e9af2e002a6690459f26474578759c5c0ad05731a79db3b05a6c67029cfd015a0409ab49
7
+ data.tar.gz: 04344c0f5f41e289a9b589f777c5837d57634436c7cd9f2a26e124ce21e31954b4f6328e5728138228b9df6ddc81ee116484d04d42107830861b39f69066b035
@@ -34,7 +34,11 @@ class Kumogata2::Plugin::Ruby
34
34
 
35
35
  def devaluate_template(template)
36
36
  exclude_key = proc do |k|
37
- k = k.to_s.gsub('::', '__')
37
+ k = k.to_s
38
+ k.gsub!('____', '-')
39
+ k.gsub!('___', '.')
40
+ k.gsub!('__', '::')
41
+ k.gsub!('_', ':')
38
42
  k !~ /\A[_a-z]\w+\Z/i and k !~ %r|\A/\S*\Z|
39
43
  end
40
44
 
@@ -50,7 +54,10 @@ class Kumogata2::Plugin::Ruby
50
54
  end
51
55
  end
52
56
  else
57
+ k.gsub('-', '____')
58
+ k.gsub('.', '___')
53
59
  k.gsub('::', '__')
60
+ k.gsub(':', '_')
54
61
  end
55
62
  end
56
63
 
@@ -6,13 +6,13 @@ class Kumogata2::Plugin::Ruby::Context
6
6
  end
7
7
 
8
8
  def template(&block)
9
- key_converter = proc do |key|
10
- key = key.to_s
11
- unless @options.skip_replace_underscore?
12
- key.gsub!('__', '::')
13
- key.gsub!('_', ':')
14
- end
15
- key
9
+ key_converter = proc do |k|
10
+ k = k.to_s
11
+ k.gsub!('____', '-')
12
+ k.gsub!('___', '.')
13
+ k.gsub!('__', '::')
14
+ k.gsub!('_', ':')
15
+ k
16
16
  end
17
17
 
18
18
  value_converter = proc do |v|
@@ -1,7 +1,7 @@
1
1
  module Kumogata2
2
2
  module Plugin
3
3
  class Ruby
4
- VERSION = '0.1.4'
4
+ VERSION = '0.1.5'
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kumogata2-plugin-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - winebarrel
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-06-22 00:00:00.000000000 Z
11
+ date: 2017-07-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: kumogata2