rggen-core 0.23.1 → 0.24.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +1 -1
- data/README.md +2 -1
- data/lib/rggen/core.rb +6 -0
- data/lib/rggen/core/builder/builder.rb +18 -10
- data/lib/rggen/core/builder/component_registry.rb +8 -9
- data/lib/rggen/core/builder/plugin_manager.rb +20 -38
- data/lib/rggen/core/builder/plugin_spec.rb +83 -0
- data/lib/rggen/core/configuration.rb +3 -2
- data/lib/rggen/core/configuration/toml_loader.rb +18 -0
- data/lib/rggen/core/dsl.rb +1 -1
- data/lib/rggen/core/facets.rb +0 -1
- data/lib/rggen/core/input_base/feature.rb +2 -2
- data/lib/rggen/core/input_base/input_data.rb +8 -4
- data/lib/rggen/core/input_base/toml_loader.rb +16 -0
- data/lib/rggen/core/input_base/yaml_loader.rb +12 -8
- data/lib/rggen/core/output_base/code_generator.rb +1 -1
- data/lib/rggen/core/plugin.rb +16 -0
- data/lib/rggen/core/register_map.rb +4 -5
- data/lib/rggen/core/register_map/toml_loader.rb +18 -0
- data/lib/rggen/core/utility/attribute_setter.rb +1 -0
- data/lib/rggen/core/version.rb +2 -4
- metadata +29 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 040113a3bef96502aae386b3aa7dafcca07af29d8881b41bfc6e17b3e0769885
|
4
|
+
data.tar.gz: 4392f0ae0bc1cd8d7422606eea73f11dffe293e29cc39250c5fd3479581dc349
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c77e46129bc726cb7afee6b21b3b31e2a692ee3fa2d99aade8eb6f6a3d1082e4f3fab1c83ff4f20afead532c521dfea6f23c8c6762a0b54ed9ab9cfbf013b484
|
7
|
+
data.tar.gz: c20b96a0be7b1f15cae6cc8b1512d05b83d8f06cb3407b34fe1731221065de3467522bdabfd74b2b5336fcc96b245a9eff191629ff58c61635b8ca77af511be1
|
data/LICENSE
CHANGED
data/README.md
CHANGED
@@ -13,6 +13,7 @@ RgGen::Core is a core library of RgGen tool and provides features listed below:
|
|
13
13
|
* Basic loaders for configuration file and register map documents
|
14
14
|
* Ruby with APIs for description
|
15
15
|
* YAML
|
16
|
+
* TOML
|
16
17
|
* JSON
|
17
18
|
* Structure and APIs for defining output file writers
|
18
19
|
* Building RgGen tool up by linking defined above features
|
@@ -43,7 +44,7 @@ Feedbacks, bug reports, questions and etc. are wellcome! You can post them by us
|
|
43
44
|
|
44
45
|
## Copyright & License
|
45
46
|
|
46
|
-
Copyright © 2017-
|
47
|
+
Copyright © 2017-2021 Taichi Ishitani. RgGen::Core is licensed under the [MIT License](https://opensource.org/licenses/MIT), see [LICENSE](LICENSE) for futher details.
|
47
48
|
|
48
49
|
## Code of Conduct
|
49
50
|
|
data/lib/rggen/core.rb
CHANGED
@@ -8,6 +8,7 @@ require 'json'
|
|
8
8
|
require 'optparse'
|
9
9
|
require 'pathname'
|
10
10
|
require 'singleton'
|
11
|
+
require 'tomlrb'
|
11
12
|
require 'yaml'
|
12
13
|
|
13
14
|
require_relative 'core/version'
|
@@ -41,6 +42,7 @@ require_relative 'core/input_base/input_data'
|
|
41
42
|
require_relative 'core/input_base/input_value_extractor'
|
42
43
|
require_relative 'core/input_base/loader'
|
43
44
|
require_relative 'core/input_base/json_loader'
|
45
|
+
require_relative 'core/input_base/toml_loader'
|
44
46
|
require_relative 'core/input_base/yaml_loader'
|
45
47
|
require_relative 'core/input_base/component'
|
46
48
|
require_relative 'core/input_base/component_factory'
|
@@ -60,6 +62,7 @@ require_relative 'core/configuration/loader'
|
|
60
62
|
require_relative 'core/configuration/ruby_loader'
|
61
63
|
require_relative 'core/configuration/hash_loader'
|
62
64
|
require_relative 'core/configuration/json_loader'
|
65
|
+
require_relative 'core/configuration/toml_loader'
|
63
66
|
require_relative 'core/configuration/yaml_loader'
|
64
67
|
require_relative 'core/configuration'
|
65
68
|
|
@@ -73,6 +76,7 @@ require_relative 'core/register_map/loader'
|
|
73
76
|
require_relative 'core/register_map/ruby_loader'
|
74
77
|
require_relative 'core/register_map/hash_loader'
|
75
78
|
require_relative 'core/register_map/json_loader'
|
79
|
+
require_relative 'core/register_map/toml_loader'
|
76
80
|
require_relative 'core/register_map/yaml_loader'
|
77
81
|
require_relative 'core/register_map'
|
78
82
|
|
@@ -95,10 +99,12 @@ require_relative 'core/builder/simple_feature_entry'
|
|
95
99
|
require_relative 'core/builder/list_feature_entry'
|
96
100
|
require_relative 'core/builder/feature_registry'
|
97
101
|
require_relative 'core/builder/layer'
|
102
|
+
require_relative 'core/builder/plugin_spec'
|
98
103
|
require_relative 'core/builder/plugin_manager'
|
99
104
|
require_relative 'core/builder/builder'
|
100
105
|
require_relative 'core/builder'
|
101
106
|
|
107
|
+
require_relative 'core/plugin'
|
102
108
|
require_relative 'core/printers'
|
103
109
|
require_relative 'core/options'
|
104
110
|
require_relative 'core/dsl'
|
@@ -15,11 +15,11 @@ module RgGen
|
|
15
15
|
attr_reader :plugin_manager
|
16
16
|
|
17
17
|
def input_component_registry(name, &body)
|
18
|
-
component_registry(:input, name, body)
|
18
|
+
component_registry(:input, name, &body)
|
19
19
|
end
|
20
20
|
|
21
21
|
def output_component_registry(name, &body)
|
22
|
-
component_registry(:output, name, body)
|
22
|
+
component_registry(:output, name, &body)
|
23
23
|
end
|
24
24
|
|
25
25
|
[
|
@@ -32,6 +32,10 @@ module RgGen
|
|
32
32
|
end
|
33
33
|
end
|
34
34
|
|
35
|
+
def register_map_layers
|
36
|
+
REGISTER_MAP_LAYERS
|
37
|
+
end
|
38
|
+
|
35
39
|
def add_feature_registry(name, target_layer, registry)
|
36
40
|
target_layers =
|
37
41
|
if target_layer
|
@@ -92,7 +96,7 @@ module RgGen
|
|
92
96
|
|
93
97
|
def_delegator :plugin_manager, :load_plugin
|
94
98
|
def_delegator :plugin_manager, :load_plugins
|
95
|
-
def_delegator :plugin_manager, :
|
99
|
+
def_delegator :plugin_manager, :register_plugin
|
96
100
|
|
97
101
|
private
|
98
102
|
|
@@ -105,26 +109,30 @@ module RgGen
|
|
105
109
|
end
|
106
110
|
end
|
107
111
|
|
112
|
+
REGISTER_MAP_LAYERS = [
|
113
|
+
:root, :register_block, :register_file, :register, :bit_field
|
114
|
+
].freeze
|
115
|
+
|
116
|
+
ALL_LAYERS = [
|
117
|
+
:global, *REGISTER_MAP_LAYERS
|
118
|
+
].freeze
|
119
|
+
|
108
120
|
def initialize_layers
|
109
121
|
@layers = Hash.new do |_, layer_name|
|
110
122
|
raise BuilderError.new("unknown layer: #{layer_name}")
|
111
123
|
end
|
112
|
-
[
|
113
|
-
:global, :root, :register_block, :register_file, :register, :bit_field
|
114
|
-
].each do |layer|
|
115
|
-
@layers[layer] = Layer.new(layer)
|
116
|
-
end
|
124
|
+
ALL_LAYERS.each { |layer| @layers[layer] = Layer.new(layer) }
|
117
125
|
end
|
118
126
|
|
119
127
|
COMPONENT_REGISTRIES = {
|
120
128
|
input: InputComponentRegistry, output: OutputComponentRegistry
|
121
129
|
}.freeze
|
122
130
|
|
123
|
-
def component_registry(type, name, body)
|
131
|
+
def component_registry(type, name, &body)
|
124
132
|
registries = @component_registries[type]
|
125
133
|
klass = COMPONENT_REGISTRIES[type]
|
126
134
|
registries.key?(name) || (registries[name] = klass.new(name, self))
|
127
|
-
Docile.dsl_eval(registries[name], &body)
|
135
|
+
block_given? && Docile.dsl_eval(registries[name], &body) || registries[name]
|
128
136
|
end
|
129
137
|
end
|
130
138
|
end
|
@@ -11,22 +11,22 @@ module RgGen
|
|
11
11
|
end
|
12
12
|
|
13
13
|
def register_component(layers = nil, &block)
|
14
|
-
|
15
|
-
|
16
|
-
@entries << create_new_entry(layer, block)
|
17
|
-
end
|
18
|
-
else
|
19
|
-
@entries << create_new_entry(nil, block)
|
14
|
+
Array(layers || @builder.register_map_layers).each do |layer|
|
15
|
+
@entries << create_new_entry(layer, &block)
|
20
16
|
end
|
21
17
|
end
|
22
18
|
|
19
|
+
def register_global_component(&block)
|
20
|
+
@entries << create_new_entry(nil, &block)
|
21
|
+
end
|
22
|
+
|
23
23
|
def build_factory
|
24
24
|
build_factories.first.tap(&:root_factory)
|
25
25
|
end
|
26
26
|
|
27
27
|
private
|
28
28
|
|
29
|
-
def create_new_entry(layer, block)
|
29
|
+
def create_new_entry(layer, &block)
|
30
30
|
entry = ComponentEntry.new(@component_name, layer)
|
31
31
|
Docile.dsl_eval(entry, layer, &block)
|
32
32
|
add_feature_registry(layer, entry.feature_registry)
|
@@ -35,8 +35,7 @@ module RgGen
|
|
35
35
|
|
36
36
|
def add_feature_registry(layer, feature_registry)
|
37
37
|
feature_registry &&
|
38
|
-
@builder
|
39
|
-
.add_feature_registry(@component_name, layer, feature_registry)
|
38
|
+
@builder.add_feature_registry(@component_name, layer, feature_registry)
|
40
39
|
end
|
41
40
|
|
42
41
|
def build_factories
|
@@ -3,46 +3,22 @@
|
|
3
3
|
module RgGen
|
4
4
|
module Core
|
5
5
|
module Builder
|
6
|
-
class
|
7
|
-
DEFAULT_PLUGIN_VERSION = '0.0.0'
|
8
|
-
|
6
|
+
class PluginRegistry
|
9
7
|
def initialize(plugin_module, &block)
|
10
8
|
@plugin_module = plugin_module
|
11
9
|
@block = block
|
12
|
-
plugin_name # check if plugin name is given
|
13
10
|
end
|
14
11
|
|
15
12
|
def default_setup(builder)
|
16
|
-
@plugin_module.
|
17
|
-
@plugin_module.default_setup(builder)
|
13
|
+
@plugin_module.plugin_spec.activate(builder)
|
18
14
|
end
|
19
15
|
|
20
16
|
def optional_setup(builder)
|
21
17
|
@block && @plugin_module.instance_exec(builder, &@block)
|
22
18
|
end
|
23
19
|
|
24
|
-
def plugin_name
|
25
|
-
if @plugin_module.const_defined?(:PLUGIN_NAME)
|
26
|
-
@plugin_module.const_get(:PLUGIN_NAME)
|
27
|
-
elsif @plugin_module.respond_to?(:plugin_name)
|
28
|
-
@plugin_module.plugin_name
|
29
|
-
else
|
30
|
-
raise Core::PluginError.new('no plugin name is given')
|
31
|
-
end
|
32
|
-
end
|
33
|
-
|
34
|
-
def version
|
35
|
-
if @plugin_module.const_defined?(:VERSION)
|
36
|
-
@plugin_module.const_get(:VERSION)
|
37
|
-
elsif @plugin_module.respond_to?(:version)
|
38
|
-
@plugin_module.version
|
39
|
-
else
|
40
|
-
DEFAULT_PLUGIN_VERSION
|
41
|
-
end
|
42
|
-
end
|
43
|
-
|
44
20
|
def version_info
|
45
|
-
|
21
|
+
@plugin_module.plugin_spec.version_info
|
46
22
|
end
|
47
23
|
end
|
48
24
|
|
@@ -65,13 +41,14 @@ module RgGen
|
|
65
41
|
|
66
42
|
def load_plugins(plugins, no_default_plugins, activation = true)
|
67
43
|
RgGen.builder(@builder)
|
68
|
-
merge_plugins(plugins, no_default_plugins)
|
69
|
-
.each { |plugin| load_plugin(*plugin) }
|
44
|
+
merge_plugins(plugins, no_default_plugins).each(&method(:load_plugin))
|
70
45
|
activation && activate_plugins
|
71
46
|
end
|
72
47
|
|
73
|
-
def
|
74
|
-
|
48
|
+
def register_plugin(plugin_module, &block)
|
49
|
+
plugin?(plugin_module) ||
|
50
|
+
(raise Core::PluginError.new('no plugin spec is given'))
|
51
|
+
@plugins << PluginRegistry.new(plugin_module, &block)
|
75
52
|
end
|
76
53
|
|
77
54
|
def activate_plugins(**options)
|
@@ -95,18 +72,19 @@ module RgGen
|
|
95
72
|
def get_setup_path(name)
|
96
73
|
base, sub_directory = name.split('/', 2)
|
97
74
|
base = base.sub(/^rggen[-_]/, '').tr('-', '_')
|
98
|
-
File.join(*[
|
99
|
-
'rggen', base, sub_directory || '', 'setup'
|
100
|
-
].reject(&:empty?))
|
75
|
+
File.join(*['rggen', base, sub_directory, 'setup'].compact)
|
101
76
|
end
|
102
77
|
|
103
78
|
def read_setup_file(setup_path, setup_path_or_name)
|
104
79
|
require setup_path
|
105
80
|
rescue ::LoadError
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
81
|
+
message =
|
82
|
+
if setup_path_or_name == setup_path
|
83
|
+
"cannot load such plugin: #{setup_path_or_name}"
|
84
|
+
else
|
85
|
+
"cannot load such plugin: #{setup_path_or_name} (#{setup_path})"
|
86
|
+
end
|
87
|
+
raise Core::PluginError.new(message)
|
110
88
|
end
|
111
89
|
|
112
90
|
def merge_plugins(plugins, no_default_plugins)
|
@@ -134,6 +112,10 @@ module RgGen
|
|
134
112
|
ENV['RGGEN_PLUGINS']
|
135
113
|
&.split(':')&.map(&:strip)&.reject(&:empty?)
|
136
114
|
end
|
115
|
+
|
116
|
+
def plugin?(plugin_module)
|
117
|
+
plugin_module.respond_to?(:plugin_spec) && plugin_module.plugin_spec
|
118
|
+
end
|
137
119
|
end
|
138
120
|
end
|
139
121
|
end
|
@@ -0,0 +1,83 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module RgGen
|
4
|
+
module Core
|
5
|
+
module Builder
|
6
|
+
class PluginSpec
|
7
|
+
def initialize(name, plugin_module)
|
8
|
+
@name = name
|
9
|
+
@plugin_module = plugin_module
|
10
|
+
@component_registrations = []
|
11
|
+
@loader_registrations = []
|
12
|
+
@files = []
|
13
|
+
end
|
14
|
+
|
15
|
+
def version(value = nil)
|
16
|
+
@version = value if value
|
17
|
+
version_value
|
18
|
+
end
|
19
|
+
|
20
|
+
def version_info
|
21
|
+
"#{@name} #{version}"
|
22
|
+
end
|
23
|
+
|
24
|
+
def register_component(component, layers = nil, &body)
|
25
|
+
@component_registrations << [component, layers, body]
|
26
|
+
end
|
27
|
+
|
28
|
+
def register_loader(component, loader_type, loader)
|
29
|
+
@loader_registrations << [component, loader_type, loader]
|
30
|
+
end
|
31
|
+
|
32
|
+
def register_loaders(component, loader_type, loaders)
|
33
|
+
Array(loaders)
|
34
|
+
.each { |loader| register_loader(component, loader_type, loader) }
|
35
|
+
end
|
36
|
+
|
37
|
+
def register_files(files)
|
38
|
+
root = File.dirname(caller_locations(1, 1).first.path)
|
39
|
+
files.each { |file| @files << File.join(root, file) }
|
40
|
+
end
|
41
|
+
|
42
|
+
alias_method :files, :register_files
|
43
|
+
|
44
|
+
def activate(builder)
|
45
|
+
activate_components(builder)
|
46
|
+
activate_loaders(builder)
|
47
|
+
load_files
|
48
|
+
end
|
49
|
+
|
50
|
+
private
|
51
|
+
|
52
|
+
DEFAULT_VERSION = '0.0.0'
|
53
|
+
|
54
|
+
def version_value
|
55
|
+
@version || const_version || DEFAULT_VERSION
|
56
|
+
end
|
57
|
+
|
58
|
+
def const_version
|
59
|
+
@plugin_module.const_defined?(:VERSION) &&
|
60
|
+
@plugin_module.const_get(:VERSION)
|
61
|
+
end
|
62
|
+
|
63
|
+
def activate_components(builder)
|
64
|
+
@component_registrations.each do |component, layers, body|
|
65
|
+
builder
|
66
|
+
.output_component_registry(component)
|
67
|
+
.register_component(layers, &body)
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
def activate_loaders(builder)
|
72
|
+
@loader_registrations.each do |component, loader_type, loader|
|
73
|
+
builder.register_loader(component, loader_type, loader)
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
def load_files
|
78
|
+
@files.each(&method(:require))
|
79
|
+
end
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
@@ -5,14 +5,15 @@ module RgGen
|
|
5
5
|
module Configuration
|
6
6
|
def self.setup(builder)
|
7
7
|
builder.input_component_registry(:configuration) do
|
8
|
-
|
8
|
+
register_global_component do
|
9
9
|
component Component, ComponentFactory
|
10
10
|
feature Feature, FeatureFactory
|
11
11
|
end
|
12
12
|
|
13
13
|
register_loader :ruby, RubyLoader
|
14
|
-
register_loader :yaml, YAMLLoader
|
15
14
|
register_loader :json, JSONLoader
|
15
|
+
register_loader :toml, TOMLLoader
|
16
|
+
register_loader :yaml, YAMLLoader
|
16
17
|
end
|
17
18
|
end
|
18
19
|
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module RgGen
|
4
|
+
module Core
|
5
|
+
module Configuration
|
6
|
+
class TOMLLoader < Loader
|
7
|
+
include HashLoader
|
8
|
+
include InputBase::TOMLLoader
|
9
|
+
|
10
|
+
support_types [:toml]
|
11
|
+
|
12
|
+
def read_file(file)
|
13
|
+
load_toml(file)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
data/lib/rggen/core/dsl.rb
CHANGED
data/lib/rggen/core/facets.rb
CHANGED
@@ -149,8 +149,8 @@ module RgGen
|
|
149
149
|
end
|
150
150
|
|
151
151
|
def do_verify(scope)
|
152
|
-
|
153
|
-
|
152
|
+
self.class.verifiers&.[](scope)
|
153
|
+
&.each { |verifier| verifier.verify(self) }
|
154
154
|
(@verified ||= {})[scope] = true
|
155
155
|
end
|
156
156
|
|
@@ -51,9 +51,9 @@ module RgGen
|
|
51
51
|
end
|
52
52
|
|
53
53
|
def load_file(file)
|
54
|
-
build_by_block(
|
55
|
-
|
56
|
-
|
54
|
+
build_by_block(instance_eval(<<~BODY, file, 1))
|
55
|
+
-> { #{File.binread(file)} } # -> { File.binread(file) }
|
56
|
+
BODY
|
57
57
|
end
|
58
58
|
|
59
59
|
private
|
@@ -79,7 +79,11 @@ module RgGen
|
|
79
79
|
|
80
80
|
def position_from_caller
|
81
81
|
locations = caller_locations(3, 2)
|
82
|
-
locations[0]
|
82
|
+
include_docile_path?(locations[0]) && locations[1] || locations[0]
|
83
|
+
end
|
84
|
+
|
85
|
+
def include_docile_path?(caller_location)
|
86
|
+
caller_location.path.include?('docile')
|
83
87
|
end
|
84
88
|
|
85
89
|
def create_child_data(layer, &block)
|
@@ -25,16 +25,20 @@ module RgGen
|
|
25
25
|
end
|
26
26
|
|
27
27
|
def symbolize_keys(result)
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
elsif result.is_a? Array
|
33
|
-
result.map(&method(:symbolize_keys))
|
34
|
-
else
|
35
|
-
result
|
28
|
+
case result
|
29
|
+
when Hash then symbolize_hash(result)
|
30
|
+
when Array then symbolize_array(result)
|
31
|
+
else result
|
36
32
|
end
|
37
33
|
end
|
34
|
+
|
35
|
+
def symbolize_hash(result)
|
36
|
+
result.map { |key, value| [key.to_sym, symbolize_keys(value)] }.to_h
|
37
|
+
end
|
38
|
+
|
39
|
+
def symbolize_array(result)
|
40
|
+
result.map(&method(:symbolize_keys))
|
41
|
+
end
|
38
42
|
end
|
39
43
|
|
40
44
|
def load_yaml(file)
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module RgGen
|
4
|
+
module Core
|
5
|
+
module Plugin
|
6
|
+
attr_reader :plugin_spec
|
7
|
+
|
8
|
+
private
|
9
|
+
|
10
|
+
def setup_plugin(name)
|
11
|
+
@plugin_spec = Builder::PluginSpec.new(name, self)
|
12
|
+
block_given? && yield(@plugin_spec)
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -5,16 +5,15 @@ module RgGen
|
|
5
5
|
module RegisterMap
|
6
6
|
def self.setup(builder)
|
7
7
|
builder.input_component_registry(:register_map) do
|
8
|
-
register_component
|
9
|
-
:root, :register_block, :register_file, :register, :bit_field
|
10
|
-
] do |layer|
|
8
|
+
register_component do
|
11
9
|
component Component, ComponentFactory
|
12
|
-
feature Feature, FeatureFactory
|
10
|
+
feature Feature, FeatureFactory
|
13
11
|
end
|
14
12
|
|
15
13
|
register_loader :ruby, RubyLoader
|
16
|
-
register_loader :yaml, YAMLLoader
|
17
14
|
register_loader :json, JSONLoader
|
15
|
+
register_loader :toml, TOMLLoader
|
16
|
+
register_loader :yaml, YAMLLoader
|
18
17
|
end
|
19
18
|
end
|
20
19
|
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module RgGen
|
4
|
+
module Core
|
5
|
+
module RegisterMap
|
6
|
+
class TOMLLoader < Loader
|
7
|
+
include HashLoader
|
8
|
+
include InputBase::TOMLLoader
|
9
|
+
|
10
|
+
support_types [:toml]
|
11
|
+
|
12
|
+
def read_file(file)
|
13
|
+
load_toml(file)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
data/lib/rggen/core/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rggen-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.24.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Taichi Ishitani
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-01-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: docile
|
@@ -17,6 +17,9 @@ dependencies:
|
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 1.1.5
|
20
|
+
- - "!="
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 1.3.3
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -24,6 +27,9 @@ dependencies:
|
|
24
27
|
- - ">="
|
25
28
|
- !ruby/object:Gem::Version
|
26
29
|
version: 1.1.5
|
30
|
+
- - "!="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 1.3.3
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: erubi
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -52,6 +58,20 @@ dependencies:
|
|
52
58
|
- - ">="
|
53
59
|
- !ruby/object:Gem::Version
|
54
60
|
version: '3.0'
|
61
|
+
- !ruby/object:Gem::Dependency
|
62
|
+
name: tomlrb
|
63
|
+
requirement: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - ">="
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '2.0'
|
68
|
+
type: :runtime
|
69
|
+
prerelease: false
|
70
|
+
version_requirements: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - ">="
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '2.0'
|
55
75
|
- !ruby/object:Gem::Dependency
|
56
76
|
name: bundler
|
57
77
|
requirement: !ruby/object:Gem::Requirement
|
@@ -99,6 +119,7 @@ files:
|
|
99
119
|
- lib/rggen/core/builder/loader_registry.rb
|
100
120
|
- lib/rggen/core/builder/output_component_registry.rb
|
101
121
|
- lib/rggen/core/builder/plugin_manager.rb
|
122
|
+
- lib/rggen/core/builder/plugin_spec.rb
|
102
123
|
- lib/rggen/core/builder/simple_feature_entry.rb
|
103
124
|
- lib/rggen/core/cli.rb
|
104
125
|
- lib/rggen/core/configuration.rb
|
@@ -112,6 +133,7 @@ files:
|
|
112
133
|
- lib/rggen/core/configuration/json_loader.rb
|
113
134
|
- lib/rggen/core/configuration/loader.rb
|
114
135
|
- lib/rggen/core/configuration/ruby_loader.rb
|
136
|
+
- lib/rggen/core/configuration/toml_loader.rb
|
115
137
|
- lib/rggen/core/configuration/yaml_loader.rb
|
116
138
|
- lib/rggen/core/core_extensions/object.rb
|
117
139
|
- lib/rggen/core/dsl.rb
|
@@ -129,6 +151,7 @@ files:
|
|
129
151
|
- lib/rggen/core/input_base/json_loader.rb
|
130
152
|
- lib/rggen/core/input_base/loader.rb
|
131
153
|
- lib/rggen/core/input_base/property.rb
|
154
|
+
- lib/rggen/core/input_base/toml_loader.rb
|
132
155
|
- lib/rggen/core/input_base/verifier.rb
|
133
156
|
- lib/rggen/core/input_base/yaml_loader.rb
|
134
157
|
- lib/rggen/core/options.rb
|
@@ -141,6 +164,7 @@ files:
|
|
141
164
|
- lib/rggen/core/output_base/file_writer.rb
|
142
165
|
- lib/rggen/core/output_base/raise_error.rb
|
143
166
|
- lib/rggen/core/output_base/template_engine.rb
|
167
|
+
- lib/rggen/core/plugin.rb
|
144
168
|
- lib/rggen/core/printers.rb
|
145
169
|
- lib/rggen/core/register_map.rb
|
146
170
|
- lib/rggen/core/register_map/component.rb
|
@@ -153,6 +177,7 @@ files:
|
|
153
177
|
- lib/rggen/core/register_map/json_loader.rb
|
154
178
|
- lib/rggen/core/register_map/loader.rb
|
155
179
|
- lib/rggen/core/register_map/ruby_loader.rb
|
180
|
+
- lib/rggen/core/register_map/toml_loader.rb
|
156
181
|
- lib/rggen/core/register_map/yaml_loader.rb
|
157
182
|
- lib/rggen/core/utility/attribute_setter.rb
|
158
183
|
- lib/rggen/core/utility/code_utility.rb
|
@@ -186,8 +211,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
186
211
|
- !ruby/object:Gem::Version
|
187
212
|
version: '0'
|
188
213
|
requirements: []
|
189
|
-
rubygems_version: 3.
|
214
|
+
rubygems_version: 3.2.3
|
190
215
|
signing_key:
|
191
216
|
specification_version: 4
|
192
|
-
summary: rggen-core-0.
|
217
|
+
summary: rggen-core-0.24.0
|
193
218
|
test_files: []
|