solr_wrapper 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/solr_wrapper/instance.rb +7 -1
- data/lib/solr_wrapper/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8f599156c301d05423f3d0bbb82f15bdcdc177c5
|
4
|
+
data.tar.gz: 91fbd6a8b261caa96a9d13d95529f8df4edd8264
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 752c5a759af88d84475784ad50501e5b24f9873d3f7ab8230042a66134f5650b3bafafc6a1b417f99780613f3c5e01824e3fac25b7de717d186b8c04bcf13571
|
7
|
+
data.tar.gz: 2daa20c6613fc167f64de77d6e245d1373924f9b0b1646543fe6e76d41f29846784c0c47849da0cc2c7c36a2005e8b3e3e0d6645bb80f24fa4800acef329caab
|
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'digest'
|
2
2
|
require 'fileutils'
|
3
|
+
require 'json'
|
3
4
|
require 'open-uri'
|
4
5
|
require 'ruby-progressbar'
|
5
6
|
require 'securerandom'
|
@@ -222,7 +223,12 @@ module SolrWrapper
|
|
222
223
|
end
|
223
224
|
|
224
225
|
def default_url
|
225
|
-
|
226
|
+
@default_url ||= begin
|
227
|
+
mirror_url = "http://www.apache.org/dyn/closer.cgi/lucene/solr/#{version}/solr-#{version}.zip?asjson=true"
|
228
|
+
json = open(mirror_url).read
|
229
|
+
doc = JSON.parse(json)
|
230
|
+
doc['preferred'] + doc['path_info']
|
231
|
+
end
|
226
232
|
end
|
227
233
|
|
228
234
|
def version
|
data/lib/solr_wrapper/version.rb
CHANGED