metric 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.travis.yml +6 -2
- data/lib/metric/rails/controller_methods.rb +5 -0
- data/lib/metric/version.rb +1 -1
- metadata +2 -2
data/.travis.yml
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
module Metric
|
|
2
2
|
module Rails
|
|
3
3
|
module ControllerMethods
|
|
4
|
+
def track_metric(metric, options = {})
|
|
5
|
+
options[:customer] ||= metric_current_user
|
|
6
|
+
Metric.track(metric, options)
|
|
7
|
+
end
|
|
8
|
+
|
|
4
9
|
def metric_current_user
|
|
5
10
|
user = current_user
|
|
6
11
|
return {} if current_user.nil?
|
data/lib/metric/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: metric
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.2
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date:
|
|
12
|
+
date: 2013-01-07 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: faraday
|