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 +4 -4
- data/README.md +1 -1
- data/lib/rggen.rb +1 -1
- data/lib/rggen/core_components/erb_engine.rb +2 -2
- data/lib/rggen/core_extensions/forwardable.rb +1 -1
- data/lib/rggen/output_base/file_writer.rb +2 -2
- data/lib/rggen/version.rb +2 -2
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 20beeb2048043f8dfa8ec05a4392ecd6173f74cf5471a7d05eb035add5aa69e2
|
4
|
+
data.tar.gz: 3e9c20a409bb47740dc3aa1656118a7eea2e8cb6157f516b664cde097e6008ce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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
@@ -5,11 +5,11 @@ module RgGen
|
|
5
5
|
end
|
6
6
|
|
7
7
|
def parse_template(path)
|
8
|
-
|
8
|
+
Erubi::Engine.new(File.read(path), filename: path)
|
9
9
|
end
|
10
10
|
|
11
11
|
def render(context, template)
|
12
|
-
template.
|
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.
|
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 =
|
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.
|
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
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.
|
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-
|
11
|
+
date: 2018-12-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: erubi
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
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: '
|
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.
|
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.
|
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.
|