action_tracker 0.1.2.2 → 0.1.3

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: 32b3aba8caa3e47d90e9df65bb89ba689229d7e2
4
- data.tar.gz: 512aa80a0df346007b3d72f7420adc2a995115d1
3
+ metadata.gz: 469c3d3178839b4b363a1486cd7ab1a48bce4562
4
+ data.tar.gz: 378183a75a3a54544d6eef48e92ed4714da11d95
5
5
  SHA512:
6
- metadata.gz: 1e72ea8ee83ec6b147e24e7ee37bd7ea4440725d882661f5c650ea75b232b654a995b27a762ded099a792f294c0b81ce8e81e8abd6c67b412d561f797e3cb992
7
- data.tar.gz: 4bd847b6c5a9408cedd41f9a9fc8328faa48a3693a1091f008ee5f4e3bd30dc52652a1b72604f067053f87d1dac831151665907a151ca8a914bfe0d31476c244
6
+ metadata.gz: f318632a0b0fe0ebc5e8cada9b7b157d2f0bcdcec88cf97eead2c95e14c8304cf8bd132d01d974fc3ce98f627b3ea8d24b866934d57e17fe51600e4d1d45a140
7
+ data.tar.gz: 72cb25c4a82f5ec36b460974cb714e55e92215447cfd2a6db2f6503ed7693928368a82450ccc5a5bc53368bbd0579738ab310a9d86e96ec92f51fabd6947b46a
@@ -2,6 +2,7 @@ require 'action_tracker/version'
2
2
  require 'action_tracker/concerns/tracker'
3
3
  require 'action_tracker/helpers/render'
4
4
  require 'action_tracker/base'
5
+ require 'action_tracker/configuration'
5
6
 
6
7
  # nodoc
7
8
  module ActionTracker
@@ -29,6 +29,7 @@ module ActionTracker
29
29
  end
30
30
 
31
31
  def track_event
32
+ return unless ActionTracker.configuration.track_events
32
33
  session[:action_tracker] ||= []
33
34
  session[:action_tracker] << tracker_params unless tracker_params.blank?
34
35
  end
@@ -0,0 +1,23 @@
1
+ # nodoc
2
+ module ActionTracker
3
+ class << self
4
+ attr_accessor :configuration
5
+
6
+ def configuration
7
+ @configuration ||= Configuration.new
8
+ end
9
+ end
10
+
11
+ def self.configure
12
+ yield(configuration)
13
+ end
14
+
15
+ # nodoc
16
+ class Configuration
17
+ attr_accessor :track_events
18
+
19
+ def initialize
20
+ @track_events = true
21
+ end
22
+ end
23
+ end
@@ -1,3 +1,3 @@
1
1
  module ActionTracker
2
- VERSION = '0.1.2.2'
2
+ VERSION = '0.1.3'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: action_tracker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - André Taiar
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2016-04-28 00:00:00.000000000 Z
12
+ date: 2016-05-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
@@ -161,6 +161,7 @@ files:
161
161
  - lib/action_tracker.rb
162
162
  - lib/action_tracker/base.rb
163
163
  - lib/action_tracker/concerns/tracker.rb
164
+ - lib/action_tracker/configuration.rb
164
165
  - lib/action_tracker/engine.rb
165
166
  - lib/action_tracker/helpers/render.rb
166
167
  - lib/action_tracker/version.rb
@@ -184,7 +185,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
184
185
  version: '0'
185
186
  requirements: []
186
187
  rubyforge_project:
187
- rubygems_version: 2.4.8
188
+ rubygems_version: 2.4.5
188
189
  signing_key:
189
190
  specification_version: 4
190
191
  summary: Easy way to track actions in your application.