kumogata2-plugin-ruby 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: ba9482fc0438403e8841467665c5c351270a7cbf
4
- data.tar.gz: 60c198f89e33617641377ccdabc9b083cecde247
3
+ metadata.gz: 3c8a4c551b7d34c428383a4afdc7f4f48b288440
4
+ data.tar.gz: 2b03eed82e053c20b808aa09adee67a26d433d5d
5
5
  SHA512:
6
- metadata.gz: 11e8fbdfb49b7d3bb5a73e05026ab4a56b92306cf2840e932c585431670201e193f48bdf79efcce1d5f4afa4d79ad86428c2a146a372a0f3bd53dd776cf6fb91
7
- data.tar.gz: cea20116e88a9e3a9fef36408b362a574be3e988f7edc7bab152221a4ef71a3cc3301fdae8da11cfbce033c7aa673d637f0f205ed82b7f6b5e301dadf7221d2c
6
+ metadata.gz: bf2f8e35d97812e54fe9cce095a57922cda95e5c39fbe3f4bdbdc42ac4b5d8cf05e1d1e48a1881d3ca2304688ce24f86bab6df8e8bc82d162e13289d45167e96
7
+ data.tar.gz: d1d6e600e3471ce3225485673cc433491fa53f48c6665860fc59f6cb9b1cd6f38a45f70ada53277bdc97a5ebb8cfe6c5284c8a36c72fe17208c7fefff450b090
data/README.md CHANGED
@@ -4,6 +4,8 @@ It is the Ruby plug-in of [Kumogata2](https://github.com/winebarrel/kumogata2).
4
4
 
5
5
  It convert the Ruby DSL to JSON.
6
6
 
7
+ [![Gem Version](https://badge.fury.io/rb/kumogata2-plugin-ruby.png?201406152020)](http://badge.fury.io/rb/kumogata2-plugin-ruby)
8
+
7
9
  ## Installation
8
10
 
9
11
  Add this line to your application's Gemfile:
@@ -8,7 +8,10 @@ class Kumogata2::Plugin::Ruby::Context
8
8
  def template(&block)
9
9
  key_converter = proc do |key|
10
10
  key = key.to_s
11
- key.gsub!('__', '::') unless @options.skip_replace_underscore?
11
+ unless @options.skip_replace_underscore?
12
+ key.gsub!('__', '::')
13
+ key.gsub!('_', ':')
14
+ end
12
15
  key
13
16
  end
14
17
 
@@ -90,6 +90,45 @@ module Kumogata2::Plugin::Ruby::StringExt
90
90
  #{null.inspect}
91
91
  end
92
92
 
93
+ def Fn__If(value)
94
+ value = {'Fn::If' => @__value_conv__[value]}
95
+
96
+ case @__functions__
97
+ when Array
98
+ @__functions__ << value
99
+ when Hash
100
+ @__functions__.update(value)
101
+ end
102
+
103
+ #{null.inspect}
104
+ end
105
+
106
+ def Fn__ImportValue(value)
107
+ value = {'Fn::ImportValue' => value}
108
+
109
+ case @__functions__
110
+ when Array
111
+ @__functions__ << value
112
+ when Hash
113
+ @__functions__.update(value)
114
+ end
115
+
116
+ #{null.inspect}
117
+ end
118
+
119
+ def Fn__Select(value)
120
+ value = {'Fn::Select' => @__value_conv__[value]}
121
+
122
+ case @__functions__
123
+ when Array
124
+ @__functions__ << value
125
+ when Hash
126
+ @__functions__.update(value)
127
+ end
128
+
129
+ #{null.inspect}
130
+ end
131
+
93
132
  def Ref(value)
94
133
  value = {'Ref' => value}
95
134
 
@@ -1,7 +1,7 @@
1
1
  module Kumogata2
2
2
  module Plugin
3
3
  class Ruby
4
- VERSION = '0.1.3'
4
+ VERSION = '0.1.4'
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,83 +1,83 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kumogata2-plugin-ruby
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
  - winebarrel
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-06-07 00:00:00.000000000 Z
11
+ date: 2017-06-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: kumogata2
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: dslh
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: 0.3.7
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: 0.3.7
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '>='
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rake
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - '>='
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - '>='
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rspec
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ~>
73
+ - - "~>"
74
74
  - !ruby/object:Gem::Version
75
75
  version: '3.0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ~>
80
+ - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: '3.0'
83
83
  description: Kumogata2 ruby plugin.
@@ -87,9 +87,9 @@ executables: []
87
87
  extensions: []
88
88
  extra_rdoc_files: []
89
89
  files:
90
- - .gitignore
91
- - .rspec
92
- - .travis.yml
90
+ - ".gitignore"
91
+ - ".rspec"
92
+ - ".travis.yml"
93
93
  - Gemfile
94
94
  - LICENSE.txt
95
95
  - README.md
@@ -111,17 +111,17 @@ require_paths:
111
111
  - lib
112
112
  required_ruby_version: !ruby/object:Gem::Requirement
113
113
  requirements:
114
- - - '>='
114
+ - - ">="
115
115
  - !ruby/object:Gem::Version
116
116
  version: '0'
117
117
  required_rubygems_version: !ruby/object:Gem::Requirement
118
118
  requirements:
119
- - - '>='
119
+ - - ">="
120
120
  - !ruby/object:Gem::Version
121
121
  version: '0'
122
122
  requirements: []
123
123
  rubyforge_project:
124
- rubygems_version: 2.0.14.1
124
+ rubygems_version: 2.6.11
125
125
  signing_key:
126
126
  specification_version: 4
127
127
  summary: Kumogata2 ruby plugin.