polyrex-links 0.4.1 → 0.4.2

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
  SHA256:
3
- metadata.gz: 07434dc35cbabb41af50c6d49a6ef3c2fa83fd95654d04422c887c69c1653a6e
4
- data.tar.gz: fe895d84d31ebe6b12bc12f3a0a098544e9365fd070e073bfa38db78be88fea0
3
+ metadata.gz: 86256bfb4e9270cadb10cb266ee9cb689f78acb29f8f59022cb97acb3765bc95
4
+ data.tar.gz: 489a261c8e3afb75dd57153fb1a8c16f38a9adf2e04876779fb9b2da5498b97e
5
5
  SHA512:
6
- metadata.gz: d77dbb86612baae60a9005c570abe89b8efc2a7953cee7954e3e5ccada08f117e83a408c6fc7695409c29a109af72d5ce763d7e2ca083b13dba3e1f2cbd03339
7
- data.tar.gz: 8b4aa96fb8455b9fe8083056bb41067afadd877972fb816ab02ecc445d40a728a40d2e12452e8f5906dfb256e2965ea4241672d3f9f1062566e9dd6cab1c4a8f
6
+ metadata.gz: 6ad0eabd37defceab3c1c97a57bf369f81d8c72d0dd224bedd577e569dc1b1acdeaa97afb644fb4f7bd6aa0cdfbc18f7c07c61c13e13c8202e237c41dbdd988c
7
+ data.tar.gz: 76a4f2e4ae7932449a2cfb80e8efe5966886af0623d584fe740721d0f7bd9ec00bd66bda549e33f07ae97d3132daa5ca34a49810cdcd8f2cdd392e7df8455f0b
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
data/lib/polyrex-links.rb CHANGED
@@ -6,11 +6,11 @@ require 'polyrex'
6
6
 
7
7
  class PolyrexLinks < Polyrex
8
8
 
9
- def initialize(rawx='links/link[name,url]', delimiter: ' # ', debug: false)
9
+ def initialize(rawx='links/link[title,url]', delimiter: ' # ', debug: false)
10
10
 
11
11
  x, _ = RXFHelper.read(rawx)
12
12
  obj = x.lstrip.sub(/<\?polyrex-links\?>/,
13
- '<?polyrex schema="links/link[name,url]" delimiter=" # "?>')
13
+ '<?polyrex schema="links/link[title,url]" delimiter=" # "?>')
14
14
  puts 'obj: ' + x.inspect if debug
15
15
 
16
16
  super(obj)
@@ -21,7 +21,7 @@ class PolyrexLinks < Polyrex
21
21
 
22
22
  def find(s)
23
23
 
24
- found = find_by_link_name s
24
+ found = find_by_link_title s
25
25
 
26
26
  if found then
27
27
 
@@ -39,7 +39,7 @@ class PolyrexLinks < Polyrex
39
39
  s.sub(/<\?[^\?]+\?>/,'').lstrip)
40
40
 
41
41
  pl.each_recursive do |x|
42
- link, linkpath = find(x.name)
42
+ link, linkpath = find(x.title)
43
43
  x.url = link.url if link and link.url
44
44
  end
45
45
 
@@ -51,7 +51,7 @@ class PolyrexLinks < Polyrex
51
51
  #
52
52
  def link(s)
53
53
 
54
- self.rxpath(s.split('/').map {|x| "link[name='%s']" % x}.join('/')).first
54
+ self.rxpath(s.split('/').map {|x| "link[title='%s']" % x}.join('/')).first
55
55
 
56
56
  end
57
57
 
@@ -66,7 +66,7 @@ class PolyrexLinks < Polyrex
66
66
  (a2 << a.clone; a.pop) while a.any?
67
67
  return nil if a2.empty?
68
68
 
69
- mask = "records/link[summary/name='%s']"
69
+ mask = "records/link[summary/title='%s']"
70
70
 
71
71
  begin
72
72
  c = a2.shift; xpath = c.map{|x| mask % x}.join + '/summary/url/text()'
@@ -103,7 +103,7 @@ class PolyrexLinks < Polyrex
103
103
  def backtrack_path(e, a5=[])
104
104
 
105
105
  backtrack_path(e.parent, a5) if e.parent?
106
- a5 << e.name
106
+ a5 << e.title
107
107
 
108
108
  return a5
109
109
  end
@@ -117,7 +117,7 @@ class PolyrexLinks < Polyrex
117
117
 
118
118
  a.slice!(i..-1)
119
119
  a[i] = record
120
- yield(a.map(&:name).join('/'), record.url) if block_given?
120
+ yield(a.map(&:title).join('/'), record.url) if block_given?
121
121
 
122
122
  end
123
123
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: polyrex-links
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
metadata.gz.sig CHANGED
Binary file