metric 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,11 +1,15 @@
1
1
  bundler_args: --binstubs
2
2
 
3
3
  rvm:
4
- - 1.8.7
5
- - 1.9.2
6
4
  - 1.9.3
5
+ - 1.8.7
7
6
  - ree
8
7
 
8
+ matrix:
9
+ allow_failures:
10
+ - rvm: 1.8.7
11
+ - rvm: ree
12
+
9
13
  script: "bundle exec rspec spec"
10
14
 
11
15
  notifications:
@@ -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?
@@ -1,3 +1,3 @@
1
1
  module Metric
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
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.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: 2012-12-27 00:00:00.000000000 Z
12
+ date: 2013-01-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: faraday