ip2proxy_ruby 3.2.0 → 3.2.1
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 +4 -4
- data/README.md +2 -2
- data/ip2proxy_ruby.gemspec +4 -4
- data/lib/ip2proxy_ruby.rb +2 -2
- data/spec/ip2proxy_ruby_database_spec.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dd1e0bbbfed7c2c8810a7673dedb3b2217e9b15f2ee66db8996b0193c1f29954
|
4
|
+
data.tar.gz: 268884174492ad2fb1e359f499fb4f783f2ff0bcd07a075fb772d5dbbc80be45
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ee2149410b6e181dc04055c245b35a43e26f32fa67443a35d88415e04389d0fca830b0aefdc33973ae9538aa5744dcb050a6d79916d8d9e0833ae581412b63d0
|
7
|
+
data.tar.gz: 9f6762d6926650eb3ef9b5b5dcb9ff1e36f342bb1f965612324a0c1a6c82f40890158d760d5d681c58ac8c76a98a6a6787fd98f432486b35bf6466d6f31a1f73
|
data/README.md
CHANGED
@@ -11,6 +11,8 @@ For more details, please visit:
|
|
11
11
|
You can check the **example.rb** file to learn more about usage.
|
12
12
|
|
13
13
|
## BIN Database
|
14
|
+
An outdated BIN database was provided in the library for your testing. You are recommended to visit the [links](#dependencies) to download the latest BIN database and save it in the ```rb``` folder.
|
15
|
+
|
14
16
|
Below is the description of the functions available in the **BIN Database** lookup.
|
15
17
|
|
16
18
|
|Method Name|Description|
|
@@ -88,8 +90,6 @@ This library requires IP2Proxy BIN data file to function. You may download the B
|
|
88
90
|
* IP2Proxy LITE BIN Data (Free): https://lite.ip2location.com
|
89
91
|
* IP2Proxy Commercial BIN Data (Comprehensive): https://www.ip2location.com/proxy-database
|
90
92
|
|
91
|
-
An outdated BIN database was provided in the library for your testing. You are recommended to visit the above links to download the latest BIN database.
|
92
|
-
|
93
93
|
You can also sign up for [IP2Proxy Web Service](https://www.ip2location.com/web-service/ip2proxy) to lookup by IP2Proxy API.
|
94
94
|
|
95
95
|
# Support
|
data/ip2proxy_ruby.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = "ip2proxy_ruby"
|
5
|
-
s.version = "3.2.
|
5
|
+
s.version = "3.2.1"
|
6
6
|
s.authors = ["ip2location"]
|
7
7
|
s.email = ["support@ip2location.com"]
|
8
8
|
|
@@ -51,18 +51,18 @@ Gem::Specification.new do |s|
|
|
51
51
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
52
52
|
s.add_runtime_dependency(%q<bindata>, [">= 0"])
|
53
53
|
s.add_development_dependency(%q<rspec>, ["~> 2.8.0"])
|
54
|
-
s.add_development_dependency(%q<rdoc>, ["
|
54
|
+
s.add_development_dependency(%q<rdoc>, [">= 6.3.1"])
|
55
55
|
s.add_development_dependency(%q<bundler>, [">= 1.2.0"])
|
56
56
|
else
|
57
57
|
s.add_dependency(%q<bindata>, [">= 0"])
|
58
58
|
s.add_dependency(%q<rspec>, ["~> 2.8.0"])
|
59
|
-
s.add_dependency(%q<rdoc>, ["
|
59
|
+
s.add_dependency(%q<rdoc>, [">= 6.3.1"])
|
60
60
|
s.add_dependency(%q<bundler>, [">= 1.2.0"])
|
61
61
|
end
|
62
62
|
else
|
63
63
|
s.add_dependency(%q<bindata>, [">= 0"])
|
64
64
|
s.add_dependency(%q<rspec>, ["~> 2.8.0"])
|
65
|
-
s.add_dependency(%q<rdoc>, ["
|
65
|
+
s.add_dependency(%q<rdoc>, [">= 6.3.1"])
|
66
66
|
s.add_dependency(%q<bundler>, [">= 1.2.0"])
|
67
67
|
end
|
68
68
|
end
|
data/lib/ip2proxy_ruby.rb
CHANGED
@@ -11,7 +11,7 @@ require_relative 'ip2proxy_ruby/ip2proxy_record'
|
|
11
11
|
class Ip2proxy
|
12
12
|
attr_accessor :record_class4, :record_class6, :v4, :file, :db_index, :count, :base_addr, :ipno, :record, :database, :columns, :ip_version, :ipv4databasecount, :ipv4databaseaddr, :ipv4indexbaseaddr, :ipv6databasecount, :ipv6databaseaddr, :ipv6indexbaseaddr, :databaseyear, :databasemonth, :databaseday, :last_err_msg
|
13
13
|
|
14
|
-
VERSION = '3.2.
|
14
|
+
VERSION = '3.2.1'
|
15
15
|
FIELD_NOT_SUPPORTED = 'NOT SUPPORTED'
|
16
16
|
INVALID_IP_ADDRESS = 'INVALID IP ADDRESS'
|
17
17
|
INVALID_BIN_DATABASE = 'Incorrect IP2Proxy BIN file format. Please make sure that you are using the latest IP2Proxy BIN file.'
|
@@ -26,7 +26,7 @@ class Ip2proxy
|
|
26
26
|
self.file = File.open(File.expand_path url, 'rb')
|
27
27
|
rescue
|
28
28
|
self.last_err_msg = 'Ip2proxy.new.open() error in opening ' + url +'.'
|
29
|
-
abort('Ip2proxy.new.open() error in opening ' + url +'.')
|
29
|
+
abort('Ip2proxy.new.open() error in opening ' + url + '. No such file in the /your_ip2proxy_ruby_library_path/rb/ folder.')
|
30
30
|
else
|
31
31
|
end
|
32
32
|
i2p = Ip2proxyConfig.read(file)
|
@@ -106,7 +106,7 @@ describe "Ip2proxy" do
|
|
106
106
|
it "work correctly with get_module_version" do
|
107
107
|
i2p = Ip2proxy.new.open(File.dirname(__FILE__) + "/assets/PX11.SAMPLE.BIN")
|
108
108
|
record = i2p.get_module_version()
|
109
|
-
expect(record).to eq '3.2.
|
109
|
+
expect(record).to eq '3.2.1'
|
110
110
|
end
|
111
111
|
|
112
112
|
it "work correctly with get_package_version" do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ip2proxy_ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.2.
|
4
|
+
version: 3.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ip2location
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-12-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bindata
|
@@ -42,16 +42,16 @@ dependencies:
|
|
42
42
|
name: rdoc
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: 6.3.1
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
54
|
+
version: 6.3.1
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: bundler
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|