solr_wrapper 0.13.0 → 0.13.1

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: 46083a390cb490449cea481a9ea8b3e994d0ad5f
4
- data.tar.gz: be741be5a4f756ed77ea3a689dc7b74daa8fdedc
3
+ metadata.gz: 99f4f21c83ffdbf5806d404b14832e4246ba8552
4
+ data.tar.gz: 0c147272d39019c77189b76ac0e206d6c591ece2
5
5
  SHA512:
6
- metadata.gz: 278a2fbd55ade0e57220c315a82d7dc403583821e6692393b41edea331e9aafe7d48a8e9847fa76cc87911aa9c41adf79241a5572dea5ac49829b6cca31d5f9f
7
- data.tar.gz: 3de884dae0e77ca16d8eab23a45b6e159282e87ad3a8c4a373e1a5c376abbf68d370f031acce31c39c40e56734e2326ece54ae4c75cc6d1e8565b92ef194b7cc
6
+ metadata.gz: 11690c982a117f8a048e2a3625a079512e122c77e2068c4fe72721ac221e6a51f99b4592159fa395cce62e915f0bb6195dc31b79dbe8fda380f020d8d294d306
7
+ data.tar.gz: 0ac83a288c79341f6043b1dfe42618192a64626801a44064f8dec1b016304b4d34b88ea9dce8e00eb7cc7d52e5e644acf2672326c15ed5c7abf7d324a62367dd
data/lib/solr_wrapper.rb CHANGED
@@ -39,4 +39,6 @@ module SolrWrapper
39
39
  def self.wrap(options = {}, &block)
40
40
  instance(options).wrap &block
41
41
  end
42
+
43
+ class SolrWrapperError < StandardError; end
42
44
  end
@@ -7,6 +7,8 @@ module SolrWrapper
7
7
  open(url, content_length_proc: ->(bytes) { pbar.total = bytes }, progress_proc: ->(bytes) { pbar.progress = bytes }) do |io|
8
8
  IO.copy_stream(io, output)
9
9
  end
10
+ rescue OpenURI::HTTPError => e
11
+ raise SolrWrapperError, "Unable to download solr from #{url}\n#{e.message}"
10
12
  end
11
13
 
12
14
  class SafeProgressBar < ProgressBar::Base
@@ -1,3 +1,3 @@
1
1
  module SolrWrapper
2
- VERSION = '0.13.0'
2
+ VERSION = '0.13.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solr_wrapper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.0
4
+ version: 0.13.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Beer