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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: c66e273e746db9b21879b3e74e553a9192b25fee
4
- data.tar.gz: b45bb6da0753ad7f69af0fd0afda8df8b22dde62
2
+ SHA256:
3
+ metadata.gz: 91115ad5f915c52672a98149cba9315bf4216d6e1adfba83e4ccc201e1f2a8e4
4
+ data.tar.gz: e05cbeb169702e51996b6a6cf43b8814f2a4662df52473fc70445ff7512ad518
5
5
  SHA512:
6
- metadata.gz: f66b200ac562ceeb6ea7c320e89e47ff88bd187b193d8322e1944ba0df99cefee66d1e14ec3c0b753807352389f5fbbe37c898755869b71e1c71113c3a79e6a9
7
- data.tar.gz: 2d9460e264e3d768bdf96c3381fef03636b87ebf82aa907c497376066b70d8de868b4284aaddc48674688add4d871c6cd27b33126d075da6bdc03234c834694d
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 = 'v1'
7
+ API_VERSION = 'v2'
8
8
 
9
- def proxy_lookup(ip_address, options = {})
10
- call(ip_address, API_VERSION, :get, options)
9
+ def proxy_lookup(target, options = {})
10
+ call(target, API_VERSION, :get, options)
11
11
  end
12
12
 
13
13
  end
@@ -9,12 +9,11 @@ module ProxyCheck
9
9
 
10
10
  ROOT_URL = 'https://proxycheck.io'
11
11
 
12
- def call(path, api_version = "v1", type = :get, params = {})
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
- params.merge!({key: api_key}) if !api_key.blank?
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.2
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
- rubyforge_project:
47
- rubygems_version: 2.6.8
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: []