ip2proxy_ruby 1.0.2 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: b9440307fd3da2ce5561eaa479425d3295776a66
4
- data.tar.gz: 477d7501345f21bf9c7f3c7a7d1e9faf592991d6
2
+ SHA256:
3
+ metadata.gz: 2a0f076da57bce1ce3df8766d07dde4855d90601d5e184b5bb1c15a099e8342f
4
+ data.tar.gz: 8c9ae8dcf68cf2d9447397299572bc82317bebca1d15bbd85124250306c664bb
5
5
  SHA512:
6
- metadata.gz: cde7bac539db121e998b988ef27a32ac9774285ba5dcbf8c245a9fea7bd3fc5db30f42af32e335ffba2a047f88cfd9b2ae584d336f1e81a7cd42380eea897919
7
- data.tar.gz: 72867604ac534149ed11ad8b14b6b803d4b4bfd4b40394ff80c369fd96ee934b8757f5edac145cf0004c1e2d2bd38e59ea2302caf5b387002f5bf07ef7a23eb4
6
+ metadata.gz: 7f546e8cc2e57db0130b996cc0b8d436b8897ea33a6c92f2346617d66475de8b89d651dbd472457ca691c8c71b6787e9138452c8dc07852ca3a0461f711c4774
7
+ data.tar.gz: 904aa801ab54f8b9c00ca38121ab3011e78fea24273d902ae2f6a57fb3b8e7f8a37858697ff75b94c9ed0efb06c50013f337082d942f01b13f0a5d92513e9623
data/.document CHANGED
@@ -1,5 +1,5 @@
1
- lib/**/*.rb
2
- bin/*
3
- -
4
- features/**/*.feature
5
- LICENSE.txt
1
+ lib/**/*.rb
2
+ bin/*
3
+ -
4
+ features/**/*.feature
5
+ LICENSE.txt
data/.gitignore CHANGED
@@ -1,9 +1,9 @@
1
- /.bundle/
2
- /.yardoc
3
- /Gemfile.lock
4
- /_yardoc/
5
- /coverage/
6
- /doc/
7
- /pkg/
8
- /spec/reports/
9
- /tmp/
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
data/Gemfile CHANGED
@@ -1,5 +1,5 @@
1
- source 'https://rubygems.org'
2
-
3
- # Specify your gem's dependencies in ip2proxy_ruby.gemspec
4
- gemspec
5
- gem 'bindata'
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in ip2proxy_ruby.gemspec
4
+ gemspec
5
+ gem 'bindata'
@@ -1,20 +1,20 @@
1
- Copyright (c) 2016 IP2Location ( support@ip2location.com )
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining
4
- a copy of this software and associated documentation files (the
5
- "Software"), to deal in the Software without restriction, including
6
- without limitation the rights to use, copy, modify, merge, publish,
7
- distribute, sublicense, and/or sell copies of the Software, and to
8
- permit persons to whom the Software is furnished to do so, subject to
9
- the following conditions:
10
-
11
- The above copyright notice and this permission notice shall be
12
- included in all copies or substantial portions of the Software.
13
-
14
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1
+ Copyright (c) 2019 IP2Location ( support@ip2location.com )
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md CHANGED
@@ -1,47 +1,131 @@
1
- # IP2Proxy Ruby Library
2
-
3
- This is IP2Proxy Ruby library that lookup IP address to detect VPN servers, open proxies, web proxies, Tor exit nodes and data center ranges. The library reads the geo location information from [IP2Proxy database](https://www.ip2location.com/proxy-database)
4
-
5
- For more details, please visit:
6
- [https://www.ip2location.com/ip2proxy/developers/ruby](https://www.ip2location.com/ip2proxy/developers/ruby)
7
-
8
- ## Usage
9
-
10
- ```
11
- require 'ip2proxy_ruby'
12
-
13
- # open IP2Proxy BIN database for proxy lookup
14
- i2p = Ip2proxy.new.open("./data/IP2PROXY-IP-PROXYTYPE-COUNTRY-REGION-CITY-ISP.SAMPLE.BIN")
15
-
16
- # get versioning information
17
- print 'Module Version: ' + i2p.getModuleVersion + "\n"
18
- print 'Package Version: ' + i2p.getPackageVersion + "\n"
19
- print 'Database Version: ' + i2p.getDatabaseVersion + "\n"
20
-
21
- # individual proxy data check
22
- print 'Is Proxy: ' + i2p.isProxy('4.0.0.47').to_s + "\n"
23
- print 'Proxy Type: ' + i2p.getProxyType('4.0.0.47') + "\n"
24
- print 'Country Code: ' + i2p.getCountryShort('4.0.0.47') + "\n"
25
- print 'Country Name: ' + i2p.getCountryLong('4.0.0.47') + "\n"
26
- print 'Region Name: ' + i2p.getRegion('4.0.0.47') + "\n"
27
- print 'City Name: ' + i2p.getCity('4.0.0.47') + "\n"
28
- print 'ISP: ' + i2p.getISP('4.0.0.47') + "\n"
29
-
30
- # single function to get all proxy data returned in array
31
- record = i2p.getAll('4.0.0.47')
32
- print 'is Proxy: ' + record['is_proxy'].to_s + "\n"
33
- print 'Proxy Type: ' + record['proxy_type'] + "\n"
34
- print 'Country Code: ' + record['country_short'] + "\n"
35
- print 'Country Name: ' + record['country_long'] + "\n"
36
- print 'Region Name: ' + record['region'] + "\n"
37
- print 'City Name: ' + record['city'] + "\n"
38
- print 'ISP: ' + record['isp'] + "\n"
39
-
40
- # close IP2Proxy BIN database
41
- i2p.close()
42
- ```
43
-
44
- ## Support
45
-
46
- Email: support@ip2location.com
47
- URL: [http://www.ip2location.com](http://www.ip2location.com)
1
+ [![Latest Stable Version](https://img.shields.io/gem/v/ip2proxy_ruby.svg)](https://rubygems.org/gems/ip2proxy_ruby)
2
+ [![Total Downloads](https://img.shields.io/gem/dt/ip2proxy_ruby.svg)](https://rubygems.org/gems/ip2proxy_ruby)
3
+
4
+ # IP2Proxy Ruby Library
5
+
6
+ This module allows user to reverse search of IP address to detect VPN servers, open proxies, web proxies, Tor exit nodes, search engine robots, data center ranges and residential proxies using IP2Proxy BIN database. Other information available includes proxy type, country, state, city, ISP, domain name, usage type, AS number, AS name, threats and last seen date.
7
+
8
+ It lookup the proxy IP address from **IP2Proxy BIN Data** file. This data file can be downloaded at
9
+
10
+ * Free IP2Proxy BIN Data: https://lite.ip2location.com
11
+ * Commercial IP2Proxy BIN Data: https://www.ip2location.com/proxy-database
12
+
13
+
14
+ For more details, please visit:
15
+ [https://www.ip2location.com/ip2proxy/developers/ruby](https://www.ip2location.com/ip2proxy/developers/ruby)
16
+
17
+ ## Methods
18
+
19
+ Below are the methods supported in this module.
20
+
21
+ |Method Name|Description|
22
+ |---|---|
23
+ |open|Open the IP2Proxy BIN data with **File I/O** mode for lookup.|
24
+ |close|Close and clean up the file pointer.|
25
+ |get_package_version|Get the package version (1 to 10 for PX1 to PX10 respectively).|
26
+ |get_module_version|Get the module version.|
27
+ |get_database_version|Get the database version.|
28
+ |is_proxy|Check whether if an IP address was a proxy. Please see [Proxy Type](#proxy-type) for details. Returned value:<ul><li>-1 : errors</li><li>0 : not a proxy</li><li>1 : a proxy</li><li>2 : a data center IP address</li></ul>|
29
+ |get_all|Return the proxy information in array.|
30
+ |get_proxytype|Return the proxy type. Please visit <a href="https://www.ip2location.com/database/px10-ip-proxytype-country-region-city-isp-domain-usagetype-asn-lastseen-threat-residential" target="_blank">IP2Location</a> for the list of proxy types supported|
31
+ |get_country_short|Return the ISO3166-1 country code (2-digits) of the proxy.|
32
+ |get_country_long|Return the ISO3166-1 country name of the proxy.|
33
+ |get_region|Return the ISO3166-2 region name of the proxy. Please visit <a href="https://www.ip2location.com/free/iso3166-2" target="_blank">ISO3166-2 Subdivision Code</a> for the information of ISO3166-2 supported|
34
+ |get_city|Return the city name of the proxy.|
35
+ |get_isp|Return the ISP name of the proxy.|
36
+ |get_domain|Return the domain name of proxy's IP address or domain name.|
37
+ |get_usagetype|Return the ISP's usage type of proxy's IP address or domain name. Please see [Usage Type](#usage-type) for details.|
38
+ |get_asn|Return the autonomous system number (ASN) of proxy's IP address or domain name.|
39
+ |get_as|Return the autonomous system (AS) name of proxy's IP address or domain name.|
40
+ |get_last_seen|Return the last seen days ago value of proxy's IP address or domain name.|
41
+ |get_threat|Return the threat types reported to proxy's IP address or domain name. Please see [Threat Type](#threat-type) for details.|
42
+
43
+ ## Usage
44
+
45
+ ```
46
+ require 'ip2proxy_ruby'
47
+
48
+ # open IP2Proxy BIN database for proxy lookup
49
+ i2p = Ip2proxy.new.open("./data/IP2PROXY-IP-PROXYTYPE-COUNTRY-REGION-CITY-ISP-DOMAIN-USAGETYPE-ASN-LASTSEEN-THREAT-RESIDENTIAL.BIN")
50
+
51
+ # get versioning information
52
+ print 'Module Version: ' + i2p.get_module_version + "\n"
53
+ print 'Package Version: ' + i2p.get_package_version + "\n"
54
+ print 'Database Version: ' + i2p.get_database_version + "\n"
55
+
56
+ # individual proxy data check
57
+ print 'Is Proxy: ' + i2p.is_proxy('1.2.3.4').to_s + "\n"
58
+ print 'Proxy Type: ' + i2p.get_proxytype('1.2.3.4') + "\n"
59
+ print 'Country Code: ' + i2p.get_country_short('1.2.3.4') + "\n"
60
+ print 'Country Name: ' + i2p.get_country_long('1.2.3.4') + "\n"
61
+ print 'Region Name: ' + i2p.get_region('1.2.3.4') + "\n"
62
+ print 'City Name: ' + i2p.get_city('1.2.3.4') + "\n"
63
+ print 'ISP: ' + i2p.get_isp('1.2.3.4') + "\n"
64
+ print 'Domain: ' + i2p.get_domain('1.2.3.4') + "\n"
65
+ print 'Usage Type: ' + i2p.get_usagetype('1.2.3.4') + "\n"
66
+ print 'ASN: ' + i2p.get_asn('1.2.3.4') + "\n"
67
+ print 'AS: ' + i2p.get_as('1.2.3.4') + "\n"
68
+ print 'Last Seen: ' + i2p.get_last_seen('1.2.3.4') + "\n"
69
+ print 'Threat: ' + i2p.get_threat('1.2.3.4') + "\n"
70
+
71
+ # single function to get all proxy data returned in array
72
+ record = i2p.get_all('1.2.3.4')
73
+ print 'is Proxy: ' + record['is_proxy'].to_s + "\n"
74
+ print 'Proxy Type: ' + record['proxy_type'] + "\n"
75
+ print 'Country Code: ' + record['country_short'] + "\n"
76
+ print 'Country Name: ' + record['country_long'] + "\n"
77
+ print 'Region Name: ' + record['region'] + "\n"
78
+ print 'City Name: ' + record['city'] + "\n"
79
+ print 'ISP: ' + record['isp'] + "\n"
80
+ print 'Domain: ' + record['domain'] + "\n"
81
+ print 'Usage Type: ' + record['usagetype'] + "\n"
82
+ print 'ASN: ' + record['asn'] + "\n"
83
+ print 'AS: ' + record['as'] + "\n"
84
+ print 'Last Seen: ' + record['last_seen'] + "\n"
85
+ print 'Threat: ' + record['threat'] + "\n"
86
+
87
+ # close IP2Proxy BIN database
88
+ i2p.close()
89
+ ```
90
+
91
+ ### Proxy Type
92
+
93
+ |Proxy Type|Description|
94
+ |---|---|
95
+ |VPN|Anonymizing VPN services|
96
+ |TOR|Tor Exit Nodes|
97
+ |PUB|Public Proxies|
98
+ |WEB|Web Proxies|
99
+ |DCH|Hosting Providers/Data Center|
100
+ |SES|Search Engine Robots|
101
+ |RES|Residential Proxies [PX10+]|
102
+
103
+ ### Usage Type
104
+
105
+ |Usage Type|Description|
106
+ |---|---|
107
+ |COM|Commercial|
108
+ |ORG|Organization|
109
+ |GOV|Government|
110
+ |MIL|Military|
111
+ |EDU|University/College/School|
112
+ |LIB|Library|
113
+ |CDN|Content Delivery Network|
114
+ |ISP|Fixed Line ISP|
115
+ |MOB|Mobile ISP|
116
+ |DCH|Data Center/Web Hosting/Transit|
117
+ |SES|Search Engine Spider|
118
+ |RSV|Reserved|
119
+
120
+ ### Threat Type
121
+
122
+ |Threat Type|Description|
123
+ |---|---|
124
+ |SPAM|Spammer|
125
+ |SCANNER|Security Scanner or Attack|
126
+ |BOTNET|Spyware or Malware|
127
+
128
+ ## Support
129
+
130
+ Email: support@ip2location.com
131
+ URL: [https://www.ip2location.com](https://www.ip2location.com)
data/Rakefile CHANGED
@@ -1,2 +1,2 @@
1
- require "bundler/gem_tasks"
2
- task :default => :spec
1
+ require "bundler/gem_tasks"
2
+ task :default => :spec
data/example.rb CHANGED
@@ -1,24 +1,30 @@
1
1
  require 'ip2proxy_ruby'
2
2
 
3
3
  # open IP2Proxy BIN database for proxy lookup
4
- i2p = Ip2proxy.new.open("./data/IP2PROXY-IP-PROXYTYPE-COUNTRY-REGION-CITY-ISP.SAMPLE.BIN")
4
+ i2p = Ip2proxy.new.open("./data/IP2PROXY-LITE-PX1.BIN")
5
5
 
6
6
  # get versioning information
7
- print 'Module Version: ' + i2p.getModuleVersion + "\n"
8
- print 'Package Version: ' + i2p.getPackageVersion + "\n"
9
- print 'Database Version: ' + i2p.getDatabaseVersion + "\n"
7
+ print 'Module Version: ' + i2p.get_module_version + "\n"
8
+ print 'Package Version: ' + i2p.get_package_version + "\n"
9
+ print 'Database Version: ' + i2p.get_database_version + "\n"
10
10
 
11
11
  # individual proxy data check
12
- print 'Is Proxy: ' + i2p.isProxy('4.0.0.47').to_s + "\n"
13
- print 'Proxy Type: ' + i2p.getProxyType('4.0.0.47') + "\n"
14
- print 'Country Code: ' + i2p.getCountryShort('4.0.0.47') + "\n"
15
- print 'Country Name: ' + i2p.getCountryLong('4.0.0.47') + "\n"
16
- print 'Region Name: ' + i2p.getRegion('4.0.0.47') + "\n"
17
- print 'City Name: ' + i2p.getCity('4.0.0.47') + "\n"
18
- print 'ISP: ' + i2p.getISP('4.0.0.47') + "\n"
12
+ print 'Is Proxy: ' + i2p.is_proxy('1.2.3.4').to_s + "\n"
13
+ print 'Proxy Type: ' + i2p.get_proxytype('1.2.3.4') + "\n"
14
+ print 'Country Code: ' + i2p.get_country_short('1.2.3.4') + "\n"
15
+ print 'Country Name: ' + i2p.get_country_long('1.2.3.4') + "\n"
16
+ print 'Region Name: ' + i2p.get_region('1.2.3.4') + "\n"
17
+ print 'City Name: ' + i2p.get_city('1.2.3.4') + "\n"
18
+ print 'ISP: ' + i2p.get_isp('1.2.3.4') + "\n"
19
+ print 'Domain: ' + i2p.get_domain('1.2.3.4') + "\n"
20
+ print 'Usage Type: ' + i2p.get_usagetype('1.2.3.4') + "\n"
21
+ print 'ASN: ' + i2p.get_asn('1.2.3.4') + "\n"
22
+ print 'AS: ' + i2p.get_as('1.2.3.4') + "\n"
23
+ print 'Last Seen: ' + i2p.get_last_seen('1.2.3.4') + "\n"
24
+ print 'Threat: ' + i2p.get_threat('1.2.3.4') + "\n"
19
25
 
20
26
  # single function to get all proxy data returned in array
21
- record = i2p.getAll('4.0.0.47')
27
+ record = i2p.get_all('1.2.3.4')
22
28
  print 'is Proxy: ' + record['is_proxy'].to_s + "\n"
23
29
  print 'Proxy Type: ' + record['proxy_type'] + "\n"
24
30
  print 'Country Code: ' + record['country_short'] + "\n"
@@ -26,6 +32,12 @@ print 'Country Name: ' + record['country_long'] + "\n"
26
32
  print 'Region Name: ' + record['region'] + "\n"
27
33
  print 'City Name: ' + record['city'] + "\n"
28
34
  print 'ISP: ' + record['isp'] + "\n"
35
+ print 'Domain: ' + record['domain'] + "\n"
36
+ print 'Usage Type: ' + record['usagetype'] + "\n"
37
+ print 'ASN: ' + record['asn'] + "\n"
38
+ print 'AS: ' + record['as'] + "\n"
39
+ print 'Last Seen: ' + record['last_seen'] + "\n"
40
+ print 'Threat: ' + record['threat'] + "\n"
29
41
 
30
42
  # close IP2Proxy BIN database
31
43
  i2p.close()
@@ -1,67 +1,74 @@
1
- # coding: utf-8
2
-
3
- Gem::Specification.new do |s|
4
- s.name = "ip2proxy_ruby"
5
- s.version = "1.0.2"
6
- s.authors = ["ip2location"]
7
- s.email = ["support@ip2location.com"]
8
-
9
- s.summary = "IP2Proxy Ruby library"
10
- s.description = "Ruby library for IP2Proxy"
11
- s.homepage = "https://github.com/ip2location/ip2proxy-ruby"
12
- s.licenses = ["MIT"]
13
- s.require_paths = ["lib"]
14
-
15
- s.extra_rdoc_files = [
16
- "LICENSE.txt",
17
- "README.md"
18
- ]
19
- s.files = [
20
- ".document",
21
- ".gitignore",
22
- "Gemfile",
23
- "Gemfile.lock",
24
- "LICENSE.txt",
25
- "README.md",
26
- "Rakefile",
27
- "ip2proxy_ruby.gemspec",
28
- "example.rb",
29
- "lib/ip2proxy_ruby.rb",
30
- "lib/ip2proxy_ruby/i2p_database_config.rb",
31
- "lib/ip2proxy_ruby/i2p_ip_data.rb",
32
- "lib/ip2proxy_ruby/i2p_string_data.rb",
33
- "lib/ip2proxy_ruby/ip2proxy_config.rb",
34
- "lib/ip2proxy_ruby/ip2proxy_record.rb",
35
- "spec/assets/IP2PROXY-IP-PROXYTYPE-COUNTRY-REGION-CITY-ISP.SAMPLE.BIN",
36
- "spec/ip2proxy_ruby_spec.rb",
37
- "spec/spec_helper.rb",
38
- "rb/data/IP2PROXY-IP-PROXYTYPE-COUNTRY-REGION-CITY-ISP.SAMPLE.BIN"
39
- ]
40
-
41
- if s.respond_to? :specification_version then
42
- s.specification_version = 4
43
-
44
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
45
- s.add_runtime_dependency(%q<bindata>, [">= 0"])
46
- s.add_development_dependency(%q<awesome_print>, [">= 0"])
47
- s.add_development_dependency(%q<rspec>, ["~> 2.8.0"])
48
- s.add_development_dependency(%q<rdoc>, ["~> 3.12"])
49
- s.add_development_dependency(%q<bundler>, [">= 1.2.0"])
50
- s.add_development_dependency(%q<simplecov>, [">= 0"])
51
- else
52
- s.add_dependency(%q<bindata>, [">= 0"])
53
- s.add_dependency(%q<awesome_print>, [">= 0"])
54
- s.add_dependency(%q<rspec>, ["~> 2.8.0"])
55
- s.add_dependency(%q<rdoc>, ["~> 3.12"])
56
- s.add_dependency(%q<bundler>, [">= 1.2.0"])
57
- s.add_dependency(%q<simplecov>, [">= 0"])
58
- end
59
- else
60
- s.add_dependency(%q<bindata>, [">= 0"])
61
- s.add_dependency(%q<awesome_print>, [">= 0"])
62
- s.add_dependency(%q<rspec>, ["~> 2.8.0"])
63
- s.add_dependency(%q<rdoc>, ["~> 3.12"])
64
- s.add_dependency(%q<bundler>, [">= 1.2.0"])
65
- s.add_dependency(%q<simplecov>, [">= 0"])
66
- end
67
- end
1
+ # coding: utf-8
2
+
3
+ Gem::Specification.new do |s|
4
+ s.name = "ip2proxy_ruby"
5
+ s.version = "3.0.0"
6
+ s.authors = ["ip2location"]
7
+ s.email = ["support@ip2location.com"]
8
+
9
+ s.summary = "IP2Proxy Ruby library"
10
+ s.description = "The official IP2Proxy Ruby library to detect VPN servers, open proxies, web proxies, Tor exit nodes, search engine robots, data center ranges and residential proxies using IP2Proxy BIN database. Other information available includes proxy type, country, state, city, ISP, domain name, usage type, AS number, AS name, threats and last seen date."
11
+ s.homepage = "https://github.com/ip2location/ip2proxy-ruby"
12
+ s.licenses = ["MIT"]
13
+ s.require_paths = ["lib"]
14
+
15
+ s.extra_rdoc_files = [
16
+ "LICENSE.txt",
17
+ "README.md"
18
+ ]
19
+ s.files = [
20
+ ".document",
21
+ ".gitignore",
22
+ "Gemfile",
23
+ "LICENSE.txt",
24
+ "README.md",
25
+ "Rakefile",
26
+ "ip2proxy_ruby.gemspec",
27
+ "example.rb",
28
+ "lib/ip2proxy_ruby.rb",
29
+ "lib/ip2proxy_ruby/i2p_database_config.rb",
30
+ "lib/ip2proxy_ruby/i2p_ip_data.rb",
31
+ "lib/ip2proxy_ruby/i2p_string_data.rb",
32
+ "lib/ip2proxy_ruby/ip2proxy_config.rb",
33
+ "lib/ip2proxy_ruby/ip2proxy_record.rb",
34
+ "spec/assets/IP2PROXY-IP-PROXYTYPE-COUNTRY-REGION-CITY-ISP.SAMPLE.BIN",
35
+ "spec/ip2proxy_ruby_spec.rb",
36
+ "spec/spec_helper.rb",
37
+ "rb/data/IP2PROXY-LITE-PX1.BIN"
38
+ ]
39
+
40
+ if s.respond_to?(:metadata=)
41
+ s.metadata = {
42
+ "bug_tracker_uri" => "https://github.com/ip2location/ip2proxy-ruby/issues",
43
+ "homepage_uri" => "https://www.ip2location.com",
44
+ "source_code_uri" => "https://github.com/ip2location/ip2proxy-ruby",
45
+ }
46
+ end
47
+
48
+ if s.respond_to? :specification_version then
49
+ s.specification_version = 4
50
+
51
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
52
+ s.add_runtime_dependency(%q<bindata>, [">= 0"])
53
+ s.add_development_dependency(%q<awesome_print>, [">= 0"])
54
+ s.add_development_dependency(%q<rspec>, ["~> 2.8.0"])
55
+ s.add_development_dependency(%q<rdoc>, ["~> 3.12"])
56
+ s.add_development_dependency(%q<bundler>, [">= 1.2.0"])
57
+ s.add_development_dependency(%q<simplecov>, [">= 0"])
58
+ else
59
+ s.add_dependency(%q<bindata>, [">= 0"])
60
+ s.add_dependency(%q<awesome_print>, [">= 0"])
61
+ s.add_dependency(%q<rspec>, ["~> 2.8.0"])
62
+ s.add_dependency(%q<rdoc>, ["~> 3.12"])
63
+ s.add_dependency(%q<bundler>, [">= 1.2.0"])
64
+ s.add_dependency(%q<simplecov>, [">= 0"])
65
+ end
66
+ else
67
+ s.add_dependency(%q<bindata>, [">= 0"])
68
+ s.add_dependency(%q<awesome_print>, [">= 0"])
69
+ s.add_dependency(%q<rspec>, ["~> 2.8.0"])
70
+ s.add_dependency(%q<rdoc>, ["~> 3.12"])
71
+ s.add_dependency(%q<bundler>, [">= 1.2.0"])
72
+ s.add_dependency(%q<simplecov>, [">= 0"])
73
+ end
74
+ end