rgen 0.10.0 → 0.10.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +9 -1
- data/Project.yaml +6 -6
- data/lib/rgen/ecore/ecore_to_ruby.rb +1 -1
- data/lib/rgen/template_language/template_container.rb +1 -1
- data/test/array_extensions_test.rb +1 -1
- data/test/ea_instantiator_test.rb +1 -1
- data/test/ea_serializer_test.rb +1 -1
- data/test/ecore_self_test.rb +1 -1
- data/test/ecore_to_ruby_test.rb +1 -1
- data/test/environment_test.rb +1 -1
- data/test/json_test.rb +1 -1
- data/test/metamodel_builder_test.rb +6 -5
- data/test/metamodel_order_test.rb +1 -1
- data/test/metamodel_roundtrip_test.rb +1 -1
- data/test/method_delegation_test.rb +1 -1
- data/test/model_builder/builder_context_test.rb +1 -1
- data/test/model_builder/builder_test.rb +1 -1
- data/test/model_builder/reference_resolver_test.rb +1 -1
- data/test/model_builder/serializer_test.rb +1 -1
- data/test/model_fragment_test.rb +1 -1
- data/test/output_handler_test.rb +1 -1
- data/test/qualified_name_provider_test.rb +1 -1
- data/test/qualified_name_resolver_test.rb +1 -1
- data/test/reference_resolver_test.rb +1 -1
- data/test/template_language_test.rb +1 -1
- data/test/transformer_test.rb +1 -1
- data/test/util/file_cache_map_test.rb +1 -1
- data/test/util/pattern_matcher_test.rb +1 -1
- data/test/xml_instantiator_test.rb +1 -1
- metadata +40 -22
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 96344b29d7c6d46b4301287f9d3c21d70d985ee4
|
4
|
+
data.tar.gz: 03c20ad4e81aff6bc1b9dc6e11fe3cc3d961fbfe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3123e149f308ce0a9cea45e4c1d253bd23227bb30a9b3c8057c75a296dfa7fd0cb637ee94944b3a5edf0d21765ec2f31b49af220504f0c420643f86e5da7db59
|
7
|
+
data.tar.gz: ad09dd2f55dbefef661416567bbb82e0f8f48c0f86ce5bf2ff9e458cc098de2f8069aa4cda8f7dcceb7b9ecf416fccbc5662ee515dc6b89403c1722a748c58fa
|
data/CHANGELOG
CHANGED
data/Project.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
name: rgen
|
2
2
|
gemspec: rgen.gemspec
|
3
3
|
git: https://github.com/mthiede/rgen.git
|
4
|
-
version: 0.10.
|
4
|
+
version: 0.10.2
|
5
5
|
summary: Ruby Modelling and Generator Framework
|
6
6
|
email: martin dot thiede at gmx de
|
7
7
|
homepage: http://ruby-gen.org
|
@@ -15,8 +15,8 @@ exclude_files: ['**/*.bak']
|
|
15
15
|
encrypt_sources: false
|
16
16
|
dependencies:
|
17
17
|
https://rubygems.org:
|
18
|
-
- {name: nokogiri, version: ['>= 1.
|
19
|
-
- {name: rake, version: '
|
20
|
-
- {name: minitest, version: ['
|
21
|
-
- {name: minitest-fail-fast, version: '
|
22
|
-
- {name: andand, version: '1.3.3',
|
18
|
+
- {name: nokogiri, version: ['>= 1.15.4', '< 1.16'], development: true}
|
19
|
+
- {name: rake, version: ['>= 13.0.0', '< 14.0'], development: true}
|
20
|
+
- {name: minitest, version: ['>= 5.20.0', '< 6.0'], development: true}
|
21
|
+
- {name: minitest-fail-fast, version: ['>= 0.1.0', '< 0.2'], development: true}
|
22
|
+
- {name: andand, version: ['>= 1.3.3', '< 1.4'], development: true}
|
@@ -29,7 +29,7 @@ module RGen
|
|
29
29
|
@@metamodels = @metamodels
|
30
30
|
fileContent = f.read
|
31
31
|
_detectNewLinePattern(fileContent)
|
32
|
-
ERB.new(fileContent, eoutvar:'@output').result(binding)
|
32
|
+
ERB.new(fileContent, eoutvar: '@output').result(binding)
|
33
33
|
rescue Exception => e
|
34
34
|
processAndRaise(e)
|
35
35
|
end
|
@@ -3,7 +3,7 @@ $:.unshift File.join(File.dirname(__FILE__),"..","lib")
|
|
3
3
|
require 'minitest/autorun'
|
4
4
|
require 'rgen/array_extensions'
|
5
5
|
|
6
|
-
class ArrayExtensionsTest <
|
6
|
+
class ArrayExtensionsTest < Minitest::Test
|
7
7
|
|
8
8
|
def test_element_methods
|
9
9
|
c = Struct.new("SomeClass",:name,:age)
|
@@ -9,7 +9,7 @@ require 'testmodel/class_model_checker'
|
|
9
9
|
require 'testmodel/object_model_checker'
|
10
10
|
require 'testmodel/ecore_model_checker'
|
11
11
|
|
12
|
-
class EAInstantiatorTest <
|
12
|
+
class EAInstantiatorTest < Minitest::Test
|
13
13
|
|
14
14
|
include Testmodel::ClassModelChecker
|
15
15
|
include Testmodel::ObjectModelChecker
|
data/test/ea_serializer_test.rb
CHANGED
@@ -6,7 +6,7 @@ require 'metamodels/uml13_metamodel'
|
|
6
6
|
require 'ea_support/ea_support'
|
7
7
|
require 'rgen/serializer/xmi11_serializer'
|
8
8
|
|
9
|
-
class EASerializerTest <
|
9
|
+
class EASerializerTest < Minitest::Test
|
10
10
|
|
11
11
|
MODEL_DIR = File.join(File.dirname(__FILE__),"testmodel")
|
12
12
|
TEST_DIR = File.join(File.dirname(__FILE__),"ea_serializer_test")
|
data/test/ecore_self_test.rb
CHANGED
data/test/ecore_to_ruby_test.rb
CHANGED
data/test/environment_test.rb
CHANGED
data/test/json_test.rb
CHANGED
@@ -5,7 +5,7 @@ require 'rgen/metamodel_builder'
|
|
5
5
|
require 'rgen/array_extensions'
|
6
6
|
require 'bigdecimal'
|
7
7
|
|
8
|
-
class MetamodelBuilderTest <
|
8
|
+
class MetamodelBuilderTest < Minitest::Test
|
9
9
|
|
10
10
|
module TestMetamodel
|
11
11
|
extend RGen::MetamodelBuilder::ModuleExtension
|
@@ -226,7 +226,7 @@ class MetamodelBuilderTest < MiniTest::Test
|
|
226
226
|
err = assert_raises StandardError do
|
227
227
|
sc.allowed = :someSymbol
|
228
228
|
end
|
229
|
-
assert_match /In (\w+::)+SimpleClass : Can not use a Symbol\(someSymbol\)
|
229
|
+
assert_match /In (\w+::)+SimpleClass : Can not use a Symbol(\(someSymbol\))?\(:someSymbol\) where a \[true,false\] is expected/, err.message
|
230
230
|
err = assert_raises StandardError do
|
231
231
|
sc.allowed = "a string"
|
232
232
|
end
|
@@ -244,7 +244,7 @@ class MetamodelBuilderTest < MiniTest::Test
|
|
244
244
|
err = assert_raises StandardError do
|
245
245
|
sc.kind = :false
|
246
246
|
end
|
247
|
-
assert_match /In (\w+::)+SimpleClass : Can not use a Symbol\(false\)
|
247
|
+
assert_match /In (\w+::)+SimpleClass : Can not use a Symbol(\(false\))?\(:false\) where a \[:simple,:extended\] is expected/, err.message
|
248
248
|
err = assert_raises StandardError do
|
249
249
|
sc.kind = "a string"
|
250
250
|
end
|
@@ -281,6 +281,7 @@ class MetamodelBuilderTest < MiniTest::Test
|
|
281
281
|
sc.longWithDefault = (2**(0.size * 8 -2) -1) + 1
|
282
282
|
assert_equal (2**(0.size * 8 -2) -1) + 1, sc.longWithDefault
|
283
283
|
assert sc.longWithDefault.is_a?(Integer)
|
284
|
+
assert sc.longWithDefault.is_a?(Integer)
|
284
285
|
err = assert_raises StandardError do
|
285
286
|
sc.longWithDefault = "a string"
|
286
287
|
end
|
@@ -615,7 +616,7 @@ class MetamodelBuilderTest < MiniTest::Test
|
|
615
616
|
err = assert_raises StandardError do
|
616
617
|
bc.addAClasses :notaaclass
|
617
618
|
end
|
618
|
-
assert_match /In (\w+::)+BClassMM : Can not use a Symbol\(notaaclass\)
|
619
|
+
assert_match /In (\w+::)+BClassMM : Can not use a Symbol(\(notaaclass\))?\(:notaaclass\) where a (\w+::)+AClassMM is expected/, err.message
|
619
620
|
|
620
621
|
# remove the AClass from the BClass
|
621
622
|
bc.removeAClasses ac
|
@@ -631,7 +632,7 @@ class MetamodelBuilderTest < MiniTest::Test
|
|
631
632
|
err = assert_raises StandardError do
|
632
633
|
ac.addBClasses :notabclass
|
633
634
|
end
|
634
|
-
assert_match /In (\w+::)+AClassMM : Can not use a Symbol\(notabclass\)
|
635
|
+
assert_match /In (\w+::)+AClassMM : Can not use a Symbol(\(notabclass\))?\(:notabclass\) where a (\w+::)+BClassMM is expected/, err.message
|
635
636
|
|
636
637
|
# remove the BClass from the AClass
|
637
638
|
ac.removeBClasses bc
|
@@ -7,7 +7,7 @@ require 'mmgen/metamodel_generator'
|
|
7
7
|
require 'rgen/instantiator/ecore_xml_instantiator'
|
8
8
|
require 'rgen/serializer/xmi20_serializer'
|
9
9
|
|
10
|
-
class MetamodelRoundtripTest <
|
10
|
+
class MetamodelRoundtripTest < Minitest::Test
|
11
11
|
|
12
12
|
TEST_DIR = File.dirname(__FILE__)+"/metamodel_roundtrip_test"
|
13
13
|
|
@@ -7,7 +7,7 @@ require 'rgen/environment'
|
|
7
7
|
require 'rgen/model_builder'
|
8
8
|
require 'model_builder/statemachine_metamodel'
|
9
9
|
|
10
|
-
class ModelBuilderTest <
|
10
|
+
class ModelBuilderTest < Minitest::Test
|
11
11
|
|
12
12
|
def test_statemachine
|
13
13
|
result = RGen::ModelBuilder.build(StatemachineMetamodel) do
|
@@ -4,7 +4,7 @@ require 'minitest/autorun'
|
|
4
4
|
require 'rgen/metamodel_builder'
|
5
5
|
require 'rgen/model_builder/reference_resolver'
|
6
6
|
|
7
|
-
class ReferenceResolverTest <
|
7
|
+
class ReferenceResolverTest < Minitest::Test
|
8
8
|
|
9
9
|
class ClassA < RGen::MetamodelBuilder::MMBase
|
10
10
|
has_attr "name"
|
@@ -28,7 +28,7 @@ require 'rgen/instantiator/ecore_xml_instantiator'
|
|
28
28
|
require 'rgen/model_builder'
|
29
29
|
require 'model_builder/statemachine_metamodel'
|
30
30
|
|
31
|
-
class ModelSerializerTest <
|
31
|
+
class ModelSerializerTest < Minitest::Test
|
32
32
|
def test_ecore_internal
|
33
33
|
File.open(File.dirname(__FILE__)+"/ecore_internal.rb","w") do |f|
|
34
34
|
serializer = RGen::ModelBuilder::ModelSerializer.new(f, RGen::ECore.ecore)
|
data/test/model_fragment_test.rb
CHANGED
data/test/output_handler_test.rb
CHANGED
@@ -3,7 +3,7 @@ $:.unshift File.join(File.dirname(__FILE__),"..","lib")
|
|
3
3
|
require 'minitest/autorun'
|
4
4
|
require 'rgen/template_language/output_handler'
|
5
5
|
|
6
|
-
class MetamodelBuilderTest <
|
6
|
+
class MetamodelBuilderTest < Minitest::Test
|
7
7
|
def test_direct_nl
|
8
8
|
h = RGen::TemplateLanguage::OutputHandler.new
|
9
9
|
h.mode = :direct
|
@@ -4,7 +4,7 @@ require 'minitest/autorun'
|
|
4
4
|
require 'rgen/metamodel_builder'
|
5
5
|
require 'rgen/serializer/qualified_name_provider'
|
6
6
|
|
7
|
-
class QualifiedNameProviderTest <
|
7
|
+
class QualifiedNameProviderTest < Minitest::Test
|
8
8
|
|
9
9
|
class AbstractTestNode < RGen::MetamodelBuilder::MMBase
|
10
10
|
contains_many 'children', AbstractTestNode, "parent"
|
@@ -4,7 +4,7 @@ require 'minitest/autorun'
|
|
4
4
|
require 'rgen/metamodel_builder'
|
5
5
|
require 'rgen/instantiator/qualified_name_resolver'
|
6
6
|
|
7
|
-
class QualifiedNameResolverTest <
|
7
|
+
class QualifiedNameResolverTest < Minitest::Test
|
8
8
|
|
9
9
|
class TestNode < RGen::MetamodelBuilder::MMBase
|
10
10
|
has_attr 'name', String
|
@@ -4,7 +4,7 @@ require 'minitest/autorun'
|
|
4
4
|
require 'rgen/metamodel_builder'
|
5
5
|
require 'rgen/instantiator/reference_resolver'
|
6
6
|
|
7
|
-
class ReferenceResolverTest <
|
7
|
+
class ReferenceResolverTest < Minitest::Test
|
8
8
|
|
9
9
|
class TestNode < RGen::MetamodelBuilder::MMBase
|
10
10
|
has_attr 'name', String
|
@@ -4,7 +4,7 @@ require 'minitest/autorun'
|
|
4
4
|
require 'rgen/template_language'
|
5
5
|
require 'rgen/metamodel_builder'
|
6
6
|
|
7
|
-
class TemplateContainerTest <
|
7
|
+
class TemplateContainerTest < Minitest::Test
|
8
8
|
|
9
9
|
TEMPLATES_DIR = File.dirname(__FILE__)+"/template_language_test/templates"
|
10
10
|
OUTPUT_DIR = File.dirname(__FILE__)+"/template_language_test"
|
data/test/transformer_test.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rgen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.10.
|
4
|
+
version: 0.10.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Martin Thiede
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-12-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -16,82 +16,100 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 1.
|
19
|
+
version: 1.15.4
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: '1.
|
22
|
+
version: '1.16'
|
23
23
|
type: :development
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 1.
|
29
|
+
version: 1.15.4
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: '1.
|
32
|
+
version: '1.16'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: rake
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
36
36
|
requirements:
|
37
|
-
- - "
|
37
|
+
- - ">="
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: 13.0.0
|
40
|
+
- - "<"
|
38
41
|
- !ruby/object:Gem::Version
|
39
|
-
version: '
|
42
|
+
version: '14.0'
|
40
43
|
type: :development
|
41
44
|
prerelease: false
|
42
45
|
version_requirements: !ruby/object:Gem::Requirement
|
43
46
|
requirements:
|
44
|
-
- - "
|
47
|
+
- - ">="
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
version: 13.0.0
|
50
|
+
- - "<"
|
45
51
|
- !ruby/object:Gem::Version
|
46
|
-
version: '
|
52
|
+
version: '14.0'
|
47
53
|
- !ruby/object:Gem::Dependency
|
48
54
|
name: minitest
|
49
55
|
requirement: !ruby/object:Gem::Requirement
|
50
56
|
requirements:
|
51
|
-
- - "~>"
|
52
|
-
- !ruby/object:Gem::Version
|
53
|
-
version: '5.0'
|
54
57
|
- - ">="
|
55
58
|
- !ruby/object:Gem::Version
|
56
|
-
version: 5.
|
59
|
+
version: 5.20.0
|
60
|
+
- - "<"
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '6.0'
|
57
63
|
type: :development
|
58
64
|
prerelease: false
|
59
65
|
version_requirements: !ruby/object:Gem::Requirement
|
60
66
|
requirements:
|
61
|
-
- - "~>"
|
62
|
-
- !ruby/object:Gem::Version
|
63
|
-
version: '5.0'
|
64
67
|
- - ">="
|
65
68
|
- !ruby/object:Gem::Version
|
66
|
-
version: 5.
|
69
|
+
version: 5.20.0
|
70
|
+
- - "<"
|
71
|
+
- !ruby/object:Gem::Version
|
72
|
+
version: '6.0'
|
67
73
|
- !ruby/object:Gem::Dependency
|
68
74
|
name: minitest-fail-fast
|
69
75
|
requirement: !ruby/object:Gem::Requirement
|
70
76
|
requirements:
|
71
|
-
- - "
|
77
|
+
- - ">="
|
72
78
|
- !ruby/object:Gem::Version
|
73
79
|
version: 0.1.0
|
80
|
+
- - "<"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0.2'
|
74
83
|
type: :development
|
75
84
|
prerelease: false
|
76
85
|
version_requirements: !ruby/object:Gem::Requirement
|
77
86
|
requirements:
|
78
|
-
- - "
|
87
|
+
- - ">="
|
79
88
|
- !ruby/object:Gem::Version
|
80
89
|
version: 0.1.0
|
90
|
+
- - "<"
|
91
|
+
- !ruby/object:Gem::Version
|
92
|
+
version: '0.2'
|
81
93
|
- !ruby/object:Gem::Dependency
|
82
94
|
name: andand
|
83
95
|
requirement: !ruby/object:Gem::Requirement
|
84
96
|
requirements:
|
85
|
-
- -
|
97
|
+
- - ">="
|
86
98
|
- !ruby/object:Gem::Version
|
87
99
|
version: 1.3.3
|
100
|
+
- - "<"
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: '1.4'
|
88
103
|
type: :development
|
89
104
|
prerelease: false
|
90
105
|
version_requirements: !ruby/object:Gem::Requirement
|
91
106
|
requirements:
|
92
|
-
- -
|
107
|
+
- - ">="
|
93
108
|
- !ruby/object:Gem::Version
|
94
109
|
version: 1.3.3
|
110
|
+
- - "<"
|
111
|
+
- !ruby/object:Gem::Version
|
112
|
+
version: '1.4'
|
95
113
|
description: RGen is a framework for Model Driven Software Development (MDSD) in Ruby.
|
96
114
|
This means that it helps you build Metamodels, instantiate Models, modify and transform
|
97
115
|
Models and finally generate arbitrary textual content from it.
|