xapian-indexer 1.2.20.1 → 1.2.20.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
  SHA1:
3
- metadata.gz: 1322194dad8b4f2ca4018ff6883e2316c98507ff
4
- data.tar.gz: 88d821ad991bb315a3ecfe56eecdbe87a7d0f0c9
3
+ metadata.gz: e12c81933dc43514b8b7ff7a4cb20b02359e279c
4
+ data.tar.gz: d5a8b6304636424532e6b90bd75b067052515da5
5
5
  SHA512:
6
- metadata.gz: dda54be1442b2827b794c0a66d278f455e9721b5db25b4c80f5987727def6508642420710a78fc1b2f2e219c4dd4958a982e359656e485ad0cc3606a1fb8f208
7
- data.tar.gz: 96f5f900ecbe6962cc45c492429cca4e77ad3c29a7557ad2d737e63618bf13daaffdc6cbe42a6ac2e58f8c9f0adb9fc9c31d80905a26866c660bed6a1bf22a17
6
+ metadata.gz: 86318e2ca52eafde44a7ee8330a13525cd9a8ccfe3554bfd9b31e989e3695babd8856148d3a4233d814f07ceb48d7b1973d4681033688fad44c70a64e3141053
7
+ data.tar.gz: fd85fe7636ade7bb6202dc714e822fa4f3a2e8348ea35b923ddaa36f36533ec8cd3439b32eba8fdc1c3c45ee330c9d5d5540bc6be619af096af066bbb6eab62c
@@ -22,20 +22,42 @@ require 'uri'
22
22
 
23
23
  class URI::Generic
24
24
  # This change allows you to merge relative URLs which otherwise isn't possible.
25
- def merge0(oth)
25
+ def merge(oth)
26
26
  oth = parser.send(:convert_to_uri, oth)
27
27
 
28
- if self.absolute? && oth.absolute?
29
- #raise BadURIError,
30
- # "both URI are absolute"
31
- # hmm... should return oth for usability?
32
- return oth, oth
33
- end
28
+ return oth if oth.absolute?
29
+
30
+ base = self.dup
31
+ rel = oth
34
32
 
35
- if self.absolute?
36
- return self.dup, oth
33
+ authority = rel.userinfo || rel.host || rel.port
34
+
35
+ # RFC2396, Section 5.2, 2)
36
+ if (rel.path.nil? || rel.path.empty?) && !authority && !rel.query
37
+ base.fragment=(rel.fragment) if rel.fragment
38
+ return base
39
+ end
40
+
41
+ base.query = nil
42
+ base.fragment=(nil)
43
+
44
+ # RFC2396, Section 5.2, 4)
45
+ if !authority
46
+ base.set_path(merge_path(base.path, rel.path)) if base.path && rel.path
37
47
  else
38
- return oth, oth
48
+ # RFC2396, Section 5.2, 4)
49
+ base.set_path(rel.path) if rel.path
39
50
  end
51
+
52
+ # RFC2396, Section 5.2, 7)
53
+ base.set_userinfo(rel.userinfo) if rel.userinfo
54
+ base.set_host(rel.host) if rel.host
55
+ base.set_port(rel.port) if rel.port
56
+ base.query = rel.query if rel.query
57
+ base.fragment=(rel.fragment) if rel.fragment
58
+
59
+ return base
40
60
  end
61
+
62
+ alias + merge
41
63
  end
@@ -20,6 +20,6 @@
20
20
 
21
21
  module Xapian
22
22
  module Indexer
23
- VERSION = "1.2.20.1"
23
+ VERSION = "1.2.20.2"
24
24
  end
25
25
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xapian-indexer
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.20.1
4
+ version: 1.2.20.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-07 00:00:00.000000000 Z
11
+ date: 2016-10-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: xapian-core
@@ -106,7 +106,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
106
106
  version: '0'
107
107
  requirements: []
108
108
  rubyforge_project:
109
- rubygems_version: 2.4.6
109
+ rubygems_version: 2.5.1
110
110
  signing_key:
111
111
  specification_version: 4
112
112
  summary: Xapian::Indexer provides a flexible spider for indexing resources.