ip2location_ruby 8.5.0 → 8.6.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.
@@ -0,0 +1,21 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
+
3
+ describe "Ip2location" do
4
+ it "work correctly with country get_country_info field" do
5
+ country = Ip2locationCountry.new('./data/IP2LOCATION-COUNTRY-INFORMATION-BASIC.CSV')
6
+ record = country.get_country_info('US')
7
+ expect(record).to include("country_code")
8
+ end
9
+
10
+ it "work correctly with country get_country_info value" do
11
+ country = Ip2locationCountry.new('./data/IP2LOCATION-COUNTRY-INFORMATION-BASIC.CSV')
12
+ record = country.get_country_info('US')
13
+ expect(record["country_code"]).to eq 'US'
14
+ end
15
+
16
+ it "work correctly with country get_country_info capital" do
17
+ country = Ip2locationCountry.new('./data/IP2LOCATION-COUNTRY-INFORMATION-BASIC.CSV')
18
+ record = country.get_country_info('MY')
19
+ expect(record["capital"]).to eq 'Kuala Lumpur'
20
+ end
21
+ end
@@ -0,0 +1,9 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
+
3
+ describe "Ip2location" do
4
+ it "work correctly with region get_region_code value" do
5
+ region = Ip2locationRegion.new('./data/IP2LOCATION-ISO3166-2.CSV')
6
+ record = region.get_region_code('US', 'California')
7
+ expect(record).to eq 'US-CA'
8
+ end
9
+ end
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.5.0
4
+ version: 8.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ip2location
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-06-21 00:00:00.000000000 Z
11
+ date: 2022-10-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bindata
@@ -94,10 +94,14 @@ files:
94
94
  - lib/ip2location_ruby/i2l_string_data.rb
95
95
  - lib/ip2location_ruby/ip2location_config.rb
96
96
  - lib/ip2location_ruby/ip2location_record.rb
97
+ - rb/data/IP2LOCATION-COUNTRY-INFORMATION-BASIC.CSV
98
+ - rb/data/IP2LOCATION-ISO3166-2.CSV
97
99
  - rb/data/IP2LOCATION-LITE-DB1.IPV6.BIN
98
100
  - spec/assets/IP2LOCATION-LITE-DB1.IPV6.BIN
101
+ - spec/ip2location_ruby_country_spec.rb
99
102
  - spec/ip2location_ruby_database_spec.rb
100
103
  - spec/ip2location_ruby_iptools_spec.rb
104
+ - spec/ip2location_ruby_region_spec.rb
101
105
  - spec/ip2location_ruby_webservice_spec.rb
102
106
  - spec/spec_helper.rb
103
107
  homepage: https://github.com/ip2location/ip2location-ruby
@@ -123,7 +127,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
123
127
  - !ruby/object:Gem::Version
124
128
  version: '0'
125
129
  requirements: []
126
- rubygems_version: 3.2.33
130
+ rubygems_version: 3.3.7
127
131
  signing_key:
128
132
  specification_version: 4
129
133
  summary: the ip2location ruby library