url_reader 0.2.1 → 0.2.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
  SHA1:
3
- metadata.gz: b747696e13a0b4788c453a84409afcb835d36fcf
4
- data.tar.gz: 21f82e519a75be794bc68520b0e12a9f093a39db
3
+ metadata.gz: 21ba464416f6def00d0a8e9424bd2a5861d88cd3
4
+ data.tar.gz: 7f76f822a71a0ca7fde295588237565e50e44adc
5
5
  SHA512:
6
- metadata.gz: 243127228518c2d15612e084f8834fa21467d747a3aa0c0cad2917e105cc70d0103d5b635451beba9ffc47b0c8e52fcad98179ecfc65e8c6d88d1258bdb46137
7
- data.tar.gz: 01048270d89facf1dbd517884707a88334dcdff835de6f4a35318d956e6426cbdb0bb3f11cde3e2433b78da7a2e5c0737f07b8cbad7b3c5fe2733d56324419c0
6
+ metadata.gz: f0ab96700f6ce6de1f5bc759146956ae9bd06fd72ee792f3c8f5ba35b382c233eec8a6d2d35937d61b2ea7b6e9654e057da1781461ee518dc921f659ac30fdc0
7
+ data.tar.gz: 303b1f4d0fcceac7103b08092601a5a6094a16f62f53c6eddcd8e1c694775aa415933f86f7fe685bea588017b0f3ae13cd4ffd966a3762788afd9798142d66db
data/lib/url_reader.rb CHANGED
@@ -69,13 +69,10 @@ module UrlReader
69
69
  Errno::ECONNREFUSED,
70
70
  Errno::ECONNRESET => e
71
71
  ne = ReadError.new(e, "Read #{hash[:url]} failed")
72
- if options[:ignore_not_found]
73
- options[:ignore_read_errors] ||= []
74
- options[:ignore_read_errors] << 'PageNotFound'
75
- end
76
- if ignore_errors = options[:ignore_read_errors]
77
- return nil if ignore_errors.map { |x| x.is_a?(Integer) ? x : ReadError.const_get(x) }.include?(ne.type)
78
- end
72
+ ignore_errors = options[:ignore_errors] || []
73
+ ignore_errors << 'PageNotFound' if options[:ignore_not_found]
74
+ ignore_errors << 'InternalServerError' if options[:ignore_server_error]
75
+ return nil if ignore_errors.map { |x| x.is_a?(Integer) ? x : ReadError.const_get(x) }.include?(ne.type)
79
76
  raise ne
80
77
  end
81
78
  return nil unless response
data/url_reader.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'url_reader'
3
- s.version = '0.2.1'
3
+ s.version = '0.2.2'
4
4
  s.authors = ['Tetsuri Moriya']
5
5
  s.email = ['tetsuri.moriya@gmail.com']
6
6
  s.summary = 'Url reader'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: url_reader
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tetsuri Moriya
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-20 00:00:00.000000000 Z
11
+ date: 2015-05-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec