sts 0.5.5 → 0.5.7

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1733e0dbcfaed1493d5a4b8ad50d0bff51b52228652e4a44f26b901b49fe6590
4
- data.tar.gz: 7568fe9a0beaf88dd06fc5100e8092140d756462e5eb93054cf7b40a0524d3cc
3
+ metadata.gz: 64daa424e22276825a3caf3f99f1bbea673717e73f1930068331d4788e35a120
4
+ data.tar.gz: af7065a03a76fe1fab29e481e89755fe503061438787c5accf2f2739d8925e83
5
5
  SHA512:
6
- metadata.gz: 2e67913429546294099efcb5577d0b5daf86bef2414abea854a6f5daa9de9c7d2d7a779c4bdae0df120138a938ae1c92e5582034c705114721f34247773ecbf9
7
- data.tar.gz: 168399cd8329433fded966b8790c754a70d02feec72c5866e1f76c38ba7a5cf850dafb0d0cfa92c826cd08ab62cc3280009f6b31a15f05720b6732dbf8d71f85
6
+ metadata.gz: b703af39516ac606ed7b22071b452cbc2e2f854c70e9cb37e0ec52b8034ba858834050ec4855f750ee35b4a20669b40f663d00e0e6d76bcf693b323374f6e7ae
7
+ data.tar.gz: f744a3a6fa44c147a6692660fd47f0130ceb4d82064998291916247be7c3f9d58715b0508ae1687e55a6de80eaca1ba3d879f8d231b5dd685cbe176c8a24c1d5
@@ -8,6 +8,9 @@ on:
8
8
  tags: [ v* ]
9
9
  pull_request:
10
10
 
11
+ permissions:
12
+ contents: write
13
+
11
14
  jobs:
12
15
  rake:
13
16
  uses: metanorma/ci/.github/workflows/generic-rake.yml@main
@@ -2,11 +2,6 @@
2
2
  # See https://github.com/metanorma/cimas
3
3
  name: release
4
4
 
5
- permissions:
6
- contents: write
7
- packages: write
8
- id-token: write
9
-
10
5
  on:
11
6
  workflow_dispatch:
12
7
  inputs:
@@ -24,6 +19,17 @@ jobs:
24
19
  uses: metanorma/ci/.github/workflows/rubygems-release.yml@main
25
20
  with:
26
21
  next_version: ${{ github.event.inputs.next_version }}
22
+ # Explicit release_command needed since metanorma/ci#314 deprecated
23
+ # `bundler_cache` (hardcoded to false) — the reusable's release job no
24
+ # longer runs `bundle install` implicitly via ruby/setup-ruby, so the
25
+ # default `bundle exec rake release` fires against uninstalled gems.
26
+ # Surfaced by kwkwan on metanorma-plugin-lutaml#285. Deeper fix
27
+ # (bundle install inside rubygems-release.yml's release job) tracked
28
+ # separately.
29
+ release_command: |
30
+ bundle install
31
+ bundle exec rake release
27
32
  secrets:
28
33
  rubygems-api-key: ${{ secrets.METANORMA_CI_RUBYGEMS_API_KEY }}
29
34
  pat_token: ${{ secrets.METANORMA_CI_PAT_TOKEN }}
35
+
data/.rubocop.yml CHANGED
@@ -1,16 +1,31 @@
1
+ # Auto-generated by Cimas: Do not edit it manually!
2
+ # See https://github.com/metanorma/cimas
1
3
  inherit_from:
4
+ - https://raw.githubusercontent.com/riboseinc/oss-guides/main/ci/rubocop.yml
5
+ # .rubocop_todo.yml MUST be the last entry. inherit_from is last-wins:
6
+ # if listed before oss-guides, the shared config's stricter Metrics/
7
+ # (MethodLength, BlockLength, etc.) rules override the todo's per-file
8
+ # grandfathering, and the todo becomes inert on those cops. Empirically
9
+ # verified on suma 2026-07-06: with todo listed first, 34 Metrics/* offenses
10
+ # remained; moved last, cleared. Every gem in the metanorma-org fleet
11
+ # already ships a `.rubocop_todo.yml` on its live tree (audited 2026-07-06,
12
+ # 54/54 have it), so this reference is safe to emit unconditionally.
2
13
  - .rubocop_todo.yml
3
- - https://raw.githubusercontent.com/riboseinc/oss-guides/master/ci/rubocop.yml
14
+
15
+ # Rubocop plugins enabled centrally so every metanorma-org gem picks them up
16
+ # on cimas sync — best practice belongs at the shared-template layer, not
17
+ # per-repo. Per ronaldtse feedback on metanorma/ci#332.
18
+ plugins:
19
+ - rubocop-rspec
20
+ - rubocop-performance
21
+ - rubocop-rake
4
22
 
5
23
  # local repo-specific modifications
6
24
  # ...
7
25
 
8
- Metrics/BlockLength:
9
- Max: 35
10
-
11
26
  AllCops:
12
- TargetRubyVersion: 2.6
13
- NewCops: enable
14
- Exclude:
15
- - 'lib/sts/mapper.rb'
16
- - 'vendor/**/*'
27
+ # 3.3 matches the org-wide minimum being pushed via #274 (Raise minimum
28
+ # Ruby version to 3.3 due to EOL of 3.2 on 2026-03-31). Was 3.4 before
29
+ # this commit — 3.4 was above the org's stated minimum and would have
30
+ # applied Rubocop rules that fail-close on gems still targeting 3.3.
31
+ TargetRubyVersion: 3.3
data/.rubocop_todo.yml CHANGED
@@ -1,49 +1,124 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2026-05-10 03:06:39 UTC using RuboCop version 1.86.1.
3
+ # on 2026-07-15 03:29:27 UTC using RuboCop version 1.86.1.
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: 1
9
+ # Offense count: 4
10
10
  # This cop supports safe autocorrection (--autocorrect).
11
- # Configuration parameters: EnforcedStyle, IndentationWidth.
12
- # SupportedStyles: with_first_argument, with_fixed_indentation
13
- Layout/ArgumentAlignment:
11
+ Layout/EmptyLines:
14
12
  Exclude:
15
- - 'lib/sts/niso_sts/funding_group.rb'
13
+ - 'spec/sts_spec.rb'
16
14
 
17
- # Offense count: 10
15
+ # Offense count: 14
18
16
  # This cop supports safe autocorrection (--autocorrect).
19
17
  # Configuration parameters: Max, AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes, AllowRBSInlineAnnotation, AllowCopDirectives, AllowedPatterns, SplitStrings.
20
18
  # URISchemes: http, https
21
19
  Layout/LineLength:
22
20
  Exclude:
23
- - 'lib/sts/niso_sts/funding_group.rb'
24
21
  - 'lib/sts/niso_sts/mml_content/containers.rb'
25
22
  - 'lib/sts/niso_sts/mml_content/linear_algebra.rb'
26
23
  - 'lib/sts/niso_sts/term.rb'
27
24
  - 'lib/sts/tbx_iso_tml/lang_set.rb'
28
25
  - 'lib/sts/tbx_iso_tml/term_type.rb'
26
+ - 'spec/elements/new_elements_spec.rb'
29
27
  - 'spec/round_trip/reference_docs_spec.rb'
30
28
  - 'spec/spec_helper.rb'
31
29
 
30
+ # Offense count: 1
31
+ # This cop supports unsafe autocorrection (--autocorrect-all).
32
+ Lint/RedundantDirGlobSort:
33
+ Exclude:
34
+ - 'spec/spec_helper.rb'
35
+
36
+ # Offense count: 1
37
+ # Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes, Max.
38
+ Metrics/AbcSize:
39
+ Exclude:
40
+ - 'lib/sts/iso_sts/mathml2/math.rb'
41
+
42
+ # Offense count: 10
43
+ # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns, inherit_mode.
44
+ # AllowedMethods: refine
45
+ Metrics/BlockLength:
46
+ Max: 35
47
+
32
48
  # Offense count: 1
33
49
  # This cop supports safe autocorrection (--autocorrect).
34
- Layout/SpaceInsidePercentLiteralDelimiters:
50
+ # Configuration parameters: EnforcedStyle.
51
+ # SupportedStyles: be, be_nil
52
+ RSpec/BeNil:
53
+ Exclude:
54
+ - 'spec/sts_spec.rb'
55
+
56
+ # Offense count: 9
57
+ # Configuration parameters: IgnoredMetadata.
58
+ RSpec/DescribeClass:
35
59
  Exclude:
60
+ - '**/spec/features/**/*'
61
+ - '**/spec/requests/**/*'
62
+ - '**/spec/routing/**/*'
63
+ - '**/spec/system/**/*'
64
+ - '**/spec/views/**/*'
65
+ - 'spec/anti_patterns_spec.rb'
66
+ - 'spec/elements/expanded_models_spec.rb'
67
+ - 'spec/elements/index_toc_spec.rb'
68
+ - 'spec/elements/missing_attributes_spec.rb'
69
+ - 'spec/elements/modified_elements_spec.rb'
70
+ - 'spec/elements/new_elements_spec.rb'
71
+ - 'spec/elements/reference_models_spec.rb'
72
+ - 'spec/elements/structural_models_spec.rb'
36
73
  - 'spec/round_trip/reference_docs_spec.rb'
37
74
 
38
75
  # Offense count: 1
39
76
  # This cop supports safe autocorrection (--autocorrect).
40
- # Configuration parameters: AllowInHeredoc.
41
- Layout/TrailingWhitespace:
77
+ RSpec/EmptyLineAfterFinalLet:
42
78
  Exclude:
43
- - 'lib/sts/niso_sts/funding_group.rb'
79
+ - 'spec/sts_spec.rb'
80
+
81
+ # Offense count: 62
82
+ # Configuration parameters: CountAsOne.
83
+ RSpec/ExampleLength:
84
+ Max: 40
85
+
86
+ # Offense count: 5
87
+ RSpec/LeakyLocalVariable:
88
+ Exclude:
89
+ - 'spec/anti_patterns_spec.rb'
90
+ - 'spec/round_trip/reference_docs_spec.rb'
91
+
92
+ # Offense count: 4
93
+ # This cop supports safe autocorrection (--autocorrect).
94
+ RSpec/LetBeforeExamples:
95
+ Exclude:
96
+ - 'spec/sts_spec.rb'
44
97
 
45
98
  # Offense count: 1
46
- # Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes, Max.
47
- Metrics/AbcSize:
99
+ RSpec/MultipleDescribes:
48
100
  Exclude:
49
- - 'lib/sts/iso_sts/mathml2/math.rb'
101
+ - 'spec/profiles/iso_iec_validator_spec.rb'
102
+
103
+ # Offense count: 67
104
+ RSpec/MultipleExpectations:
105
+ Max: 14
106
+
107
+ # Offense count: 4
108
+ # Configuration parameters: AllowedPatterns.
109
+ # AllowedPatterns: ^expect_, ^assert_
110
+ RSpec/NoExpectationExample:
111
+ Exclude:
112
+ - 'spec/iso_sts/iso_sts_spec.rb'
113
+ - 'spec/sts_spec.rb'
114
+
115
+ # Offense count: 2
116
+ # Configuration parameters: CustomTransform, IgnoreMethods, IgnoreMetadata, InflectorPath, EnforcedInflector.
117
+ # SupportedInflectors: default, active_support
118
+ RSpec/SpecFilePathFormat:
119
+ Exclude:
120
+ - '**/spec/routing/**/*'
121
+ - 'spec/sts_element_spec.rb'
122
+ - 'spec/sts_table_spec.rb'
123
+ - 'spec/iso_sts/iso_sts_spec.rb'
124
+ - 'spec/iso_sts/iso_sts_element_spec.rb'
@@ -4,6 +4,7 @@ module Sts
4
4
  module TbxIsoTml
5
5
  class Note < Lutaml::Model::Serializable
6
6
  attribute :id, :string
7
+ attribute :value, :string, collection: true
7
8
  attribute :table_wrap, ::Sts::TbxIsoTml::TableWrap
8
9
  attribute :entailed_term, ::Sts::TbxIsoTml::EntailedTerm, collection: true
9
10
  attribute :math, ::Sts::TbxIsoTml::Math, collection: true
@@ -18,10 +19,11 @@ module Sts
18
19
 
19
20
  xml do
20
21
  element "note"
21
- ordered
22
22
  namespace ::Sts::Namespaces::TbxNamespace
23
+ mixed_content
23
24
 
24
25
  map_attribute "id", to: :id
26
+ map_content to: :value
25
27
  map_element "entailedTerm", to: :entailed_term
26
28
  map_element "list", to: :list
27
29
  map_element "table-wrap", to: :table_wrap
@@ -100,7 +100,7 @@ module Sts
100
100
  attribute :sup, ::Sts::NisoSts::Sup, collection: true
101
101
 
102
102
  # break.class
103
- attribute :break, ::Sts::TbxIsoTml::TableBreak
103
+ attribute :break, ::Sts::TbxIsoTml::TableBreak, collection: true
104
104
 
105
105
  # citation.class (std)
106
106
  attribute :std, ::Sts::NisoSts::ReferenceStandard, collection: true
@@ -101,7 +101,7 @@ module Sts
101
101
  attribute :sup, ::Sts::NisoSts::Sup, collection: true
102
102
 
103
103
  # break.class
104
- attribute :break, ::Sts::TbxIsoTml::TableBreak
104
+ attribute :break, ::Sts::TbxIsoTml::TableBreak, collection: true
105
105
 
106
106
  # citation.class (std)
107
107
  attribute :std, ::Sts::NisoSts::ReferenceStandard, collection: true
data/lib/sts/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Sts
4
- VERSION = "0.5.5"
4
+ VERSION = "0.5.7"
5
5
  end
data/sts.gemspec CHANGED
@@ -15,7 +15,7 @@ Gem::Specification.new do |spec|
15
15
  spec.summary = "Library to work with NISO STS and ISOSTS."
16
16
  spec.homepage = "https://github.com/metanorma/sts-ruby"
17
17
  spec.license = "BSD-2-Clause"
18
- spec.required_ruby_version = Gem::Requirement.new(">= 2.6.0")
18
+ spec.required_ruby_version = Gem::Requirement.new(">= 3.3.0")
19
19
 
20
20
  spec.metadata["homepage_uri"] = spec.homepage
21
21
  spec.metadata["source_code_uri"] = spec.homepage
@@ -31,7 +31,7 @@ Gem::Specification.new do |spec|
31
31
 
32
32
  spec.add_dependency "bigdecimal"
33
33
  spec.add_dependency "lutaml-model", "~> 0.8.0"
34
- spec.add_dependency "mml", "~> 2.3.1"
34
+ spec.add_dependency "mml", "~> 2.4.0"
35
35
 
36
36
  # spec.add_dependency "thor"
37
37
  spec.metadata["rubygems_mfa_required"] = "true"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sts
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.5
4
+ version: 0.5.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-05-10 00:00:00.000000000 Z
11
+ date: 2026-07-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bigdecimal
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 2.3.1
47
+ version: 2.4.0
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 2.3.1
54
+ version: 2.4.0
55
55
  description:
56
56
  email:
57
57
  - open.source@ribose.com
@@ -1431,7 +1431,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
1431
1431
  requirements:
1432
1432
  - - ">="
1433
1433
  - !ruby/object:Gem::Version
1434
- version: 2.6.0
1434
+ version: 3.3.0
1435
1435
  required_rubygems_version: !ruby/object:Gem::Requirement
1436
1436
  requirements:
1437
1437
  - - ">="