lutaml-model 0.8.1 → 0.8.2

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: 7e243cd9c18fd7a9e9d16c246265f18a5088096093527bb78c860198621040c1
4
- data.tar.gz: 2eb85ccf7aac11cb6fe202291db84d43c5e32485f1cc32e28679f559e996943e
3
+ metadata.gz: d6eb717e543e98728e8819eef97823780156ce2f594c360f678b9d23f9baf230
4
+ data.tar.gz: 64906eed0282afa83f0905db2e3a75e607a22bacf5e9e40cafa3c0007bdc8fec
5
5
  SHA512:
6
- metadata.gz: 541667a09503edffcc498190f7d845c362168e375928b4f0b9341568e057fd8eab4e00c33cb9d495ee6e853caa935d46e3fb0e9f4985758019bc4ab319350171
7
- data.tar.gz: 342dc3142ac6e68c1bff66956ccdd5a23978253abcab734ffe503534b4205fb7a02f7b2e18603c53f1cc976eb4e907636326acde7653563ff3e000dbc12c40a0
6
+ metadata.gz: 62b3ca87767a8b942d78b22800b6765467532a194484c18f494bc29ff558adb57f2fcf92f7ea5e2bba5a05cac811c39d807c40885c247190452b33556ccf78f8
7
+ data.tar.gz: 1771fd424b8c31e9da2c6940b750c80af2ac38b4ae05e02d234894ee9df5cd5ad4dbd6a9486bbbee0060a3f956507a98a3bfdcc6dd1d6a074957f544649638ee
data/.rubocop_todo.yml CHANGED
@@ -1,6 +1,6 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2026-05-03 14:18:01 UTC using RuboCop version 1.86.1.
3
+ # on 2026-05-03 22:38:22 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
@@ -11,6 +11,14 @@ Gemspec/RequiredRubyVersion:
11
11
  Exclude:
12
12
  - 'lutaml-model.gemspec'
13
13
 
14
+ # Offense count: 2
15
+ # This cop supports safe autocorrection (--autocorrect).
16
+ # Configuration parameters: AllowForAlignment.
17
+ Layout/CommentIndentation:
18
+ Exclude:
19
+ - 'lib/lutaml/model/mapping/listener.rb'
20
+ - 'lib/lutaml/model/services/base.rb'
21
+
14
22
  # Offense count: 3210
15
23
  # This cop supports safe autocorrection (--autocorrect).
16
24
  # Configuration parameters: Max, AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes, AllowRBSInlineAnnotation, AllowCopDirectives, AllowedPatterns, SplitStrings.
@@ -392,16 +400,6 @@ Security/MarshalLoad:
392
400
  Exclude:
393
401
  - 'scripts-xmi-profile/profile_xmi.rb'
394
402
 
395
- # Offense count: 2
396
- # This cop supports safe autocorrection (--autocorrect).
397
- # Configuration parameters: AllowOnlyRestArgument, UseAnonymousForwarding, RedundantRestArgumentNames, RedundantKeywordRestArgumentNames, RedundantBlockArgumentNames.
398
- # RedundantRestArgumentNames: args, arguments
399
- # RedundantKeywordRestArgumentNames: kwargs, options, opts
400
- # RedundantBlockArgumentNames: blk, block, proc
401
- Style/ArgumentsForwarding:
402
- Exclude:
403
- - 'lib/lutaml/model/serialize.rb'
404
-
405
403
  # Offense count: 1
406
404
  # This cop supports unsafe autocorrection (--autocorrect-all).
407
405
  # Configuration parameters: AllowedMethods, AllowedPatterns.
@@ -16,7 +16,8 @@ module Lutaml
16
16
  "multi_json gem is not available. Please add 'multi_json' to your Gemfile."
17
17
  end
18
18
 
19
- def to_json(*)
19
+ # rubocop:disable Style/ArgumentsForwarding -- anonymous * requires Ruby 3.2+
20
+ def to_json(*args)
20
21
  require "multi_json"
21
22
  # Handle KeyValueElement input (new symmetric architecture)
22
23
  attributes_to_serialize = if @attributes.is_a?(Lutaml::KeyValue::DataModel::Element)
@@ -27,7 +28,8 @@ module Lutaml
27
28
  @attributes
28
29
  end
29
30
 
30
- MultiJson.dump(attributes_to_serialize, *)
31
+ MultiJson.dump(attributes_to_serialize, *args)
32
+ # rubocop:enable Style/ArgumentsForwarding
31
33
  rescue LoadError
32
34
  raise LoadError,
33
35
  "multi_json gem is not available. Please add 'multi_json' to your Gemfile."
@@ -16,7 +16,8 @@ module Lutaml
16
16
  "oj gem is not available. Please add 'oj' to your Gemfile or use the StandardAdapter."
17
17
  end
18
18
 
19
- def to_json(*)
19
+ # rubocop:disable Style/ArgumentsForwarding -- anonymous * requires Ruby 3.2+
20
+ def to_json(*args)
20
21
  require "oj"
21
22
  # Handle KeyValueElement input (new symmetric architecture)
22
23
  attributes_to_serialize = if @attributes.is_a?(Lutaml::KeyValue::DataModel::Element)
@@ -27,7 +28,8 @@ module Lutaml
27
28
  @attributes
28
29
  end
29
30
 
30
- Oj.dump(attributes_to_serialize, *)
31
+ Oj.dump(attributes_to_serialize, *args)
32
+ # rubocop:enable Style/ArgumentsForwarding
31
33
  rescue LoadError
32
34
  raise LoadError,
33
35
  "oj gem is not available. Please add 'oj' to your Gemfile or use the StandardAdapter."
@@ -20,7 +20,8 @@ module Lutaml
20
20
  "multi_json gem is not available. Please add 'multi_json' to your Gemfile."
21
21
  end
22
22
 
23
- def to_json(*)
23
+ # rubocop:disable Style/ArgumentsForwarding -- anonymous * requires Ruby 3.2+
24
+ def to_json(*args)
24
25
  require "multi_json"
25
26
  # Handle KeyValueElement input (new symmetric architecture)
26
27
  attributes_to_serialize = if @attributes.is_a?(Lutaml::KeyValue::DataModel::Element)
@@ -31,7 +32,8 @@ module Lutaml
31
32
  @attributes
32
33
  end
33
34
 
34
- MultiJson.dump(attributes_to_serialize, *)
35
+ MultiJson.dump(attributes_to_serialize, *args)
36
+ # rubocop:enable Style/ArgumentsForwarding
35
37
  rescue LoadError
36
38
  raise LoadError,
37
39
  "multi_json gem is not available. Please add 'multi_json' to your Gemfile."
@@ -20,7 +20,8 @@ module Lutaml
20
20
  "oj gem is not available. Please add 'oj' to your Gemfile or use the StandardAdapter."
21
21
  end
22
22
 
23
- def to_json(*)
23
+ # rubocop:disable Style/ArgumentsForwarding -- anonymous * requires Ruby 3.2+
24
+ def to_json(*args)
24
25
  require "oj"
25
26
  # Handle KeyValueElement input (new symmetric architecture)
26
27
  attributes_to_serialize = if @attributes.is_a?(Lutaml::KeyValue::DataModel::Element)
@@ -31,7 +32,8 @@ module Lutaml
31
32
  @attributes
32
33
  end
33
34
 
34
- Oj.dump(attributes_to_serialize, *)
35
+ Oj.dump(attributes_to_serialize, *args)
36
+ # rubocop:enable Style/ArgumentsForwarding
35
37
  rescue LoadError
36
38
  raise LoadError,
37
39
  "oj gem is not available. Please add 'oj' to your Gemfile or use the StandardAdapter."
@@ -91,13 +91,15 @@ module Lutaml
91
91
  #
92
92
  # @param args [Array] Arguments to pass to the handler block
93
93
  # @return [Object] Result of the handler invocation
94
- def call(*)
94
+ # rubocop:disable Style/ArgumentsForwarding -- anonymous * requires Ruby 3.2+
95
+ def call(*args)
95
96
  if simple?
96
97
  raise NoHandlerError,
97
98
  "Cannot call simple listener #{id.inspect}"
98
99
  end
99
100
 
100
- @handler.call(*)
101
+ @handler.call(*args)
102
+ # rubocop:enable Style/ArgumentsForwarding
101
103
  end
102
104
 
103
105
  # Error raised when attempting to invoke a simple listener as a complex one.
@@ -2,8 +2,10 @@ module Lutaml
2
2
  module Model
3
3
  module Services
4
4
  class Base
5
- def self.call(*)
6
- new(*).call
5
+ # rubocop:disable Style/ArgumentsForwarding -- anonymous * requires Ruby 3.2+
6
+ def self.call(*args)
7
+ new(*args).call
8
+ # rubocop:enable Style/ArgumentsForwarding
7
9
  end
8
10
  end
9
11
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Lutaml
4
4
  module Model
5
- VERSION = "0.8.1"
5
+ VERSION = "0.8.2"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lutaml-model
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.1
4
+ version: 0.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.