rexle 1.4.5 → 1.4.6

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: 410902164364da60cce5ddec53abfb0e2bb6dd1c
4
- data.tar.gz: ccf190e5407656ba73ddd268c4e87bd9dca47e96
3
+ metadata.gz: 8e8ffb10b1c4c1bb6bba14ff7a989eaf5883c7cd
4
+ data.tar.gz: 1c1c4050f3dfe65e7f13e67d3f831805ec012833
5
5
  SHA512:
6
- metadata.gz: 9abe85dc8816b16d669721d6bccb6a685bd8afb7cc3ea76fcace91d6bf0175918bb40e68e922225085d8e4cd3f53f6fb81136689003c7264e2a61e906d384c90
7
- data.tar.gz: 7698d4111f011f89c78fa75b71d9b72808a44aa977105432e7b17fe9d0c9f2179542ea6c8410b8e0087171798107b6fe71abf26b3a33e94c9ce3f1d34113087b
6
+ metadata.gz: bb4d919579a1eb45a8e228d545f355d0aee104af49685929acb87e071248fe0dbfeee63b02493b889de3babdd080293ff5ba85a53dfa6003c3aec314e70d9b84
7
+ data.tar.gz: 88f58061972c1c0bca6b7e7b392fec4f24fa0390c19250fb6d1d107ba28c5cfb7d2dad967c3a7e2c3c24c39e303c0d41d63e2d88b45f30cb501f61eba166e5ba
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
data/lib/rexle.rb CHANGED
@@ -11,6 +11,9 @@ require 'backtrack-xpath'
11
11
 
12
12
 
13
13
  # modifications:
14
+ # 10-Aug-2017: feature: Rexle now has a member variable (@rexle) to keep
15
+ # track of the working document when elements are passed to
16
+ # different documents
14
17
  # 13-Apr-2017: bug fix: Rexle::Elements#index was implemented which fixes the
15
18
  # Rexle::Element#next_sibling and Rexle::Element#previous_sibling bugs
16
19
  # 25-Feb-2017: improvement:
@@ -233,8 +236,9 @@ class Rexle
233
236
  attr_reader :prefixes, :doctype
234
237
  attr_accessor :instructions
235
238
 
236
- def initialize(x=nil)
239
+ def initialize(x=nil, rexle: self)
237
240
 
241
+ @rexle = rexle
238
242
  super()
239
243
 
240
244
  @instructions = [["xml", "version='1.0' encoding='UTF-8'"]]
@@ -333,7 +337,7 @@ class Rexle
333
337
 
334
338
  alias original_clone clone
335
339
 
336
- def initialize(name=nil, value: nil, attributes: Attributes.new, rexle: nil)
340
+ def initialize(name=nil, value: nil, attributes: Attributes.new, rexle: self)
337
341
 
338
342
  @rexle = rexle
339
343
  super()
@@ -434,7 +438,7 @@ class Rexle
434
438
  a = self.parent.elements
435
439
  i = a.index {|x| x.object_id == id}
436
440
 
437
- a[i] if i >= 0
441
+ a[i] if i > 0
438
442
 
439
443
  end
440
444
 
@@ -1522,7 +1526,7 @@ class Rexle
1522
1526
  return Rexle::CData.new(children.first) if name == '!['
1523
1527
  return Rexle::Comment.new(children.first) if name == '!-'
1524
1528
 
1525
- element = Rexle::Element.new(name, attributes: attributes, rexle: self)
1529
+ element = Rexle::Element.new(name, attributes: attributes, rexle: @rexle)
1526
1530
 
1527
1531
  if children then
1528
1532
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rexle
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.5
4
+ version: 1.4.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -31,7 +31,7 @@ cert_chain:
31
31
  CqFh6U4iXSHeN7EtB+IaYwj0O7/uQThVBDM+MzSHp5u25hrVs7KrKap0f6rdAVcF
32
32
  1V8kvBbe/enp7g==
33
33
  -----END CERTIFICATE-----
34
- date: 2017-04-13 00:00:00.000000000 Z
34
+ date: 2017-08-10 00:00:00.000000000 Z
35
35
  dependencies:
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rexleparser
metadata.gz.sig CHANGED
Binary file