proxy_fetcher 0.6.4 → 0.6.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/proxy_fetcher/proxy.rb +9 -2
- data/lib/proxy_fetcher/version.rb +1 -1
- data/spec/proxy_fetcher/proxy_spec.rb +4 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d3914a2ff7553eb5b82a10bafbd442c2047db5e6
|
4
|
+
data.tar.gz: 9dbea0fb816d58ad43027e0366078775a648f361
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ad83498d6e5f055326973163daf7719936792c95d641be37322ea5f4756223253ee5576135c507ad61cf9fb7c5518ded3f5e96bcfbd9291298a8731568ad177d
|
7
|
+
data.tar.gz: 3b99d216bc66904b2a4bab40359057e7097e6fd9d8e0cd397335ea993fefafebfa921e7fb75faa124dc96a3adfff053f761166a1d5dfeb85d73bbb44a79112a7
|
data/README.md
CHANGED
@@ -401,7 +401,7 @@ Also you can call next instance methods for every Proxy object:
|
|
401
401
|
* `socks4?`
|
402
402
|
* `socks5?`
|
403
403
|
* `uri` (returns `URI::Generic` object)
|
404
|
-
* `url` (returns a formatted URL like "_http://IP:PORT_" )
|
404
|
+
* `url` (returns a formatted URL like "_IP:PORT_" or "_http://IP:PORT_" if `scheme: true` provided)
|
405
405
|
|
406
406
|
## Providers
|
407
407
|
|
data/lib/proxy_fetcher/proxy.rb
CHANGED
@@ -91,11 +91,18 @@ module ProxyFetcher
|
|
91
91
|
|
92
92
|
# Returns <code>String</code> object with <i>addr:port</i> values of the proxy.
|
93
93
|
#
|
94
|
+
# @param scheme [Boolean]
|
95
|
+
# Indicates if URL must include proxy type
|
96
|
+
#
|
94
97
|
# @return [String]
|
95
98
|
# true if proxy connectable, otherwise false.
|
96
99
|
#
|
97
|
-
def url
|
98
|
-
|
100
|
+
def url(scheme: false)
|
101
|
+
if scheme
|
102
|
+
URI::Generic.build(scheme: type, host: addr, port: port).to_s
|
103
|
+
else
|
104
|
+
URI::Generic.build(host: addr, port: port).to_s
|
105
|
+
end
|
99
106
|
end
|
100
107
|
end
|
101
108
|
end
|
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.6.
|
4
|
+
version: 0.6.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nikita Bulai
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-04-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|