proxied 0.1.5 → 0.1.6

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
  SHA256:
3
- metadata.gz: 29b91a7c5c377492b4ef67eaca0b0cc0b2a6eb153829fd9853e4fd4ec1d87a9f
4
- data.tar.gz: c776549b3460abf6abd40a91d9f5cb96c09d99c03cbaa7939c5da70cf5720ea7
3
+ metadata.gz: c8a21544331bd1193d8d9f134f838999c742aa4c1f4c2e5d2ea900bae9ea26da
4
+ data.tar.gz: cc45d9f563de4ad0c4603653193b66e2c0739ae30433b7884edfdaf7824af00d
5
5
  SHA512:
6
- metadata.gz: d17828c85d020f52a43b4734eeda29d78a59733f7085e2350ced4922ccd4c418d96c8f7230d9fd480c19400a1618ba173f7a58fb7ec19a6ca961349093656a00
7
- data.tar.gz: 5cfb8dc968ae33409c6bcdb3b7a14ef060032a54c8210b52b765bbf43ee6ee134e8a0bf2a8fc22459b688df2df85c7944905f8b40c94d38c4fcb4d7a6e17557c
6
+ metadata.gz: 908e478ad96163724976c277880433fd8975ccc7c27e68f639f61d7dfb39c6d2abb5eea5a43d996a983765326fd51f3031e46436e893aef81abf69ec73343899
7
+ data.tar.gz: a32cd75f38f5860cad7b7ba62cbfca8260666fbf773e42ca9e27d33326b37e210e17a14a3dec60b30030605d75997fd06f780ce8d5bb89835563e5fe7e50e2e0
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- proxied (0.1.4)
4
+ proxied (0.1.6)
5
5
  faraday (>= 0.14)
6
6
  net-ssh (>= 4.0)
7
7
 
@@ -99,7 +99,7 @@ GEM
99
99
  multipart-post (2.0.0)
100
100
  net-ssh (5.0.2)
101
101
  nio4r (2.3.1)
102
- nokogiri (1.8.3)
102
+ nokogiri (1.8.4)
103
103
  mini_portile2 (~> 2.3.0)
104
104
  pry (0.11.3)
105
105
  coderay (~> 1.1.0)
@@ -68,10 +68,10 @@ module Proxied
68
68
  end
69
69
 
70
70
  def check_http_proxy(proxy, test_url: ::Proxied.configuration.http_test[:url], timeout: ::Proxied.configuration.http_test[:timeout], update: true)
71
- ::Proxied::Logger.log "#{Time.now}: Fetching robots.txt for Google.com with proxy #{proxy.proxy_address}."
71
+ ::Proxied::Logger.log "#{Time.now}: Fetching #{::Proxied.configuration.http_test[:url]} with proxy #{proxy.proxy_address}."
72
72
 
73
73
  response = request(test_url, proxy, options: {timeout: timeout})
74
- valid_proxy = (response && !(response =~ /Allow: \/search\/about/i).nil?)
74
+ valid_proxy = response.to_s.strip.eql?(proxy.host.strip)
75
75
 
76
76
  update_proxy(proxy, valid_proxy) if update
77
77
 
@@ -20,7 +20,7 @@ module Proxied
20
20
  }
21
21
 
22
22
  self.http_test = {
23
- url: "http://www.google.com/robots.txt",
23
+ url: "http://ipinfo.io/ip",
24
24
  timeout: 10,
25
25
  }
26
26
 
@@ -1,3 +1,3 @@
1
1
  module Proxied
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: proxied
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sebastian