rggen 0.6.4 → 0.7.0

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
  SHA256:
3
- metadata.gz: 1f61240cfbeb4ebe1bbb00e32effe4040e5e28eeacbab223751ad3539ce28f99
4
- data.tar.gz: 6ae29730329fcbdda7d86185b20f802bced62a6cfb74f6aa7a014e426bf5c4f0
3
+ metadata.gz: 20beeb2048043f8dfa8ec05a4392ecd6173f74cf5471a7d05eb035add5aa69e2
4
+ data.tar.gz: 3e9c20a409bb47740dc3aa1656118a7eea2e8cb6157f516b664cde097e6008ce
5
5
  SHA512:
6
- metadata.gz: b1b1f1ddd3f63ad88e263222456e4ca092c6a2277cfd09a2ef3ee7095c37a4b9e7d15eb7cd755ac9e53809d50fefe4614f32ff93a83e9fbc9e8bcb2f687c1bbe
7
- data.tar.gz: 6ddf34310aef40ce34903c152e857b8cf339b5ad8ec382f11bd42d4b23c51d1a9f2b6e72c8c52fa0a39decad994dd3458d103a4a49a2ca849a5cc71b608cfa4f
6
+ metadata.gz: 03b65d9feca8599c006694414a6e6c8e1dfc298e13b417e2be122dbfbb167f20dedc0f7f17ab9ef22169d19a1b6863b6af52fe7280a53d69b6de2ce1db641e4f
7
+ data.tar.gz: cbd1c1b53b90398a6bd1196cb7d123347adcddf0982d166938a977dc40db4c4f549bc91581126a05a7bc8e40a2144c11075d56d5e014243b93ec3e99d22be4b0
data/README.md CHANGED
@@ -13,7 +13,7 @@ Also RgGen is customizable so you can build your specific generate tool.
13
13
 
14
14
  ## Ruby
15
15
 
16
- RgGen is written in the [*Ruby*](https://www.ruby-lang.org/en/about/) programing language and supports version 2.0 or later.
16
+ RgGen is written in the [*Ruby*](https://www.ruby-lang.org/en/about/) programing language and supports version 2.3 or later.
17
17
  If you don't have above version of Ruby, you need to install the Ruby at first.
18
18
  To install the Ruby, see [this page](https://www.ruby-lang.org/en/downloads/).
19
19
 
data/lib/rggen.rb CHANGED
@@ -3,7 +3,7 @@ module RgGen
3
3
  require 'singleton'
4
4
  require 'pathname'
5
5
  require 'optparse'
6
- require 'baby_erubis'
6
+ require 'erubi'
7
7
 
8
8
  require_relative 'rggen/version'
9
9
  require_relative 'rggen/rggen_home'
@@ -5,11 +5,11 @@ module RgGen
5
5
  end
6
6
 
7
7
  def parse_template(path)
8
- BabyErubis::Text.new.from_str(File.read(path), path)
8
+ Erubi::Engine.new(File.read(path), filename: path)
9
9
  end
10
10
 
11
11
  def render(context, template)
12
- template.render(context)
12
+ context.instance_eval(template.src, template.filename, 1)
13
13
  end
14
14
  end
15
15
  end
@@ -24,7 +24,7 @@ module SingleForwardable
24
24
  end
25
25
  end
26
26
 
27
- if ['2.2.5', '2.2.6', '2.3.1'].include?(RUBY_VERSION)
27
+ if ['2.3.1'].include?(RUBY_VERSION)
28
28
  # https://bugs.ruby-lang.org/issues/12478
29
29
  def def_single_delegator(accessor, method, ali = method)
30
30
  accessor = accessor.to_s
@@ -2,7 +2,7 @@ module RgGen
2
2
  module OutputBase
3
3
  class FileWriter
4
4
  def initialize(pattern, body)
5
- @pattern = BabyErubis::Text.new.from_str(pattern)
5
+ @pattern = Erubi::Engine.new(pattern)
6
6
  @body = body
7
7
  end
8
8
 
@@ -17,7 +17,7 @@ module RgGen
17
17
 
18
18
  def generate_path(context, output_directory)
19
19
  [
20
- *Array(output_directory), @pattern.render(context)
20
+ *Array(output_directory), context.instance_eval(@pattern.src)
21
21
  ].map(&:to_s).reject(&:empty?).to_path
22
22
  end
23
23
 
data/lib/rggen/version.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  module RgGen
2
2
  MAJOR = 0
3
- MINOR = 6
4
- TEENY = 4
3
+ MINOR = 7
4
+ TEENY = 0
5
5
  VERSION = "#{MAJOR}.#{MINOR}.#{TEENY}".freeze
6
6
  end
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rggen
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.4
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Taichi Ishitani
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-02-09 00:00:00.000000000 Z
11
+ date: 2018-12-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: baby_erubis
14
+ name: erubi
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '2.0'
19
+ version: '1.7'
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: '2.0'
26
+ version: '1.7'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: facets
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -334,7 +334,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
334
334
  requirements:
335
335
  - - ">="
336
336
  - !ruby/object:Gem::Version
337
- version: '2.2'
337
+ version: '2.3'
338
338
  required_rubygems_version: !ruby/object:Gem::Requirement
339
339
  requirements:
340
340
  - - ">="
@@ -342,7 +342,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
342
342
  version: '0'
343
343
  requirements: []
344
344
  rubyforge_project:
345
- rubygems_version: 2.7.3
345
+ rubygems_version: 2.7.6
346
346
  signing_key:
347
347
  specification_version: 4
348
348
  summary: Code generation tool for control registers in a SoC design.