geolite2_city 2018.08.07 → 2018.09.05

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,17 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: dee0e84b80ca0877827d43651cdce2e3ebb0fc90
4
- data.tar.gz: a7e3e74a7c56b8d6b4ca9698cc81af45d77da8b3
2
+ !binary "U0hBMjU2":
3
+ metadata.gz: !binary |-
4
+ M2QzNjU2MDAwMzYxMDc2ZTE2ZjUyYjk0NDhjODU0ZDYxYmQyODM4ZWY2NzJl
5
+ MzFjMWUyNmE4ZWVlNjhlMzY5ZA==
6
+ data.tar.gz: !binary |-
7
+ MDFmMGFhYjM5YTRiMTEyMzRhMjI5MTRkOWRmMGRhMzE4ZTJjOWYwOGI4ODlj
8
+ ZmFmOTYzZjE4OWUxMTdlMjgwMw==
5
9
  SHA512:
6
- metadata.gz: 1720f78c843cbfdc5a8871361b15dc57d773bf66327e33901c0a7385d6b519fb1d225365fa44354a101f5676a96432ccbba97f3b518f9f711573ad15fd47649e
7
- data.tar.gz: 03fbf6915c4c757c0cac9da8db17a838356c77ffcd02a6c0a236c7ffd35f9f89f83f56ecbbb4226e896a07d4f62d073ce5a769e716af0e39245ba61c1cf3d304
10
+ metadata.gz: !binary |-
11
+ NDdjYTljZjM1YTdiZDNhYTA0NGEwOTZiMTNlNjc4NDJiNjdjMDFiYWU0NjQ3
12
+ ZGY0NjIxMDM2ODIzNWRmYjU5NmZkYTU0NDc1NmQwNDI3Mjc3NTFiNTcxNDE1
13
+ ZjAzZGVmMTdkMDI5ZmM0OWU1Njk4NDAxZDJkMGU2YmE4MzdkN2M=
14
+ data.tar.gz: !binary |-
15
+ NGY4ZGI0MDc5MmRlNTU3ODMyNDNlMGQzMDg1ODJhZGVhYTMyMzZhZTk0NWY2
16
+ MzgxZWVkMTI3NmYzMDIyM2E4ZmI0Mzg4YmU5ZjUyZWRjM2JjNjk2Mjg1YjE5
17
+ YjE2NDk4ZjQ5NTQ2YjY1MWYwZDM1OWRmNTY3Yzg0YzFlYjkxMjc=
data/README.md CHANGED
@@ -6,19 +6,30 @@ MaxMind updates the database monthly on their site. We make no guarantees about
6
6
 
7
7
  The version scheme for this gem reflects the date of the embedded MaxMind database, e.g. version `2018.08.07`. We may add another position for any maintenance releases, e.g. `2018.08.07.1`.
8
8
 
9
+ Please be aware that this is a relatively large gem due to the embedded database. At the time of writing, it's about 55 MB.
10
+
9
11
 
10
12
  ## Usage
11
13
 
12
14
  `Geolite2City::DB_PATH` will be the path to the `.mmdb` database.
13
15
 
14
- We recommend using it with the [MaxMindDB](https://github.com/yhirose/maxminddb) gem, e.g.
16
+ We've used it with the [MaxMindDB](https://github.com/yhirose/maxminddb) gem. The database can be a bit slow to load (hundreds of ms), so we suggest doing it only once, e.g. in `config/initializers/maxmind_db.rb` in a Rails project:
17
+
18
+ ``` ruby
19
+ MAXMIND_DB = MaxMindDB.new(GeoLite2City::DB_PATH)
20
+ ```
21
+
22
+ (By putting it in an initializer, it will be present before the app server (such as Unicorn) forks worker processes, meaning it will use as little memory as possible.)
23
+
24
+ To look up an IP:
15
25
 
16
26
  ``` ruby
17
- db = MaxMindDB.new(Geolite2City::DB_PATH)
27
+ MAXMIND_DB.lookup("74.125.225.224")
18
28
  ```
19
29
 
20
- See its documentation for more.
30
+ See [the MaxMindDB documentation](https://github.com/yhirose/maxminddb) for more.
21
31
 
32
+ There is also an offical [MaxMind DB Reader](https://github.com/maxmind/MaxMind-DB-Reader-ruby) library.
22
33
 
23
34
  ## Installation
24
35
 
Binary file
@@ -1,3 +1,3 @@
1
1
  module Geolite2City
2
- VERSION = "2018.08.07"
2
+ VERSION = "2018.09.05"
3
3
  end
metadata CHANGED
@@ -1,41 +1,41 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: geolite2_city
3
3
  version: !ruby/object:Gem::Version
4
- version: 2018.08.07
4
+ version: 2018.09.05
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henrik Nyh
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-08-23 00:00:00.000000000 Z
11
+ date: 2018-09-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ~>
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.15'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ~>
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.15'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ~>
32
32
  - !ruby/object:Gem::Version
33
33
  version: '10.0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ~>
39
39
  - !ruby/object:Gem::Version
40
40
  version: '10.0'
41
41
  description:
@@ -45,8 +45,8 @@ executables: []
45
45
  extensions: []
46
46
  extra_rdoc_files: []
47
47
  files:
48
- - ".gitignore"
49
- - ".travis.yml"
48
+ - .gitignore
49
+ - .travis.yml
50
50
  - Gemfile
51
51
  - LICENSE.txt
52
52
  - README.md
@@ -70,17 +70,17 @@ require_paths:
70
70
  - lib
71
71
  required_ruby_version: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ">="
73
+ - - ! '>='
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0'
76
76
  required_rubygems_version: !ruby/object:Gem::Requirement
77
77
  requirements:
78
- - - ">="
78
+ - - ! '>='
79
79
  - !ruby/object:Gem::Version
80
80
  version: '0'
81
81
  requirements: []
82
82
  rubyforge_project:
83
- rubygems_version: 2.6.11
83
+ rubygems_version: 2.7.4
84
84
  signing_key:
85
85
  specification_version: 4
86
86
  summary: Includes the free GeoLite2 City database file.