ip_locator_cn 0.2.0 → 0.3.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
2
  SHA256:
3
- metadata.gz: d7a329456174c6d309051f83b38dce8004116c4e86ef6c6c9c7e816cdee527cc
4
- data.tar.gz: ab81c58038e50b9d85bc75853c5670bab3bcee8c537b4de5f692721bc310559b
3
+ metadata.gz: 591a6432b9a000210e613282dfe40749c563d58a1390befad9691edba327b1e8
4
+ data.tar.gz: 18ee39d3f8afd0ff3e1969e8f7ae9553e0a2411ad6322a5738afb4ed421ea2c4
5
5
  SHA512:
6
- metadata.gz: 5c76128be6fe760277a4734def75823063827c775c172ecad3d7c484c3174a2ac8839baf31fb8a33d86780fcc33cec3556ade86b84f57e8a831d090843e43c3f
7
- data.tar.gz: ee5994b55c2b0ddcab0a2dc509e241f797f05d239d2492fbbe79098f21e149df407e37cb80ae2e2e74ce0007ee1d7bf5c9856a9ed51df1d2fedfa3391b6f87df
6
+ metadata.gz: 58223fcf17a87f4bb5e3803b246da3ec0f357d30ef4064a8820ca5cb9d7c8dee79915cd23af9fbf183efab5ed5f2accb92553bb542ee786231b011e42d0f0354
7
+ data.tar.gz: 9d59a4a5e5241f061ac2134e34b52ba38f8d3990aabca4f39012d508b67812b2e47af2645d445a8f000357ac0988ac1a79e78942b038bf98e52c20b12c8b9c86
data/.travis.yml CHANGED
@@ -4,4 +4,15 @@ language: ruby
4
4
  cache: bundler
5
5
  rvm:
6
6
  - 2.4.5
7
- before_install: gem install bundler -v 1.16.6
7
+ before_install:
8
+ - gem update --system
9
+ - gem install bundler
10
+ before_script:
11
+ - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
12
+ - chmod +x ./cc-test-reporter
13
+ - ./cc-test-reporter before-build
14
+ - bundle i
15
+ script:
16
+ - bundle exec rspec
17
+ after_script:
18
+ - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
data/Gemfile.lock CHANGED
@@ -1,28 +1,28 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ip_locator_cn (0.1.1)
4
+ ip_locator_cn (0.3.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
8
8
  specs:
9
- diff-lcs (1.3)
10
- docile (1.3.1)
11
- json (2.2.0)
9
+ diff-lcs (1.5.0)
10
+ docile (1.4.0)
11
+ json (2.6.3)
12
12
  rake (10.5.0)
13
- rspec (3.8.0)
14
- rspec-core (~> 3.8.0)
15
- rspec-expectations (~> 3.8.0)
16
- rspec-mocks (~> 3.8.0)
17
- rspec-core (3.8.0)
18
- rspec-support (~> 3.8.0)
19
- rspec-expectations (3.8.2)
13
+ rspec (3.12.0)
14
+ rspec-core (~> 3.12.0)
15
+ rspec-expectations (~> 3.12.0)
16
+ rspec-mocks (~> 3.12.0)
17
+ rspec-core (3.12.2)
18
+ rspec-support (~> 3.12.0)
19
+ rspec-expectations (3.12.3)
20
20
  diff-lcs (>= 1.2.0, < 2.0)
21
- rspec-support (~> 3.8.0)
22
- rspec-mocks (3.8.0)
21
+ rspec-support (~> 3.12.0)
22
+ rspec-mocks (3.12.5)
23
23
  diff-lcs (>= 1.2.0, < 2.0)
24
- rspec-support (~> 3.8.0)
25
- rspec-support (3.8.0)
24
+ rspec-support (~> 3.12.0)
25
+ rspec-support (3.12.0)
26
26
  simplecov (0.16.1)
27
27
  docile (~> 1.1)
28
28
  json (>= 1.8, < 3)
@@ -30,14 +30,13 @@ GEM
30
30
  simplecov-html (0.10.2)
31
31
 
32
32
  PLATFORMS
33
- ruby
33
+ x86_64-darwin-22
34
34
 
35
35
  DEPENDENCIES
36
- bundler (~> 1.16)
37
36
  ip_locator_cn!
38
37
  rake (~> 10.0)
39
38
  rspec (~> 3.0)
40
39
  simplecov (~> 0.16.1)
41
40
 
42
41
  BUNDLED WITH
43
- 1.16.6
42
+ 2.4.12
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # IP Locator CN
2
2
 
3
+ [![Gem Version](https://badge.fury.io/rb/ip_locator_cn.svg)](https://badge.fury.io/rb/ip_locator_cn) [![Build Status](https://travis-ci.org/xiaohui-zhangxh/ip_locator_cn.svg?branch=master)](https://travis-ci.org/xiaohui-zhangxh/ip_locator_cn) [![Maintainability](https://api.codeclimate.com/v1/badges/ce57ddef67adc3d48378/maintainability)](https://codeclimate.com/github/xiaohui-zhangxh/ip_locator_cn/maintainability) [![Test Coverage](https://api.codeclimate.com/v1/badges/ce57ddef67adc3d48378/test_coverage)](https://codeclimate.com/github/xiaohui-zhangxh/ip_locator_cn/test_coverage) ![](https://ruby-gem-downloads-badge.herokuapp.com/ip_locator_cn?type=total)
4
+
3
5
  基于纯真 IP 库解析中国的 IP,参考了“[纯真数据库自动更新原理](https://github.com/shuax/QQWryUpdate/blob/master/update.php)” 和 “[PHP 版本的 IP 搜索源码](https://github.com/itbdw/ip-database/blob/master/src/IpLocation.php)”
4
6
 
5
7
  ## Installation
@@ -57,6 +59,11 @@ Or install it yourself as:
57
59
  => {:province=>"北京", :city=>"顺义区", :country=>"中国", :ip=>"60.195.153.98", :county=>"", :isp=>"", :area=>"中国北京顺义区后沙峪金龙网吧", :origin_country=>"北京市顺义区", :origin_area=>"后沙峪金龙网吧"}
58
60
  ```
59
61
 
62
+ ## TODO
63
+
64
+ - [ ] Fix: 目前无法提取少数名族地区的城市名称。如:“四川省凉山州西昌市”无法识别出“凉山州”是城市,“西昌市”是县;“内蒙古锡林郭勒盟”,无法识别出“锡林郭勒盟”是城市。
65
+ - [ ] 通过 OTA 获取 QQWry 数据后,缓存的到本地磁盘
66
+
60
67
  ## Development
61
68
 
62
69
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
10
10
 
11
11
  spec.summary = 'Resolve IP info in China'
12
12
  spec.description = 'Resolve IP with qqwry.data, can download qqwry.data on the air.'
13
- spec.homepage = 'https://github.com/xiaohui-zhangxh/'
13
+ spec.homepage = 'https://github.com/xiaohui-zhangxh/ip_locator_cn'
14
14
  spec.license = 'MIT'
15
15
 
16
16
  # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
@@ -35,7 +35,6 @@ Gem::Specification.new do |spec|
35
35
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
36
36
  spec.require_paths = ['lib']
37
37
 
38
- spec.add_development_dependency 'bundler', '~> 1.16'
39
38
  spec.add_development_dependency 'rake', '~> 10.0'
40
39
  spec.add_development_dependency 'rspec', '~> 3.0'
41
40
  spec.add_development_dependency 'simplecov', '~> 0.16.1'
@@ -1,3 +1,3 @@
1
1
  module IpLocatorCn
2
- VERSION = '0.2.0'.freeze
2
+ VERSION = '0.3.0'.freeze
3
3
  end
data/lib/ip_locator_cn.rb CHANGED
@@ -17,6 +17,6 @@ module IpLocatorCn
17
17
  end
18
18
 
19
19
  def self.resolve(ip, options={ dat_path: data_path })
20
- QQWry.new(options).resolve(ip)
20
+ QQWry.new(**options).resolve(ip)
21
21
  end
22
22
  end
metadata CHANGED
@@ -1,29 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ip_locator_cn
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - xiaohui
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-03-01 00:00:00.000000000 Z
11
+ date: 2023-05-29 00:00:00.000000000 Z
12
12
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: bundler
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '1.16'
20
- type: :development
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: '1.16'
27
13
  - !ruby/object:Gem::Dependency
28
14
  name: rake
29
15
  requirement: !ruby/object:Gem::Requirement
@@ -92,12 +78,12 @@ files:
92
78
  - lib/ip_locator_cn/qqwry/isp.rb
93
79
  - lib/ip_locator_cn/qqwry/provinces.rb
94
80
  - lib/ip_locator_cn/version.rb
95
- homepage: https://github.com/xiaohui-zhangxh/
81
+ homepage: https://github.com/xiaohui-zhangxh/ip_locator_cn
96
82
  licenses:
97
83
  - MIT
98
84
  metadata:
99
- homepage_uri: https://github.com/xiaohui-zhangxh/
100
- post_install_message:
85
+ homepage_uri: https://github.com/xiaohui-zhangxh/ip_locator_cn
86
+ post_install_message:
101
87
  rdoc_options: []
102
88
  require_paths:
103
89
  - lib
@@ -112,9 +98,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
112
98
  - !ruby/object:Gem::Version
113
99
  version: '0'
114
100
  requirements: []
115
- rubyforge_project:
116
- rubygems_version: 2.7.8
117
- signing_key:
101
+ rubygems_version: 3.4.12
102
+ signing_key:
118
103
  specification_version: 4
119
104
  summary: Resolve IP info in China
120
105
  test_files: []