kumogata2-plugin-ruby 0.1.6 → 0.1.7

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
- SHA1:
3
- metadata.gz: 1b8a4fa935be29ac1295c97e35ac587c3816a212
4
- data.tar.gz: d912c40aeec8f0b374fae0e07f185e067e349f2b
2
+ SHA256:
3
+ metadata.gz: 606b2235daf7c9028cff0259ef7fd3297cc2eb567414354fd6724c3f142ebf3c
4
+ data.tar.gz: fd17eab5396fa88b1729de5825eceffa6d79e314519feb9157a3d0ec0e860ef5
5
5
  SHA512:
6
- metadata.gz: 6d798b1a6505c1b22d25a5abb27e940651880c30a8d93abaf76841b003a544aa1b3ba1b8864a19b9b14d860e0e98ceaf4ebba1005e30af43d3b3d01359e854f6
7
- data.tar.gz: da4b4c61413d3f02a7a0259cdfd81dadd15da30fc0c1608af6c6ca721f58be71025f2881c4ec3fb0379c7d8a47c70b624ac958808148965bf25754888c6eb327
6
+ metadata.gz: 1b05dc74365c2d55575de6a5873e4861a4271e695479a2ea5b514bcf1c536e4240f5ccc0229e2ac4cdba4e244c21a67abac065ed494368d81c24ec11d5ef47d1
7
+ data.tar.gz: e1b20eb32364d0baedbfb20f9803c8d6705078e879c084370ae33807ed33edf3a21fc1b5aa4f310af09d1b7d69151e22f734a111008921aaec0bc8ef607ddb54
data/.travis.yml CHANGED
@@ -1,4 +1,9 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.2.4
4
- before_install: gem install bundler -v 1.11.2
3
+ - 2.3.0
4
+ - 2.4.4
5
+ - 2.5.1
6
+ before_install:
7
+ - gem install bundler
8
+ script:
9
+ - bundle exec rake
data/README.md CHANGED
@@ -1,10 +1,12 @@
1
1
  # kumogata2-plugin-ruby
2
2
 
3
- It is the Ruby plug-in of [Kumogata2](https://github.com/winebarrel/kumogata2).
3
+ It is the Ruby plug-in of [Kumogata2](https://github.com/kumogata/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)
7
+ [![Gem Version](https://badge.fury.io/rb/kumogata2-plugin-ruby.svg)](http://badge.fury.io/rb/kumogata2-plugin-ruby)
8
+ [![Build Status](https://travis-ci.org/kumogata/kumogata2-plugin-ruby.svg?branch=master)](https://travis-ci.org/kumogata/kumogata2-plugin-ruby)
9
+
8
10
 
9
11
  ## Installation
10
12
 
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
10
10
  spec.email = ['sgwr_dts@yahoo.co.jp']
11
11
 
12
12
  spec.summary = %q{Kumogata2 ruby plugin.}
13
- spec.description = %q{Kumogata2 ruby plugin.}
13
+ spec.description = %q{It is the Ruby plug-in of Kumogata2. It convert the Ruby DSL to JSON.}
14
14
  spec.homepage = 'https://github.com/winebarrel/kumogata2-plugin-ruby'
15
15
  spec.license = 'MIT'
16
16
 
@@ -19,10 +19,10 @@ Gem::Specification.new do |spec|
19
19
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
20
20
  spec.require_paths = ['lib']
21
21
 
22
- spec.add_dependency 'kumogata2'
23
- spec.add_dependency 'dslh', '>= 0.3.7'
22
+ spec.add_dependency 'kumogata2', '~> 0.1'
23
+ spec.add_dependency 'dslh', '~> 0.4'
24
24
 
25
- spec.add_development_dependency 'bundler'
26
- spec.add_development_dependency 'rake'
25
+ spec.add_development_dependency 'bundler', '~> 1.16'
26
+ spec.add_development_dependency 'rake', '~> 12.3'
27
27
  spec.add_development_dependency 'rspec', '~> 3.0'
28
28
  end
@@ -7,12 +7,11 @@ class Kumogata2::Plugin::Ruby::Context
7
7
 
8
8
  def template(&block)
9
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
10
+ k.to_s.
11
+ gsub('__', '::').
12
+ gsub('___', ':').
13
+ gsub('____', '.').
14
+ gsub('_____', '-')
16
15
  end
17
16
 
18
17
  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.6'
4
+ VERSION = '0.1.7'
5
5
  end
6
6
  end
7
7
  end
@@ -16,8 +16,8 @@ class Kumogata2::Plugin::Ruby
16
16
  def parse(str)
17
17
  context = Kumogata2::Plugin::Ruby::Context.new(@options)
18
18
  context.instance_eval(str, @options.path_or_url)
19
- @post = context.instance_variable_get(:@_post)
20
- context.instance_variable_get(:@_template)
19
+ @post = context.instance_variable_get(:@_post) if context.instance_variable_defined? :@_post
20
+ context.instance_variable_get(:@_template) if context.instance_variable_defined? :@_template
21
21
  end
22
22
 
23
23
  def dump(hash)
@@ -34,11 +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
38
- k.gsub!('____', '-')
39
- k.gsub!('___', '.')
40
- k.gsub!('__', '::')
41
- k.gsub!('_', ':')
37
+ k = k.to_s.
38
+ gsub('::', '__').
39
+ gsub(':', '___').
40
+ gsub('.', '____').
41
+ gsub('-', '_____')
42
42
  k !~ /\A[_a-z]\w+\Z/i and k !~ %r|\A/\S*\Z|
43
43
  end
44
44
 
@@ -54,10 +54,10 @@ class Kumogata2::Plugin::Ruby
54
54
  end
55
55
  end
56
56
  else
57
- k.gsub('-', '____')
58
- k.gsub('.', '___')
59
- k.gsub('::', '__')
60
- k.gsub(':', '_')
57
+ k.gsub('::', '__').
58
+ gsub(':', '___').
59
+ gsub('.', '____').
60
+ gsub('-', '_____')
61
61
  end
62
62
  end
63
63
 
metadata CHANGED
@@ -1,71 +1,71 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kumogata2-plugin-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - winebarrel
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-08-16 00:00:00.000000000 Z
11
+ date: 2018-08-23 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
- version: '0'
19
+ version: '0.1'
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
- version: '0'
26
+ version: '0.1'
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
- version: 0.3.7
33
+ version: '0.4'
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
- version: 0.3.7
40
+ version: '0.4'
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
- version: '0'
47
+ version: '1.16'
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
- version: '0'
54
+ version: '1.16'
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
- version: '0'
61
+ version: '12.3'
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
- version: '0'
68
+ version: '12.3'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rspec
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -80,7 +80,7 @@ dependencies:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: '3.0'
83
- description: Kumogata2 ruby plugin.
83
+ description: It is the Ruby plug-in of Kumogata2. It convert the Ruby DSL to JSON.
84
84
  email:
85
85
  - sgwr_dts@yahoo.co.jp
86
86
  executables: []
@@ -121,7 +121,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
121
121
  version: '0'
122
122
  requirements: []
123
123
  rubyforge_project:
124
- rubygems_version: 2.6.11
124
+ rubygems_version: 2.7.6
125
125
  signing_key:
126
126
  specification_version: 4
127
127
  summary: Kumogata2 ruby plugin.