xsd 2.4.0 → 2.4.2

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: f913aa0733e739fe2c7bad6f4c3969f9ee3e5a14df34bb240f3b188b3fbc77e0
4
- data.tar.gz: 5a3b4c6bdd94e8c7223b3d5b7d6c29d010689a36d5efd014129e7d1d8b23ff7f
3
+ metadata.gz: 5866e8be4b81ee97f2df8d4b1df3f585d94a3edcb7408ef45d6f8fee2fb89f1e
4
+ data.tar.gz: 793e41c9424ca2cce3d0b9f5b26b38d9e39696c31c29910ba3f9223dd6850724
5
5
  SHA512:
6
- metadata.gz: 898d2ccca42898cef0a4017e37e3b8f0f4da86a462552aa971c3268abbf675eeceb5e5022364d755f40f09714245eb7ac3057895a1abc45dcf4a4108f92c7b73
7
- data.tar.gz: bfad6be19d68ef8b932cac391701f80174ea36b4883f8cad2e3be3b0e3d068755b8bbda328d1de76d5ef499876e8081384e0630e6931535e688e79958210f19c
6
+ metadata.gz: 89bee39c770bb75941940911c875159b455443a97fdb10d6bb0064a3acfb557d66f106fba45701940aff51f07f2f61a5d7f44453ed7b80a81426042da76dec8e
7
+ data.tar.gz: 8b3f4004b78f7a5be63903514a60971a21b5107e4488882d2d2a36e260d6d6eaa6b200ab37491fe4060d50f8f00c18b0ced84aac3323819af41d02535fb7512a
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
 
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [2.4.1] - 2023-11-13
4
+
5
+ - Fix attribute value existence check
6
+
3
7
  ## [2.4.0] - 2023-11-13
4
8
 
5
9
  - Fixed reading of SimpleType in List
@@ -193,7 +193,7 @@ module XSD
193
193
  # @param [Nokogiri::XML::Node] node
194
194
  # @return Array<String>
195
195
  def documentation_for(node)
196
- node.xpath('./xs:annotation/xs:documentation/text()', { 'xs' => XML_SCHEMA }).map { |x| x.to_s.strip }
196
+ node.xpath('./xs:annotation/xs:documentation/text()', { 'xs' => XML_SCHEMA }).map { |x| x.text.strip }
197
197
  end
198
198
 
199
199
  # Get all available elements on the current stack level
data/lib/xsd/generator.rb CHANGED
@@ -77,7 +77,7 @@ 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
82
  elsif attribute.required?
83
83
  raise Error, "Attribute #{attribute.name} is required, but no data in provided for it" if attribute.fixed.nil?
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.4.0'
4
+ VERSION = '2.4.2'
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.4.0
4
+ version: 2.4.2
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-11-13 00:00:00.000000000 Z
11
+ date: 2024-04-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: builder
@@ -134,7 +134,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
134
134
  - !ruby/object:Gem::Version
135
135
  version: '0'
136
136
  requirements: []
137
- rubygems_version: 3.4.10
137
+ rubygems_version: 3.5.5
138
138
  signing_key:
139
139
  specification_version: 4
140
140
  summary: The Ruby XSD library is an XML Schema implementation for Ruby.