ip2location_ruby 8.7.2 → 8.7.3
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/Gemfile +1 -1
- data/LICENSE.txt +1 -1
- data/VERSION +1 -1
- data/example.rb +0 -6
- data/ip2location_ruby.gemspec +4 -5
- data/lib/ip2location_ruby.rb +2 -2
- metadata +7 -8
- data/Gemfile.lock +0 -25
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ecc166b6193e9ed97e8ad60faaf2f26d1ab5b0764a9b4520c968bc2578401e4e
|
|
4
|
+
data.tar.gz: 89a822c6eb06a3781c7b66e579ba1ad707fdf9ae2a4068cb72fe980b3e7ceda1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6fcbeda2d8bd5ef6bb61b434e37946c36d84f721137d26a4a076b9ddcb5e60ed4b38a8d01188cf4ca7ea07f49ed30cfc5a7472808342d3bb9d3bf29d281e372b
|
|
7
|
+
data.tar.gz: 0f70b47844945a9975552630eb5aa9eafcafba90cf740051344a18e7221c1fc7e5ba2a1c4220ed4c471f7cdf0e4d878fc3ceb495bb0aa73df4a2dd434c71349a
|
data/Gemfile
CHANGED
|
@@ -2,7 +2,7 @@ source "http://rubygems.org"
|
|
|
2
2
|
# Add dependencies required to use your gem here.
|
|
3
3
|
# Example:
|
|
4
4
|
# gem "activesupport", ">= 2.3.5"
|
|
5
|
-
gem 'bindata'
|
|
5
|
+
gem 'bindata', "~> 2.4.15"
|
|
6
6
|
# Add dependencies to develop your gem here.
|
|
7
7
|
# Include everything needed to run rake, tests, features, etc.
|
|
8
8
|
|
data/LICENSE.txt
CHANGED
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
8.7.
|
|
1
|
+
8.7.3
|
data/example.rb
CHANGED
|
@@ -34,12 +34,6 @@ puts 'ASN: ' + record['asn']
|
|
|
34
34
|
puts 'AS: ' + record['as']
|
|
35
35
|
i2l.close()
|
|
36
36
|
|
|
37
|
-
# Web Service
|
|
38
|
-
ws = Ip2locationWebService.new('demo', 'WS25', true)
|
|
39
|
-
record = ws.lookup('8.8.8.8', 'continent,country,region,city,geotargeting,country_groupings,time_zone_info', 'en')
|
|
40
|
-
puts record
|
|
41
|
-
puts ws.get_credit()
|
|
42
|
-
|
|
43
37
|
# IP Tools
|
|
44
38
|
iptool = Ip2locationIpTools.new()
|
|
45
39
|
puts iptool.is_ipv4('8.8.8.8')
|
data/ip2location_ruby.gemspec
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Gem::Specification.new do |s|
|
|
2
2
|
s.name = "ip2location_ruby"
|
|
3
|
-
s.version = "8.7.
|
|
3
|
+
s.version = "8.7.3"
|
|
4
4
|
|
|
5
5
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
|
6
6
|
s.require_paths = ["lib"]
|
|
@@ -16,7 +16,6 @@ Gem::Specification.new do |s|
|
|
|
16
16
|
".document",
|
|
17
17
|
".rspec",
|
|
18
18
|
"Gemfile",
|
|
19
|
-
"Gemfile.lock",
|
|
20
19
|
"LICENSE.txt",
|
|
21
20
|
"Rakefile",
|
|
22
21
|
"VERSION",
|
|
@@ -57,18 +56,18 @@ Gem::Specification.new do |s|
|
|
|
57
56
|
s.specification_version = 4
|
|
58
57
|
|
|
59
58
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
|
60
|
-
s.add_runtime_dependency(%q<bindata>, ["
|
|
59
|
+
s.add_runtime_dependency(%q<bindata>, ["~> 2.4.15"])
|
|
61
60
|
s.add_development_dependency(%q<rspec>, ["~> 2.8.0"])
|
|
62
61
|
s.add_development_dependency(%q<rdoc>, [">= 6.3.1"])
|
|
63
62
|
s.add_development_dependency(%q<bundler>, [">= 1.2.0"])
|
|
64
63
|
else
|
|
65
|
-
s.add_dependency(%q<bindata>, ["
|
|
64
|
+
s.add_dependency(%q<bindata>, ["~> 2.4.15"])
|
|
66
65
|
s.add_dependency(%q<rspec>, ["~> 2.8.0"])
|
|
67
66
|
s.add_dependency(%q<rdoc>, [">= 6.3.1"])
|
|
68
67
|
s.add_dependency(%q<bundler>, [">= 1.2.0"])
|
|
69
68
|
end
|
|
70
69
|
else
|
|
71
|
-
s.add_dependency(%q<bindata>, ["
|
|
70
|
+
s.add_dependency(%q<bindata>, ["~> 2.4.15"])
|
|
72
71
|
s.add_dependency(%q<rspec>, ["~> 2.8.0"])
|
|
73
72
|
s.add_dependency(%q<rdoc>, [">= 6.3.1"])
|
|
74
73
|
s.add_dependency(%q<bundler>, [">= 1.2.0"])
|
data/lib/ip2location_ruby.rb
CHANGED
|
@@ -12,9 +12,9 @@ require 'ip2location_ruby/i2l_ip_data'
|
|
|
12
12
|
require 'ip2location_ruby/ip2location_record'
|
|
13
13
|
|
|
14
14
|
class Ip2location
|
|
15
|
-
attr_accessor :record_class4, :record_class6, :v4, :file, :db_index, :count, :base_addr, :ipno, :
|
|
15
|
+
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
|
|
16
16
|
|
|
17
|
-
VERSION = '8.7.
|
|
17
|
+
VERSION = '8.7.3'
|
|
18
18
|
FIELD_NOT_SUPPORTED = 'NOT SUPPORTED'
|
|
19
19
|
INVALID_IP_ADDRESS = 'INVALID IP ADDRESS'
|
|
20
20
|
INVALID_BIN_DATABASE = 'Incorrect IP2Location BIN file format. Please make sure that you are using the latest IP2Location BIN file.'
|
metadata
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ip2location_ruby
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 8.7.
|
|
4
|
+
version: 8.7.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- ip2location
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2024-03-08 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bindata
|
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
|
16
16
|
requirements:
|
|
17
|
-
- - "
|
|
17
|
+
- - "~>"
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version:
|
|
19
|
+
version: 2.4.15
|
|
20
20
|
type: :runtime
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
|
-
- - "
|
|
24
|
+
- - "~>"
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
|
-
version:
|
|
26
|
+
version: 2.4.15
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: rspec
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -82,7 +82,6 @@ files:
|
|
|
82
82
|
- ".document"
|
|
83
83
|
- ".rspec"
|
|
84
84
|
- Gemfile
|
|
85
|
-
- Gemfile.lock
|
|
86
85
|
- LICENSE.txt
|
|
87
86
|
- README.md
|
|
88
87
|
- Rakefile
|
|
@@ -129,7 +128,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
129
128
|
- !ruby/object:Gem::Version
|
|
130
129
|
version: '0'
|
|
131
130
|
requirements: []
|
|
132
|
-
rubygems_version: 3.
|
|
131
|
+
rubygems_version: 3.5.6
|
|
133
132
|
signing_key:
|
|
134
133
|
specification_version: 4
|
|
135
134
|
summary: the ip2location ruby library
|
data/Gemfile.lock
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
GEM
|
|
2
|
-
remote: http://rubygems.org/
|
|
3
|
-
specs:
|
|
4
|
-
bindata (2.4.10)
|
|
5
|
-
diff-lcs (1.1.3)
|
|
6
|
-
json (>= 2.3.0)
|
|
7
|
-
rdoc (>= 6.3.1)
|
|
8
|
-
json (~> 1.4)
|
|
9
|
-
rspec (2.8.0)
|
|
10
|
-
rspec-core (~> 2.8.0)
|
|
11
|
-
rspec-expectations (~> 2.8.0)
|
|
12
|
-
rspec-mocks (~> 2.8.0)
|
|
13
|
-
rspec-core (2.8.0)
|
|
14
|
-
rspec-expectations (2.8.0)
|
|
15
|
-
diff-lcs (~> 1.1.2)
|
|
16
|
-
rspec-mocks (2.8.0)
|
|
17
|
-
|
|
18
|
-
PLATFORMS
|
|
19
|
-
ruby
|
|
20
|
-
|
|
21
|
-
DEPENDENCIES
|
|
22
|
-
bindata
|
|
23
|
-
bundler (>= 1.2.0)
|
|
24
|
-
rdoc (>= 6.3.1)
|
|
25
|
-
rspec (~> 2.8.0)
|