proxycheck 0.0.2 → 2.0.0
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 +5 -5
- data/lib/proxycheck/api/proxy_lookup.rb +3 -3
- data/lib/proxycheck/api/util.rb +4 -5
- metadata +5 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 91115ad5f915c52672a98149cba9315bf4216d6e1adfba83e4ccc201e1f2a8e4
|
|
4
|
+
data.tar.gz: e05cbeb169702e51996b6a6cf43b8814f2a4662df52473fc70445ff7512ad518
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1e3dd52b3cc1c444d1ce8fe01cce34b83328af17481d516da98bcdbdba9c1768e703c9002858748dc275525e929a2965195728fb698ab76e1f614ba916901df8
|
|
7
|
+
data.tar.gz: 41c9d12b9f889533ef97a981a9847d4152852294179a7971b8ec7b2c27254ed0e5e6dbeb7db79671b350eb19f4dae8109339d24a8cac9f5c59adf3c66a3a6776
|
|
@@ -4,10 +4,10 @@ module ProxyCheck
|
|
|
4
4
|
module ProxyLookup
|
|
5
5
|
include ProxyCheck::API::Util
|
|
6
6
|
|
|
7
|
-
API_VERSION = '
|
|
7
|
+
API_VERSION = 'v2'
|
|
8
8
|
|
|
9
|
-
def proxy_lookup(
|
|
10
|
-
call(
|
|
9
|
+
def proxy_lookup(target, options = {})
|
|
10
|
+
call(target, API_VERSION, :get, options)
|
|
11
11
|
end
|
|
12
12
|
|
|
13
13
|
end
|
data/lib/proxycheck/api/util.rb
CHANGED
|
@@ -9,12 +9,11 @@ module ProxyCheck
|
|
|
9
9
|
|
|
10
10
|
ROOT_URL = 'https://proxycheck.io'
|
|
11
11
|
|
|
12
|
-
def call(path, api_version = "
|
|
12
|
+
def call(path, api_version = "v2", type = :get, params = {})
|
|
13
|
+
params.merge!({key: api_key}) if !(api_key.nil? || api_key.empty?)
|
|
13
14
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
uri = URI.parse(build_url(path, api_version))
|
|
17
|
-
uri.query = URI.encode_www_form(params)
|
|
15
|
+
_path = path + "&" + URI.encode_www_form(params)
|
|
16
|
+
uri = URI.parse(build_url(_path, api_version))
|
|
18
17
|
|
|
19
18
|
http = Net::HTTP.new(uri.host, uri.port)
|
|
20
19
|
|
metadata
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: proxycheck
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0
|
|
4
|
+
version: 2.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jonathan De Jong
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
11
|
date: 2017-11-09 00:00:00.000000000 Z
|
|
@@ -28,7 +28,7 @@ homepage: http://rubygems.org/gems/proxycheck
|
|
|
28
28
|
licenses:
|
|
29
29
|
- MIT
|
|
30
30
|
metadata: {}
|
|
31
|
-
post_install_message:
|
|
31
|
+
post_install_message:
|
|
32
32
|
rdoc_options: []
|
|
33
33
|
require_paths:
|
|
34
34
|
- lib
|
|
@@ -43,9 +43,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
43
43
|
- !ruby/object:Gem::Version
|
|
44
44
|
version: '0'
|
|
45
45
|
requirements: []
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
signing_key:
|
|
46
|
+
rubygems_version: 3.2.33
|
|
47
|
+
signing_key:
|
|
49
48
|
specification_version: 4
|
|
50
49
|
summary: proxycheck
|
|
51
50
|
test_files: []
|