xsd 2.6.2 → 2.6.3

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: d3f894631bb4ecfab0ab93c8b67f1a4d2d85dc88aeef5c69890e424c018ea7a0
4
- data.tar.gz: 6be2dfdee0a06f955d80ba57cbc39739fa6c09c06d6af80d194e77ccf32c8797
3
+ metadata.gz: f1d2b1ea3cf4fb7f11e131e1a7cb9f446682b8be0bb1a38bb90817a9c0ef8717
4
+ data.tar.gz: edbb623f773bd0909284728b42e71e8a49d6663159e7382d12cb9229f4057b05
5
5
  SHA512:
6
- metadata.gz: 7d45a0c77011c0bdfd4bdee3998eef649129cb51d2c248b733a35b9c2c19bb8678b2b41035afcc95f69f02e37df550bd90ef5c57a03225789de34ff7dfb65c11
7
- data.tar.gz: dd2673d5e862524a8fad13f8ce55857d9ec3c7daed215542b9806491c428e778ce011b77c26f2dc3aa6ba24a60bfd5d1bdf9ed6cc59a702ac4daa23725fa9dce
6
+ metadata.gz: 0b474c9ac63f1dd09b4b1aef416eee487aeaa84135f12242ba7a9fde520094a42279a738b5ef99e4540b622c35b4dc0b581d1ec3b44fd6a98217022dba1ab66a
7
+ data.tar.gz: ea99e743a50f84952b78f2d43463482ab630175c7eafcc92567bb9a35044698a50b2b2d6e92d33f274b07a3b8f6b3d639358d6d4020b8db140350396c3e3e9c2
data/.rubocop.yml CHANGED
@@ -4,7 +4,7 @@ require:
4
4
  - rubocop-rspec
5
5
 
6
6
  AllCops:
7
- TargetRubyVersion: 3.2.2
7
+ TargetRubyVersion: 3.2.3
8
8
  NewCops: enable
9
9
  SuggestExtensions: false
10
10
 
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## [2.6.3] - 2024-04-13
2
+
3
+ - Fix retrieving documentation for referenced elements
4
+ - Cache "namespace" call result
5
+
1
6
  ## [2.6.2] - 2024-04-12
2
7
 
3
8
  - Get default value for element/attribute "form" property from schema
@@ -189,7 +189,16 @@ module XSD
189
189
  # Return element documentation
190
190
  # @return Array<String>
191
191
  def documentation
192
- documentation_for(node)
192
+ @documentation ||= begin
193
+ docs = documentation_for(node)
194
+ if docs.any?
195
+ docs
196
+ elsif is_a?(Referenced) && referenced?
197
+ documentation_for(reference.node)
198
+ else
199
+ []
200
+ end
201
+ end
193
202
  end
194
203
 
195
204
  # Return documentation for specified node
@@ -5,8 +5,7 @@ module XSD
5
5
  # Get definition namespace
6
6
  # @return String
7
7
  def namespace
8
- is_referenced = respond_to?(:referenced?)
9
- is_referenced && referenced? ? reference.schema.target_namespace : schema.target_namespace
8
+ @namespace ||= (is_a?(Referenced) && referenced? ? reference.schema : schema).target_namespace
10
9
  end
11
10
 
12
11
  # Get absolute definition name
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.6.2'
4
+ VERSION = '2.6.3'
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.6.2
4
+ version: 2.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - d.arkhipov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-04-12 00:00:00.000000000 Z
11
+ date: 2024-04-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: builder