xsd 2.3.0 → 2.4.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dce377d21632c6a26b8cf654ec519d7fa7664a6518b136280433a1411580159c
4
- data.tar.gz: 57ff6cd7eb787f93d1ab51b8ebcc170da4f9726105a584a3a9d69f24711fdd0d
3
+ metadata.gz: 786af29254baeee14f0dbe25030ea93f11b13cbc65809a6b74eec7dac9c3e964
4
+ data.tar.gz: 8a57b93cbd03ffb4cc176dee9ef9acec5ee37da68bcba6c0dd29bfb9450cd71c
5
5
  SHA512:
6
- metadata.gz: 95c494a1699eee86c90989c1de42ef8f1532ea805273e1f35b2b7f2f6d68cc74f4a056ba1c71b5b3f3e9b7b80d9500b206fc684d4bddf4cb3563dda59d21fc48
7
- data.tar.gz: d58a3a37ebd8104cbcd58eb416f127bd862f2c9e510bafafc83ffbefb257ce5ef1093d56db8a6ad0682137fbe9de04d67fa8d0e5d2b32f38a56e1b1a3fe0e0cc
6
+ metadata.gz: 96c8d9f3e1905cab35ab23446c7ab6b14b6d60a352fc603a520851f7669a5ae0fad5f61256cc95ee1077aade09a3fb8d12aeee28721f003d615d01233d0d190c
7
+ data.tar.gz: b5214a02de3b5b196d37eacddd6afb987fdd3ff23bb0a4660204fbac91875d61e266089e84f183a64fae5b8a2eba3a47e65cd0813babec74e8e45842243a2bd1
data/.rubocop.yml CHANGED
@@ -42,6 +42,7 @@ Metrics/AbcSize:
42
42
  Enabled: false
43
43
 
44
44
  Metrics/BlockLength:
45
+ Max: 40
45
46
  Exclude:
46
47
  - 'spec/**/*_spec.rb'
47
48
 
@@ -87,6 +88,9 @@ RSpec/NoExpectationExample:
87
88
  RSpec/RepeatedExample:
88
89
  Enabled: false
89
90
 
91
+ Style/ArgumentsForwarding:
92
+ Enabled: false
93
+
90
94
  Style/ConditionalAssignment:
91
95
  Enabled: false
92
96
 
data/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [2.4.1] - 2023-11-13
4
+
5
+ - Fix attribute value existence check
6
+
7
+ ## [2.4.0] - 2023-11-13
8
+
9
+ - Fixed reading of SimpleType in List
10
+ - Add support for Restriction without base
11
+ - Support Any generation in simple scenarios
12
+
3
13
  ## [2.3.0] - 2023-09-06
4
14
 
5
15
  - Fixed reading of SimpleType in List
data/lib/xsd/generator.rb CHANGED
@@ -77,8 +77,12 @@ module XSD
77
77
  # prepare attributes
78
78
  all_attributes.each do |attribute|
79
79
  value = item["@#{attribute.name}"]
80
- if value
80
+ if !value.nil?
81
81
  attributes[attribute.name] = value
82
+ elsif attribute.required?
83
+ raise Error, "Attribute #{attribute.name} is required, but no data in provided for it" if attribute.fixed.nil?
84
+
85
+ attributes[attribute.name] = attribute.fixed
82
86
  else
83
87
  attributes.delete(attribute.name)
84
88
  end
data/lib/xsd/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module XSD
4
- VERSION = '2.3.0'
4
+ VERSION = '2.4.1'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xsd
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.0
4
+ version: 2.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - d.arkhipov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-09-06 00:00:00.000000000 Z
11
+ date: 2023-11-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: builder