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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: df9faee203f427e1f2f643edefea1b5b3ff3ac30
4
- data.tar.gz: dd45228ac7f2b8130aca58cd203ad6d3a91c768e
3
+ metadata.gz: c47aab23361966a66edcbd03f375d8208b24a74e
4
+ data.tar.gz: b0ce32798edc46a11aa963719081aa9e9999608f
5
5
  SHA512:
6
- metadata.gz: 8dcfd251841b8493a0c42a0a91d0f162a1e0d4adf0fbcd7e25eaf249e4ae4467b5aef4adf6ae310f337f4afe5f44b16ffeb222e396abe586aa9b16e1054bd36e
7
- data.tar.gz: 0919517568a175fb40118da8f120568cdb012ae8197e55fa6d22f1709c16c5a22b58f06b4ac756dca31a33e50786b0b9955a551bc5b103ac82b5be7cddb7c3a1
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
@@ -2,7 +2,7 @@ module Meter
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 1
4
4
  MINOR = 0
5
- TINY = 3
5
+ TINY = 4
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].compact.join('.')
8
8
  end
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.3
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