commontator 1.1.1 → 1.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (126) hide show
  1. data/README.md +1 -1
  2. data/Rakefile +2 -20
  3. data/lib/commontator.rb +4 -2
  4. data/lib/commontator.rb~ +7 -5
  5. data/lib/commontator/acts_as_commontable.rb +1 -1
  6. data/lib/commontator/acts_as_commontable.rb~ +2 -2
  7. data/lib/commontator/security_transgression.rb +2 -1
  8. data/lib/commontator/security_transgression.rb~ +3 -0
  9. data/lib/commontator/version.rb +1 -1
  10. data/lib/commontator/version.rb~ +1 -1
  11. data/lib/tasks/commontator_tasks.rake +1 -0
  12. data/lib/tasks/commontator_tasks.rake~ +41 -0
  13. data/spec/app/controllers/commontator/comments_controller_spec.rb +1 -1
  14. data/spec/app/controllers/commontator/comments_controller_spec.rb~ +8 -8
  15. data/spec/app/controllers/commontator/subscriptions_controller_spec.rb +1 -1
  16. data/spec/app/controllers/commontator/subscriptions_controller_spec.rb~ +1 -1
  17. data/spec/app/controllers/commontator/threads_controller_spec.rb +1 -1
  18. data/spec/app/controllers/commontator/threads_controller_spec.rb~ +110 -110
  19. data/spec/app/helpers/commontator/application_helper_spec.rb +2 -0
  20. data/spec/app/helpers/commontator/application_helper_spec.rb~ +1 -1
  21. data/spec/app/helpers/commontator/threads_helper_spec.rb +1 -1
  22. data/spec/app/helpers/commontator/threads_helper_spec.rb~ +1 -1
  23. data/spec/app/mailers/commontator/subscriptions_mailer_spec.rb +1 -1
  24. data/spec/app/mailers/commontator/subscriptions_mailer_spec.rb~ +2 -2
  25. data/spec/app/models/commontator/comment_observer_spec.rb +1 -1
  26. data/spec/app/models/commontator/comment_observer_spec.rb~ +1 -1
  27. data/spec/app/models/commontator/comment_spec.rb +1 -1
  28. data/spec/app/models/commontator/comment_spec.rb~ +1 -1
  29. data/spec/app/models/commontator/subscription_spec.rb +1 -1
  30. data/spec/app/models/commontator/subscription_spec.rb~ +22 -22
  31. data/spec/app/models/commontator/thread_spec.rb +1 -1
  32. data/spec/app/models/commontator/thread_spec.rb~ +2 -2
  33. data/spec/dummy/README.md +1 -1
  34. data/spec/dummy/README.md~ +1 -1
  35. data/spec/dummy/Rakefile~ +7 -0
  36. data/spec/dummy/config/initializers/commontator.rb +1 -1
  37. data/spec/dummy/db/development.sqlite3 +0 -0
  38. data/spec/dummy/db/migrate/{0_create_dummy_models.rb → 1_create_dummy_models.rb} +0 -0
  39. data/spec/dummy/db/migrate/{1_create_dummy_users.rb → 2_create_dummy_users.rb} +0 -0
  40. data/spec/dummy/db/migrate/3_acts_as_votable_migration.rb +4 -1
  41. data/spec/dummy/db/schema.rb +3 -0
  42. data/spec/dummy/db/test.sqlite3 +0 -0
  43. data/spec/dummy/log/development.log +466 -15153
  44. data/spec/dummy/log/test.log +7183 -178543
  45. data/spec/lib/commontator/acts_as_commontable_spec.rb +1 -1
  46. data/spec/lib/commontator/acts_as_commontable_spec.rb~ +1 -1
  47. data/spec/lib/commontator/acts_as_commontator_spec.rb +1 -1
  48. data/spec/lib/commontator/acts_as_commontator_spec.rb~ +1 -1
  49. data/spec/lib/commontator/commontable_config_spec.rb +1 -1
  50. data/spec/lib/commontator/commontable_config_spec.rb~ +6 -6
  51. data/spec/lib/commontator/commontator_config_spec.rb +1 -1
  52. data/spec/lib/commontator/commontator_config_spec.rb~ +6 -6
  53. data/spec/lib/commontator/controller_includes_spec.rb +1 -1
  54. data/spec/lib/commontator/controller_includes_spec.rb~ +1 -1
  55. data/spec/lib/commontator/shared_helper_spec.rb +1 -1
  56. data/spec/lib/commontator/shared_helper_spec.rb~ +1 -1
  57. data/spec/lib/commontator_spec.rb +1 -1
  58. data/spec/lib/commontator_spec.rb~ +4 -4
  59. data/spec/{spec_helper.rb → minitest_helper.rb} +0 -1
  60. data/spec/minitest_helper.rb~ +35 -0
  61. data/spec/spec_helper.rb~ +7 -1
  62. metadata +153 -241
  63. data/app/assets/stylesheets/commontator/comments.css~ +0 -83
  64. data/app/assets/stylesheets/commontator/threads.css~ +0 -18
  65. data/app/controllers/commontator/application_controller.rb~ +0 -28
  66. data/app/controllers/commontator/comments_controller.rb~ +0 -135
  67. data/app/controllers/commontator/commontator_controller.rb~ +0 -22
  68. data/app/controllers/commontator/subscriptions_controller.rb~ +0 -33
  69. data/app/controllers/commontator/threads_controller.rb~ +0 -41
  70. data/app/helpers/commontator/comments_helper.rb~ +0 -41
  71. data/app/helpers/commontator/commontator_helper.rb~ +0 -7
  72. data/app/helpers/commontator/subscriptions_helper.rb~ +0 -8
  73. data/app/helpers/commontator/threads_helper.rb~ +0 -22
  74. data/app/mailers/commontator/subscriptions_mailer.rb~ +0 -49
  75. data/app/models/commontator/comment.rb~ +0 -89
  76. data/app/models/commontator/comment_observer.rb~ +0 -13
  77. data/app/models/commontator/subscription.rb~ +0 -19
  78. data/app/models/commontator/thread.rb~ +0 -123
  79. data/app/views/commontator/comments/_actions.html.erb~ +0 -30
  80. data/app/views/commontator/comments/_body.html.erb~ +0 -7
  81. data/app/views/commontator/comments/_form.html.erb~ +0 -36
  82. data/app/views/commontator/comments/_show.html.erb~ +0 -44
  83. data/app/views/commontator/comments/_votes.html.erb~ +0 -57
  84. data/app/views/commontator/comments/delete.js.erb~ +0 -17
  85. data/app/views/commontator/comments/update.js.erb~ +0 -7
  86. data/app/views/commontator/shared/_thread.html.erb~ +0 -20
  87. data/app/views/commontator/shared/_thread_link.html.erb~ +0 -16
  88. data/app/views/commontator/subscriptions_mailer/comment_created_email.html.erb~ +0 -6
  89. data/app/views/commontator/threads/_show.html.erb~ +0 -61
  90. data/config/initializers/commontator.rb~ +0 -164
  91. data/db/migrate/0_install_commontator.rb~ +0 -48
  92. data/lib/commontator/commontable_config.rb~ +0 -13
  93. data/lib/commontator/commontator_config.rb~ +0 -13
  94. data/lib/commontator/controller_includes.rb~ +0 -23
  95. data/lib/commontator/engine.rb~ +0 -7
  96. data/lib/commontator/shared_helper.rb~ +0 -42
  97. data/lib/commontator/shared_methods.rb~ +0 -24
  98. data/spec/app/controllers/comments_controller_spec.rb~ +0 -7
  99. data/spec/app/controllers/commontator/application_controller_spec.rb~ +0 -30
  100. data/spec/app/controllers/threads_controller_spec.rb~ +0 -12
  101. data/spec/dummy/Gemfile~ +0 -3
  102. data/spec/dummy/app/controllers/application_controller.rb~ +0 -7
  103. data/spec/dummy/app/controllers/dummies_controller.rb~ +0 -17
  104. data/spec/dummy/app/controllers/dummy_models_controller.rb~ +0 -29
  105. data/spec/dummy/app/helpers/application_helper.rb~ +0 -15
  106. data/spec/dummy/app/models/dummy.rb~ +0 -3
  107. data/spec/dummy/app/models/dummy_user.rb~ +0 -9
  108. data/spec/dummy/app/models/user.rb~ +0 -5
  109. data/spec/dummy/app/views/dummy_model/show.html.erb~ +0 -1
  110. data/spec/dummy/config/application.rb~ +0 -59
  111. data/spec/dummy/config/initializers/commontator.rb~ +0 -164
  112. data/spec/dummy/config/routes.rb~ +0 -7
  113. data/spec/dummy/db/migrate/0_create_dummies.rb~ +0 -48
  114. data/spec/dummy/db/migrate/0_create_dummy_models.rb~ +0 -7
  115. data/spec/dummy/db/migrate/1_create_dummy_users.rb~ +0 -7
  116. data/spec/dummy/db/migrate/1_create_users.rb~ +0 -7
  117. data/spec/dummy/db/migrate/2_install_commontator.rb +0 -49
  118. data/spec/dummy/db/migrate/2_install_commontator.rb~ +0 -49
  119. data/spec/dummy/db/schema.rb~ +0 -71
  120. data/spec/dummy/tmp/cache/assets/CCB/1D0/sprockets%2F02d4b791eb831cf2057bf4703a1218d1 +0 -0
  121. data/spec/dummy/tmp/cache/assets/CD1/510/sprockets%2Fc69ee3cc5796188d873574179290a6ef +0 -0
  122. data/spec/dummy/tmp/cache/assets/D01/8B0/sprockets%2F0f196a1a50363b0a076ec6e1ee5417f6 +0 -0
  123. data/spec/dummy/tmp/cache/assets/D06/2F0/sprockets%2Fe1f674c11941d62aac1764ef3a7134e4 +0 -0
  124. data/spec/dummy/tmp/cache/assets/D54/060/sprockets%2Fe85565206c3e5fdf9dfeb367c85557b1 +0 -0
  125. data/spec/dummy/tmp/cache/assets/D9B/550/sprockets%2Fa41c8be5379abec3c0d0d98e2f0d5609 +0 -0
  126. data/spec/dummy/tmp/cache/assets/E01/2E0/sprockets%2Fa3fb9025f90ff05a6fd4afc7ded2692c +0 -0
@@ -1,7 +0,0 @@
1
- class CreateDummyModels < ActiveRecord::Migration
2
- def change
3
- create_table "dummies" do |t|
4
- t.timestamps
5
- end
6
- end
7
- end
@@ -1,7 +0,0 @@
1
- class CreateUsers < ActiveRecord::Migration
2
- def change
3
- create_table "users" do |t|
4
- t.timestamps
5
- end
6
- end
7
- end
@@ -1,7 +0,0 @@
1
- class CreateUsers < ActiveRecord::Migration
2
- def change
3
- create_table "dummies" do |t|
4
- t.timestamps
5
- end
6
- end
7
- end
@@ -1,49 +0,0 @@
1
- # This migration comes from commontator (originally 0)
2
- class InstallCommontator < ActiveRecord::Migration
3
- def change
4
- create_table "commontator_comments" do |t|
5
- t.text "body"
6
- t.integer "creator_id"
7
- t.string "creator_type"
8
- t.datetime "deleted_at"
9
- t.integer "deleter_id"
10
- t.string "deleter_type"
11
- t.integer "thread_id"
12
-
13
- t.integer "cached_votes_total", :default => 0
14
- t.integer "cached_votes_up", :default => 0
15
- t.integer "cached_votes_down", :default => 0
16
-
17
- t.timestamps
18
- end
19
-
20
- create_table "commontator_subscriptions" do |t|
21
- t.integer "subscriber_id"
22
- t.string "subscriber_type"
23
- t.integer "thread_id"
24
- t.integer "unread", :default => 0
25
-
26
- t.timestamps
27
- end
28
-
29
- create_table "commontator_threads" do |t|
30
- t.integer "commontable_id"
31
- t.string "commontable_type"
32
- t.datetime "closed_at"
33
- t.integer "closer_id"
34
- t.string "closer_type"
35
-
36
- t.timestamps
37
- end
38
-
39
- add_index :commontator_comments, [:creator_id, :creator_type, :thread_id], :name => "index_c_c_on_c_id_and_c_type_and_t_id"
40
- add_index :commontator_comments, :thread_id
41
- add_index :commontator_subscriptions, [:subscriber_id, :subscriber_type, :thread_id], :unique => true, :name => "index_c_s_on_s_id_and_s_type_and_t_id"
42
- add_index :commontator_subscriptions, :thread_id
43
- add_index :commontator_threads, [:commontable_id, :commontable_type]
44
-
45
- add_index :commontator_comments, :cached_votes_total
46
- add_index :commontator_comments, :cached_votes_up
47
- add_index :commontator_comments, :cached_votes_down
48
- end
49
- end
@@ -1,49 +0,0 @@
1
- # This migration comes from commontator (originally 0)
2
- class InstallCommontator < ActiveRecord::Migration
3
- def change
4
- create_table "commontator_comments" do |t|
5
- t.text "body"
6
- t.integer "creator_id"
7
- t.string "creator_type"
8
- t.datetime "deleted_at"
9
- t.integer "deleter_id"
10
- t.string "deleter_type"
11
- t.integer "thread_id"
12
-
13
- t.integer "cached_votes_total", :default => 0
14
- t.integer "cached_votes_up", :default => 0
15
- t.integer "cached_votes_down", :default => 0
16
-
17
- t.timestamps
18
- end
19
-
20
- create_table "commontator_subscriptions" do |t|
21
- t.integer "subscriber_id"
22
- t.string "subscriber_type"
23
- t.integer "thread_id"
24
- t.integer "unread"
25
-
26
- t.timestamps
27
- end
28
-
29
- create_table "commontator_threads" do |t|
30
- t.integer "commontable_id"
31
- t.string "commontable_type"
32
- t.datetime "closed_at"
33
- t.integer "closer_id"
34
- t.string "closer_type"
35
-
36
- t.timestamps
37
- end
38
-
39
- add_index :commontator_comments, [:creator_id, :creator_type, :thread_id], :name => "index_c_c_on_c_id_and_c_type_and_t_id"
40
- add_index :commontator_comments, :thread_id
41
- add_index :commontator_subscriptions, [:subscriber_id, :subscriber_type, :thread_id], :unique => true, :name => "index_c_s_on_s_id_and_s_type_and_t_id"
42
- add_index :commontator_subscriptions, :thread_id
43
- add_index :commontator_threads, [:commontable_id, :commontable_type]
44
-
45
- add_index :commontator_comments, :cached_votes_total
46
- add_index :commontator_comments, :cached_votes_up
47
- add_index :commontator_comments, :cached_votes_down
48
- end
49
- end
@@ -1,71 +0,0 @@
1
- # encoding: UTF-8
2
- # This file is auto-generated from the current state of the database. Instead
3
- # of editing this file, please use the migrations feature of Active Record to
4
- # incrementally modify your database, and then regenerate this schema definition.
5
- #
6
- # Note that this schema.rb definition is the authoritative source for your
7
- # database schema. If you need to create the application database on another
8
- # system, you should be using db:schema:load, not running all the migrations
9
- # from scratch. The latter is a flawed and unsustainable approach (the more migrations
10
- # you'll amass, the slower it'll run and the greater likelihood for issues).
11
- #
12
- # It's strongly recommended to check this file into your version control system.
13
-
14
- ActiveRecord::Schema.define(:version => 2) do
15
-
16
- create_table "commontator_comments", :force => true do |t|
17
- t.text "body"
18
- t.integer "creator_id"
19
- t.string "creator_type"
20
- t.datetime "deleted_at"
21
- t.integer "deleter_id"
22
- t.string "deleter_type"
23
- t.integer "thread_id"
24
- t.integer "cached_votes_total", :default => 0
25
- t.integer "cached_votes_up", :default => 0
26
- t.integer "cached_votes_down", :default => 0
27
- t.datetime "created_at", :null => false
28
- t.datetime "updated_at", :null => false
29
- end
30
-
31
- add_index "commontator_comments", ["cached_votes_down"], :name => "index_commontator_comments_on_cached_votes_down"
32
- add_index "commontator_comments", ["cached_votes_total"], :name => "index_commontator_comments_on_cached_votes_total"
33
- add_index "commontator_comments", ["cached_votes_up"], :name => "index_commontator_comments_on_cached_votes_up"
34
- add_index "commontator_comments", ["creator_id", "creator_type", "thread_id"], :name => "index_c_c_on_c_id_and_c_type_and_t_id"
35
- add_index "commontator_comments", ["thread_id"], :name => "index_commontator_comments_on_thread_id"
36
-
37
- create_table "commontator_subscriptions", :force => true do |t|
38
- t.integer "subscriber_id"
39
- t.string "subscriber_type"
40
- t.integer "thread_id"
41
- t.boolean "is_unread"
42
- t.datetime "created_at", :null => false
43
- t.datetime "updated_at", :null => false
44
- end
45
-
46
- add_index "commontator_subscriptions", ["subscriber_id", "subscriber_type", "thread_id"], :name => "index_c_s_on_s_id_and_s_type_and_t_id", :unique => true
47
- add_index "commontator_subscriptions", ["thread_id"], :name => "index_commontator_subscriptions_on_thread_id"
48
-
49
- create_table "commontator_threads", :force => true do |t|
50
- t.integer "commontable_id"
51
- t.string "commontable_type"
52
- t.datetime "closed_at"
53
- t.integer "closer_id"
54
- t.string "closer_type"
55
- t.datetime "created_at", :null => false
56
- t.datetime "updated_at", :null => false
57
- end
58
-
59
- add_index "commontator_threads", ["commontable_id", "commontable_type"], :name => "index_commontator_threads_on_commontable_id_and_commontable_type"
60
-
61
- create_table "dummy_models", :force => true do |t|
62
- t.datetime "created_at", :null => false
63
- t.datetime "updated_at", :null => false
64
- end
65
-
66
- create_table "users", :force => true do |t|
67
- t.datetime "created_at", :null => false
68
- t.datetime "updated_at", :null => false
69
- end
70
-
71
- end