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 +15 -5
- data/README.md +14 -3
- data/db/GeoLite2-City.mmdb +0 -0
- data/lib/geolite2_city/version.rb +1 -1
- metadata +11 -11
checksums.yaml
CHANGED
@@ -1,7 +1,17 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
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:
|
7
|
-
|
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
|
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
|
-
|
27
|
+
MAXMIND_DB.lookup("74.125.225.224")
|
18
28
|
```
|
19
29
|
|
20
|
-
See
|
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
|
|
data/db/GeoLite2-City.mmdb
CHANGED
Binary file
|
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.
|
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-
|
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
|
-
-
|
49
|
-
-
|
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.
|
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.
|