expressir 0.2.24-x86-linux → 0.2.25-x86-linux
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/expressir/express_exp/formatter.rb +2 -2
- data/lib/expressir/express_exp/hyperlink_formatter.rb +10 -15
- data/lib/expressir/express_exp/model_visitor.rb +23 -0
- data/lib/expressir/express_exp/parser.rb +14 -3
- data/lib/expressir/express_exp/resolve_references_model_visitor.rb +33 -0
- data/lib/expressir/model/expressions/simple_reference.rb +4 -0
- data/lib/expressir/model/interfaced_item.rb +0 -4
- data/lib/expressir/model/model_element.rb +5 -2
- data/lib/expressir/version.rb +1 -1
- data/original/examples/syntax/multiple.yaml +14 -0
- data/original/examples/syntax/remark.yaml +14 -0
- data/original/examples/syntax/single.exp +1 -0
- data/original/examples/syntax/single.yaml +6 -0
- data/original/examples/syntax/single_formatted.exp +4 -0
- data/original/examples/syntax/single_formatted.yaml +14 -0
- data/original/examples/syntax/syntax.yaml +81 -0
- data/original/examples/syntax/syntax_hyperlink_formatted.exp +902 -0
- data/spec/expressir/express_exp/formatter_spec.rb +16 -0
- metadata +5 -2
@@ -75,6 +75,22 @@ RSpec.describe Expressir::ExpressExp::Formatter do
|
|
75
75
|
expect(result).to eq(expected_result)
|
76
76
|
end
|
77
77
|
|
78
|
+
it "exports an object with hyperlink formatter (syntax.exp)" do
|
79
|
+
exp_file = Expressir.root_path.join("original", "examples", "syntax", "syntax.exp")
|
80
|
+
formatted_exp_file = Expressir.root_path.join("original", "examples", "syntax", "syntax_hyperlink_formatted.exp")
|
81
|
+
|
82
|
+
repo = Expressir::ExpressExp::Parser.from_file(exp_file)
|
83
|
+
|
84
|
+
formatter = Class.new(Expressir::ExpressExp::Formatter) do
|
85
|
+
include Expressir::ExpressExp::HyperlinkFormatter
|
86
|
+
end
|
87
|
+
result = formatter.format(repo)
|
88
|
+
# File.write(formatted_exp_file, result)
|
89
|
+
expected_result = File.read(formatted_exp_file)
|
90
|
+
|
91
|
+
expect(result).to eq(expected_result)
|
92
|
+
end
|
93
|
+
|
78
94
|
it "exports an object with hyperlink formatter (multiple.exp)" do
|
79
95
|
exp_file = Expressir.root_path.join("original", "examples", "syntax", "multiple.exp")
|
80
96
|
formatted_exp_file = Expressir.root_path.join("original", "examples", "syntax", "multiple_hyperlink_formatted.exp")
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: expressir
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.25
|
5
5
|
platform: x86-linux
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-03-
|
11
|
+
date: 2021-03-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -218,7 +218,9 @@ files:
|
|
218
218
|
- lib/expressir/express_exp/cache.rb
|
219
219
|
- lib/expressir/express_exp/formatter.rb
|
220
220
|
- lib/expressir/express_exp/hyperlink_formatter.rb
|
221
|
+
- lib/expressir/express_exp/model_visitor.rb
|
221
222
|
- lib/expressir/express_exp/parser.rb
|
223
|
+
- lib/expressir/express_exp/resolve_references_model_visitor.rb
|
222
224
|
- lib/expressir/express_exp/schema_head_formatter.rb
|
223
225
|
- lib/expressir/express_exp/visitor.rb
|
224
226
|
- lib/expressir/express_parser.rb
|
@@ -337,6 +339,7 @@ files:
|
|
337
339
|
- original/examples/syntax/syntax.exp
|
338
340
|
- original/examples/syntax/syntax.yaml
|
339
341
|
- original/examples/syntax/syntax_formatted.exp
|
342
|
+
- original/examples/syntax/syntax_hyperlink_formatted.exp
|
340
343
|
- original/examples/syntax/syntax_schema_head_formatted.exp
|
341
344
|
- original/exp2ruby.rb
|
342
345
|
- original/expsm.rb
|