lutaml-xsd 1.0.3 → 1.0.4

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: 003d1a3ea29751816eaa61e7c5be8f4210b2e4057d132bb1075c8b0ccac2d617
4
- data.tar.gz: 56f69ef85d12950d673fc41131ae78b25ff50801bd489786ed0a3c52ca7f38b4
3
+ metadata.gz: 46cf2c2fbbbfea3660ff779819ae6c3687cb2c31051d96162e165aa2206189b4
4
+ data.tar.gz: 51cd5b535685962565e9b1dc2af295cb305e9c9fdd76d97b500b737c3fb18bdf
5
5
  SHA512:
6
- metadata.gz: 7271814f9e3a6e8c9b454ec6f45da2880ceba37fd6eac110d691b2959400e49a81c39c5ee09267c5c897e7a6efd1b039a50f9ac1103dc881feaf1917c8746e3a
7
- data.tar.gz: a88385aced78379d2ce157514c2dd0256600906a56325eb5dbed05820f5f520403793416dfc51313719fbd0f08e4844af75ede808a3b4ef842e872fd9791f3f7
6
+ metadata.gz: '02953bf07154ac931462385ecd788f3572b272988c4c6c21acdda265140699471522c46224ffcdd876da220d533d1f43deab30c217b53c85cf3fff9958421541'
7
+ data.tar.gz: 96bfbfad2bfdbcb6a8d3aa64f6113a34c1a4580c7bf6a104814ffb99fbe73f6728310993599d5a01b00c3b11ae5c405730d1816fee3f55be5cef2dd700a54b3a
data/.rubocop.yml CHANGED
@@ -1,3 +1,5 @@
1
+ inherit_from: .rubocop_todo.yml
2
+
1
3
  AllCops:
2
4
  TargetRubyVersion: 3.0
3
5
 
data/.rubocop_todo.yml ADDED
@@ -0,0 +1,21 @@
1
+ # This configuration was generated by
2
+ # `rubocop --auto-gen-config`
3
+ # on 2025-03-07 11:40:20 UTC using RuboCop version 1.73.2.
4
+ # The point is for the user to remove these configuration records
5
+ # one by one as the offenses are removed from the code base.
6
+ # Note that changes in the inspected code, or installation of new
7
+ # versions of RuboCop, may require this file to be generated again.
8
+
9
+ # Offense count: 1
10
+ # This cop supports safe autocorrection (--autocorrect).
11
+ # Configuration parameters: TreatCommentsAsGroupSeparators, ConsiderPunctuation, Include.
12
+ # Include: **/*.gemfile, **/Gemfile, **/gems.rb
13
+ Bundler/OrderedGems:
14
+ Exclude:
15
+ - 'Gemfile'
16
+
17
+ # Offense count: 2
18
+ # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
19
+ # AllowedMethods: refine
20
+ Metrics/BlockLength:
21
+ Max: 30
data/Gemfile CHANGED
@@ -6,13 +6,8 @@ source "https://rubygems.org"
6
6
  gemspec
7
7
 
8
8
  gem "equivalent-xml"
9
-
10
- gem "rake", "~> 13.0"
11
-
12
- gem "rspec", "~> 3.0"
13
-
14
- gem "rubocop", "~> 1.21"
15
-
9
+ gem "rake"
10
+ gem "rspec"
11
+ gem "rubocop"
16
12
  gem "nokogiri"
17
-
18
13
  gem "xml-c14n"
@@ -7,7 +7,7 @@ module Lutaml
7
7
  attribute :max_occurs, :string
8
8
  attribute :min_occurs, :string
9
9
  attribute :annotation, Annotation
10
- attribute :element, Element, collection: true
10
+ attribute :element, Element, collection: true, initialize_empty: true
11
11
 
12
12
  xml do
13
13
  root "all", mixed: true
@@ -4,8 +4,8 @@ module Lutaml
4
4
  module Xsd
5
5
  class Annotation < Model::Serializable
6
6
  attribute :id, :string
7
- attribute :documentation, Documentation, collection: true
8
- attribute :appinfo, Appinfo, collection: true
7
+ attribute :documentation, Documentation, collection: true, initialize_empty: true
8
+ attribute :appinfo, Appinfo, collection: true, initialize_empty: true
9
9
 
10
10
  xml do
11
11
  root "annotation", mixed: true
@@ -8,8 +8,8 @@ module Lutaml
8
8
  attribute :ref, :string
9
9
  attribute :annotation, Annotation
10
10
  attribute :any_attribute, AnyAttribute
11
- attribute :attribute, Attribute, collection: true
12
- attribute :attribute_group, AttributeGroup, collection: true
11
+ attribute :attribute, Attribute, collection: true, initialize_empty: true
12
+ attribute :attribute_group, AttributeGroup, collection: true, initialize_empty: true
13
13
 
14
14
  xml do
15
15
  root "attributeGroup", mixed: true
@@ -10,11 +10,11 @@ module Lutaml
10
10
  attribute :min_occurs, :string
11
11
  attribute :max_occurs, :string
12
12
  attribute :annotation, Annotation
13
- attribute :any, Any, collection: true
14
- attribute :group, Group, collection: true
15
- attribute :choice, Choice, collection: true
16
- attribute :element, Element, collection: true
17
- attribute :sequence, Sequence, collection: true
13
+ attribute :any, Any, collection: true, initialize_empty: true
14
+ attribute :group, Group, collection: true, initialize_empty: true
15
+ attribute :choice, Choice, collection: true, initialize_empty: true
16
+ attribute :element, Element, collection: true, initialize_empty: true
17
+ attribute :sequence, Sequence, collection: true, initialize_empty: true
18
18
 
19
19
  xml do
20
20
  root "choice", mixed: true
@@ -16,8 +16,8 @@ module Lutaml
16
16
  attribute :annotation, Annotation
17
17
  attribute :simple_content, SimpleContent
18
18
  attribute :complex_content, ComplexContent
19
- attribute :attribute, Attribute, collection: true
20
- attribute :attribute_group, AttributeGroup, collection: true
19
+ attribute :attribute, Attribute, collection: true, initialize_empty: true
20
+ attribute :attribute_group, AttributeGroup, collection: true, initialize_empty: true
21
21
 
22
22
  xml do
23
23
  root "complexType", mixed: true
@@ -20,9 +20,9 @@ module Lutaml
20
20
  attribute :annotation, Annotation
21
21
  attribute :simple_type, SimpleType
22
22
  attribute :complex_type, ComplexType
23
- attribute :key, Key, collection: true
24
- attribute :keyref, Keyref, collection: true
25
- attribute :unique, Unique, collection: true
23
+ attribute :key, Key, collection: true, initialize_empty: true
24
+ attribute :keyref, Keyref, collection: true, initialize_empty: true
25
+ attribute :unique, Unique, collection: true, initialize_empty: true
26
26
 
27
27
  xml do
28
28
  root "element", mixed: true
@@ -11,8 +11,8 @@ module Lutaml
11
11
  attribute :sequence, Sequence
12
12
  attribute :annotation, Annotation
13
13
  attribute :any_attribute, AnyAttribute
14
- attribute :attribute, Attribute, collection: true
15
- attribute :attribute_group, AttributeGroup, collection: true
14
+ attribute :attribute, Attribute, collection: true, initialize_empty: true
15
+ attribute :attribute_group, AttributeGroup, collection: true, initialize_empty: true
16
16
 
17
17
  xml do
18
18
  root "extension", mixed: true
@@ -7,8 +7,8 @@ module Lutaml
7
7
  attribute :base, :string
8
8
  attribute :annotation, Annotation
9
9
  attribute :any_attribute, AnyAttribute
10
- attribute :attribute, Attribute, collection: true
11
- attribute :attribute_group, AttributeGroup, collection: true
10
+ attribute :attribute, Attribute, collection: true, initialize_empty: true
11
+ attribute :attribute_group, AttributeGroup, collection: true, initialize_empty: true
12
12
 
13
13
  xml do
14
14
  root "extension", mixed: true
@@ -7,7 +7,7 @@ module Lutaml
7
7
  attribute :name, :string
8
8
  attribute :selector, Selector
9
9
  attribute :annotation, Annotation
10
- attribute :field, Field, collection: true
10
+ attribute :field, Field, collection: true, initialize_empty: true
11
11
  # Field should be one or more
12
12
 
13
13
  xml do
@@ -8,7 +8,7 @@ module Lutaml
8
8
  attribute :refer, :string
9
9
  attribute :selector, Selector
10
10
  attribute :annotation, Annotation
11
- attribute :field, Field, collection: true
11
+ attribute :field, Field, collection: true, initialize_empty: true
12
12
  # Field should be one or more
13
13
 
14
14
  xml do
@@ -11,8 +11,8 @@ module Lutaml
11
11
  attribute :sequence, Sequence
12
12
  attribute :annotation, Annotation
13
13
  attribute :any_attribute, AnyAttribute
14
- attribute :attribute, Attribute, collection: true
15
- attribute :attribute_group, AttributeGroup, collection: true
14
+ attribute :attribute, Attribute, collection: true, initialize_empty: true
15
+ attribute :attribute_group, AttributeGroup, collection: true, initialize_empty: true
16
16
 
17
17
  xml do
18
18
  root "restriction", mixed: true
@@ -8,20 +8,20 @@ module Lutaml
8
8
  attribute :annotation, Annotation
9
9
  attribute :simple_type, SimpleType
10
10
  attribute :any_attribute, AnyAttribute
11
- attribute :length, Length, collection: true
12
- attribute :pattern, Pattern, collection: true
13
- attribute :attribute, Attribute, collection: true
14
- attribute :max_length, MaxLength, collection: true
15
- attribute :min_length, MinLength, collection: true
16
- attribute :white_space, WhiteSpace, collection: true
17
- attribute :enumeration, Enumeration, collection: true
18
- attribute :total_digits, TotalDigits, collection: true
19
- attribute :min_exclusive, MinExclusive, collection: true
20
- attribute :min_inclusive, MinInclusive, collection: true
21
- attribute :max_exclusive, MaxExclusive, collection: true
22
- attribute :max_inclusive, MaxInclusive, collection: true
23
- attribute :attribute_group, AttributeGroup, collection: true
24
- attribute :fraction_digits, FractionDigits, collection: true
11
+ attribute :length, Length, collection: true, initialize_empty: true
12
+ attribute :pattern, Pattern, collection: true, initialize_empty: true
13
+ attribute :attribute, Attribute, collection: true, initialize_empty: true
14
+ attribute :max_length, MaxLength, collection: true, initialize_empty: true
15
+ attribute :min_length, MinLength, collection: true, initialize_empty: true
16
+ attribute :white_space, WhiteSpace, collection: true, initialize_empty: true
17
+ attribute :enumeration, Enumeration, collection: true, initialize_empty: true
18
+ attribute :total_digits, TotalDigits, collection: true, initialize_empty: true
19
+ attribute :min_exclusive, MinExclusive, collection: true, initialize_empty: true
20
+ attribute :min_inclusive, MinInclusive, collection: true, initialize_empty: true
21
+ attribute :max_exclusive, MaxExclusive, collection: true, initialize_empty: true
22
+ attribute :max_inclusive, MaxInclusive, collection: true, initialize_empty: true
23
+ attribute :attribute_group, AttributeGroup, collection: true, initialize_empty: true
24
+ attribute :fraction_digits, FractionDigits, collection: true, initialize_empty: true
25
25
 
26
26
  xml do
27
27
  root "restriction", mixed: true
@@ -7,18 +7,18 @@ module Lutaml
7
7
  attribute :base, :string
8
8
  attribute :annotation, Annotation
9
9
  attribute :simple_type, SimpleType
10
- attribute :length, Length, collection: true
11
- attribute :pattern, Pattern, collection: true
12
- attribute :min_length, MinLength, collection: true
13
- attribute :max_length, MaxLength, collection: true
14
- attribute :white_space, WhiteSpace, collection: true
15
- attribute :enumeration, Enumeration, collection: true
16
- attribute :total_digits, TotalDigits, collection: true
17
- attribute :max_exclusive, MaxExclusive, collection: true
18
- attribute :min_exclusive, MinExclusive, collection: true
19
- attribute :max_inclusive, MaxInclusive, collection: true
20
- attribute :min_inclusive, MinInclusive, collection: true
21
- attribute :fraction_digits, FractionDigits, collection: true
10
+ attribute :length, Length, collection: true, initialize_empty: true
11
+ attribute :pattern, Pattern, collection: true, initialize_empty: true
12
+ attribute :min_length, MinLength, collection: true, initialize_empty: true
13
+ attribute :max_length, MaxLength, collection: true, initialize_empty: true
14
+ attribute :white_space, WhiteSpace, collection: true, initialize_empty: true
15
+ attribute :enumeration, Enumeration, collection: true, initialize_empty: true
16
+ attribute :total_digits, TotalDigits, collection: true, initialize_empty: true
17
+ attribute :max_exclusive, MaxExclusive, collection: true, initialize_empty: true
18
+ attribute :min_exclusive, MinExclusive, collection: true, initialize_empty: true
19
+ attribute :max_inclusive, MaxInclusive, collection: true, initialize_empty: true
20
+ attribute :min_inclusive, MinInclusive, collection: true, initialize_empty: true
21
+ attribute :fraction_digits, FractionDigits, collection: true, initialize_empty: true
22
22
 
23
23
  xml do
24
24
  root "restriction", mixed: true
@@ -15,20 +15,20 @@ module Lutaml
15
15
  attribute :target_namespace, :string
16
16
  attribute :element_form_default, :string
17
17
  attribute :attribute_form_default, :string
18
- attribute :imports, Import, collection: true
19
- attribute :includes, Include, collection: true
20
-
21
- attribute :group, Group, collection: true
22
- attribute :import, Import, collection: true
23
- attribute :element, Element, collection: true
24
- attribute :include, Include, collection: true
25
- attribute :notation, Notation, collection: true
26
- attribute :redefine, Redefine, collection: true
27
- attribute :attribute, Attribute, collection: true
28
- attribute :annotation, Annotation, collection: true
29
- attribute :simple_type, SimpleType, collection: true
30
- attribute :complex_type, ComplexType, collection: true
31
- attribute :attribute_group, AttributeGroup, collection: true
18
+ attribute :imports, Import, collection: true, initialize_empty: true
19
+ attribute :includes, Include, collection: true, initialize_empty: true
20
+
21
+ attribute :group, Group, collection: true, initialize_empty: true
22
+ attribute :import, Import, collection: true, initialize_empty: true
23
+ attribute :element, Element, collection: true, initialize_empty: true
24
+ attribute :include, Include, collection: true, initialize_empty: true
25
+ attribute :notation, Notation, collection: true, initialize_empty: true
26
+ attribute :redefine, Redefine, collection: true, initialize_empty: true
27
+ attribute :attribute, Attribute, collection: true, initialize_empty: true
28
+ attribute :annotation, Annotation, collection: true, initialize_empty: true
29
+ attribute :simple_type, SimpleType, collection: true, initialize_empty: true
30
+ attribute :complex_type, ComplexType, collection: true, initialize_empty: true
31
+ attribute :attribute_group, AttributeGroup, collection: true, initialize_empty: true
32
32
 
33
33
  xml do
34
34
  root "schema", mixed: true
@@ -9,11 +9,11 @@ module Lutaml
9
9
  attribute :min_occurs, :string
10
10
  attribute :max_occurs, :string
11
11
  attribute :annotation, Annotation
12
- attribute :sequence, Sequence, collection: true
13
- attribute :element, Element, collection: true
14
- attribute :choice, Choice, collection: true
15
- attribute :group, Group, collection: true
16
- attribute :any, Any, collection: true
12
+ attribute :sequence, Sequence, collection: true, initialize_empty: true
13
+ attribute :element, Element, collection: true, initialize_empty: true
14
+ attribute :choice, Choice, collection: true, initialize_empty: true
15
+ attribute :group, Group, collection: true, initialize_empty: true
16
+ attribute :any, Any, collection: true, initialize_empty: true
17
17
 
18
18
  xml do
19
19
  root "sequence", mixed: true
@@ -6,7 +6,7 @@ module Lutaml
6
6
  attribute :id, :string
7
7
  attribute :member_types, :string, default: -> { "" }
8
8
  attribute :annotation, Annotation
9
- attribute :simple_type, SimpleType, collection: true
9
+ attribute :simple_type, SimpleType, collection: true, initialize_empty: true
10
10
 
11
11
  xml do
12
12
  root "union", mixed: true
@@ -7,7 +7,7 @@ module Lutaml
7
7
  attribute :name, :string
8
8
  attribute :selector, Selector
9
9
  attribute :annotation, Annotation
10
- attribute :field, Field, collection: true
10
+ attribute :field, Field, collection: true, initialize_empty: true
11
11
 
12
12
  xml do
13
13
  root "unique", mixed: true
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Lutaml
4
4
  module Xsd
5
- VERSION = "1.0.3"
5
+ VERSION = "1.0.4"
6
6
  end
7
7
  end
data/lutaml-xsd.gemspec CHANGED
@@ -32,6 +32,6 @@ Gem::Specification.new do |spec|
32
32
 
33
33
  spec.test_files = `git ls-files -- {spec}/*`.split("\n")
34
34
 
35
- spec.add_dependency "lutaml-model", "~> 0.5"
35
+ spec.add_dependency "lutaml-model", "~> 0.7"
36
36
  spec.add_dependency "zeitwerk"
37
37
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lutaml-xsd
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-02-24 00:00:00.000000000 Z
11
+ date: 2025-03-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lutaml-model
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0.5'
19
+ version: '0.7'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0.5'
26
+ version: '0.7'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: zeitwerk
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -50,6 +50,7 @@ files:
50
50
  - ".gitignore"
51
51
  - ".rspec"
52
52
  - ".rubocop.yml"
53
+ - ".rubocop_todo.yml"
53
54
  - CHANGELOG.md
54
55
  - CODE_OF_CONDUCT.md
55
56
  - Gemfile
@@ -132,7 +133,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
132
133
  - !ruby/object:Gem::Version
133
134
  version: '0'
134
135
  requirements: []
135
- rubygems_version: 3.3.27
136
+ rubygems_version: 3.5.22
136
137
  signing_key:
137
138
  specification_version: 4
138
139
  summary: Library for XML Schema Definition (XSD) files