expressir 0.2.27-x86-mingw32 → 1.0.0-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +3 -3
- data/.gitignore +2 -2
- data/demo.rb +5 -5
- data/exe/format +8 -8
- data/exe/format-test +11 -11
- data/expressir.gemspec +0 -1
- data/lib/expressir.rb +0 -1
- data/lib/expressir/cli.rb +0 -6
- data/lib/expressir/{express_exp → express}/2.4/express_parser.so +0 -0
- data/lib/expressir/{express_exp → express}/2.5/express_parser.so +0 -0
- data/lib/expressir/{express_exp → express}/2.6/express_parser.so +0 -0
- data/lib/expressir/{express_exp → express}/2.7/express_parser.so +0 -0
- data/lib/expressir/{express_exp → express}/3.0/express_parser.so +0 -0
- data/lib/expressir/{express_exp → express}/cache.rb +3 -6
- data/lib/expressir/{express_exp → express}/formatter.rb +72 -66
- data/lib/expressir/{express_exp → express}/hyperlink_formatter.rb +1 -1
- data/lib/expressir/{express_exp → express}/model_visitor.rb +1 -1
- data/lib/expressir/{express_exp → express}/parser.rb +3 -3
- data/lib/expressir/{express_exp → express}/resolve_references_model_visitor.rb +2 -2
- data/lib/expressir/{express_exp → express}/schema_head_formatter.rb +1 -1
- data/lib/expressir/{express_exp → express}/visitor.rb +21 -25
- data/lib/expressir/model.rb +2 -2
- data/lib/expressir/model/entity.rb +6 -6
- data/lib/expressir/model/model_element.rb +1 -1
- data/lib/expressir/model/rule.rb +3 -3
- data/lib/expressir/model/type.rb +6 -6
- data/lib/expressir/model/types/enumeration.rb +2 -4
- data/lib/expressir/model/types/select.rb +2 -4
- data/lib/expressir/model/{unique.rb → unique_rule.rb} +1 -1
- data/lib/expressir/model/{where.rb → where_rule.rb} +1 -1
- data/lib/expressir/version.rb +1 -1
- data/rakelib/cross-ruby.rake +1 -1
- data/spec/expressir/{express_exp → express}/cache_spec.rb +9 -9
- data/spec/expressir/express/formatter_spec.rb +127 -0
- data/spec/expressir/{express_exp → express}/parser_spec.rb +23 -23
- data/spec/expressir/model/model_element_spec.rb +45 -45
- data/{original/examples → spec}/syntax/multiple.exp +0 -0
- data/{original/examples → spec}/syntax/multiple.yaml +4 -4
- data/{original/examples → spec}/syntax/multiple_formatted.exp +0 -0
- data/{original/examples → spec}/syntax/multiple_hyperlink_formatted.exp +0 -0
- data/{original/examples → spec}/syntax/multiple_schema_head_hyperlink_formatted.exp +0 -0
- data/{original/examples → spec}/syntax/remark.exp +0 -0
- data/{original/examples → spec}/syntax/remark.yaml +13 -13
- data/{original/examples → spec}/syntax/remark_formatted.exp +0 -0
- data/{original/examples → spec}/syntax/single.exp +0 -0
- data/{original/examples → spec}/syntax/single.yaml +1 -1
- data/{original/examples → spec}/syntax/single_formatted.exp +0 -0
- data/{original/examples → spec}/syntax/single_formatted.yaml +1 -1
- data/{original/examples → spec}/syntax/syntax.exp +10 -10
- data/{original/examples → spec}/syntax/syntax.yaml +106 -106
- data/{original/examples → spec}/syntax/syntax_formatted.exp +10 -10
- data/{original/examples → spec}/syntax/syntax_hyperlink_formatted.exp +10 -10
- data/{original/examples → spec}/syntax/syntax_schema_head_formatted.exp +0 -0
- metadata +37 -85
- data/lib/expressir/express.rb +0 -11
- data/lib/expressir/express/aggregate_dimension.rb +0 -38
- data/lib/expressir/express/attribute.rb +0 -15
- data/lib/expressir/express/comment.rb +0 -7
- data/lib/expressir/express/defined_type.rb +0 -36
- data/lib/expressir/express/derived.rb +0 -65
- data/lib/expressir/express/derived_aggregate.rb +0 -43
- data/lib/expressir/express/entity.rb +0 -137
- data/lib/expressir/express/explicit.rb +0 -70
- data/lib/expressir/express/explicit_aggregate.rb +0 -46
- data/lib/expressir/express/explicit_or_derived.rb +0 -16
- data/lib/expressir/express/global_rule.rb +0 -44
- data/lib/expressir/express/interface_specification.rb +0 -51
- data/lib/expressir/express/interfaced_item.rb +0 -38
- data/lib/expressir/express/inverse.rb +0 -46
- data/lib/expressir/express/inverse_aggregate.rb +0 -37
- data/lib/expressir/express/model_element.rb +0 -7
- data/lib/expressir/express/named_type.rb +0 -19
- data/lib/expressir/express/remark.rb +0 -8
- data/lib/expressir/express/repository.rb +0 -306
- data/lib/expressir/express/schema_definition.rb +0 -96
- data/lib/expressir/express/subtype_constraint.rb +0 -14
- data/lib/expressir/express/type.rb +0 -26
- data/lib/expressir/express/type_aggregate.rb +0 -42
- data/lib/expressir/express/type_enum.rb +0 -29
- data/lib/expressir/express/type_parser.rb +0 -45
- data/lib/expressir/express/type_select.rb +0 -82
- data/lib/expressir/express/unique_rule.rb +0 -35
- data/lib/expressir/express/where_rule.rb +0 -32
- data/lib/expressir/express_parser.rb +0 -30
- data/lib/expressir/parser.rb +0 -6
- data/lib/expressir/parser/owl_parser.rb +0 -8
- data/spec/acceptance/express_to_owl_spec.rb +0 -18
- data/spec/expressir/express/repository_spec.rb +0 -25
- data/spec/expressir/express_exp/formatter_spec.rb +0 -127
@@ -1,15 +1,15 @@
|
|
1
1
|
require "yaml"
|
2
2
|
require "spec_helper"
|
3
|
-
require "expressir/
|
3
|
+
require "expressir/express/parser"
|
4
4
|
|
5
|
-
RSpec.describe Expressir::
|
5
|
+
RSpec.describe Expressir::Express::Parser do
|
6
6
|
describe ".from_file" do
|
7
7
|
it "parses a file (single.exp)" do
|
8
|
-
exp_file = Expressir.root_path.join("
|
9
|
-
yaml_file = Expressir.root_path.join("
|
8
|
+
exp_file = Expressir.root_path.join("spec", "syntax", "single.exp")
|
9
|
+
yaml_file = Expressir.root_path.join("spec", "syntax", "single.yaml")
|
10
10
|
|
11
|
-
repo = Expressir::
|
12
|
-
result = YAML.dump(repo.to_hash(root_path: Expressir.root_path
|
11
|
+
repo = Expressir::Express::Parser.from_file(exp_file)
|
12
|
+
result = YAML.dump(repo.to_hash(root_path: Expressir.root_path))
|
13
13
|
# File.write(yaml_file, result)
|
14
14
|
expected_result = File.read(yaml_file)
|
15
15
|
|
@@ -17,11 +17,11 @@ RSpec.describe Expressir::ExpressExp::Parser do
|
|
17
17
|
end
|
18
18
|
|
19
19
|
it "parses a file (multiple.exp)" do
|
20
|
-
exp_file = Expressir.root_path.join("
|
21
|
-
yaml_file = Expressir.root_path.join("
|
20
|
+
exp_file = Expressir.root_path.join("spec", "syntax", "multiple.exp")
|
21
|
+
yaml_file = Expressir.root_path.join("spec", "syntax", "multiple.yaml")
|
22
22
|
|
23
|
-
repo = Expressir::
|
24
|
-
result = YAML.dump(repo.to_hash(root_path: Expressir.root_path
|
23
|
+
repo = Expressir::Express::Parser.from_file(exp_file)
|
24
|
+
result = YAML.dump(repo.to_hash(root_path: Expressir.root_path))
|
25
25
|
# File.write(yaml_file, result)
|
26
26
|
expected_result = File.read(yaml_file)
|
27
27
|
|
@@ -29,11 +29,11 @@ RSpec.describe Expressir::ExpressExp::Parser do
|
|
29
29
|
end
|
30
30
|
|
31
31
|
it "parses a file (syntax.exp)" do
|
32
|
-
exp_file = Expressir.root_path.join("
|
33
|
-
yaml_file = Expressir.root_path.join("
|
32
|
+
exp_file = Expressir.root_path.join("spec", "syntax", "syntax.exp")
|
33
|
+
yaml_file = Expressir.root_path.join("spec", "syntax", "syntax.yaml")
|
34
34
|
|
35
|
-
repo = Expressir::
|
36
|
-
result = YAML.dump(repo.to_hash(root_path: Expressir.root_path
|
35
|
+
repo = Expressir::Express::Parser.from_file(exp_file)
|
36
|
+
result = YAML.dump(repo.to_hash(root_path: Expressir.root_path))
|
37
37
|
# File.write(yaml_file, result)
|
38
38
|
expected_result = File.read(yaml_file)
|
39
39
|
|
@@ -41,11 +41,11 @@ RSpec.describe Expressir::ExpressExp::Parser do
|
|
41
41
|
end
|
42
42
|
|
43
43
|
it "parses a file (remark.exp)" do
|
44
|
-
exp_file = Expressir.root_path.join("
|
45
|
-
yaml_file = Expressir.root_path.join("
|
44
|
+
exp_file = Expressir.root_path.join("spec", "syntax", "remark.exp")
|
45
|
+
yaml_file = Expressir.root_path.join("spec", "syntax", "remark.yaml")
|
46
46
|
|
47
|
-
repo = Expressir::
|
48
|
-
result = YAML.dump(repo.to_hash(root_path: Expressir.root_path
|
47
|
+
repo = Expressir::Express::Parser.from_file(exp_file)
|
48
|
+
result = YAML.dump(repo.to_hash(root_path: Expressir.root_path))
|
49
49
|
# File.write(yaml_file, result)
|
50
50
|
expected_result = File.read(yaml_file)
|
51
51
|
|
@@ -53,10 +53,10 @@ RSpec.describe Expressir::ExpressExp::Parser do
|
|
53
53
|
end
|
54
54
|
|
55
55
|
it "parses a file including original source (multiple.exp)" do
|
56
|
-
exp_file = Expressir.root_path.join("
|
56
|
+
exp_file = Expressir.root_path.join("spec", "syntax", "multiple.exp")
|
57
57
|
|
58
58
|
input = File.read(exp_file)
|
59
|
-
repo = Expressir::
|
59
|
+
repo = Expressir::Express::Parser.from_file(exp_file, include_source: true)
|
60
60
|
|
61
61
|
schema = repo.schemas.first
|
62
62
|
start_index = input.index("SCHEMA")
|
@@ -75,11 +75,11 @@ RSpec.describe Expressir::ExpressExp::Parser do
|
|
75
75
|
describe ".from_files" do
|
76
76
|
it "parses multiple files (single.exp, multiple.exp)" do
|
77
77
|
exp_files = [
|
78
|
-
Expressir.root_path.join("
|
79
|
-
Expressir.root_path.join("
|
78
|
+
Expressir.root_path.join("spec", "syntax", "single.exp"),
|
79
|
+
Expressir.root_path.join("spec", "syntax", "multiple.exp")
|
80
80
|
]
|
81
81
|
|
82
|
-
repo = Expressir::
|
82
|
+
repo = Expressir::Express::Parser.from_files(exp_files)
|
83
83
|
|
84
84
|
schemas = repo.schemas
|
85
85
|
expect(schemas.count).to eq(5)
|
@@ -1,18 +1,18 @@
|
|
1
1
|
|
2
2
|
require "yaml"
|
3
3
|
require "spec_helper"
|
4
|
-
require "expressir/
|
5
|
-
require "expressir/
|
4
|
+
require "expressir/express/parser"
|
5
|
+
require "expressir/express/formatter"
|
6
6
|
|
7
7
|
RSpec.describe Expressir::Model::ModelElement do
|
8
8
|
describe ".to_hash" do
|
9
9
|
it "exports an object with a formatter (single.exp)" do
|
10
|
-
exp_file = Expressir.root_path.join("
|
11
|
-
yaml_file = Expressir.root_path.join("
|
10
|
+
exp_file = Expressir.root_path.join("spec", "syntax", "single.exp")
|
11
|
+
yaml_file = Expressir.root_path.join("spec", "syntax", "single_formatted.yaml")
|
12
12
|
|
13
|
-
repo = Expressir::
|
13
|
+
repo = Expressir::Express::Parser.from_file(exp_file)
|
14
14
|
|
15
|
-
result = YAML.dump(repo.to_hash(root_path: Expressir.root_path, formatter: Expressir::
|
15
|
+
result = YAML.dump(repo.to_hash(root_path: Expressir.root_path, formatter: Expressir::Express::Formatter))
|
16
16
|
# File.write(yaml_file, result)
|
17
17
|
expected_result = File.read(yaml_file)
|
18
18
|
|
@@ -22,48 +22,48 @@ RSpec.describe Expressir::Model::ModelElement do
|
|
22
22
|
|
23
23
|
describe ".from_hash" do
|
24
24
|
it "parses an object (single.yaml)" do
|
25
|
-
yaml_file = Expressir.root_path.join("
|
25
|
+
yaml_file = Expressir.root_path.join("spec", "syntax", "single.yaml")
|
26
26
|
|
27
27
|
input = YAML.load(File.read(yaml_file))
|
28
28
|
repo = Expressir::Model::ModelElement.from_hash(input, root_path: Expressir.root_path)
|
29
29
|
|
30
|
-
result = YAML.dump(repo.to_hash(root_path: Expressir.root_path
|
30
|
+
result = YAML.dump(repo.to_hash(root_path: Expressir.root_path))
|
31
31
|
expected_result = File.read(yaml_file)
|
32
32
|
|
33
33
|
expect(result).to eq(expected_result)
|
34
34
|
end
|
35
35
|
|
36
36
|
it "parses an object (multiple.yaml)" do
|
37
|
-
yaml_file = Expressir.root_path.join("
|
37
|
+
yaml_file = Expressir.root_path.join("spec", "syntax", "multiple.yaml")
|
38
38
|
|
39
39
|
input = YAML.load(File.read(yaml_file))
|
40
40
|
repo = Expressir::Model::ModelElement.from_hash(input, root_path: Expressir.root_path)
|
41
41
|
|
42
|
-
result = YAML.dump(repo.to_hash(root_path: Expressir.root_path
|
42
|
+
result = YAML.dump(repo.to_hash(root_path: Expressir.root_path))
|
43
43
|
expected_result = File.read(yaml_file)
|
44
44
|
|
45
45
|
expect(result).to eq(expected_result)
|
46
46
|
end
|
47
47
|
|
48
48
|
it "parses an object (syntax.yaml)" do
|
49
|
-
yaml_file = Expressir.root_path.join("
|
49
|
+
yaml_file = Expressir.root_path.join("spec", "syntax", "syntax.yaml")
|
50
50
|
|
51
51
|
input = YAML.load(File.read(yaml_file))
|
52
52
|
repo = Expressir::Model::ModelElement.from_hash(input, root_path: Expressir.root_path)
|
53
53
|
|
54
|
-
result = YAML.dump(repo.to_hash(root_path: Expressir.root_path
|
54
|
+
result = YAML.dump(repo.to_hash(root_path: Expressir.root_path))
|
55
55
|
expected_result = File.read(yaml_file)
|
56
56
|
|
57
57
|
expect(result).to eq(expected_result)
|
58
58
|
end
|
59
59
|
|
60
60
|
it "parses an object (remark.yaml)" do
|
61
|
-
yaml_file = Expressir.root_path.join("
|
61
|
+
yaml_file = Expressir.root_path.join("spec", "syntax", "remark.yaml")
|
62
62
|
|
63
63
|
input = YAML.load(File.read(yaml_file))
|
64
64
|
repo = Expressir::Model::ModelElement.from_hash(input, root_path: Expressir.root_path)
|
65
65
|
|
66
|
-
result = YAML.dump(repo.to_hash(root_path: Expressir.root_path
|
66
|
+
result = YAML.dump(repo.to_hash(root_path: Expressir.root_path))
|
67
67
|
expected_result = File.read(yaml_file)
|
68
68
|
|
69
69
|
expect(result).to eq(expected_result)
|
@@ -72,9 +72,9 @@ RSpec.describe Expressir::Model::ModelElement do
|
|
72
72
|
|
73
73
|
describe ".find" do
|
74
74
|
it "finds an object (single.exp)" do
|
75
|
-
exp_file = Expressir.root_path.join("
|
75
|
+
exp_file = Expressir.root_path.join("spec", "syntax", "single.exp")
|
76
76
|
|
77
|
-
repo = Expressir::
|
77
|
+
repo = Expressir::Express::Parser.from_file(exp_file)
|
78
78
|
|
79
79
|
# universal scope
|
80
80
|
expect(repo.find('single_schema')).to be_instance_of(Expressir::Model::Schema)
|
@@ -86,9 +86,9 @@ RSpec.describe Expressir::Model::ModelElement do
|
|
86
86
|
end
|
87
87
|
|
88
88
|
it "finds an object (multiple.exp)" do
|
89
|
-
exp_file = Expressir.root_path.join("
|
89
|
+
exp_file = Expressir.root_path.join("spec", "syntax", "multiple.exp")
|
90
90
|
|
91
|
-
repo = Expressir::
|
91
|
+
repo = Expressir::Express::Parser.from_file(exp_file)
|
92
92
|
|
93
93
|
# universal scope
|
94
94
|
expect(repo.find('multiple_schema')).to be_instance_of(Expressir::Model::Schema)
|
@@ -108,9 +108,9 @@ RSpec.describe Expressir::Model::ModelElement do
|
|
108
108
|
end
|
109
109
|
|
110
110
|
it "finds an object (syntax.exp)" do
|
111
|
-
exp_file = Expressir.root_path.join("
|
111
|
+
exp_file = Expressir.root_path.join("spec", "syntax", "syntax.exp")
|
112
112
|
|
113
|
-
repo = Expressir::
|
113
|
+
repo = Expressir::Express::Parser.from_file(exp_file)
|
114
114
|
|
115
115
|
# universal scope
|
116
116
|
expect(repo.find('syntax_schema')).to be_instance_of(Expressir::Model::Schema)
|
@@ -122,16 +122,16 @@ RSpec.describe Expressir::Model::ModelElement do
|
|
122
122
|
end
|
123
123
|
|
124
124
|
it "finds an object (remark.exp)" do
|
125
|
-
exp_file = Expressir.root_path.join("
|
125
|
+
exp_file = Expressir.root_path.join("spec", "syntax", "remark.exp")
|
126
126
|
|
127
|
-
repo = Expressir::
|
127
|
+
repo = Expressir::Express::Parser.from_file(exp_file)
|
128
128
|
|
129
129
|
# universal scope
|
130
130
|
expect(repo.find('remark_schema')).to be_instance_of(Expressir::Model::Schema)
|
131
131
|
expect(repo.find('remark_schema.remark_constant')).to be_instance_of(Expressir::Model::Constant)
|
132
132
|
expect(repo.find('remark_schema.remark_type')).to be_instance_of(Expressir::Model::Type)
|
133
|
-
expect(repo.find('remark_schema.remark_type.WR1')).to be_instance_of(Expressir::Model::
|
134
|
-
expect(repo.find('remark_schema.remark_type.wr:WR1')).to be_instance_of(Expressir::Model::
|
133
|
+
expect(repo.find('remark_schema.remark_type.WR1')).to be_instance_of(Expressir::Model::WhereRule)
|
134
|
+
expect(repo.find('remark_schema.remark_type.wr:WR1')).to be_instance_of(Expressir::Model::WhereRule)
|
135
135
|
expect(repo.find('remark_schema.remark_type.IP1')).to be_instance_of(Expressir::Model::RemarkItem)
|
136
136
|
expect(repo.find('remark_schema.remark_type.ip:IP1')).to be_instance_of(Expressir::Model::RemarkItem)
|
137
137
|
expect(repo.find('remark_schema.remark_enumeration_item')).to be_instance_of(Expressir::Model::EnumerationItem)
|
@@ -139,9 +139,9 @@ RSpec.describe Expressir::Model::ModelElement do
|
|
139
139
|
expect(repo.find('remark_schema.remark_entity.remark_attribute')).to be_instance_of(Expressir::Model::Attribute)
|
140
140
|
expect(repo.find('remark_schema.remark_entity.remark_derived_attribute')).to be_instance_of(Expressir::Model::Attribute)
|
141
141
|
expect(repo.find('remark_schema.remark_entity.remark_inverse_attribute')).to be_instance_of(Expressir::Model::Attribute)
|
142
|
-
expect(repo.find('remark_schema.remark_entity.UR1')).to be_instance_of(Expressir::Model::
|
143
|
-
expect(repo.find('remark_schema.remark_entity.WR1')).to be_instance_of(Expressir::Model::
|
144
|
-
expect(repo.find('remark_schema.remark_entity.wr:WR1')).to be_instance_of(Expressir::Model::
|
142
|
+
expect(repo.find('remark_schema.remark_entity.UR1')).to be_instance_of(Expressir::Model::UniqueRule)
|
143
|
+
expect(repo.find('remark_schema.remark_entity.WR1')).to be_instance_of(Expressir::Model::WhereRule)
|
144
|
+
expect(repo.find('remark_schema.remark_entity.wr:WR1')).to be_instance_of(Expressir::Model::WhereRule)
|
145
145
|
expect(repo.find('remark_schema.remark_entity.IP1')).to be_instance_of(Expressir::Model::RemarkItem)
|
146
146
|
expect(repo.find('remark_schema.remark_entity.ip:IP1')).to be_instance_of(Expressir::Model::RemarkItem)
|
147
147
|
expect(repo.find('remark_schema.remark_subtype_constraint')).to be_instance_of(Expressir::Model::SubtypeConstraint)
|
@@ -162,8 +162,8 @@ RSpec.describe Expressir::Model::ModelElement do
|
|
162
162
|
expect(repo.find('remark_schema.remark_rule.remark_enumeration_item')).to be_instance_of(Expressir::Model::EnumerationItem)
|
163
163
|
expect(repo.find('remark_schema.remark_rule.remark_constant')).to be_instance_of(Expressir::Model::Constant)
|
164
164
|
expect(repo.find('remark_schema.remark_rule.remark_variable')).to be_instance_of(Expressir::Model::Variable)
|
165
|
-
expect(repo.find('remark_schema.remark_rule.WR1')).to be_instance_of(Expressir::Model::
|
166
|
-
expect(repo.find('remark_schema.remark_rule.wr:WR1')).to be_instance_of(Expressir::Model::
|
165
|
+
expect(repo.find('remark_schema.remark_rule.WR1')).to be_instance_of(Expressir::Model::WhereRule)
|
166
|
+
expect(repo.find('remark_schema.remark_rule.wr:WR1')).to be_instance_of(Expressir::Model::WhereRule)
|
167
167
|
expect(repo.find('remark_schema.remark_rule.IP1')).to be_instance_of(Expressir::Model::RemarkItem)
|
168
168
|
expect(repo.find('remark_schema.remark_rule.ip:IP1')).to be_instance_of(Expressir::Model::RemarkItem)
|
169
169
|
expect(repo.find('remark_schema.remark_item')).to be_instance_of(Expressir::Model::RemarkItem)
|
@@ -172,8 +172,8 @@ RSpec.describe Expressir::Model::ModelElement do
|
|
172
172
|
schema = repo.schemas.first
|
173
173
|
expect(schema.find('remark_constant')).to be_instance_of(Expressir::Model::Constant)
|
174
174
|
expect(schema.find('remark_type')).to be_instance_of(Expressir::Model::Type)
|
175
|
-
expect(schema.find('remark_type.WR1')).to be_instance_of(Expressir::Model::
|
176
|
-
expect(schema.find('remark_type.wr:WR1')).to be_instance_of(Expressir::Model::
|
175
|
+
expect(schema.find('remark_type.WR1')).to be_instance_of(Expressir::Model::WhereRule)
|
176
|
+
expect(schema.find('remark_type.wr:WR1')).to be_instance_of(Expressir::Model::WhereRule)
|
177
177
|
expect(schema.find('remark_type.IP1')).to be_instance_of(Expressir::Model::RemarkItem)
|
178
178
|
expect(schema.find('remark_type.ip:IP1')).to be_instance_of(Expressir::Model::RemarkItem)
|
179
179
|
expect(schema.find('remark_enumeration_item')).to be_instance_of(Expressir::Model::EnumerationItem)
|
@@ -181,9 +181,9 @@ RSpec.describe Expressir::Model::ModelElement do
|
|
181
181
|
expect(schema.find('remark_entity.remark_attribute')).to be_instance_of(Expressir::Model::Attribute)
|
182
182
|
expect(schema.find('remark_entity.remark_derived_attribute')).to be_instance_of(Expressir::Model::Attribute)
|
183
183
|
expect(schema.find('remark_entity.remark_inverse_attribute')).to be_instance_of(Expressir::Model::Attribute)
|
184
|
-
expect(schema.find('remark_entity.UR1')).to be_instance_of(Expressir::Model::
|
185
|
-
expect(schema.find('remark_entity.WR1')).to be_instance_of(Expressir::Model::
|
186
|
-
expect(schema.find('remark_entity.wr:WR1')).to be_instance_of(Expressir::Model::
|
184
|
+
expect(schema.find('remark_entity.UR1')).to be_instance_of(Expressir::Model::UniqueRule)
|
185
|
+
expect(schema.find('remark_entity.WR1')).to be_instance_of(Expressir::Model::WhereRule)
|
186
|
+
expect(schema.find('remark_entity.wr:WR1')).to be_instance_of(Expressir::Model::WhereRule)
|
187
187
|
expect(schema.find('remark_entity.IP1')).to be_instance_of(Expressir::Model::RemarkItem)
|
188
188
|
expect(schema.find('remark_entity.ip:IP1')).to be_instance_of(Expressir::Model::RemarkItem)
|
189
189
|
expect(schema.find('remark_subtype_constraint')).to be_instance_of(Expressir::Model::SubtypeConstraint)
|
@@ -204,16 +204,16 @@ RSpec.describe Expressir::Model::ModelElement do
|
|
204
204
|
expect(schema.find('remark_rule.remark_enumeration_item')).to be_instance_of(Expressir::Model::EnumerationItem)
|
205
205
|
expect(schema.find('remark_rule.remark_constant')).to be_instance_of(Expressir::Model::Constant)
|
206
206
|
expect(schema.find('remark_rule.remark_variable')).to be_instance_of(Expressir::Model::Variable)
|
207
|
-
expect(schema.find('remark_rule.WR1')).to be_instance_of(Expressir::Model::
|
208
|
-
expect(schema.find('remark_rule.wr:WR1')).to be_instance_of(Expressir::Model::
|
207
|
+
expect(schema.find('remark_rule.WR1')).to be_instance_of(Expressir::Model::WhereRule)
|
208
|
+
expect(schema.find('remark_rule.wr:WR1')).to be_instance_of(Expressir::Model::WhereRule)
|
209
209
|
expect(schema.find('remark_rule.IP1')).to be_instance_of(Expressir::Model::RemarkItem)
|
210
210
|
expect(schema.find('remark_rule.ip:IP1')).to be_instance_of(Expressir::Model::RemarkItem)
|
211
211
|
expect(schema.find('remark_item')).to be_instance_of(Expressir::Model::RemarkItem)
|
212
212
|
|
213
213
|
# type scope
|
214
214
|
type = schema.types.first
|
215
|
-
expect(type.find('WR1')).to be_instance_of(Expressir::Model::
|
216
|
-
expect(type.find('wr:WR1')).to be_instance_of(Expressir::Model::
|
215
|
+
expect(type.find('WR1')).to be_instance_of(Expressir::Model::WhereRule)
|
216
|
+
expect(type.find('wr:WR1')).to be_instance_of(Expressir::Model::WhereRule)
|
217
217
|
expect(type.find('IP1')).to be_instance_of(Expressir::Model::RemarkItem)
|
218
218
|
expect(type.find('ip:IP1')).to be_instance_of(Expressir::Model::RemarkItem)
|
219
219
|
|
@@ -222,9 +222,9 @@ RSpec.describe Expressir::Model::ModelElement do
|
|
222
222
|
expect(entity.find('remark_attribute')).to be_instance_of(Expressir::Model::Attribute)
|
223
223
|
expect(entity.find('remark_derived_attribute')).to be_instance_of(Expressir::Model::Attribute)
|
224
224
|
expect(entity.find('remark_inverse_attribute')).to be_instance_of(Expressir::Model::Attribute)
|
225
|
-
expect(entity.find('UR1')).to be_instance_of(Expressir::Model::
|
226
|
-
expect(entity.find('WR1')).to be_instance_of(Expressir::Model::
|
227
|
-
expect(entity.find('wr:WR1')).to be_instance_of(Expressir::Model::
|
225
|
+
expect(entity.find('UR1')).to be_instance_of(Expressir::Model::UniqueRule)
|
226
|
+
expect(entity.find('WR1')).to be_instance_of(Expressir::Model::WhereRule)
|
227
|
+
expect(entity.find('wr:WR1')).to be_instance_of(Expressir::Model::WhereRule)
|
228
228
|
expect(entity.find('IP1')).to be_instance_of(Expressir::Model::RemarkItem)
|
229
229
|
expect(entity.find('ip:IP1')).to be_instance_of(Expressir::Model::RemarkItem)
|
230
230
|
|
@@ -250,15 +250,15 @@ RSpec.describe Expressir::Model::ModelElement do
|
|
250
250
|
expect(rule.find('remark_enumeration_item')).to be_instance_of(Expressir::Model::EnumerationItem)
|
251
251
|
expect(rule.find('remark_constant')).to be_instance_of(Expressir::Model::Constant)
|
252
252
|
expect(rule.find('remark_variable')).to be_instance_of(Expressir::Model::Variable)
|
253
|
-
expect(rule.find('WR1')).to be_instance_of(Expressir::Model::
|
254
|
-
expect(rule.find('wr:WR1')).to be_instance_of(Expressir::Model::
|
253
|
+
expect(rule.find('WR1')).to be_instance_of(Expressir::Model::WhereRule)
|
254
|
+
expect(rule.find('wr:WR1')).to be_instance_of(Expressir::Model::WhereRule)
|
255
255
|
expect(rule.find('IP1')).to be_instance_of(Expressir::Model::RemarkItem)
|
256
256
|
expect(rule.find('ip:IP1')).to be_instance_of(Expressir::Model::RemarkItem)
|
257
257
|
|
258
258
|
# retry search in parent scope
|
259
259
|
expect(entity.find('remark_type')).to be_instance_of(Expressir::Model::Type)
|
260
|
-
expect(entity.find('remark_type.WR1')).to be_instance_of(Expressir::Model::
|
261
|
-
expect(entity.find('remark_type.wr:WR1')).to be_instance_of(Expressir::Model::
|
260
|
+
expect(entity.find('remark_type.WR1')).to be_instance_of(Expressir::Model::WhereRule)
|
261
|
+
expect(entity.find('remark_type.wr:WR1')).to be_instance_of(Expressir::Model::WhereRule)
|
262
262
|
expect(entity.find('remark_type.IP1')).to be_instance_of(Expressir::Model::RemarkItem)
|
263
263
|
expect(entity.find('remark_type.ip:IP1')).to be_instance_of(Expressir::Model::RemarkItem)
|
264
264
|
end
|
File without changes
|
@@ -2,7 +2,7 @@
|
|
2
2
|
_class: Expressir::Model::Repository
|
3
3
|
schemas:
|
4
4
|
- _class: Expressir::Model::Schema
|
5
|
-
file:
|
5
|
+
file: spec/syntax/multiple.exp
|
6
6
|
id: multiple_schema
|
7
7
|
interfaces:
|
8
8
|
- _class: Expressir::Model::Interface
|
@@ -161,7 +161,7 @@ schemas:
|
|
161
161
|
- _class: Expressir::Model::Expressions::SimpleReference
|
162
162
|
id: missing_entity
|
163
163
|
- _class: Expressir::Model::Schema
|
164
|
-
file:
|
164
|
+
file: spec/syntax/multiple.exp
|
165
165
|
id: multiple_schema2
|
166
166
|
entities:
|
167
167
|
- _class: Expressir::Model::Entity
|
@@ -173,7 +173,7 @@ schemas:
|
|
173
173
|
type:
|
174
174
|
_class: Expressir::Model::Types::Boolean
|
175
175
|
- _class: Expressir::Model::Schema
|
176
|
-
file:
|
176
|
+
file: spec/syntax/multiple.exp
|
177
177
|
id: multiple_schema3
|
178
178
|
entities:
|
179
179
|
- _class: Expressir::Model::Entity
|
@@ -185,7 +185,7 @@ schemas:
|
|
185
185
|
type:
|
186
186
|
_class: Expressir::Model::Types::Boolean
|
187
187
|
- _class: Expressir::Model::Schema
|
188
|
-
file:
|
188
|
+
file: spec/syntax/multiple.exp
|
189
189
|
id: multiple_schema4
|
190
190
|
entities:
|
191
191
|
- _class: Expressir::Model::Entity
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -2,7 +2,7 @@
|
|
2
2
|
_class: Expressir::Model::Repository
|
3
3
|
schemas:
|
4
4
|
- _class: Expressir::Model::Schema
|
5
|
-
file:
|
5
|
+
file: spec/syntax/remark.exp
|
6
6
|
id: remark_schema
|
7
7
|
remarks:
|
8
8
|
- |-
|
@@ -36,7 +36,7 @@ schemas:
|
|
36
36
|
remarks:
|
37
37
|
- schema scope - type
|
38
38
|
- universal scope - type
|
39
|
-
|
39
|
+
underlying_type:
|
40
40
|
_class: Expressir::Model::Types::Enumeration
|
41
41
|
items:
|
42
42
|
- _class: Expressir::Model::EnumerationItem
|
@@ -46,8 +46,8 @@ schemas:
|
|
46
46
|
- schema scope - enumeration item, on the same level as the type
|
47
47
|
- universal scope - enumeration item
|
48
48
|
- universal scope - enumeration item, on the same level as the type
|
49
|
-
|
50
|
-
- _class: Expressir::Model::
|
49
|
+
where_rules:
|
50
|
+
- _class: Expressir::Model::WhereRule
|
51
51
|
id: WR1
|
52
52
|
remarks:
|
53
53
|
- type scope - type where
|
@@ -112,8 +112,8 @@ schemas:
|
|
112
112
|
_class: Expressir::Model::Expressions::SimpleReference
|
113
113
|
id: remark_attribute
|
114
114
|
base_path: remark_schema.remark_entity.remark_attribute
|
115
|
-
|
116
|
-
- _class: Expressir::Model::
|
115
|
+
unique_rules:
|
116
|
+
- _class: Expressir::Model::UniqueRule
|
117
117
|
id: UR1
|
118
118
|
remarks:
|
119
119
|
- entity scope - entity unique
|
@@ -123,8 +123,8 @@ schemas:
|
|
123
123
|
- _class: Expressir::Model::Expressions::SimpleReference
|
124
124
|
id: remark_attribute
|
125
125
|
base_path: remark_schema.remark_entity.remark_attribute
|
126
|
-
|
127
|
-
- _class: Expressir::Model::
|
126
|
+
where_rules:
|
127
|
+
- _class: Expressir::Model::WhereRule
|
128
128
|
id: WR1
|
129
129
|
remarks:
|
130
130
|
- entity scope - entity where
|
@@ -180,7 +180,7 @@ schemas:
|
|
180
180
|
- function scope - function type
|
181
181
|
- schema scope - function type
|
182
182
|
- universal scope - function type
|
183
|
-
|
183
|
+
underlying_type:
|
184
184
|
_class: Expressir::Model::Types::Enumeration
|
185
185
|
items:
|
186
186
|
- _class: Expressir::Model::EnumerationItem
|
@@ -271,7 +271,7 @@ schemas:
|
|
271
271
|
- rule scope - rule type
|
272
272
|
- schema scope - rule type
|
273
273
|
- universal scope - rule type
|
274
|
-
|
274
|
+
underlying_type:
|
275
275
|
_class: Expressir::Model::Types::Enumeration
|
276
276
|
items:
|
277
277
|
- _class: Expressir::Model::EnumerationItem
|
@@ -344,8 +344,8 @@ schemas:
|
|
344
344
|
expression:
|
345
345
|
_class: Expressir::Model::Literals::Logical
|
346
346
|
value: :TRUE
|
347
|
-
|
348
|
-
- _class: Expressir::Model::
|
347
|
+
where_rules:
|
348
|
+
- _class: Expressir::Model::WhereRule
|
349
349
|
id: WR1
|
350
350
|
remarks:
|
351
351
|
- rule scope - rule where
|
@@ -389,7 +389,7 @@ schemas:
|
|
389
389
|
- procedure scope - procedure type
|
390
390
|
- schema scope - procedure type
|
391
391
|
- universal scope - procedure type
|
392
|
-
|
392
|
+
underlying_type:
|
393
393
|
_class: Expressir::Model::Types::Enumeration
|
394
394
|
items:
|
395
395
|
- _class: Expressir::Model::EnumerationItem
|