meter 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/meter/rails/middleware.rb +4 -1
- data/lib/meter/version.rb +1 -1
- metadata +15 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c47aab23361966a66edcbd03f375d8208b24a74e
|
4
|
+
data.tar.gz: b0ce32798edc46a11aa963719081aa9e9999608f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 22b768fb6ec1555ccee5d535230a2830a46459ad3b2fb7b9fa1bab206257b132341dc663d5bcf0f2e4091b3b1b7b24982c208b504d951d4c543ab12daa7774e9
|
7
|
+
data.tar.gz: 1bd917c0a649bee9b5cc69ef34f1c6fa429720a82b1f94c24ef0f2e3dbc24891635cfcb1cf6c45f7edcc69f0ce5d979571bc86680df97f532b6c968e4d40fe40
|
@@ -1,4 +1,6 @@
|
|
1
1
|
require 'useragent'
|
2
|
+
require 'locality'
|
3
|
+
|
2
4
|
module Meter
|
3
5
|
module Rails
|
4
6
|
class Middleware
|
@@ -29,10 +31,11 @@ module Meter
|
|
29
31
|
end
|
30
32
|
|
31
33
|
def store_geoip_data(request)
|
32
|
-
return unless defined?(Locality)
|
33
34
|
lookup = Locality::IP.new request.ip
|
34
35
|
Meter::MDC.tags['geoip_city'] = lookup.city_name
|
35
36
|
Meter::MDC.tags['geoip_country'] = lookup.country_name
|
37
|
+
Meter::MDC.data['geoip_lat'] = lookup.latitude
|
38
|
+
Meter::MDC.data['geoip_long'] = lookup.longitude
|
36
39
|
end
|
37
40
|
end
|
38
41
|
end
|
data/lib/meter/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: meter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- bukowskis
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 0.13.1
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: locality
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 1.0.4
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 1.0.4
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: rspec
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|