meter 1.0.4 → 1.0.5

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: c47aab23361966a66edcbd03f375d8208b24a74e
4
- data.tar.gz: b0ce32798edc46a11aa963719081aa9e9999608f
3
+ metadata.gz: 61bfa875029fe6f0a486fc8d78039e310720a795
4
+ data.tar.gz: a32afa1f67caa3c26ddfb17b3e8326ee3032753e
5
5
  SHA512:
6
- metadata.gz: 22b768fb6ec1555ccee5d535230a2830a46459ad3b2fb7b9fa1bab206257b132341dc663d5bcf0f2e4091b3b1b7b24982c208b504d951d4c543ab12daa7774e9
7
- data.tar.gz: 1bd917c0a649bee9b5cc69ef34f1c6fa429720a82b1f94c24ef0f2e3dbc24891635cfcb1cf6c45f7edcc69f0ce5d979571bc86680df97f532b6c968e4d40fe40
6
+ metadata.gz: c88b11d073e90b96033c4c91583e82c8308650467d3bf0d7e478f71782a8635d833693f4d7ba317bade1649077c12224a710a06c27400170fbe32daccc3e5978
7
+ data.tar.gz: 0c70247d4fac2a78b7d069cd4aec81d8c6b66519aa42ea069032fca9699e33294c3348648abe6c1b0a5683ad98833573825cf7f7f52c0ed2abf11effe4888c42
@@ -25,17 +25,16 @@ module Meter
25
25
  def store_user_agent_data(request)
26
26
  user_agent = UserAgent.parse(request.user_agent)
27
27
  Meter::MDC.tags['user_agent_name'] = user_agent.browser
28
- Meter::MDC.tags['user_agent_version'] = "#{user_agent.browser}_#{user_agent.version}"
29
28
  Meter::MDC.tags['user_agent_platform'] = user_agent.platform
29
+ Meter::MDC.data['user_agent_version'] = "#{user_agent.browser}_#{user_agent.version}"
30
30
  Meter::MDC.data['user_agent'] = user_agent.to_s
31
31
  end
32
32
 
33
33
  def store_geoip_data(request)
34
34
  lookup = Locality::IP.new request.ip
35
- Meter::MDC.tags['geoip_city'] = lookup.city_name
36
35
  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
+ Meter::MDC.data['geoip_city'] = lookup.city_name
37
+ Meter::MDC.data['geoip_coords'] = "#{lookup.latitude},#{lookup.longitude}" if lookup.latitude && lookup.longitude
39
38
  end
40
39
  end
41
40
  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 = 4
5
+ TINY = 5
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].compact.join('.')
8
8
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: meter
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - bukowskis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-17 00:00:00.000000000 Z
11
+ date: 2015-03-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: useragent