expressir 2.1.13 → 2.1.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +7 -82
- data/.rubocop_todo.yml +15 -74
- data/Gemfile +4 -5
- data/expressir.gemspec +3 -1
- data/lib/expressir/express/cache.rb +4 -6
- data/lib/expressir/express/formatter.rb +92 -63
- data/lib/expressir/express/model_visitor.rb +10 -9
- data/lib/expressir/express/parser.rb +10 -8
- data/lib/expressir/express/resolve_references_model_visitor.rb +0 -3
- data/lib/expressir/express/visitor.rb +2 -1
- data/lib/expressir/liquid.rb +0 -17
- data/lib/expressir/model/cache.rb +9 -8
- data/lib/expressir/model/data_types/aggregate.rb +6 -11
- data/lib/expressir/model/data_types/array.rb +14 -20
- data/lib/expressir/model/data_types/bag.rb +10 -14
- data/lib/expressir/model/data_types/binary.rb +8 -11
- data/lib/expressir/model/data_types/boolean.rb +6 -1
- data/lib/expressir/model/data_types/enumeration.rb +10 -14
- data/lib/expressir/model/data_types/enumeration_item.rb +3 -5
- data/lib/expressir/model/data_types/generic.rb +4 -6
- data/lib/expressir/model/data_types/generic_entity.rb +4 -6
- data/lib/expressir/model/data_types/integer.rb +6 -1
- data/lib/expressir/model/data_types/list.rb +12 -17
- data/lib/expressir/model/data_types/logical.rb +6 -1
- data/lib/expressir/model/data_types/number.rb +6 -1
- data/lib/expressir/model/data_types/real.rb +6 -8
- data/lib/expressir/model/data_types/select.rb +12 -17
- data/lib/expressir/model/data_types/set.rb +10 -14
- data/lib/expressir/model/data_types/string.rb +8 -11
- data/lib/expressir/model/declarations/attribute.rb +17 -26
- data/lib/expressir/model/declarations/constant.rb +8 -14
- data/lib/expressir/model/declarations/entity.rb +18 -29
- data/lib/expressir/model/declarations/function.rb +25 -39
- data/lib/expressir/model/declarations/interface.rb +12 -16
- data/lib/expressir/model/declarations/interface_item.rb +7 -11
- data/lib/expressir/model/declarations/interfaced_item.rb +11 -18
- data/lib/expressir/model/declarations/parameter.rb +8 -14
- data/lib/expressir/model/declarations/procedure.rb +23 -36
- data/lib/expressir/model/declarations/remark_item.rb +8 -11
- data/lib/expressir/model/declarations/rule.rb +27 -42
- data/lib/expressir/model/declarations/schema.rb +59 -58
- data/lib/expressir/model/declarations/schema_version.rb +7 -10
- data/lib/expressir/model/declarations/schema_version_item.rb +7 -10
- data/lib/expressir/model/declarations/subtype_constraint.rb +12 -20
- data/lib/expressir/model/declarations/type.rb +10 -17
- data/lib/expressir/model/declarations/unique_rule.rb +6 -11
- data/lib/expressir/model/declarations/variable.rb +8 -14
- data/lib/expressir/model/declarations/where_rule.rb +6 -11
- data/lib/expressir/model/expressions/aggregate_initializer.rb +6 -8
- data/lib/expressir/model/expressions/aggregate_initializer_item.rb +8 -11
- data/lib/expressir/model/expressions/binary_expression.rb +40 -42
- data/lib/expressir/model/expressions/entity_constructor.rb +8 -11
- data/lib/expressir/model/expressions/function_call.rb +8 -11
- data/lib/expressir/model/expressions/interval.rb +16 -22
- data/lib/expressir/model/expressions/query_expression.rb +8 -14
- data/lib/expressir/model/expressions/unary_expression.rb +11 -14
- data/lib/expressir/model/identifier.rb +8 -25
- data/lib/expressir/model/literals/binary.rb +6 -8
- data/lib/expressir/model/literals/integer.rb +6 -8
- data/lib/expressir/model/literals/logical.rb +9 -11
- data/lib/expressir/model/literals/real.rb +6 -8
- data/lib/expressir/model/literals/string.rb +8 -11
- data/lib/expressir/model/model_element.rb +164 -131
- data/lib/expressir/model/references/attribute_reference.rb +8 -11
- data/lib/expressir/model/references/group_reference.rb +8 -11
- data/lib/expressir/model/references/index_reference.rb +10 -14
- data/lib/expressir/model/references/simple_reference.rb +10 -13
- data/lib/expressir/model/repository.rb +5 -7
- data/lib/expressir/model/statements/alias.rb +8 -14
- data/lib/expressir/model/statements/assignment.rb +8 -11
- data/lib/expressir/model/statements/case.rb +10 -14
- data/lib/expressir/model/statements/case_action.rb +7 -10
- data/lib/expressir/model/statements/compound.rb +6 -8
- data/lib/expressir/model/statements/escape.rb +6 -1
- data/lib/expressir/model/statements/if.rb +10 -14
- data/lib/expressir/model/statements/null.rb +6 -1
- data/lib/expressir/model/statements/procedure_call.rb +8 -11
- data/lib/expressir/model/statements/repeat.rb +16 -26
- data/lib/expressir/model/statements/return.rb +6 -8
- data/lib/expressir/model/statements/skip.rb +6 -1
- data/lib/expressir/model/supertype_expressions/binary_supertype_expression.rb +12 -16
- data/lib/expressir/model/supertype_expressions/oneof_supertype_expression.rb +6 -8
- data/lib/expressir/model.rb +1 -8
- data/lib/expressir/version.rb +1 -1
- data/lib/expressir.rb +7 -3
- metadata +32 -89
- data/lib/expressir/liquid/cache_drop.rb +0 -20
- data/lib/expressir/liquid/data_type_drop.rb +0 -8
- data/lib/expressir/liquid/data_types/aggregate_drop.rb +0 -21
- data/lib/expressir/liquid/data_types/array_drop.rb +0 -34
- data/lib/expressir/liquid/data_types/bag_drop.rb +0 -26
- data/lib/expressir/liquid/data_types/binary_drop.rb +0 -22
- data/lib/expressir/liquid/data_types/boolean_drop.rb +0 -10
- data/lib/expressir/liquid/data_types/enumeration_drop.rb +0 -30
- data/lib/expressir/liquid/data_types/enumeration_item_drop.rb +0 -17
- data/lib/expressir/liquid/data_types/generic_drop.rb +0 -17
- data/lib/expressir/liquid/data_types/generic_entity_drop.rb +0 -17
- data/lib/expressir/liquid/data_types/integer_drop.rb +0 -10
- data/lib/expressir/liquid/data_types/list_drop.rb +0 -30
- data/lib/expressir/liquid/data_types/logical_drop.rb +0 -10
- data/lib/expressir/liquid/data_types/number_drop.rb +0 -10
- data/lib/expressir/liquid/data_types/real_drop.rb +0 -18
- data/lib/expressir/liquid/data_types/select_drop.rb +0 -34
- data/lib/expressir/liquid/data_types/set_drop.rb +0 -26
- data/lib/expressir/liquid/data_types/string_drop.rb +0 -22
- data/lib/expressir/liquid/declaration_drop.rb +0 -8
- data/lib/expressir/liquid/declarations/attribute_drop.rb +0 -37
- data/lib/expressir/liquid/declarations/constant_drop.rb +0 -25
- data/lib/expressir/liquid/declarations/entity_drop.rb +0 -65
- data/lib/expressir/liquid/declarations/function_drop.rb +0 -93
- data/lib/expressir/liquid/declarations/interface_drop.rb +0 -30
- data/lib/expressir/liquid/declarations/interface_item_drop.rb +0 -22
- data/lib/expressir/liquid/declarations/interfaced_item_drop.rb +0 -34
- data/lib/expressir/liquid/declarations/parameter_drop.rb +0 -25
- data/lib/expressir/liquid/declarations/procedure_drop.rb +0 -89
- data/lib/expressir/liquid/declarations/remark_item_drop.rb +0 -22
- data/lib/expressir/liquid/declarations/rule_drop.rb +0 -105
- data/lib/expressir/liquid/declarations/schema_drop.rb +0 -131
- data/lib/expressir/liquid/declarations/schema_version_drop.rb +0 -26
- data/lib/expressir/liquid/declarations/schema_version_item_drop.rb +0 -22
- data/lib/expressir/liquid/declarations/subtype_constraint_drop.rb +0 -37
- data/lib/expressir/liquid/declarations/type_drop.rb +0 -37
- data/lib/expressir/liquid/declarations/unique_rule_drop.rb +0 -21
- data/lib/expressir/liquid/declarations/variable_drop.rb +0 -25
- data/lib/expressir/liquid/declarations/where_rule_drop.rb +0 -21
- data/lib/expressir/liquid/expression_drop.rb +0 -8
- data/lib/expressir/liquid/expressions/aggregate_initializer_drop.rb +0 -24
- data/lib/expressir/liquid/expressions/aggregate_initializer_item_drop.rb +0 -22
- data/lib/expressir/liquid/expressions/binary_expression_drop.rb +0 -26
- data/lib/expressir/liquid/expressions/entity_constructor_drop.rb +0 -26
- data/lib/expressir/liquid/expressions/function_call_drop.rb +0 -26
- data/lib/expressir/liquid/expressions/interval_drop.rb +0 -34
- data/lib/expressir/liquid/expressions/query_expression_drop.rb +0 -25
- data/lib/expressir/liquid/expressions/unary_expression_drop.rb +0 -22
- data/lib/expressir/liquid/identifier_drop.rb +0 -33
- data/lib/expressir/liquid/literal_drop.rb +0 -8
- data/lib/expressir/liquid/literals/binary_drop.rb +0 -18
- data/lib/expressir/liquid/literals/integer_drop.rb +0 -18
- data/lib/expressir/liquid/literals/logical_drop.rb +0 -18
- data/lib/expressir/liquid/literals/real_drop.rb +0 -18
- data/lib/expressir/liquid/literals/string_drop.rb +0 -22
- data/lib/expressir/liquid/model_element_drop.rb +0 -33
- data/lib/expressir/liquid/reference_drop.rb +0 -8
- data/lib/expressir/liquid/references/attribute_reference_drop.rb +0 -22
- data/lib/expressir/liquid/references/group_reference_drop.rb +0 -22
- data/lib/expressir/liquid/references/index_reference_drop.rb +0 -26
- data/lib/expressir/liquid/references/simple_reference_drop.rb +0 -22
- data/lib/expressir/liquid/repository_drop.rb +0 -25
- data/lib/expressir/liquid/statement_drop.rb +0 -8
- data/lib/expressir/liquid/statements/alias_drop.rb +0 -29
- data/lib/expressir/liquid/statements/assignment_drop.rb +0 -22
- data/lib/expressir/liquid/statements/case_action_drop.rb +0 -26
- data/lib/expressir/liquid/statements/case_drop.rb +0 -30
- data/lib/expressir/liquid/statements/compound_drop.rb +0 -22
- data/lib/expressir/liquid/statements/escape_drop.rb +0 -10
- data/lib/expressir/liquid/statements/if_drop.rb +0 -34
- data/lib/expressir/liquid/statements/null_drop.rb +0 -10
- data/lib/expressir/liquid/statements/procedure_call_drop.rb +0 -26
- data/lib/expressir/liquid/statements/repeat_drop.rb +0 -45
- data/lib/expressir/liquid/statements/return_drop.rb +0 -18
- data/lib/expressir/liquid/statements/skip_drop.rb +0 -10
- data/lib/expressir/liquid/supertype_expression_drop.rb +0 -8
- data/lib/expressir/liquid/supertype_expressions/binary_supertype_expression_drop.rb +0 -26
- data/lib/expressir/liquid/supertype_expressions/oneof_supertype_expression_drop.rb +0 -22
- data/lib/expressir/model/data_type.rb +0 -9
- data/lib/expressir/model/declaration.rb +0 -9
- data/lib/expressir/model/expression.rb +0 -9
- data/lib/expressir/model/literal.rb +0 -9
- data/lib/expressir/model/reference.rb +0 -9
- data/lib/expressir/model/statement.rb +0 -9
- data/lib/expressir/model/supertype_expression.rb +0 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 67f5ecd799b4d840e12c933335be6d93f8b20db9619b687dcb510d8837de9f97
|
4
|
+
data.tar.gz: 93eb64ed9c535fc16fb38c070d8a5f15ede607e94286465687ec857066bb8ee2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6332c17449aa48036cf2f1bbc756715a45a0f0585dbd30fb2348331d28bf809c8e77071987b53f47f4ce994b48f15b35dea20e9901f8e74561876dce269eb302
|
7
|
+
data.tar.gz: 6742625b27b2e76e0f318acd212a5d741fb0779e0200a9cdeaea53feaaa0e80fee7475e81f29970c3f5bb83159e3ada07106fc7838b80e2d41c715b00bf357b0
|
data/.github/workflows/rake.yml
CHANGED
@@ -1,90 +1,15 @@
|
|
1
|
+
# Auto-generated by Cimas: Do not edit it manually!
|
2
|
+
# See https://github.com/metanorma/cimas
|
1
3
|
name: rake
|
2
4
|
|
3
5
|
on:
|
4
6
|
push:
|
5
|
-
branches: [ main ]
|
6
|
-
|
7
|
-
- 'docs/**'
|
8
|
-
- '**.adoc'
|
9
|
-
- '**.md'
|
10
|
-
- .github/workflows/release.yml
|
11
|
-
- .github/workflows/codeql.yml
|
7
|
+
branches: [ master, main ]
|
8
|
+
tags: [ v* ]
|
12
9
|
pull_request:
|
13
|
-
workflow_dispatch:
|
14
|
-
|
15
|
-
concurrency:
|
16
|
-
group: '${{ github.workflow }}-${{ github.job }}-${{ github.head_ref || github.ref_name }}'
|
17
|
-
cancel-in-progress: true
|
18
|
-
|
19
|
-
env:
|
20
|
-
RUBYGEM_VER: 3.4.22
|
21
10
|
|
22
11
|
jobs:
|
23
|
-
rubocop:
|
24
|
-
runs-on: ubuntu-latest
|
25
|
-
steps:
|
26
|
-
- name: Checkout
|
27
|
-
uses: actions/checkout@v4
|
28
|
-
|
29
|
-
- name: Install Ruby
|
30
|
-
uses: ruby/setup-ruby@v1
|
31
|
-
with:
|
32
|
-
ruby-version: 3.2
|
33
|
-
bundler-cache: true
|
34
|
-
|
35
|
-
- name: Rubocop
|
36
|
-
run: bundle exec rake rubocop
|
37
|
-
|
38
12
|
rake:
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
fail-fast: false
|
43
|
-
matrix:
|
44
|
-
ruby: [ '3.3', '3.2', '3.1', '3.0', '2.7' ]
|
45
|
-
os: [ ubuntu-latest, windows-latest, macos-latest ]
|
46
|
-
|
47
|
-
steps:
|
48
|
-
- name: Checkout
|
49
|
-
uses: actions/checkout@v4
|
50
|
-
|
51
|
-
- name: Install Ruby
|
52
|
-
uses: ruby/setup-ruby@v1
|
53
|
-
with:
|
54
|
-
ruby-version: ${{ matrix.ruby }}
|
55
|
-
bundler-cache: true
|
56
|
-
|
57
|
-
- name: Run tests
|
58
|
-
run: |
|
59
|
-
bundle exec rake
|
60
|
-
cat .rspec_status
|
61
|
-
|
62
|
-
rake-alpine:
|
63
|
-
name: test on ruby-${{ matrix.ruby }} alpine container
|
64
|
-
runs-on: ubuntu-latest
|
65
|
-
strategy:
|
66
|
-
fail-fast: false
|
67
|
-
matrix:
|
68
|
-
ruby: [ '3.3', '3.2', '3.1', '3.0', '2.7' ]
|
69
|
-
container: ruby:${{ matrix.ruby }}-alpine
|
70
|
-
steps:
|
71
|
-
- name: Install packages
|
72
|
-
run: |
|
73
|
-
apk --no-cache --upgrade add build-base git bash tar
|
74
|
-
|
75
|
-
- name: Checkout
|
76
|
-
uses: actions/checkout@v4
|
77
|
-
|
78
|
-
- name: Upgrade RubyGems
|
79
|
-
if: matrix.ruby == '3.0' || matrix.ruby == '2.7'
|
80
|
-
run: gem update --system ${{ env.RUBYGEM_VER }} --no-document
|
81
|
-
|
82
|
-
- name: Bundle
|
83
|
-
run: |
|
84
|
-
git config --global --add safe.directory $PWD
|
85
|
-
bundle install --jobs 4 --retry 3
|
86
|
-
|
87
|
-
- name: Run tests
|
88
|
-
run: |
|
89
|
-
bundle exec rake
|
90
|
-
cat .rspec_status
|
13
|
+
uses: metanorma/ci/.github/workflows/generic-rake.yml@main
|
14
|
+
secrets:
|
15
|
+
pat_token: ${{ secrets.LUTAML_CI_PAT_TOKEN }}
|
data/.rubocop_todo.yml
CHANGED
@@ -1,48 +1,17 @@
|
|
1
1
|
# This configuration was generated by
|
2
2
|
# `rubocop --auto-gen-config`
|
3
|
-
# on 2025-
|
3
|
+
# on 2025-03-19 17:57:28 UTC using RuboCop version 1.74.0.
|
4
4
|
# The point is for the user to remove these configuration records
|
5
5
|
# one by one as the offenses are removed from the code base.
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
7
7
|
# versions of RuboCop, may require this file to be generated again.
|
8
8
|
|
9
|
-
# Offense count:
|
10
|
-
#
|
11
|
-
#
|
12
|
-
|
13
|
-
Layout/CaseIndentation:
|
14
|
-
Exclude:
|
15
|
-
- 'lib/expressir/model/model_element.rb'
|
16
|
-
|
17
|
-
# Offense count: 4
|
18
|
-
# This cop supports safe autocorrection (--autocorrect).
|
19
|
-
Layout/ElseAlignment:
|
20
|
-
Exclude:
|
21
|
-
- 'lib/expressir/express/formatter.rb'
|
22
|
-
|
23
|
-
# Offense count: 111
|
24
|
-
# This cop supports safe autocorrection (--autocorrect).
|
25
|
-
# Configuration parameters: EnforcedStyleAlignWith, Severity.
|
26
|
-
# SupportedStylesAlignWith: keyword, variable, start_of_line
|
27
|
-
Layout/EndAlignment:
|
28
|
-
Exclude:
|
29
|
-
- 'lib/expressir/express/formatter.rb'
|
30
|
-
- 'lib/expressir/model/model_element.rb'
|
31
|
-
|
32
|
-
# Offense count: 2
|
33
|
-
# This cop supports safe autocorrection (--autocorrect).
|
34
|
-
# Configuration parameters: EnforcedStyle, IndentationWidth.
|
35
|
-
# SupportedStyles: special_inside_parentheses, consistent, align_brackets
|
36
|
-
Layout/FirstArrayElementIndentation:
|
37
|
-
Exclude:
|
38
|
-
- 'lib/expressir/express/formatter.rb'
|
39
|
-
|
40
|
-
# Offense count: 109
|
41
|
-
# This cop supports safe autocorrection (--autocorrect).
|
42
|
-
# Configuration parameters: Width, AllowedPatterns.
|
43
|
-
Layout/IndentationWidth:
|
9
|
+
# Offense count: 1
|
10
|
+
# Configuration parameters: Severity, Include.
|
11
|
+
# Include: **/*.gemspec
|
12
|
+
Gemspec/RequiredRubyVersion:
|
44
13
|
Exclude:
|
45
|
-
- '
|
14
|
+
- 'expressir.gemspec'
|
46
15
|
|
47
16
|
# Offense count: 2
|
48
17
|
# This cop supports safe autocorrection (--autocorrect).
|
@@ -52,34 +21,21 @@ Layout/LineLength:
|
|
52
21
|
Exclude:
|
53
22
|
- 'lib/expressir/express/parser.rb'
|
54
23
|
|
55
|
-
# Offense count: 4
|
56
|
-
# This cop supports safe autocorrection (--autocorrect).
|
57
|
-
# Configuration parameters: EnforcedStyle, IndentationWidth.
|
58
|
-
# SupportedStyles: aligned, indented
|
59
|
-
Layout/MultilineOperationIndentation:
|
60
|
-
Exclude:
|
61
|
-
- 'lib/expressir/express/formatter.rb'
|
62
|
-
|
63
|
-
# Offense count: 1
|
64
|
-
# Configuration parameters: AllowedParentClasses.
|
65
|
-
Lint/MissingSuper:
|
66
|
-
Exclude:
|
67
|
-
- 'lib/expressir/model/cache.rb'
|
68
|
-
|
69
24
|
# Offense count: 3
|
70
25
|
Lint/ShadowingOuterLocalVariable:
|
71
26
|
Exclude:
|
72
27
|
- 'lib/expressir/express/visitor.rb'
|
73
28
|
|
74
|
-
# Offense count:
|
29
|
+
# Offense count: 3
|
75
30
|
# This cop supports safe autocorrection (--autocorrect).
|
76
31
|
# Configuration parameters: AutoCorrect, AllowUnusedKeywordArguments, IgnoreEmptyMethods, IgnoreNotImplementedMethods, NotImplementedExceptions.
|
77
32
|
# NotImplementedExceptions: NotImplementedError
|
78
33
|
Lint/UnusedMethodArgument:
|
79
34
|
Exclude:
|
35
|
+
- 'lib/expressir/express/cache.rb'
|
80
36
|
- 'lib/expressir/express/parser.rb'
|
81
37
|
|
82
|
-
# Offense count:
|
38
|
+
# Offense count: 48
|
83
39
|
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes, Max.
|
84
40
|
Metrics/AbcSize:
|
85
41
|
Exclude:
|
@@ -87,9 +43,6 @@ Metrics/AbcSize:
|
|
87
43
|
- 'lib/expressir/express/hyperlink_formatter.rb'
|
88
44
|
- 'lib/expressir/express/resolve_references_model_visitor.rb'
|
89
45
|
- 'lib/expressir/express/visitor.rb'
|
90
|
-
- 'lib/expressir/model/declarations/function.rb'
|
91
|
-
- 'lib/expressir/model/declarations/procedure.rb'
|
92
|
-
- 'lib/expressir/model/declarations/rule.rb'
|
93
46
|
- 'lib/expressir/model/declarations/schema.rb'
|
94
47
|
- 'lib/expressir/model/model_element.rb'
|
95
48
|
|
@@ -97,34 +50,30 @@ Metrics/AbcSize:
|
|
97
50
|
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
|
98
51
|
# AllowedMethods: refine
|
99
52
|
Metrics/BlockLength:
|
100
|
-
Max:
|
53
|
+
Max: 141
|
101
54
|
|
102
55
|
# Offense count: 40
|
103
56
|
# Configuration parameters: AllowedMethods, AllowedPatterns, Max.
|
104
57
|
Metrics/CyclomaticComplexity:
|
105
58
|
Exclude:
|
106
59
|
- 'lib/expressir/express/formatter.rb'
|
60
|
+
- 'lib/expressir/express/model_visitor.rb'
|
107
61
|
- 'lib/expressir/express/visitor.rb'
|
108
|
-
- 'lib/expressir/model/declarations/function.rb'
|
109
|
-
- 'lib/expressir/model/declarations/procedure.rb'
|
110
|
-
- 'lib/expressir/model/declarations/rule.rb'
|
111
62
|
- 'lib/expressir/model/declarations/schema.rb'
|
112
63
|
- 'lib/expressir/model/model_element.rb'
|
64
|
+
- 'spec/support/model_element_helper.rb'
|
113
65
|
|
114
|
-
# Offense count:
|
66
|
+
# Offense count: 67
|
115
67
|
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
|
116
68
|
Metrics/MethodLength:
|
117
|
-
Max:
|
69
|
+
Max: 34
|
118
70
|
|
119
|
-
# Offense count:
|
71
|
+
# Offense count: 32
|
120
72
|
# Configuration parameters: AllowedMethods, AllowedPatterns, Max.
|
121
73
|
Metrics/PerceivedComplexity:
|
122
74
|
Exclude:
|
123
75
|
- 'lib/expressir/express/formatter.rb'
|
124
76
|
- 'lib/expressir/express/visitor.rb'
|
125
|
-
- 'lib/expressir/model/declarations/function.rb'
|
126
|
-
- 'lib/expressir/model/declarations/procedure.rb'
|
127
|
-
- 'lib/expressir/model/declarations/rule.rb'
|
128
77
|
- 'lib/expressir/model/declarations/schema.rb'
|
129
78
|
- 'lib/expressir/model/model_element.rb'
|
130
79
|
|
@@ -137,11 +86,3 @@ Performance/FixedSize:
|
|
137
86
|
Style/MissingRespondToMissing:
|
138
87
|
Exclude:
|
139
88
|
- 'lib/expressir/express/visitor.rb'
|
140
|
-
|
141
|
-
# Offense count: 2
|
142
|
-
# This cop supports safe autocorrection (--autocorrect).
|
143
|
-
# Configuration parameters: EnforcedStyle.
|
144
|
-
# SupportedStyles: single_quotes, double_quotes
|
145
|
-
Style/StringLiteralsInInterpolation:
|
146
|
-
Exclude:
|
147
|
-
- 'lib/expressir/model/model_element.rb'
|
data/Gemfile
CHANGED
@@ -6,11 +6,10 @@ source "https://rubygems.org"
|
|
6
6
|
gemspec
|
7
7
|
|
8
8
|
gem "pry"
|
9
|
-
gem "rake"
|
10
|
-
gem "rspec"
|
11
|
-
gem "rubocop"
|
9
|
+
gem "rake"
|
10
|
+
gem "rspec"
|
11
|
+
gem "rubocop"
|
12
12
|
gem "rubocop-performance"
|
13
13
|
gem "rubocop-rake", require: false
|
14
14
|
gem "rubocop-rspec", require: false
|
15
|
-
gem "
|
16
|
-
gem "yard", "~> 0.9"
|
15
|
+
gem "yard"
|
data/expressir.gemspec
CHANGED
@@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
|
|
23
23
|
spec.metadata["changelog_uri"] = "https://github.com/lutaml/expressir/releases"
|
24
24
|
spec.metadata["rubygems_mfa_required"] = "true"
|
25
25
|
|
26
|
-
spec.required_ruby_version = Gem::Requirement.new(">=
|
26
|
+
spec.required_ruby_version = Gem::Requirement.new(">= 3.0.0")
|
27
27
|
|
28
28
|
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
29
29
|
`git ls-files -z`.split("\x0").reject do |f|
|
@@ -34,6 +34,8 @@ Gem::Specification.new do |spec|
|
|
34
34
|
spec.test_files = `git ls-files -- {spec}/*`.split("\n")
|
35
35
|
|
36
36
|
spec.add_dependency "liquid"
|
37
|
+
spec.add_dependency "lutaml-model", "~>0.7"
|
37
38
|
spec.add_dependency "parslet", "~> 2.0"
|
38
39
|
spec.add_dependency "thor", "~> 1.0"
|
40
|
+
spec.add_dependency "zeitwerk", "~> 2.6"
|
39
41
|
end
|
@@ -1,5 +1,4 @@
|
|
1
1
|
require "zlib"
|
2
|
-
require_relative "../model"
|
3
2
|
|
4
3
|
module Expressir
|
5
4
|
module Express
|
@@ -16,10 +15,10 @@ module Expressir
|
|
16
15
|
cache = Model::Cache.new(
|
17
16
|
version: version,
|
18
17
|
content: content,
|
18
|
+
root_path: root_path,
|
19
19
|
)
|
20
20
|
|
21
|
-
|
22
|
-
yaml = YAML.dump(hash)
|
21
|
+
yaml = cache.to_yaml
|
23
22
|
yaml_compressed = Zlib::Deflate.deflate(yaml)
|
24
23
|
|
25
24
|
File.binwrite(file, yaml_compressed)
|
@@ -36,14 +35,13 @@ module Expressir
|
|
36
35
|
|
37
36
|
yaml_compressed = File.binread(file)
|
38
37
|
yaml = Zlib::Inflate.inflate(yaml_compressed)
|
39
|
-
|
40
|
-
cache = Model::ModelElement.from_hash(hash, root_path: root_path)
|
38
|
+
cache = Model::Cache.from_yaml(yaml)
|
41
39
|
|
42
40
|
if cache.version != version
|
43
41
|
raise Error.new("Cache version mismatch, cache version is #{cache.version}, Expressir version is #{version}")
|
44
42
|
end
|
45
43
|
|
46
|
-
cache
|
44
|
+
cache
|
47
45
|
end
|
48
46
|
end
|
49
47
|
end
|