From 22840dba7131467dc6346dae0b26c392be72a863 Mon Sep 17 00:00:00 2001 From: Nikita Bulai Date: Mon, 12 Nov 2018 12:36:21 +0300 Subject: [PATCH] Release 0.8.0 --- CHANGELOG.md | 6 +++++- lib/proxy_fetcher.rb | 2 +- lib/proxy_fetcher/manager.rb | 2 +- .../{bulk_proxy_validator.rb => proxy_list_validator.rb} | 2 +- lib/proxy_fetcher/version.rb | 4 ++-- spec/support/manager_examples.rb | 4 +++- 6 files changed, 13 insertions(+), 7 deletions(-) rename lib/proxy_fetcher/utils/{bulk_proxy_validator.rb => proxy_list_validator.rb} (98%) diff --git a/CHANGELOG.md b/CHANGELOG.md index bb12646..508cd4c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,11 @@ Reverse Chronological Order: -## `0.7.3` (2018-11-10) +## `master` + +* Add your changelog here + +## `0.8.0` (2018-11-12) * Improve speed of proxy list loading. * Improve speed of proxies cleanup. diff --git a/lib/proxy_fetcher.rb b/lib/proxy_fetcher.rb index b73f0e3..2a16639 100644 --- a/lib/proxy_fetcher.rb +++ b/lib/proxy_fetcher.rb @@ -15,7 +15,7 @@ require File.dirname(__FILE__) + '/proxy_fetcher/utils/http_client' require File.dirname(__FILE__) + '/proxy_fetcher/utils/proxy_validator' -require File.dirname(__FILE__) + '/proxy_fetcher/utils/bulk_proxy_validator' +require File.dirname(__FILE__) + '/proxy_fetcher/utils/proxy_list_validator' require File.dirname(__FILE__) + '/proxy_fetcher/client/client' require File.dirname(__FILE__) + '/proxy_fetcher/client/request' require File.dirname(__FILE__) + '/proxy_fetcher/client/proxies_registry' diff --git a/lib/proxy_fetcher/manager.rb b/lib/proxy_fetcher/manager.rb index 4a4f5db..d413f81 100644 --- a/lib/proxy_fetcher/manager.rb +++ b/lib/proxy_fetcher/manager.rb @@ -94,7 +94,7 @@ def get! # @return [Array] # list of valid proxies def cleanup! - valid_proxies = BulkProxyValidator.new(@proxies).validate + valid_proxies = ProxyListValidator.new(@proxies).validate @proxies &= valid_proxies end diff --git a/lib/proxy_fetcher/utils/bulk_proxy_validator.rb b/lib/proxy_fetcher/utils/proxy_list_validator.rb similarity index 98% rename from lib/proxy_fetcher/utils/bulk_proxy_validator.rb rename to lib/proxy_fetcher/utils/proxy_list_validator.rb index 799e148..f2036f2 100644 --- a/lib/proxy_fetcher/utils/bulk_proxy_validator.rb +++ b/lib/proxy_fetcher/utils/proxy_list_validator.rb @@ -3,7 +3,7 @@ module ProxyFetcher # This class validates list of proxies. # Each proxy is validated using ProxyFetcher::ProxyValidator. - class BulkProxyValidator + class ProxyListValidator # @!attribute [r] proxies # @return [Array] Source array of proxies attr_reader :proxies diff --git a/lib/proxy_fetcher/version.rb b/lib/proxy_fetcher/version.rb index d7d374f..d6fb6af 100644 --- a/lib/proxy_fetcher/version.rb +++ b/lib/proxy_fetcher/version.rb @@ -13,9 +13,9 @@ module VERSION # Major version number MAJOR = 0 # Minor version number - MINOR = 7 + MINOR = 8 # Smallest version number - TINY = 2 + TINY = 0 # Full version number STRING = [MAJOR, MINOR, TINY].compact.join('.') diff --git a/spec/support/manager_examples.rb b/spec/support/manager_examples.rb index 23d3dc4..fc1ad89 100644 --- a/spec/support/manager_examples.rb +++ b/spec/support/manager_examples.rb @@ -35,7 +35,9 @@ manager = ProxyFetcher::Manager.new - expect { manager.cleanup! }.to change { manager.proxies }.to([]) + expect do + manager.cleanup! + end.to change { manager.proxies }.to([]) end it "doesn't pollute the output with array of proxies" do