sql_metrics 0.1.4 → 0.1.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: 9c2e9f436f2df5a9d5d6ba05022fe5acb2e7146b
4
- data.tar.gz: f4ff424df1a7c93f5d687f2b0a290b293d70379d
3
+ metadata.gz: 0b55e9e7529c5a7518614c4325fa285933c42874
4
+ data.tar.gz: 24f789cd424a8f4973e24ab9c85bd1a91bcef51c
5
5
  SHA512:
6
- metadata.gz: 61d7c87bfebffbfcb1d1cbf55e8522746c6448642bbdcf107414a0b3c2b1563e39edd65c6de853821a776d5ddf327795f71425d2897026622ccd215fc7407d49
7
- data.tar.gz: 5d464e7542fa40c65ca3206b1bca7f9a79a46ee84fd53f4f678b6aa0ccc04a9327ccf72a29e0280e8041755798f71e04618ec8af9e08a0f9d1015004398fdefc
6
+ metadata.gz: 3b3856ee12718c3dc765ccb59406f1be129aca393a7fb48d6f3adc0356ac7fc9c284221bd0d36c8d68171093e2e4cf50519300e98668e4ef01552cb448e9f345
7
+ data.tar.gz: b5d27fd301ca759f3f17b14cdf2efe2920bb60b01c3e806968de2d312812f3ec8e0bf2ff39d1e4a8e83d69a30db16056f8d7b8b6707c60c8798c2c022138899d
data/README.md CHANGED
@@ -70,7 +70,7 @@ You can also pass a rails request object from a controller:
70
70
  request
71
71
  )
72
72
 
73
- The gem automaticall filters bots for you using the user_agent property from the rails request object...you can disable this if you want:
73
+ The gem automatically filters bots for you using the user_agent property from the rails request object...you can disable this if you want:
74
74
 
75
75
  SqlMetrics.track(
76
76
  'event_name',
@@ -84,6 +84,20 @@ The gem automaticall filters bots for you using the user_agent property from the
84
84
  }
85
85
  )
86
86
 
87
+ The gem also automatically performs a geo lookup using the remote_ip property from the rails request object...you can disable this if you want:
88
+
89
+ SqlMetrics.track(
90
+ 'event_name',
91
+ {
92
+ :a_property => 'hello world',
93
+ :another_property => 'hello user'
94
+ },
95
+ request,
96
+ {
97
+ :geo_lookup => false
98
+ }
99
+ )
100
+
87
101
  This will automatically fetch properties like the user agent, client ip, requested url, etc
88
102
 
89
103
  ## Additional Config parameters
data/lib/sql_metrics.rb CHANGED
@@ -35,7 +35,7 @@ module SqlMetrics
35
35
  properties[:session_id] = request.session_options[:id]
36
36
  properties[:remote_ip] = request.remote_ip
37
37
 
38
- unless options and options[:reverse_ip_lookup] == false
38
+ unless options and options[:geo_lookup] == false
39
39
  if properties[:remote_ip] and geo_object = Geocoder.search(properties[:remote_ip]).first
40
40
  properties[:remote_city] = geo_object.city
41
41
  properties[:remote_country] = geo_object.country
@@ -1,3 +1,3 @@
1
1
  module SqlMetrics
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sql_metrics
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthias