proxy_fetcher 0.5.0 → 0.5.1

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: 287db7b55e3f0798e263fe7268f8a709e4d8e8c0
4
- data.tar.gz: cde6d4dc22e60aa012c02b1f679fcc72b23c6114
3
+ metadata.gz: eb17af3b54c59182794340dd9e07351e3107c380
4
+ data.tar.gz: f86f209533d12f4a536ac4a5ae07d48a8afc9e90
5
5
  SHA512:
6
- metadata.gz: a54e2d725338bc5c859d415cae5b0397b4aa2a75a0f00917edf4eaa2f845e893c1d73f8e56b86ddfce85c6016fcf473ed4ad2e29fbf78a2c65495df050a320d7
7
- data.tar.gz: 61b2fc3dfd20c75045c8b435d0855e0596071facc8bef9e73d68e46996faaad8a9e1ccbb3b9b818f1449138e7d52ee583dffaa813cc5d3696a24ad6ba835475c
6
+ metadata.gz: 0ecf1b6ee299550228ea651a220bcc9d85f3e383844974416862d567634a35d41d3650499ee6a8695af9b26c53fea3bba35a57336b1cfc795996df10c301751b
7
+ data.tar.gz: dcb39302fa9b2b43869be96484794d273a579546f92c27d5103f535d2fe8768220ab3a781d8373a58e11ebe5a2abe9efb13c772c32b088aa393bf890ca66c385
data/.travis.yml CHANGED
@@ -3,9 +3,11 @@ before_install: gem install bundler
3
3
  bundler_args: --without yard guard benchmarks
4
4
  script: "rake spec"
5
5
  rvm:
6
+ - 2.0
7
+ - 2.1
6
8
  - 2.2.4
7
9
  - 2.3.3
8
- - 2.4.1
10
+ - 2.4.2
9
11
  - ruby-head
10
12
  matrix:
11
13
  allow_failures:
data/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  Reverse Chronological Order:
4
4
 
5
+ ## `0.5.1` (2017-11-13)
6
+
7
+ * Fix ProxyFetcher CLI
8
+
5
9
  ## `0.5.0` (2017-09-06)
6
10
 
7
11
  * Remove HideMyName provider (not works anymore)
data/bin/proxy_fetcher CHANGED
@@ -41,7 +41,7 @@ OptionParser.new do |opts|
41
41
  end.parse!
42
42
 
43
43
  ProxyFetcher.config.providers = options[:providers] if options[:providers]
44
- ProxyFetcher.config.connection_timeout = options[:timeout] if options[:timeout]
44
+ ProxyFetcher.config.timeout = options[:timeout] if options[:timeout]
45
45
 
46
46
  manager = ProxyFetcher::Manager.new(filters: options[:filters])
47
47
  manager.validate! if options[:validate]
@@ -9,7 +9,7 @@ module ProxyFetcher
9
9
  # Minor version number
10
10
  MINOR = 5
11
11
  # Smallest version number
12
- TINY = 0
12
+ TINY = 1
13
13
 
14
14
  # Full version number
15
15
  STRING = [MAJOR, MINOR, TINY].compact.join('.')
@@ -5,7 +5,7 @@ require 'proxy_fetcher/version'
5
5
  Gem::Specification.new do |gem|
6
6
  gem.name = 'proxy_fetcher'
7
7
  gem.version = ProxyFetcher.gem_version
8
- gem.date = '2017-09-06'
8
+ gem.date = '2017-11-13'
9
9
  gem.summary = 'Ruby gem for dealing with proxy lists from different providers'
10
10
  gem.description = 'This gem can help your Ruby application to make HTTP(S) requests ' \
11
11
  'from proxy server by fetching and validating proxy lists from the different providers.'
@@ -17,7 +17,7 @@ Gem::Specification.new do |gem|
17
17
  gem.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
18
18
  gem.homepage = 'http://github.com/nbulaj/proxy_fetcher'
19
19
  gem.license = 'MIT'
20
- gem.required_ruby_version = '>= 2.2.2'
20
+ gem.required_ruby_version = '>= 2.0.0'
21
21
 
22
22
  gem.add_runtime_dependency 'nokogiri', '~> 1.6', '>= 1.6'
23
23
 
@@ -108,6 +108,18 @@ describe ProxyFetcher::Client do
108
108
 
109
109
  expect { ProxyFetcher::Client.get('http://httpbin.org') }.to raise_error(ProxyFetcher::Exceptions::MaximumRetriesReached)
110
110
  end
111
+
112
+ it 'raises an error when http request returns an error' do
113
+ allow_any_instance_of(Net::HTTP).to receive(:request).and_return(Net::HTTPBadRequest.new('', '', ''))
114
+
115
+ expect { ProxyFetcher::Client.get('http://httpbin.org') }.to raise_error(ProxyFetcher::Exceptions::MaximumRetriesReached)
116
+ end
117
+
118
+ it 'refreshes proxy lists if no proxy found' do
119
+ ProxyFetcher::Client::ProxiesRegistry.manager.instance_variable_set(:'@proxies', [])
120
+
121
+ expect { ProxyFetcher::Client.get('http://httpbin.org') }.not_to raise_error(ProxyFetcher::Exceptions::MaximumRetriesReached)
122
+ end
111
123
  end
112
124
 
113
125
  context 'redirects' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: proxy_fetcher
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nikita Bulai
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-09-06 00:00:00.000000000 Z
11
+ date: 2017-11-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -111,7 +111,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
111
111
  requirements:
112
112
  - - ">="
113
113
  - !ruby/object:Gem::Version
114
- version: 2.2.2
114
+ version: 2.0.0
115
115
  required_rubygems_version: !ruby/object:Gem::Requirement
116
116
  requirements:
117
117
  - - ">="