impressionist 1.4.1 → 1.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -1
- data/Rakefile +17 -4
- data/app/models/impressionist/impressionable.rb +2 -2
- data/impressionist.gemspec +4 -3
- data/lib/impressionist/engine.rb +8 -25
- data/lib/impressionist/load.rb +6 -4
- data/lib/impressionist/models/active_record/impression.rb +5 -2
- data/lib/impressionist/models/mongoid/impression.rb +8 -15
- data/lib/impressionist/models/mongoid/impressionist/impressionable.rb +13 -32
- data/lib/impressionist/rails_toggle.rb +22 -0
- data/lib/impressionist/setup_association.rb +48 -0
- data/lib/impressionist/version.rb +1 -1
- data/tests/README +1 -0
- data/tests/spec/minitest_helper.rb +4 -0
- data/tests/spec/rails_toggle_spec.rb +26 -0
- data/tests/spec/setup_association_spec.rb +55 -0
- data/{test_app → tests/test_app}/.gitignore +0 -0
- data/{test_app → tests/test_app}/.rspec +0 -0
- data/{test_app → tests/test_app}/Gemfile +4 -15
- data/{test_app → tests/test_app}/README +0 -0
- data/{test_app → tests/test_app}/README.rdoc +0 -0
- data/{test_app → tests/test_app}/Rakefile +0 -0
- data/{test_app → tests/test_app}/app/assets/images/rails.png +0 -0
- data/{test_app → tests/test_app}/app/assets/javascripts/application.js +0 -0
- data/{test_app → tests/test_app}/app/assets/stylesheets/application.css +0 -0
- data/{test_app → tests/test_app}/app/controllers/application_controller.rb +0 -0
- data/{test_app → tests/test_app}/app/controllers/articles_controller.rb +0 -0
- data/{test_app → tests/test_app}/app/controllers/dummy_controller.rb +0 -0
- data/{test_app → tests/test_app}/app/controllers/posts_controller.rb +0 -0
- data/{test_app → tests/test_app}/app/controllers/widgets_controller.rb +0 -0
- data/{test_app → tests/test_app}/app/helpers/application_helper.rb +0 -0
- data/{test_app → tests/test_app}/app/mailers/.gitkeep +0 -0
- data/{test_app → tests/test_app}/app/models/.gitkeep +0 -0
- data/{test_app → tests/test_app}/app/models/article.rb +0 -0
- data/{test_app → tests/test_app}/app/models/dummy.rb +0 -0
- data/{test_app → tests/test_app}/app/models/post.rb +0 -0
- data/{test_app → tests/test_app}/app/models/user.rb +0 -0
- data/{test_app → tests/test_app}/app/models/widget.rb +0 -0
- data/{test_app → tests/test_app}/app/views/articles/index.html.erb +0 -0
- data/{test_app → tests/test_app}/app/views/articles/show.html.erb +0 -0
- data/{test_app → tests/test_app}/app/views/dummy/index.html.erb +0 -0
- data/{test_app → tests/test_app}/app/views/layouts/application.html.erb +0 -0
- data/{test_app → tests/test_app}/app/views/posts/edit.html.erb +0 -0
- data/{test_app → tests/test_app}/app/views/posts/index.html.erb +0 -0
- data/{test_app → tests/test_app}/app/views/posts/show.html.erb +0 -0
- data/{test_app → tests/test_app}/app/views/widgets/index.html.erb +0 -0
- data/{test_app → tests/test_app}/app/views/widgets/new.html.erb +0 -0
- data/{test_app → tests/test_app}/app/views/widgets/show.html.erb +0 -0
- data/{test_app → tests/test_app}/config.ru +0 -0
- data/{test_app → tests/test_app}/config/application.rb +0 -0
- data/{test_app → tests/test_app}/config/boot.rb +0 -0
- data/{test_app → tests/test_app}/config/cucumber.yml +0 -0
- data/{test_app → tests/test_app}/config/database.yml +0 -0
- data/{test_app → tests/test_app}/config/environment.rb +0 -0
- data/{test_app → tests/test_app}/config/environments/development.rb +0 -0
- data/{test_app → tests/test_app}/config/environments/pg_test.rb +0 -0
- data/{test_app → tests/test_app}/config/environments/production.rb +0 -0
- data/{test_app → tests/test_app}/config/environments/test.rb +0 -0
- data/{test_app → tests/test_app}/config/initializers/backtrace_silencers.rb +0 -0
- data/tests/test_app/config/initializers/impression.rb +2 -0
- data/{test_app → tests/test_app}/config/initializers/inflections.rb +0 -0
- data/{test_app → tests/test_app}/config/initializers/mime_types.rb +0 -0
- data/{test_app → tests/test_app}/config/initializers/secret_token.rb +0 -0
- data/{test_app → tests/test_app}/config/initializers/session_store.rb +0 -0
- data/{test_app → tests/test_app}/config/initializers/wrap_parameters.rb +0 -0
- data/{test_app → tests/test_app}/config/locales/en.yml +0 -0
- data/{test_app → tests/test_app}/config/routes.rb +0 -0
- data/{test_app → tests/test_app}/db/migrate/20110201153144_create_articles.rb +0 -0
- data/{test_app → tests/test_app}/db/migrate/20110210205028_create_posts.rb +0 -0
- data/{test_app → tests/test_app}/db/migrate/20111127184039_create_widgets.rb +0 -0
- data/tests/test_app/db/schema.rb +60 -0
- data/{test_app → tests/test_app}/db/seeds.rb +0 -0
- data/{test_app → tests/test_app}/lib/assets/.gitkeep +0 -0
- data/{test_app → tests/test_app}/lib/tasks/.gitkeep +0 -0
- data/{test_app → tests/test_app}/lib/tasks/cucumber.rake +0 -0
- data/{test_app → tests/test_app}/log/.gitkeep +0 -0
- data/{test_app → tests/test_app}/public/404.html +0 -0
- data/{test_app → tests/test_app}/public/422.html +0 -0
- data/{test_app → tests/test_app}/public/500.html +0 -0
- data/{test_app → tests/test_app}/public/favicon.ico +0 -0
- data/{test_app → tests/test_app}/public/images/rails.png +0 -0
- data/{test_app → tests/test_app}/public/index.html +0 -0
- data/{test_app → tests/test_app}/public/javascripts/application.js +0 -0
- data/{test_app → tests/test_app}/public/javascripts/controls.js +0 -0
- data/{test_app → tests/test_app}/public/javascripts/dragdrop.js +0 -0
- data/{test_app → tests/test_app}/public/javascripts/effects.js +0 -0
- data/{test_app → tests/test_app}/public/javascripts/prototype.js +0 -0
- data/{test_app → tests/test_app}/public/javascripts/rails.js +0 -0
- data/{test_app → tests/test_app}/public/robots.txt +0 -0
- data/{test_app → tests/test_app}/public/stylesheets/.gitkeep +0 -0
- data/{test_app → tests/test_app}/script/cucumber +0 -0
- data/{test_app → tests/test_app}/script/rails +0 -0
- data/{test_app → tests/test_app}/spec/controllers/articles_controller_spec.rb +0 -0
- data/{test_app → tests/test_app}/spec/controllers/dummy_controller_spec.rb +0 -0
- data/{test_app → tests/test_app}/spec/controllers/impressionist_uniqueness_spec.rb +45 -45
- data/{test_app → tests/test_app}/spec/controllers/posts_controller_spec.rb +0 -0
- data/{test_app → tests/test_app}/spec/controllers/widgets_controller_spec.rb +2 -2
- data/{test_app → tests/test_app}/spec/fixtures/articles.yml +0 -0
- data/{test_app → tests/test_app}/spec/fixtures/impressions.yml +0 -0
- data/{test_app → tests/test_app}/spec/fixtures/posts.yml +0 -0
- data/{test_app → tests/test_app}/spec/fixtures/widgets.yml +0 -0
- data/{test_app → tests/test_app}/spec/initializers/initializers_spec.rb +0 -0
- data/{test_app → tests/test_app}/spec/models/bots_spec.rb +0 -0
- data/{test_app → tests/test_app}/spec/models/counter_caching_spec.rb +0 -0
- data/{test_app → tests/test_app}/spec/models/model_spec.rb +0 -0
- data/{test_app → tests/test_app}/spec/rails_generators/rails_generators_spec.rb +0 -0
- data/tests/test_app/spec/spec_helper.rb +31 -0
- metadata +224 -99
- data/lib/impressionist/set_up_association.rb +0 -14
- data/spec/spec_helper.rb +0 -5
- data/test_app/config/initializers/impression.rb +0 -5
- data/test_app/spec/spec_helper.rb +0 -38
File without changes
|
@@ -17,13 +17,13 @@ describe WidgetsController do
|
|
17
17
|
end
|
18
18
|
|
19
19
|
it "should not log impression when user-agent is in wildcard list" do
|
20
|
-
request.stub
|
20
|
+
request.stub(:user_agent).and_return('somebot')
|
21
21
|
get "show", :id=> 1
|
22
22
|
Impression.all.size.should eq 11
|
23
23
|
end
|
24
24
|
|
25
25
|
it "should not log impression when user-agent is in the bot list" do
|
26
|
-
request.stub
|
26
|
+
request.stub(:user_agent).and_return('Acoon Robot v1.50.001')
|
27
27
|
get "show", :id=> 1
|
28
28
|
Impression.all.size.should eq 11
|
29
29
|
end
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,31 @@
|
|
1
|
+
ENV["RAILS_ENV"] ||= 'test'
|
2
|
+
|
3
|
+
unless ENV['CI']
|
4
|
+
require 'simplecov'
|
5
|
+
SimpleCov.start 'rails'
|
6
|
+
end
|
7
|
+
|
8
|
+
require File.
|
9
|
+
expand_path("../../config/environment", __FILE__)
|
10
|
+
|
11
|
+
require 'rspec/rails'
|
12
|
+
require 'capybara/rails'
|
13
|
+
|
14
|
+
# Custom matchers and macros, etc...
|
15
|
+
Dir[Rails.root.join("spec/support/**/*.rb")].each {|f|
|
16
|
+
require f
|
17
|
+
}
|
18
|
+
|
19
|
+
RSpec.configure do |config|
|
20
|
+
config.mock_with :rspec
|
21
|
+
|
22
|
+
config.fixture_path = "#{::Rails.root}/spec/fixtures"
|
23
|
+
|
24
|
+
config.use_transactional_fixtures = true
|
25
|
+
|
26
|
+
# make the rails logger usable in the tests as logger.xxx "..."
|
27
|
+
def logger
|
28
|
+
Rails.logger
|
29
|
+
end
|
30
|
+
|
31
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: impressionist
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- johnmcaliley
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-07-
|
11
|
+
date: 2013-07-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httpclient
|
@@ -70,16 +70,16 @@ dependencies:
|
|
70
70
|
name: rails
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - '='
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
75
|
+
version: 3.2.12
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - '='
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
82
|
+
version: 3.2.12
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: rdoc
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -150,6 +150,34 @@ dependencies:
|
|
150
150
|
- - '>='
|
151
151
|
- !ruby/object:Gem::Version
|
152
152
|
version: '0'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: minitest
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - '>='
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '0'
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - '>='
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '0'
|
167
|
+
- !ruby/object:Gem::Dependency
|
168
|
+
name: minitest-rails
|
169
|
+
requirement: !ruby/object:Gem::Requirement
|
170
|
+
requirements:
|
171
|
+
- - '>='
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: '0'
|
174
|
+
type: :development
|
175
|
+
prerelease: false
|
176
|
+
version_requirements: !ruby/object:Gem::Requirement
|
177
|
+
requirements:
|
178
|
+
- - '>='
|
179
|
+
- !ruby/object:Gem::Version
|
180
|
+
version: '0'
|
153
181
|
description: Log impressions from controller actions or from a model
|
154
182
|
email: john.mcaliley@gmail.com
|
155
183
|
executables: []
|
@@ -187,101 +215,106 @@ files:
|
|
187
215
|
- lib/impressionist/models/mongo_mapper/impressionist/impressionable.rb
|
188
216
|
- lib/impressionist/models/mongoid/impression.rb
|
189
217
|
- lib/impressionist/models/mongoid/impressionist/impressionable.rb
|
190
|
-
- lib/impressionist/
|
218
|
+
- lib/impressionist/rails_toggle.rb
|
219
|
+
- lib/impressionist/setup_association.rb
|
191
220
|
- lib/impressionist/update_counters.rb
|
192
221
|
- lib/impressionist/version.rb
|
193
222
|
- logo.png
|
194
|
-
-
|
195
|
-
-
|
196
|
-
-
|
197
|
-
-
|
198
|
-
- test_app
|
199
|
-
- test_app
|
200
|
-
- test_app/
|
201
|
-
- test_app/
|
202
|
-
- test_app/
|
203
|
-
- test_app/
|
204
|
-
- test_app/app/
|
205
|
-
- test_app/app/
|
206
|
-
- test_app/app/
|
207
|
-
- test_app/app/controllers/
|
208
|
-
- test_app/app/controllers/
|
209
|
-
- test_app/app/
|
210
|
-
- test_app/app/
|
211
|
-
- test_app/app/
|
212
|
-
- test_app/app/
|
213
|
-
- test_app/app/
|
214
|
-
- test_app/app/models
|
215
|
-
- test_app/app/models/
|
216
|
-
- test_app/app/models/
|
217
|
-
- test_app/app/
|
218
|
-
- test_app/app/
|
219
|
-
- test_app/app/
|
220
|
-
- test_app/app/views/
|
221
|
-
- test_app/app/views/
|
222
|
-
- test_app/app/views/
|
223
|
-
- test_app/app/views/
|
224
|
-
- test_app/app/views/
|
225
|
-
- test_app/app/views/
|
226
|
-
- test_app/app/views/
|
227
|
-
- test_app/
|
228
|
-
- test_app/
|
229
|
-
- test_app/
|
230
|
-
- test_app/config
|
231
|
-
- test_app/config/
|
232
|
-
- test_app/config/
|
233
|
-
- test_app/config/
|
234
|
-
- test_app/config/
|
235
|
-
- test_app/config/
|
236
|
-
- test_app/config/environments/
|
237
|
-
- test_app/config/
|
238
|
-
- test_app/config/
|
239
|
-
- test_app/config/
|
240
|
-
- test_app/config/initializers/
|
241
|
-
- test_app/config/initializers/
|
242
|
-
- test_app/config/initializers/
|
243
|
-
- test_app/config/initializers/
|
244
|
-
- test_app/config/
|
245
|
-
- test_app/config/
|
246
|
-
- test_app/
|
247
|
-
- test_app/
|
248
|
-
- test_app/
|
249
|
-
- test_app/db/
|
250
|
-
- test_app/
|
251
|
-
- test_app/
|
252
|
-
- test_app/
|
253
|
-
- test_app/
|
254
|
-
- test_app/
|
255
|
-
- test_app/
|
256
|
-
- test_app/
|
257
|
-
- test_app/
|
258
|
-
- test_app/public/
|
259
|
-
- test_app/public/
|
260
|
-
- test_app/public/
|
261
|
-
- test_app/public/
|
262
|
-
- test_app/public/
|
263
|
-
- test_app/public/
|
264
|
-
- test_app/public/javascripts/
|
265
|
-
- test_app/public/javascripts/
|
266
|
-
- test_app/public/
|
267
|
-
- test_app/public/
|
268
|
-
- test_app/
|
269
|
-
- test_app/
|
270
|
-
- test_app/
|
271
|
-
- test_app/
|
272
|
-
- test_app/
|
273
|
-
- test_app/
|
274
|
-
- test_app/spec/controllers/
|
275
|
-
- test_app/spec/
|
276
|
-
- test_app/spec/
|
277
|
-
- test_app/spec/
|
278
|
-
- test_app/spec/
|
279
|
-
- test_app/spec/
|
280
|
-
- test_app/spec/
|
281
|
-
- test_app/spec/
|
282
|
-
- test_app/spec/
|
283
|
-
- test_app/spec/
|
284
|
-
- test_app/spec/
|
223
|
+
- tests/README
|
224
|
+
- tests/spec/minitest_helper.rb
|
225
|
+
- tests/spec/rails_toggle_spec.rb
|
226
|
+
- tests/spec/setup_association_spec.rb
|
227
|
+
- tests/test_app/.gitignore
|
228
|
+
- tests/test_app/.rspec
|
229
|
+
- tests/test_app/Gemfile
|
230
|
+
- tests/test_app/README
|
231
|
+
- tests/test_app/README.rdoc
|
232
|
+
- tests/test_app/Rakefile
|
233
|
+
- tests/test_app/app/assets/images/rails.png
|
234
|
+
- tests/test_app/app/assets/javascripts/application.js
|
235
|
+
- tests/test_app/app/assets/stylesheets/application.css
|
236
|
+
- tests/test_app/app/controllers/application_controller.rb
|
237
|
+
- tests/test_app/app/controllers/articles_controller.rb
|
238
|
+
- tests/test_app/app/controllers/dummy_controller.rb
|
239
|
+
- tests/test_app/app/controllers/posts_controller.rb
|
240
|
+
- tests/test_app/app/controllers/widgets_controller.rb
|
241
|
+
- tests/test_app/app/helpers/application_helper.rb
|
242
|
+
- tests/test_app/app/mailers/.gitkeep
|
243
|
+
- tests/test_app/app/models/.gitkeep
|
244
|
+
- tests/test_app/app/models/article.rb
|
245
|
+
- tests/test_app/app/models/dummy.rb
|
246
|
+
- tests/test_app/app/models/post.rb
|
247
|
+
- tests/test_app/app/models/user.rb
|
248
|
+
- tests/test_app/app/models/widget.rb
|
249
|
+
- tests/test_app/app/views/articles/index.html.erb
|
250
|
+
- tests/test_app/app/views/articles/show.html.erb
|
251
|
+
- tests/test_app/app/views/dummy/index.html.erb
|
252
|
+
- tests/test_app/app/views/layouts/application.html.erb
|
253
|
+
- tests/test_app/app/views/posts/edit.html.erb
|
254
|
+
- tests/test_app/app/views/posts/index.html.erb
|
255
|
+
- tests/test_app/app/views/posts/show.html.erb
|
256
|
+
- tests/test_app/app/views/widgets/index.html.erb
|
257
|
+
- tests/test_app/app/views/widgets/new.html.erb
|
258
|
+
- tests/test_app/app/views/widgets/show.html.erb
|
259
|
+
- tests/test_app/config.ru
|
260
|
+
- tests/test_app/config/application.rb
|
261
|
+
- tests/test_app/config/boot.rb
|
262
|
+
- tests/test_app/config/cucumber.yml
|
263
|
+
- tests/test_app/config/database.yml
|
264
|
+
- tests/test_app/config/environment.rb
|
265
|
+
- tests/test_app/config/environments/development.rb
|
266
|
+
- tests/test_app/config/environments/pg_test.rb
|
267
|
+
- tests/test_app/config/environments/production.rb
|
268
|
+
- tests/test_app/config/environments/test.rb
|
269
|
+
- tests/test_app/config/initializers/backtrace_silencers.rb
|
270
|
+
- tests/test_app/config/initializers/impression.rb
|
271
|
+
- tests/test_app/config/initializers/inflections.rb
|
272
|
+
- tests/test_app/config/initializers/mime_types.rb
|
273
|
+
- tests/test_app/config/initializers/secret_token.rb
|
274
|
+
- tests/test_app/config/initializers/session_store.rb
|
275
|
+
- tests/test_app/config/initializers/wrap_parameters.rb
|
276
|
+
- tests/test_app/config/locales/en.yml
|
277
|
+
- tests/test_app/config/routes.rb
|
278
|
+
- tests/test_app/db/migrate/20110201153144_create_articles.rb
|
279
|
+
- tests/test_app/db/migrate/20110210205028_create_posts.rb
|
280
|
+
- tests/test_app/db/migrate/20111127184039_create_widgets.rb
|
281
|
+
- tests/test_app/db/schema.rb
|
282
|
+
- tests/test_app/db/seeds.rb
|
283
|
+
- tests/test_app/lib/assets/.gitkeep
|
284
|
+
- tests/test_app/lib/tasks/.gitkeep
|
285
|
+
- tests/test_app/lib/tasks/cucumber.rake
|
286
|
+
- tests/test_app/log/.gitkeep
|
287
|
+
- tests/test_app/public/404.html
|
288
|
+
- tests/test_app/public/422.html
|
289
|
+
- tests/test_app/public/500.html
|
290
|
+
- tests/test_app/public/favicon.ico
|
291
|
+
- tests/test_app/public/images/rails.png
|
292
|
+
- tests/test_app/public/index.html
|
293
|
+
- tests/test_app/public/javascripts/application.js
|
294
|
+
- tests/test_app/public/javascripts/controls.js
|
295
|
+
- tests/test_app/public/javascripts/dragdrop.js
|
296
|
+
- tests/test_app/public/javascripts/effects.js
|
297
|
+
- tests/test_app/public/javascripts/prototype.js
|
298
|
+
- tests/test_app/public/javascripts/rails.js
|
299
|
+
- tests/test_app/public/robots.txt
|
300
|
+
- tests/test_app/public/stylesheets/.gitkeep
|
301
|
+
- tests/test_app/script/cucumber
|
302
|
+
- tests/test_app/script/rails
|
303
|
+
- tests/test_app/spec/controllers/articles_controller_spec.rb
|
304
|
+
- tests/test_app/spec/controllers/dummy_controller_spec.rb
|
305
|
+
- tests/test_app/spec/controllers/impressionist_uniqueness_spec.rb
|
306
|
+
- tests/test_app/spec/controllers/posts_controller_spec.rb
|
307
|
+
- tests/test_app/spec/controllers/widgets_controller_spec.rb
|
308
|
+
- tests/test_app/spec/fixtures/articles.yml
|
309
|
+
- tests/test_app/spec/fixtures/impressions.yml
|
310
|
+
- tests/test_app/spec/fixtures/posts.yml
|
311
|
+
- tests/test_app/spec/fixtures/widgets.yml
|
312
|
+
- tests/test_app/spec/initializers/initializers_spec.rb
|
313
|
+
- tests/test_app/spec/models/bots_spec.rb
|
314
|
+
- tests/test_app/spec/models/counter_caching_spec.rb
|
315
|
+
- tests/test_app/spec/models/model_spec.rb
|
316
|
+
- tests/test_app/spec/rails_generators/rails_generators_spec.rb
|
317
|
+
- tests/test_app/spec/spec_helper.rb
|
285
318
|
- upgrade_migrations/version_0_3_0.rb
|
286
319
|
- upgrade_migrations/version_0_4_0.rb
|
287
320
|
homepage: http://github.com/charlotte-ruby/impressionist
|
@@ -308,4 +341,96 @@ rubygems_version: 2.0.2
|
|
308
341
|
signing_key:
|
309
342
|
specification_version: 4
|
310
343
|
summary: Easy way to log impressions
|
311
|
-
test_files:
|
344
|
+
test_files:
|
345
|
+
- tests/spec/minitest_helper.rb
|
346
|
+
- tests/spec/rails_toggle_spec.rb
|
347
|
+
- tests/spec/setup_association_spec.rb
|
348
|
+
- tests/test_app/Gemfile
|
349
|
+
- tests/test_app/README
|
350
|
+
- tests/test_app/README.rdoc
|
351
|
+
- tests/test_app/Rakefile
|
352
|
+
- tests/test_app/app/assets/images/rails.png
|
353
|
+
- tests/test_app/app/assets/javascripts/application.js
|
354
|
+
- tests/test_app/app/assets/stylesheets/application.css
|
355
|
+
- tests/test_app/app/controllers/application_controller.rb
|
356
|
+
- tests/test_app/app/controllers/articles_controller.rb
|
357
|
+
- tests/test_app/app/controllers/dummy_controller.rb
|
358
|
+
- tests/test_app/app/controllers/posts_controller.rb
|
359
|
+
- tests/test_app/app/controllers/widgets_controller.rb
|
360
|
+
- tests/test_app/app/helpers/application_helper.rb
|
361
|
+
- tests/test_app/app/mailers/.gitkeep
|
362
|
+
- tests/test_app/app/models/.gitkeep
|
363
|
+
- tests/test_app/app/models/article.rb
|
364
|
+
- tests/test_app/app/models/dummy.rb
|
365
|
+
- tests/test_app/app/models/post.rb
|
366
|
+
- tests/test_app/app/models/user.rb
|
367
|
+
- tests/test_app/app/models/widget.rb
|
368
|
+
- tests/test_app/app/views/articles/index.html.erb
|
369
|
+
- tests/test_app/app/views/articles/show.html.erb
|
370
|
+
- tests/test_app/app/views/dummy/index.html.erb
|
371
|
+
- tests/test_app/app/views/layouts/application.html.erb
|
372
|
+
- tests/test_app/app/views/posts/edit.html.erb
|
373
|
+
- tests/test_app/app/views/posts/index.html.erb
|
374
|
+
- tests/test_app/app/views/posts/show.html.erb
|
375
|
+
- tests/test_app/app/views/widgets/index.html.erb
|
376
|
+
- tests/test_app/app/views/widgets/new.html.erb
|
377
|
+
- tests/test_app/app/views/widgets/show.html.erb
|
378
|
+
- tests/test_app/config.ru
|
379
|
+
- tests/test_app/config/application.rb
|
380
|
+
- tests/test_app/config/boot.rb
|
381
|
+
- tests/test_app/config/cucumber.yml
|
382
|
+
- tests/test_app/config/database.yml
|
383
|
+
- tests/test_app/config/environment.rb
|
384
|
+
- tests/test_app/config/environments/development.rb
|
385
|
+
- tests/test_app/config/environments/pg_test.rb
|
386
|
+
- tests/test_app/config/environments/production.rb
|
387
|
+
- tests/test_app/config/environments/test.rb
|
388
|
+
- tests/test_app/config/initializers/backtrace_silencers.rb
|
389
|
+
- tests/test_app/config/initializers/impression.rb
|
390
|
+
- tests/test_app/config/initializers/inflections.rb
|
391
|
+
- tests/test_app/config/initializers/mime_types.rb
|
392
|
+
- tests/test_app/config/initializers/secret_token.rb
|
393
|
+
- tests/test_app/config/initializers/session_store.rb
|
394
|
+
- tests/test_app/config/initializers/wrap_parameters.rb
|
395
|
+
- tests/test_app/config/locales/en.yml
|
396
|
+
- tests/test_app/config/routes.rb
|
397
|
+
- tests/test_app/db/migrate/20110201153144_create_articles.rb
|
398
|
+
- tests/test_app/db/migrate/20110210205028_create_posts.rb
|
399
|
+
- tests/test_app/db/migrate/20111127184039_create_widgets.rb
|
400
|
+
- tests/test_app/db/schema.rb
|
401
|
+
- tests/test_app/db/seeds.rb
|
402
|
+
- tests/test_app/lib/assets/.gitkeep
|
403
|
+
- tests/test_app/lib/tasks/.gitkeep
|
404
|
+
- tests/test_app/lib/tasks/cucumber.rake
|
405
|
+
- tests/test_app/log/.gitkeep
|
406
|
+
- tests/test_app/public/404.html
|
407
|
+
- tests/test_app/public/422.html
|
408
|
+
- tests/test_app/public/500.html
|
409
|
+
- tests/test_app/public/favicon.ico
|
410
|
+
- tests/test_app/public/images/rails.png
|
411
|
+
- tests/test_app/public/index.html
|
412
|
+
- tests/test_app/public/javascripts/application.js
|
413
|
+
- tests/test_app/public/javascripts/controls.js
|
414
|
+
- tests/test_app/public/javascripts/dragdrop.js
|
415
|
+
- tests/test_app/public/javascripts/effects.js
|
416
|
+
- tests/test_app/public/javascripts/prototype.js
|
417
|
+
- tests/test_app/public/javascripts/rails.js
|
418
|
+
- tests/test_app/public/robots.txt
|
419
|
+
- tests/test_app/public/stylesheets/.gitkeep
|
420
|
+
- tests/test_app/script/cucumber
|
421
|
+
- tests/test_app/script/rails
|
422
|
+
- tests/test_app/spec/controllers/articles_controller_spec.rb
|
423
|
+
- tests/test_app/spec/controllers/dummy_controller_spec.rb
|
424
|
+
- tests/test_app/spec/controllers/impressionist_uniqueness_spec.rb
|
425
|
+
- tests/test_app/spec/controllers/posts_controller_spec.rb
|
426
|
+
- tests/test_app/spec/controllers/widgets_controller_spec.rb
|
427
|
+
- tests/test_app/spec/fixtures/articles.yml
|
428
|
+
- tests/test_app/spec/fixtures/impressions.yml
|
429
|
+
- tests/test_app/spec/fixtures/posts.yml
|
430
|
+
- tests/test_app/spec/fixtures/widgets.yml
|
431
|
+
- tests/test_app/spec/initializers/initializers_spec.rb
|
432
|
+
- tests/test_app/spec/models/bots_spec.rb
|
433
|
+
- tests/test_app/spec/models/counter_caching_spec.rb
|
434
|
+
- tests/test_app/spec/models/model_spec.rb
|
435
|
+
- tests/test_app/spec/rails_generators/rails_generators_spec.rb
|
436
|
+
- tests/test_app/spec/spec_helper.rb
|
@@ -1,14 +0,0 @@
|
|
1
|
-
module Impressionist
|
2
|
-
module SetUpAssociation
|
3
|
-
|
4
|
-
def self.included(base)
|
5
|
-
base.attr_accessible(:impressionable_type,:impressionable_id,
|
6
|
-
:user_id,:controller_name,:action_name,:view_name,:request_hash,
|
7
|
-
:ip_address,:session_hash,:message,:referrer)
|
8
|
-
|
9
|
-
base.belongs_to(:impressionable, :polymorphic => true)
|
10
|
-
end
|
11
|
-
|
12
|
-
end
|
13
|
-
|
14
|
-
end
|