nom-xml 1.0.0 → 1.1.0

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
  SHA1:
3
- metadata.gz: 68d13170b175503be9096bf39f8d8604447b274b
4
- data.tar.gz: 1718b2a0026a09625081d988a3dffb1dac6a1df8
3
+ metadata.gz: 958e8e47f3ad37b2a192354cf1d7d04b31d45ab8
4
+ data.tar.gz: 24307ffb65569e749fdc820fe62fa9f611418d3f
5
5
  SHA512:
6
- metadata.gz: d33bf38dbdf85b56e2e1834f061cd679293b05726a036d8f458913e8cd03b4015ef7138f0391e4b6a1d6b9297ebea91b57d38a5dca74dec565da089cd28ab451
7
- data.tar.gz: 3015b4cefb164f7e273dfa2111eeb3d672029f22144aea9a84c11461a56a61c29a3a86555800fc4b8a85079aa619851a49bb5a01cbf371110a9cd8a9c54cd3fb
6
+ metadata.gz: 5637795c9e229b0d24107dc5301919c01e59ef6950e59b3006c836db4a04fe63698edebc6053d5d870a4c8f534f23f3ceb7b5a31ee24d8068f65fb7c936f6b74
7
+ data.tar.gz: ee6630352a0fb50069b43a77213658d8dc4a35344667af50817e9886caa7f5be0823bff6c9304947e8d74fa9cb27eae2489bef0a0044dc4585ef4d9781537b7b
@@ -31,12 +31,11 @@ module Nom::XML::Decorators::NodeSet
31
31
  def method_missing sym, *args, &block
32
32
  if self.all? { |node| node.respond_to? sym }
33
33
  result = self.collect { |node| node.send(sym, *args, &block) }.flatten
34
- nodeset = self.class.new(self.document, result) rescue result
35
-
36
- # hack around some lazy initialization in the jruby version of Nokogiri
37
- # https://github.com/sparklemotion/nokogiri/issues/1782
38
- nodeset | self.class.new(self.document) if defined?(JRUBY_VERSION) && result.empty?
39
- nodeset
34
+ if result.empty? || result.any? { |x| x.is_a? Nokogiri::XML::Node }
35
+ self.class.new(self.document, result) rescue result
36
+ else
37
+ result
38
+ end
40
39
  else
41
40
  begin
42
41
  self.document.template_registry.send(sym, self, *args, &block)
@@ -1,5 +1,5 @@
1
1
  module Nom
2
2
  module XML
3
- VERSION = '1.0.0'
3
+ VERSION = '1.1.0'
4
4
  end
5
5
  end
@@ -1,13 +1,9 @@
1
- if ENV['COVERAGE'] and RUBY_VERSION =~ /^1.9/
2
- require 'simplecov'
3
- SimpleCov.start
4
- end
1
+ require 'simplecov'
2
+ SimpleCov.start
5
3
 
6
4
  require 'rspec'
7
5
  require 'nom'
8
6
  require 'equivalent-xml/rspec_matchers'
9
-
10
7
  RSpec.configure do |config|
11
8
 
12
9
  end
13
-
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nom-xml
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Beer
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-08-08 00:00:00.000000000 Z
12
+ date: 2018-12-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport