commontator 2.0.1 → 2.0.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.
Files changed (60) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +1 -1
  3. data/app/controllers/commontator/application_controller.rb~ +27 -0
  4. data/app/controllers/commontator/comments_controller.rb~ +20 -12
  5. data/app/controllers/commontator/subscriptions_controller.rb~ +32 -0
  6. data/app/controllers/commontator/threads_controller.rb~ +42 -0
  7. data/app/mailers/commontator/subscriptions_mailer.rb~ +50 -0
  8. data/app/models/commontator/comment.rb~ +2 -6
  9. data/app/models/commontator/subscription.rb~ +2 -5
  10. data/app/models/commontator/thread.rb~ +5 -7
  11. data/app/views/commontator/comments/_actions.html.erb~ +30 -0
  12. data/app/views/commontator/comments/_votes.html.erb~ +1 -1
  13. data/app/views/commontator/shared/_thread.html.erb~ +20 -0
  14. data/app/views/commontator/subscriptions/_link.html.erb~ +16 -0
  15. data/app/views/commontator/threads/_show.html.erb~ +62 -0
  16. data/config/initializers/commontator.rb~ +1 -1
  17. data/config/routes.rb~ +22 -0
  18. data/db/migrate/0_install.rb~ +1 -1
  19. data/db/migrate/{0_install.rb → 0_install_commontator.rb} +1 -1
  20. data/lib/commontator/controller_includes.rb~ +22 -0
  21. data/lib/commontator/shared_helper.rb~ +42 -0
  22. data/lib/commontator/version.rb +1 -1
  23. data/lib/commontator/version.rb~ +1 -1
  24. data/spec/app/controllers/commontator/comments_controller_spec.rb~ +55 -2
  25. data/spec/app/controllers/commontator/subscriptions_controller_spec.rb~ +16 -16
  26. data/spec/app/controllers/commontator/threads_controller_spec.rb~ +1 -1
  27. data/spec/app/helpers/commontator/application_helper_spec.rb~ +2 -0
  28. data/spec/app/helpers/commontator/threads_helper_spec.rb~ +1 -1
  29. data/spec/app/mailers/commontator/subscriptions_mailer_spec.rb~ +1 -1
  30. data/spec/app/models/commontator/comment_spec.rb~ +1 -1
  31. data/spec/app/models/commontator/subscription_spec.rb~ +1 -1
  32. data/spec/app/models/commontator/thread_spec.rb~ +1 -1
  33. data/spec/dummy/Rakefile~ +1 -1
  34. data/spec/dummy/config.ru~ +4 -0
  35. data/spec/dummy/config/application.rb~ +23 -0
  36. data/spec/dummy/config/environment.rb~ +5 -0
  37. data/spec/dummy/config/environments/development.rb~ +31 -0
  38. data/spec/dummy/config/environments/production.rb~ +67 -0
  39. data/spec/dummy/config/environments/test.rb~ +31 -0
  40. data/spec/dummy/config/initializers/secret_token.rb~ +12 -0
  41. data/spec/dummy/db/development.sqlite3 +0 -0
  42. data/spec/dummy/db/test.sqlite3 +0 -0
  43. data/spec/dummy/log/development.log +1250 -0
  44. data/spec/dummy/log/test.log +170101 -0
  45. data/spec/dummy/tmp/cache/assets/test/sprockets/02d4b791eb831cf2057bf4703a1218d1 +0 -0
  46. data/spec/dummy/tmp/cache/assets/test/sprockets/0f196a1a50363b0a076ec6e1ee5417f6 +0 -0
  47. data/spec/dummy/tmp/cache/assets/test/sprockets/a3fb9025f90ff05a6fd4afc7ded2692c +0 -0
  48. data/spec/dummy/tmp/cache/assets/test/sprockets/a41c8be5379abec3c0d0d98e2f0d5609 +0 -0
  49. data/spec/dummy/tmp/cache/assets/test/sprockets/c69ee3cc5796188d873574179290a6ef +0 -0
  50. data/spec/dummy/tmp/cache/assets/test/sprockets/e1f674c11941d62aac1764ef3a7134e4 +0 -0
  51. data/spec/dummy/tmp/cache/assets/test/sprockets/e85565206c3e5fdf9dfeb367c85557b1 +0 -0
  52. data/spec/lib/commontator/acts_as_commontable_spec.rb~ +2 -2
  53. data/spec/lib/commontator/acts_as_commontator_spec.rb~ +1 -1
  54. data/spec/lib/commontator/commontable_config_spec.rb~ +1 -1
  55. data/spec/lib/commontator/commontator_config_spec.rb~ +1 -1
  56. data/spec/lib/commontator/controller_includes_spec.rb~ +3 -3
  57. data/spec/lib/commontator/shared_helper_spec.rb~ +7 -3
  58. data/spec/lib/commontator_spec.rb~ +1 -1
  59. data/spec/test_helper.rb~ +37 -0
  60. metadata +61 -31
@@ -1,9 +1,9 @@
1
- require 'spec_helper'
1
+ require 'test_helper'
2
2
 
3
3
  module Commontator
4
4
  describe ActsAsCommontable do
5
5
  it 'must add methods to ActiveRecord and subclasses' do
6
- ActiveRecord::Base.must_respond_to :acts_as_commontable
6
+ ActiveRecord::Base.must_respond_to :acts_as_common
7
7
  ActiveRecord::Base.must_respond_to :is_commontable
8
8
  ActiveRecord::Base.is_commontable.must_equal false
9
9
  DummyModel.must_respond_to :acts_as_commontable
@@ -1,4 +1,4 @@
1
- require 'spec_helper'
1
+ require 'minitest_helper'
2
2
 
3
3
  module Commontator
4
4
  describe ActsAsCommontator do
@@ -1,4 +1,4 @@
1
- require 'spec_helper'
1
+ require 'minitest_helper'
2
2
 
3
3
  module Commontator
4
4
  describe CommontableConfig do
@@ -1,4 +1,4 @@
1
- require 'spec_helper'
1
+ require 'minitest_helper'
2
2
 
3
3
  module Commontator
4
4
  describe CommontatorConfig do
@@ -1,10 +1,10 @@
1
- require 'spec_helper'
1
+ require 'test_helper'
2
2
 
3
3
  module Commontator
4
4
  describe ControllerIncludes do
5
5
  it 'must add commontator_thread_show to ActionController instances' do
6
- ActionController::Base.new.must_respond_to :commontator_thread_show
7
- DummyModelsController.new.must_respond_to :commontator_thread_show
6
+ ActionController::Base.new.respond_to?(:commontator_thread_show, true).must_be true
7
+ DummyModelsController.new.respond_to?(:commontator_thread_show, true).must_equal true
8
8
  end
9
9
 
10
10
  it 'must add shared helper to ActionController and subclasses' do
@@ -1,10 +1,14 @@
1
- require 'spec_helper'
1
+ require 'test_helper'
2
2
 
3
3
  module Commontator
4
4
  describe SharedHelper do
5
5
  it 'must show commontator thread' do
6
- view_context = DummyModelsController.new.view_context
7
- thread_link = view_context.commontator_thread(DummyModel.create)
6
+ controller = DummyModelsController.new
7
+ # Workaround for
8
+ controller.define_singleton_method(:params) do
9
+ {}
10
+ end
11
+ thread_link = controller.view_context.commontator_thread(DummyModel.create)
8
12
  thread_link.wont_be_nil
9
13
  thread_link.wont_be_empty
10
14
  end
@@ -1,4 +1,4 @@
1
- require 'spec_helper'
1
+ require 'minitest_helper'
2
2
 
3
3
  module Commontator
4
4
  describe Commontator do
@@ -0,0 +1,37 @@
1
+ ENV["RAILS_ENV"] = "test"
2
+ require File.expand_path("../../config/environment", __FILE__)
3
+ require "rails/test_help"
4
+ require "minitest/rails"
5
+
6
+ # To add Capybara feature tests add `gem "minitest-rails-capybara"`
7
+ # to the test group in the Gemfile and uncomment the following:
8
+ # require "minitest/rails/capybara"
9
+
10
+ # Uncomment for awesome colorful output
11
+ # require "minitest/pride"
12
+
13
+ Rails.backtrace_cleaner.remove_silencers!
14
+
15
+ Commontator::ApplicationController.class_eval do
16
+ include ApplicationHelper
17
+ end
18
+
19
+ def setup_model_spec
20
+ @user = DummyUser.create
21
+ @commontable = DummyModel.create
22
+ @thread = @commontable.thread
23
+ end
24
+
25
+ def setup_controller_spec
26
+ class_eval {include ApplicationHelper}
27
+ sign_out
28
+ setup_model_spec
29
+ end
30
+
31
+ def setup_helper_spec
32
+ setup_model_spec
33
+ end
34
+
35
+ def setup_mailer_spec
36
+ setup_model_spec
37
+ end
metadata CHANGED
@@ -1,94 +1,83 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: commontator
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
5
- prerelease:
4
+ version: 2.0.2
6
5
  platform: ruby
7
6
  authors:
8
7
  - Dante Soares
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-09-20 00:00:00.000000000 Z
11
+ date: 2013-11-04 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: rails
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - '>='
20
18
  - !ruby/object:Gem::Version
21
19
  version: '3.1'
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - '>='
28
25
  - !ruby/object:Gem::Version
29
26
  version: '3.1'
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: jquery-rails
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ! '>='
31
+ - - '>='
36
32
  - !ruby/object:Gem::Version
37
33
  version: '0'
38
34
  type: :runtime
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ! '>='
38
+ - - '>='
44
39
  - !ruby/object:Gem::Version
45
40
  version: '0'
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: sqlite3
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
- - - ! '>='
45
+ - - '>='
52
46
  - !ruby/object:Gem::Version
53
47
  version: '0'
54
48
  type: :development
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
- - - ! '>='
52
+ - - '>='
60
53
  - !ruby/object:Gem::Version
61
54
  version: '0'
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: minitest-rails
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
- - - ! '>='
59
+ - - '>='
68
60
  - !ruby/object:Gem::Version
69
61
  version: '0'
70
62
  type: :development
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
- - - ! '>='
66
+ - - '>='
76
67
  - !ruby/object:Gem::Version
77
68
  version: '0'
78
69
  - !ruby/object:Gem::Dependency
79
70
  name: acts_as_votable
80
71
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
72
  requirements:
83
- - - ! '>='
73
+ - - '>='
84
74
  - !ruby/object:Gem::Version
85
75
  version: '0'
86
76
  type: :development
87
77
  prerelease: false
88
78
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
79
  requirements:
91
- - - ! '>='
80
+ - - '>='
92
81
  - !ruby/object:Gem::Version
93
82
  version: '0'
94
83
  description: A Rails engine for comments.
@@ -98,10 +87,13 @@ executables: []
98
87
  extensions: []
99
88
  extra_rdoc_files: []
100
89
  files:
90
+ - app/controllers/commontator/application_controller.rb~
101
91
  - app/controllers/commontator/threads_controller.rb
92
+ - app/controllers/commontator/threads_controller.rb~
102
93
  - app/controllers/commontator/application_controller.rb
103
94
  - app/controllers/commontator/subscriptions_controller.rb
104
95
  - app/controllers/commontator/comments_controller.rb~
96
+ - app/controllers/commontator/subscriptions_controller.rb~
105
97
  - app/controllers/commontator/comments_controller.rb
106
98
  - app/assets/stylesheets/commontator/application.css
107
99
  - app/assets/stylesheets/commontator/comments.css
@@ -120,11 +112,14 @@ files:
120
112
  - app/models/commontator/comment.rb~
121
113
  - app/helpers/commontator/threads_helper.rb
122
114
  - app/helpers/commontator/application_helper.rb
115
+ - app/views/commontator/subscriptions/_link.html.erb~
123
116
  - app/views/commontator/subscriptions/subscribe.js.erb
124
117
  - app/views/commontator/subscriptions/_link.html.erb
125
118
  - app/views/commontator/subscriptions_mailer/comment_created.html.erb
126
119
  - app/views/commontator/threads/_show.html.erb
127
120
  - app/views/commontator/threads/show.js.erb
121
+ - app/views/commontator/threads/_show.html.erb~
122
+ - app/views/commontator/shared/_thread.html.erb~
128
123
  - app/views/commontator/shared/_thread.html.erb
129
124
  - app/views/commontator/comments/_votes.html.erb
130
125
  - app/views/commontator/comments/_body.html.erb~
@@ -140,13 +135,16 @@ files:
140
135
  - app/views/commontator/comments/_votes.html.erb~
141
136
  - app/views/commontator/comments/vote.js.erb
142
137
  - app/views/commontator/comments/_form.html.erb
138
+ - app/views/commontator/comments/_actions.html.erb~
143
139
  - app/views/commontator/comments/_form.html.erb~
144
140
  - app/views/commontator/comments/delete.js.erb~
145
141
  - app/mailers/commontator/subscriptions_mailer.rb
142
+ - app/mailers/commontator/subscriptions_mailer.rb~
146
143
  - config/routes.rb
147
144
  - config/initializers/commontator.rb~
148
145
  - config/initializers/commontator.rb
149
- - db/migrate/0_install.rb
146
+ - config/routes.rb~
147
+ - db/migrate/0_install_commontator.rb
150
148
  - db/migrate/0_install.rb~
151
149
  - lib/commontator.rb~
152
150
  - lib/commontator/version.rb~
@@ -155,12 +153,14 @@ files:
155
153
  - lib/commontator/acts_as_commontator.rb~
156
154
  - lib/commontator/commontator_config.rb
157
155
  - lib/commontator/acts_as_commontable.rb
156
+ - lib/commontator/shared_helper.rb~
158
157
  - lib/commontator/controller_includes.rb
159
158
  - lib/commontator/engine.rb
160
159
  - lib/commontator/acts_as_commontable.rb~
161
160
  - lib/commontator/shared_helper.rb
162
161
  - lib/commontator/version.rb
163
162
  - lib/commontator/security_transgression.rb~
163
+ - lib/commontator/controller_includes.rb~
164
164
  - lib/commontator/security_transgression.rb
165
165
  - lib/commontator.rb
166
166
  - lib/tasks/commontator_tasks.rake~
@@ -193,6 +193,7 @@ files:
193
193
  - spec/dummy/script/rails
194
194
  - spec/dummy/Rakefile
195
195
  - spec/dummy/Rakefile~
196
+ - spec/dummy/config.ru~
196
197
  - spec/dummy/app/controllers/application_controller.rb
197
198
  - spec/dummy/app/controllers/dummy_models_controller.rb
198
199
  - spec/dummy/app/assets/stylesheets/application.css
@@ -202,12 +203,23 @@ files:
202
203
  - spec/dummy/app/helpers/application_helper.rb
203
204
  - spec/dummy/app/views/layouts/application.html.erb
204
205
  - spec/dummy/app/views/dummy_model/show.html.erb
206
+ - spec/dummy/tmp/cache/assets/test/sprockets/02d4b791eb831cf2057bf4703a1218d1
207
+ - spec/dummy/tmp/cache/assets/test/sprockets/e85565206c3e5fdf9dfeb367c85557b1
208
+ - spec/dummy/tmp/cache/assets/test/sprockets/c69ee3cc5796188d873574179290a6ef
209
+ - spec/dummy/tmp/cache/assets/test/sprockets/a3fb9025f90ff05a6fd4afc7ded2692c
210
+ - spec/dummy/tmp/cache/assets/test/sprockets/0f196a1a50363b0a076ec6e1ee5417f6
211
+ - spec/dummy/tmp/cache/assets/test/sprockets/e1f674c11941d62aac1764ef3a7134e4
212
+ - spec/dummy/tmp/cache/assets/test/sprockets/a41c8be5379abec3c0d0d98e2f0d5609
205
213
  - spec/dummy/config/locales/en.yml
206
214
  - spec/dummy/config/environment.rb
207
215
  - spec/dummy/config/routes.rb
208
216
  - spec/dummy/config/environments/production.rb
217
+ - spec/dummy/config/environments/production.rb~
218
+ - spec/dummy/config/environments/test.rb~
219
+ - spec/dummy/config/environments/development.rb~
209
220
  - spec/dummy/config/environments/test.rb
210
221
  - spec/dummy/config/environments/development.rb
222
+ - spec/dummy/config/initializers/secret_token.rb~
211
223
  - spec/dummy/config/initializers/wrap_parameters.rb
212
224
  - spec/dummy/config/initializers/secret_token.rb
213
225
  - spec/dummy/config/initializers/mime_types.rb
@@ -216,8 +228,10 @@ files:
216
228
  - spec/dummy/config/initializers/backtrace_silencers.rb
217
229
  - spec/dummy/config/initializers/inflections.rb
218
230
  - spec/dummy/config/boot.rb
231
+ - spec/dummy/config/environment.rb~
219
232
  - spec/dummy/config/application.rb
220
233
  - spec/dummy/config/database.yml
234
+ - spec/dummy/config/application.rb~
221
235
  - spec/dummy/README.md~
222
236
  - spec/dummy/README.md
223
237
  - spec/dummy/public/500.html
@@ -233,6 +247,7 @@ files:
233
247
  - spec/dummy/db/migrate/1_create_dummy_models.rb
234
248
  - spec/dummy/db/migrate/3_acts_as_votable_migration.rb
235
249
  - spec/dummy/db/test.sqlite3
250
+ - spec/test_helper.rb~
236
251
  - spec/spec_helper.rb~
237
252
  - spec/lib/commontator_spec.rb
238
253
  - spec/lib/commontator_spec.rb~
@@ -249,28 +264,28 @@ files:
249
264
  - spec/lib/commontator/shared_helper_spec.rb~
250
265
  - spec/lib/commontator/acts_as_commontable_spec.rb
251
266
  homepage: http://github.com/lml/commontator
252
- licenses: []
267
+ licenses:
268
+ - MIT
269
+ metadata: {}
253
270
  post_install_message:
254
271
  rdoc_options: []
255
272
  require_paths:
256
273
  - lib
257
274
  required_ruby_version: !ruby/object:Gem::Requirement
258
- none: false
259
275
  requirements:
260
- - - ! '>='
276
+ - - '>='
261
277
  - !ruby/object:Gem::Version
262
278
  version: '0'
263
279
  required_rubygems_version: !ruby/object:Gem::Requirement
264
- none: false
265
280
  requirements:
266
- - - ! '>='
281
+ - - '>='
267
282
  - !ruby/object:Gem::Version
268
283
  version: '0'
269
284
  requirements: []
270
285
  rubyforge_project:
271
- rubygems_version: 1.8.24
286
+ rubygems_version: 2.0.3
272
287
  signing_key:
273
- specification_version: 3
288
+ specification_version: 4
274
289
  summary: Allows users to comment on any model in your application.
275
290
  test_files:
276
291
  - spec/minitest_helper.rb
@@ -298,6 +313,7 @@ test_files:
298
313
  - spec/dummy/script/rails
299
314
  - spec/dummy/Rakefile
300
315
  - spec/dummy/Rakefile~
316
+ - spec/dummy/config.ru~
301
317
  - spec/dummy/app/controllers/application_controller.rb
302
318
  - spec/dummy/app/controllers/dummy_models_controller.rb
303
319
  - spec/dummy/app/assets/stylesheets/application.css
@@ -307,12 +323,23 @@ test_files:
307
323
  - spec/dummy/app/helpers/application_helper.rb
308
324
  - spec/dummy/app/views/layouts/application.html.erb
309
325
  - spec/dummy/app/views/dummy_model/show.html.erb
326
+ - spec/dummy/tmp/cache/assets/test/sprockets/02d4b791eb831cf2057bf4703a1218d1
327
+ - spec/dummy/tmp/cache/assets/test/sprockets/e85565206c3e5fdf9dfeb367c85557b1
328
+ - spec/dummy/tmp/cache/assets/test/sprockets/c69ee3cc5796188d873574179290a6ef
329
+ - spec/dummy/tmp/cache/assets/test/sprockets/a3fb9025f90ff05a6fd4afc7ded2692c
330
+ - spec/dummy/tmp/cache/assets/test/sprockets/0f196a1a50363b0a076ec6e1ee5417f6
331
+ - spec/dummy/tmp/cache/assets/test/sprockets/e1f674c11941d62aac1764ef3a7134e4
332
+ - spec/dummy/tmp/cache/assets/test/sprockets/a41c8be5379abec3c0d0d98e2f0d5609
310
333
  - spec/dummy/config/locales/en.yml
311
334
  - spec/dummy/config/environment.rb
312
335
  - spec/dummy/config/routes.rb
313
336
  - spec/dummy/config/environments/production.rb
337
+ - spec/dummy/config/environments/production.rb~
338
+ - spec/dummy/config/environments/test.rb~
339
+ - spec/dummy/config/environments/development.rb~
314
340
  - spec/dummy/config/environments/test.rb
315
341
  - spec/dummy/config/environments/development.rb
342
+ - spec/dummy/config/initializers/secret_token.rb~
316
343
  - spec/dummy/config/initializers/wrap_parameters.rb
317
344
  - spec/dummy/config/initializers/secret_token.rb
318
345
  - spec/dummy/config/initializers/mime_types.rb
@@ -321,8 +348,10 @@ test_files:
321
348
  - spec/dummy/config/initializers/backtrace_silencers.rb
322
349
  - spec/dummy/config/initializers/inflections.rb
323
350
  - spec/dummy/config/boot.rb
351
+ - spec/dummy/config/environment.rb~
324
352
  - spec/dummy/config/application.rb
325
353
  - spec/dummy/config/database.yml
354
+ - spec/dummy/config/application.rb~
326
355
  - spec/dummy/README.md~
327
356
  - spec/dummy/README.md
328
357
  - spec/dummy/public/500.html
@@ -338,6 +367,7 @@ test_files:
338
367
  - spec/dummy/db/migrate/1_create_dummy_models.rb
339
368
  - spec/dummy/db/migrate/3_acts_as_votable_migration.rb
340
369
  - spec/dummy/db/test.sqlite3
370
+ - spec/test_helper.rb~
341
371
  - spec/spec_helper.rb~
342
372
  - spec/lib/commontator_spec.rb
343
373
  - spec/lib/commontator_spec.rb~