action_tracker 0.1.1 → 0.1.2

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: d785a27cd18c83225bc9a5be6925a286ec248f1d
4
- data.tar.gz: ed98253107c1b3b7ad0d1da0b77f6273b4028f76
3
+ metadata.gz: 271908ff7392bb9d9899c9b33d587fb37a2b1be7
4
+ data.tar.gz: 1d9432c3f92e6c514ee0f114eba29f2ab7ec2fa2
5
5
  SHA512:
6
- metadata.gz: cceafa44f0f441510c6d31a1fa27f226560498deffe5ecf8c391a917d5f7dbef3e850bcfc7e4cace3d10468cebb27543de4bdc14b9fba915d62b9261ce840a47
7
- data.tar.gz: e437c1ae31973f0a1713373ac35c5ddfdecf27b41a1f7a1cfb77ed6b1a36b043c0d4730e2ddb0396e8d72bbf50a7b3c8a6984deba064140c059da1ad7485037f
6
+ metadata.gz: d205960a56ede2e7ab894ec92b028eaf2b59ca875b265852ddf4e442ec5df6f1ee92fc0d0955734b0dbeba44b4611d7ee1b0a097c5334f78ee246bc04d6fdb0d
7
+ data.tar.gz: 32c6939603c3b89360bb402f4f16bf57fec0d2f31f45ec53e8e0909f9d2b5f776f72b6757341976f1c7338058389f88030c964829c947cdda7f79fca3ab14d3f
data/Guardfile ADDED
@@ -0,0 +1,70 @@
1
+ # A sample Guardfile
2
+ # More info at https://github.com/guard/guard#readme
3
+
4
+ ## Uncomment and set this to only include directories you want to watch
5
+ # directories %w(app lib config test spec features) \
6
+ # .select{|d| Dir.exists?(d) ? d : UI.warning("Directory #{d} does not exist")}
7
+
8
+ ## Note: if you are using the `directories` clause above and you are not
9
+ ## watching the project directory ('.'), then you will want to move
10
+ ## the Guardfile to a watched dir and symlink it back, e.g.
11
+ #
12
+ # $ mkdir config
13
+ # $ mv Guardfile config/
14
+ # $ ln -s config/Guardfile .
15
+ #
16
+ # and, you'll have to watch "config/Guardfile" instead of "Guardfile"
17
+
18
+ # Note: The cmd option is now required due to the increasing number of ways
19
+ # rspec may be run, below are examples of the most common uses.
20
+ # * bundler: 'bundle exec rspec'
21
+ # * bundler binstubs: 'bin/rspec'
22
+ # * spring: 'bin/rspec' (This will use spring if running and you have
23
+ # installed the spring binstubs per the docs)
24
+ # * zeus: 'zeus rspec' (requires the server to be started separately)
25
+ # * 'just' rspec: 'rspec'
26
+
27
+ guard :rspec, cmd: "bundle exec rspec" do
28
+ require "guard/rspec/dsl"
29
+ dsl = Guard::RSpec::Dsl.new(self)
30
+
31
+ # Feel free to open issues for suggestions and improvements
32
+
33
+ # RSpec files
34
+ rspec = dsl.rspec
35
+ watch(rspec.spec_helper) { rspec.spec_dir }
36
+ watch(rspec.spec_support) { rspec.spec_dir }
37
+ watch(rspec.spec_files)
38
+
39
+ # Ruby files
40
+ ruby = dsl.ruby
41
+ dsl.watch_spec_files_for(ruby.lib_files)
42
+
43
+ # Rails files
44
+ rails = dsl.rails(view_extensions: %w(erb haml slim))
45
+ dsl.watch_spec_files_for(rails.app_files)
46
+ dsl.watch_spec_files_for(rails.views)
47
+
48
+ watch(rails.controllers) do |m|
49
+ [
50
+ rspec.spec.("routing/#{m[1]}_routing"),
51
+ rspec.spec.("controllers/#{m[1]}_controller"),
52
+ rspec.spec.("acceptance/#{m[1]}")
53
+ ]
54
+ end
55
+
56
+ # Rails config changes
57
+ watch(rails.spec_helper) { rspec.spec_dir }
58
+ watch(rails.routes) { "#{rspec.spec_dir}/routing" }
59
+ watch(rails.app_controller) { "#{rspec.spec_dir}/controllers" }
60
+
61
+ # Capybara features specs
62
+ watch(rails.view_dirs) { |m| rspec.spec.("features/#{m[1]}") }
63
+ watch(rails.layouts) { |m| rspec.spec.("features/#{m[1]}") }
64
+
65
+ # Turnip features and steps
66
+ watch(%r{^spec/acceptance/(.+)\.feature$})
67
+ watch(%r{^spec/acceptance/steps/(.+)_steps\.rb$}) do |m|
68
+ Dir[File.join("**/#{m[1]}.feature")][0] || "spec/acceptance"
69
+ end
70
+ end
data/README.md CHANGED
@@ -1,4 +1,5 @@
1
1
  <a href="https://codeclimate.com/github/appprova/action_tracker"><img src="https://codeclimate.com/github/appprova/action_tracker/badges/gpa.svg" /></a>
2
+ [![Build Status](https://travis-ci.org/appprova/action_tracker.svg?branch=develop)](https://travis-ci.org/appprova/action_tracker)
2
3
 
3
4
  # Action Tracker
4
5
 
@@ -25,4 +25,7 @@ Gem::Specification.new do |spec|
25
25
  spec.add_development_dependency 'rake', '~> 10.0'
26
26
  spec.add_development_dependency 'rspec-rails', '~> 3.0'
27
27
  spec.add_development_dependency 'rails', '~> 3.2'
28
+ spec.add_development_dependency 'guard', '~> 2.13'
29
+ spec.add_development_dependency 'byebug', '~> 5.0'
30
+ spec.add_development_dependency 'guard-rspec', '~> 4.6'
28
31
  end
@@ -11,6 +11,11 @@ module ActionTracker
11
11
  after_filter :track_event
12
12
  end
13
13
 
14
+ def render(*args)
15
+ track_event
16
+ super
17
+ end
18
+
14
19
  def track_event
15
20
  session[:action_tracker] ||= []
16
21
  session[:action_tracker] << tracker_params unless tracker_params.blank?
@@ -1,3 +1,3 @@
1
1
  module ActionTracker
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: action_tracker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
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-21 00:00:00.000000000 Z
12
+ date: 2016-04-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
@@ -95,6 +95,48 @@ dependencies:
95
95
  - - "~>"
96
96
  - !ruby/object:Gem::Version
97
97
  version: '3.2'
98
+ - !ruby/object:Gem::Dependency
99
+ name: guard
100
+ requirement: !ruby/object:Gem::Requirement
101
+ requirements:
102
+ - - "~>"
103
+ - !ruby/object:Gem::Version
104
+ version: '2.13'
105
+ type: :development
106
+ prerelease: false
107
+ version_requirements: !ruby/object:Gem::Requirement
108
+ requirements:
109
+ - - "~>"
110
+ - !ruby/object:Gem::Version
111
+ version: '2.13'
112
+ - !ruby/object:Gem::Dependency
113
+ name: byebug
114
+ requirement: !ruby/object:Gem::Requirement
115
+ requirements:
116
+ - - "~>"
117
+ - !ruby/object:Gem::Version
118
+ version: '5.0'
119
+ type: :development
120
+ prerelease: false
121
+ version_requirements: !ruby/object:Gem::Requirement
122
+ requirements:
123
+ - - "~>"
124
+ - !ruby/object:Gem::Version
125
+ version: '5.0'
126
+ - !ruby/object:Gem::Dependency
127
+ name: guard-rspec
128
+ requirement: !ruby/object:Gem::Requirement
129
+ requirements:
130
+ - - "~>"
131
+ - !ruby/object:Gem::Version
132
+ version: '4.6'
133
+ type: :development
134
+ prerelease: false
135
+ version_requirements: !ruby/object:Gem::Requirement
136
+ requirements:
137
+ - - "~>"
138
+ - !ruby/object:Gem::Version
139
+ version: '4.6'
98
140
  description: Easy way to track actions in your application without adding unnecessary
99
141
  code to your controllers.
100
142
  email:
@@ -109,6 +151,7 @@ files:
109
151
  - ".travis.yml"
110
152
  - Changelog.md
111
153
  - Gemfile
154
+ - Guardfile
112
155
  - LICENSE.txt
113
156
  - README.md
114
157
  - Rakefile
@@ -141,7 +184,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
141
184
  version: '0'
142
185
  requirements: []
143
186
  rubyforge_project:
144
- rubygems_version: 2.4.5
187
+ rubygems_version: 2.4.8
145
188
  signing_key:
146
189
  specification_version: 4
147
190
  summary: Easy way to track actions in your application.