ip2location_ruby 8.3.1 → 8.3.2

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
2
  SHA256:
3
- metadata.gz: 88ca0a0eeda11477542ff26e73d650ee4710fe53cefacfae2becdab77a60b296
4
- data.tar.gz: b53da2a74fb4cbe4580d0745cee0b9be50b21dc45d63b7baf4fd2d94090380a6
3
+ metadata.gz: f65c7c4cdd394a27ed94056f2b040291f5728c074cac760222a323746821d050
4
+ data.tar.gz: 73afe05c310a00fe285c5c92b7c8d305ca7d360f223731ae52a1fc26f40ce308
5
5
  SHA512:
6
- metadata.gz: f20f7d2bb1fd83dacaacc4f78e9f2641a67be6a833be040c9ceaf289471d58658df35f01623bb8429bfaf9830df36e10517a693ab564c4542911c510f5b90292
7
- data.tar.gz: b8f9340cd456e71a2e7920290f04aeea7d1d88692d53dee247f537f31b7ab25e5ccf83870667b5df626080c65a60c872ede67c606aab11dcdeef1d2cc7c5c4dd
6
+ metadata.gz: b3a4ef0bbefe2bdd34ec42da052dd0358e45165432ef46bf988649931c78df4e6b37c985f916b3905025a1c51f53050b57e457cbaab476a68af51bde6ba89b53
7
+ data.tar.gz: 55926d42c6326264454762933b14b43036d3d9834641e88dd1d27f924b02e462eed2f206706b8e359a8c01ac1351f135a2b7096c249c48a90ac31532988604ee
data/Gemfile.lock CHANGED
@@ -4,7 +4,7 @@ GEM
4
4
  bindata (2.4.10)
5
5
  diff-lcs (1.1.3)
6
6
  json (>= 2.3.0)
7
- rdoc (3.12.2)
7
+ rdoc (>= 6.3.1)
8
8
  json (~> 1.4)
9
9
  rspec (2.8.0)
10
10
  rspec-core (~> 2.8.0)
@@ -21,5 +21,5 @@ PLATFORMS
21
21
  DEPENDENCIES
22
22
  bindata
23
23
  bundler (>= 1.2.0)
24
- rdoc (~> 3.12)
24
+ rdoc (>= 6.3.1)
25
25
  rspec (~> 2.8.0)
data/README.md CHANGED
@@ -9,10 +9,19 @@ Supported IPv4 and IPv6 address.
9
9
  For more details, please visit:
10
10
  [https://www.ip2location.com/developers/ruby](https://www.ip2location.com/developers/ruby)
11
11
 
12
+ # INSTALLATION
13
+ Install this package using the command as below:
14
+
15
+ ```
16
+ gem install ip2location_ruby
17
+ ```
18
+
12
19
  # Usage
13
20
  You can check the **example.rb** file to learn more about usage.
14
21
 
15
22
  ## BIN Database
23
+ 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.
24
+
16
25
  Below is the description of the functions available in the **BIN Database** lookup.
17
26
 
18
27
  | Function Name | Description |
@@ -45,7 +54,7 @@ Below is the description of the functions available in the **BIN Database** look
45
54
  | get_elevation | Return average height of city above sea level in meters (m). |
46
55
  | get_usagetype | Return the ISP's usage type of IP address. |
47
56
  | get_addresstype | Returns the IP address type (A-Anycast, B-Broadcast, M-Multicast & U-Unicast) of IP address or domain name. |
48
- | category | Returns the IAB content taxonomy category of IP address or domain name. |
57
+ | get_category | Returns the IAB content taxonomy category of IP address or domain name. |
49
58
 
50
59
 
51
60
  ## Web Service
@@ -62,8 +71,6 @@ This library requires IP2Location BIN data file to function. You may download th
62
71
  * IP2Location LITE BIN Data (Free): https://lite.ip2location.com
63
72
  * IP2Location Commercial BIN Data (Comprehensive): https://www.ip2location.com
64
73
 
65
- 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.
66
-
67
74
  You can also sign up for [IP2Location Web Service](https://www.ip2location.com/web-service/ip2location) to lookup by IP2Location API.
68
75
 
69
76
  # IPv4 BIN vs IPv6 BIN
data/VERSION CHANGED
@@ -1 +1 @@
1
- 8.3.1
1
+ 8.3.2
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "ip2location_ruby"
3
- s.version = "8.3.1"
3
+ s.version = "8.3.2"
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"]
@@ -54,18 +54,18 @@ Gem::Specification.new do |s|
54
54
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
55
55
  s.add_runtime_dependency(%q<bindata>, [">= 0"])
56
56
  s.add_development_dependency(%q<rspec>, ["~> 2.8.0"])
57
- s.add_development_dependency(%q<rdoc>, ["~> 3.12"])
57
+ s.add_development_dependency(%q<rdoc>, [">= 6.3.1"])
58
58
  s.add_development_dependency(%q<bundler>, [">= 1.2.0"])
59
59
  else
60
60
  s.add_dependency(%q<bindata>, [">= 0"])
61
61
  s.add_dependency(%q<rspec>, ["~> 2.8.0"])
62
- s.add_dependency(%q<rdoc>, ["~> 3.12"])
62
+ s.add_dependency(%q<rdoc>, [">= 6.3.1"])
63
63
  s.add_dependency(%q<bundler>, [">= 1.2.0"])
64
64
  end
65
65
  else
66
66
  s.add_dependency(%q<bindata>, [">= 0"])
67
67
  s.add_dependency(%q<rspec>, ["~> 2.8.0"])
68
- s.add_dependency(%q<rdoc>, ["~> 3.12"])
68
+ s.add_dependency(%q<rdoc>, [">= 6.3.1"])
69
69
  s.add_dependency(%q<bundler>, [">= 1.2.0"])
70
70
  end
71
71
  end
@@ -13,7 +13,7 @@ require 'ip2location_ruby/ip2location_record'
13
13
  class Ip2location
14
14
  attr_accessor :record_class4, :record_class6, :v4, :file, :db_index, :count, :base_addr, :ipno, :count, :record, :database, :columns, :ip_version, :ipv4databasecount, :ipv4databaseaddr, :ipv4indexbaseaddr, :ipv6databasecount, :ipv6databaseaddr, :ipv6indexbaseaddr, :databaseyear, :databasemonth, :databaseday, :last_err_msg
15
15
 
16
- VERSION = '8.3.1'
16
+ VERSION = '8.3.2'
17
17
  FIELD_NOT_SUPPORTED = 'NOT SUPPORTED'
18
18
  INVALID_IP_ADDRESS = 'INVALID IP ADDRESS'
19
19
  INVALID_BIN_DATABASE = 'Incorrect IP2Location BIN file format. Please make sure that you are using the latest IP2Location BIN file.'
@@ -29,7 +29,7 @@ class Ip2location
29
29
  self.file = File.open(File.expand_path url, 'rb')
30
30
  rescue
31
31
  self.last_err_msg = 'Ip2location.new.open() error in opening ' + url +'.'
32
- abort('Ip2location.new.open() error in opening ' + url +'.')
32
+ abort('Ip2location.new.open() error in opening ' + url + '. No such file in the /your_ip2location_ruby_library_path/rb/ folder.')
33
33
  else
34
34
  end
35
35
  i2l = Ip2locationConfig.read(file)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ip2location_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 8.3.1
4
+ version: 8.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - ip2location
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-07-14 00:00:00.000000000 Z
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: '3.12'
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: '3.12'
54
+ version: 6.3.1
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: bundler
57
57
  requirement: !ruby/object:Gem::Requirement