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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 718b7e6aeacd446bb08225196146552c65033210
4
- data.tar.gz: cc635adbb4efece25018192e3252329908c33816
3
+ metadata.gz: 96344b29d7c6d46b4301287f9d3c21d70d985ee4
4
+ data.tar.gz: 03c20ad4e81aff6bc1b9dc6e11fe3cc3d961fbfe
5
5
  SHA512:
6
- metadata.gz: df6c209888d596ff60c3ec98727a725ff5bc3633c4623064394d3836348538d69e0ffa3fb279f9d41aade24fcc7620c3e5f5b0a32d38654f0509fc952991cbeb
7
- data.tar.gz: 622b0cd9abe40acba98091eb0fdcb7c2abcc73cde5c755ed51da2792f22d1c40b7546eb71e2a8905305a1718c79d330686954056e2e81c3b76569ad3e0d25b5e
6
+ metadata.gz: 3123e149f308ce0a9cea45e4c1d253bd23227bb30a9b3c8057c75a296dfa7fd0cb637ee94944b3a5edf0d21765ec2f31b49af220504f0c420643f86e5da7db59
7
+ data.tar.gz: ad09dd2f55dbefef661416567bbb82e0f8f48c0f86ce5bf2ff9e458cc098de2f8069aa4cda8f7dcceb7b9ecf416fccbc5662ee515dc6b89403c1722a748c58fa
data/CHANGELOG CHANGED
@@ -233,4 +233,12 @@
233
233
 
234
234
  =0.10.0
235
235
 
236
- * Added support for Ruby up to 3.2
236
+ * Added support for Rubies 3.0, 3.1, 3.2
237
+
238
+ =0.10.1
239
+
240
+ * Updated dependencies
241
+
242
+ =0.10.2
243
+
244
+ * Fixed issue with Kernel methods name clash with features
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.0
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.14.2', '< 1.15'], development: true}
19
- - {name: rake, version: '~> 12.0', development: true}
20
- - {name: minitest, version: ['~> 5.0', '>= 5.10.1'], development: true}
21
- - {name: minitest-fail-fast, version: '~> 0.1.0', development: true}
22
- - {name: andand, version: '1.3.3', development: true}
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}
@@ -12,7 +12,7 @@ class ECoreToRuby
12
12
  @modules = {}
13
13
  @classifiers = {}
14
14
  @features_added = {}
15
- @reserved = Set.new(Object.methods)
15
+ @reserved = Set.new(Object.methods).merge(Kernel.methods)
16
16
  end
17
17
 
18
18
  # Create a Ruby module representing +epackage+.
@@ -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 < MiniTest::Test
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 < MiniTest::Test
12
+ class EAInstantiatorTest < Minitest::Test
13
13
 
14
14
  include Testmodel::ClassModelChecker
15
15
  include Testmodel::ObjectModelChecker
@@ -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 < MiniTest::Test
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")
@@ -4,7 +4,7 @@ require 'minitest/autorun'
4
4
  require 'rgen/ecore/ecore'
5
5
  require 'rgen/array_extensions'
6
6
 
7
- class ECoreSelfTest < MiniTest::Test
7
+ class ECoreSelfTest < Minitest::Test
8
8
  include RGen::ECore
9
9
 
10
10
  def test_simple
@@ -6,7 +6,7 @@ require 'rgen/ecore/ecore'
6
6
  require 'rgen/ecore/ecore_ext'
7
7
  require 'rgen/ecore/ecore_to_ruby'
8
8
 
9
- class ECoreToRubyTest < MiniTest::Test
9
+ class ECoreToRubyTest < Minitest::Test
10
10
 
11
11
  module ContainerSimple
12
12
  end
@@ -4,7 +4,7 @@ require 'minitest/autorun'
4
4
  require 'rgen/environment'
5
5
  require 'rgen/metamodel_builder'
6
6
 
7
- class EnvironmentTest < MiniTest::Test
7
+ class EnvironmentTest < Minitest::Test
8
8
 
9
9
  class Model
10
10
  attr_accessor :name
data/test/json_test.rb CHANGED
@@ -6,7 +6,7 @@ require 'rgen/metamodel_builder'
6
6
  require 'rgen/serializer/json_serializer'
7
7
  require 'rgen/instantiator/json_instantiator'
8
8
 
9
- class JsonTest < MiniTest::Test
9
+ class JsonTest < Minitest::Test
10
10
 
11
11
  module TestMM
12
12
  extend RGen::MetamodelBuilder::ModuleExtension
@@ -5,7 +5,7 @@ require 'rgen/metamodel_builder'
5
5
  require 'rgen/array_extensions'
6
6
  require 'bigdecimal'
7
7
 
8
- class MetamodelBuilderTest < MiniTest::Test
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\)\(:someSymbol\) where a \[true,false\] is expected/, err.message
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\)\(:false\) where a \[:simple,:extended\] is expected/, err.message
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\)\(:notaaclass\) where a (\w+::)+AClassMM is expected/, err.message
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\)\(:notabclass\) where a (\w+::)+BClassMM is expected/, err.message
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
@@ -4,7 +4,7 @@ require 'minitest/autorun'
4
4
  require 'rgen/ecore/ecore'
5
5
  require 'rgen/array_extensions'
6
6
 
7
- class MetamodelOrderTest < MiniTest::Test
7
+ class MetamodelOrderTest < Minitest::Test
8
8
  include RGen::ECore
9
9
 
10
10
  module TestMM1
@@ -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 < MiniTest::Test
10
+ class MetamodelRoundtripTest < Minitest::Test
11
11
 
12
12
  TEST_DIR = File.dirname(__FILE__)+"/metamodel_roundtrip_test"
13
13
 
@@ -3,7 +3,7 @@ $:.unshift File.dirname(__FILE__) + "/../lib"
3
3
  require 'minitest/autorun'
4
4
  require 'rgen/util/method_delegation'
5
5
 
6
- class MethodDelegationTest < MiniTest::Test
6
+ class MethodDelegationTest < Minitest::Test
7
7
  include RGen
8
8
 
9
9
  class TestDelegate
@@ -4,7 +4,7 @@ require 'minitest/autorun'
4
4
  require 'rgen/ecore/ecore'
5
5
  require 'rgen/model_builder/builder_context'
6
6
 
7
- class BuilderContextTest < MiniTest::Test
7
+ class BuilderContextTest < Minitest::Test
8
8
 
9
9
  module BuilderExtension1
10
10
  module PackageA
@@ -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 < MiniTest::Test
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 < MiniTest::Test
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 < MiniTest::Test
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)
@@ -4,7 +4,7 @@ require 'minitest/autorun'
4
4
  require 'rgen/metamodel_builder'
5
5
  require 'rgen/fragment/model_fragment'
6
6
 
7
- class ModelFragmentTest < MiniTest::Test
7
+ class ModelFragmentTest < Minitest::Test
8
8
 
9
9
  module TestMetamodel
10
10
  extend RGen::MetamodelBuilder::ModuleExtension
@@ -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 < MiniTest::Test
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 < MiniTest::Test
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 < MiniTest::Test
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 < MiniTest::Test
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 < MiniTest::Test
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"
@@ -8,7 +8,7 @@ require 'rgen/util/model_comparator'
8
8
  require 'metamodels/uml13_metamodel'
9
9
  require 'testmodel/class_model_checker'
10
10
 
11
- class TransformerTest < MiniTest::Test
11
+ class TransformerTest < Minitest::Test
12
12
 
13
13
  class ModelIn
14
14
  attr_accessor :name
@@ -4,7 +4,7 @@ require 'minitest/autorun'
4
4
  require 'fileutils'
5
5
  require 'rgen/util/file_cache_map'
6
6
 
7
- class FileCacheMapTest < MiniTest::Test
7
+ class FileCacheMapTest < Minitest::Test
8
8
 
9
9
  TestDir = File.dirname(__FILE__)+"/file_cache_map_test/testdir"
10
10
 
@@ -6,7 +6,7 @@ require 'rgen/metamodel_builder'
6
6
  require 'rgen/model_builder'
7
7
  require 'rgen/util/pattern_matcher'
8
8
 
9
- class PatternMatcherTest < MiniTest::Test
9
+ class PatternMatcherTest < Minitest::Test
10
10
 
11
11
  module TestMM
12
12
  extend RGen::MetamodelBuilder::ModuleExtension
@@ -18,7 +18,7 @@ module DefaultMM
18
18
  Person.one_to_one 'personalRoom', MNS::Room, 'inhabitant'
19
19
  end
20
20
 
21
- class XMLInstantiatorTest < MiniTest::Test
21
+ class XMLInstantiatorTest < Minitest::Test
22
22
 
23
23
  XML_DIR = File.join(File.dirname(__FILE__),"testmodel")
24
24
 
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.0
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-02-21 00:00:00.000000000 Z
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.14.2
19
+ version: 1.15.4
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: '1.15'
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.14.2
29
+ version: 1.15.4
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: '1.15'
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: '12.0'
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: '12.0'
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.10.1
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.10.1
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.