commontator 0.4.1 → 0.5.12
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +35 -23
- data/app/assets/stylesheets/commontator/comments.css +1 -1
- data/app/assets/stylesheets/commontator/comments.css~ +0 -4
- data/app/controllers/commontator/application_controller.rb +4 -5
- data/app/controllers/commontator/application_controller.rb~ +5 -5
- data/app/controllers/commontator/comments_controller.rb +30 -30
- data/app/controllers/commontator/comments_controller.rb~ +31 -31
- data/app/controllers/commontator/subscriptions_controller.rb +8 -7
- data/app/controllers/commontator/subscriptions_controller.rb~ +6 -7
- data/app/controllers/commontator/threads_controller.rb +8 -9
- data/app/controllers/commontator/threads_controller.rb~ +9 -10
- data/app/helpers/commontator/comments_helper.rb~ +14 -24
- data/app/helpers/commontator/subscriptions_helper.rb~ +3 -3
- data/app/helpers/commontator/threads_helper.rb +0 -8
- data/app/helpers/commontator/threads_helper.rb~ +5 -5
- data/app/mailers/commontator/subscriptions_mailer.rb +8 -8
- data/app/mailers/commontator/subscriptions_mailer.rb~ +9 -10
- data/app/models/commontator/comment.rb +14 -6
- data/app/models/commontator/comment.rb~ +15 -12
- data/app/views/commontator/comments/_actions.html.erb +6 -5
- data/app/views/commontator/comments/_actions.html.erb~ +6 -5
- data/app/views/commontator/comments/_body.html.erb +2 -1
- data/app/views/commontator/comments/_body.html.erb~ +1 -2
- data/app/views/commontator/comments/_form.html.erb +8 -3
- data/app/views/commontator/comments/_form.html.erb~ +7 -4
- data/app/views/commontator/comments/_show.html.erb +11 -8
- data/app/views/commontator/comments/_show.html.erb~ +11 -8
- data/app/views/commontator/comments/_votes.html.erb +7 -6
- data/app/views/commontator/comments/create.js.erb +4 -2
- data/app/views/commontator/comments/delete.js.erb +5 -3
- data/app/views/commontator/comments/delete.js.erb~ +5 -3
- data/app/views/commontator/comments/update.js.erb +1 -1
- data/app/views/commontator/comments/update.js.erb~ +1 -1
- data/app/views/commontator/comments/vote.js.erb +2 -1
- data/app/views/commontator/shared/_thread.html.erb +17 -0
- data/app/views/commontator/shared/_thread.html.erb~ +16 -0
- data/app/views/commontator/shared/_thread_link.html.erb~ +16 -0
- data/app/views/commontator/subscriptions/_link.html.erb +3 -2
- data/app/views/commontator/subscriptions/subscribe.js.erb +2 -1
- data/app/views/commontator/subscriptions_mailer/comment_created_email.html.erb +1 -1
- data/app/views/commontator/threads/_show.html.erb +18 -11
- data/app/views/commontator/threads/_show.html.erb~ +18 -11
- data/app/views/commontator/threads/show.js.erb +2 -1
- data/config/initializers/commontator.rb +14 -14
- data/db/migrate/0_install_commontator.rb +3 -3
- data/lib/commontator.rb +5 -6
- data/lib/commontator.rb~ +5 -6
- data/lib/commontator/acts_as_commontable.rb +2 -0
- data/lib/commontator/acts_as_commontator.rb +2 -0
- data/lib/commontator/controller_includes.rb +23 -0
- data/lib/commontator/controller_includes.rb~ +23 -0
- data/lib/commontator/shared_helper.rb +42 -0
- data/lib/commontator/shared_helper.rb~ +42 -0
- data/lib/commontator/shared_methods.rb~ +24 -0
- data/lib/commontator/version.rb +1 -1
- data/lib/commontator/version.rb~ +1 -1
- data/test/dummy/config/initializers/commontator.rb +15 -15
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/db/migrate/1_install_commontator.commontator.rb +3 -3
- data/test/dummy/db/schema.rb +3 -3
- data/test/dummy/log/development.log +64 -0
- metadata +10 -70
- data/app/assets/stylesheets/commontator/application.css~ +0 -88
- data/app/assets/stylesheets/commontator/threads.css~ +0 -13
- data/app/helpers/commontator/application_helper.rb~ +0 -11
- data/app/helpers/commontator/comments_helper.rb +0 -51
- data/app/helpers/commontator/commontable_helper.rb~ +0 -9
- data/app/helpers/commontator/commontator_helper.rb +0 -8
- data/app/helpers/commontator/commontator_helper.rb~ +0 -8
- data/app/helpers/commontator/subscriptions_helper.rb +0 -8
- data/app/mailers/commontator/subscription_mailer.rb~ +0 -38
- data/app/models/commontator/subscription.rb~ +0 -21
- data/app/models/commontator/thread.rb~ +0 -143
- data/app/views/commontator/comments/_votes.html.erb~ +0 -62
- data/app/views/commontator/comments/create.js.erb~ +0 -15
- data/app/views/commontator/comments/destroy.js.erb~ +0 -1
- data/app/views/commontator/comments/edit.html.erb~ +0 -6
- data/app/views/commontator/comments/edit.js.erb~ +0 -5
- data/app/views/commontator/comments/new.html.erb~ +0 -8
- data/app/views/commontator/comments/new.js.erb~ +0 -12
- data/app/views/commontator/comments/vote.js.erb~ +0 -5
- data/app/views/commontator/shared/_thread_link.html.erb +0 -13
- data/app/views/commontator/subscriptions/_index.html.erb~ +0 -16
- data/app/views/commontator/subscriptions/_link.html.erb~ +0 -15
- data/app/views/commontator/subscriptions/_subscription_link.html.erb~ +0 -13
- data/app/views/commontator/subscriptions/create.js.erb~ +0 -5
- data/app/views/commontator/subscriptions/destroy.js.erb~ +0 -3
- data/app/views/commontator/subscriptions/index.html.erb~ +0 -16
- data/app/views/commontator/subscriptions/subscribe.js.erb~ +0 -5
- data/app/views/commontator/subscriptions_mailer/comment_created_email.html.erb~ +0 -6
- data/app/views/commontator/threads/_actions.html.erb~ +0 -28
- data/app/views/commontator/threads/_link.html.erb~ +0 -14
- data/app/views/commontator/threads/close.js.erb~ +0 -5
- data/app/views/commontator/threads/show.html.erb~ +0 -3
- data/app/views/commontator/threads/show.js.erb~ +0 -6
- data/config/initializers/commontator.rb~ +0 -179
- data/config/routes.rb~ +0 -24
- data/db/migrate/0_install_commontator.rb~ +0 -48
- data/lib/commontator/acts_as_commontable.rb~ +0 -39
- data/lib/commontator/acts_as_commontator.rb~ +0 -28
- data/lib/commontator/commontable_config.rb~ +0 -13
- data/lib/commontator/commontator_config.rb~ +0 -13
- data/lib/commontator/routes.rb~ +0 -37
- data/lib/tasks/commontator_tasks.rake~ +0 -41
- data/test/dummy/config/initializers/commontator.rb~ +0 -179
- data/test/dummy/config/routes.rb~ +0 -3
- data/test/functional/comment_thread_subscriptions_controller_test.rb~ +0 -125
- data/test/functional/comments_controller_test.rb~ +0 -184
- data/test/functional/subscriptions_controller_test.rb~ +0 -122
- data/test/unit/comment_test.rb~ +0 -38
- data/test/unit/comment_thread_subscription_test.rb~ +0 -18
- data/test/unit/comment_thread_test.rb~ +0 -60
- data/test/unit/helpers/comment_thread_subscriptions_helper_test.rb~ +0 -7
- data/test/unit/helpers/comments_helper_test.rb~ +0 -7
- data/test/unit/helpers/subscriptions_helper_test.rb~ +0 -4
- data/test/unit/subscription_test.rb~ +0 -15
- data/test/unit/thread_test.rb~ +0 -57
Binary file
|
@@ -3,8 +3,8 @@ class InstallCommontator < ActiveRecord::Migration
|
|
3
3
|
def change
|
4
4
|
create_table "commontator_comments" do |t|
|
5
5
|
t.text "body"
|
6
|
-
t.integer "
|
7
|
-
t.string "
|
6
|
+
t.integer "creator_id"
|
7
|
+
t.string "creator_type"
|
8
8
|
t.datetime "deleted_at"
|
9
9
|
t.integer "deleter_id"
|
10
10
|
t.string "deleter_type"
|
@@ -36,7 +36,7 @@ class InstallCommontator < ActiveRecord::Migration
|
|
36
36
|
t.timestamps
|
37
37
|
end
|
38
38
|
|
39
|
-
add_index :commontator_comments, [:
|
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
40
|
add_index :commontator_comments, :thread_id
|
41
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
42
|
add_index :commontator_subscriptions, :thread_id
|
data/test/dummy/db/schema.rb
CHANGED
@@ -15,8 +15,8 @@ ActiveRecord::Schema.define(:version => 1) do
|
|
15
15
|
|
16
16
|
create_table "commontator_comments", :force => true do |t|
|
17
17
|
t.text "body"
|
18
|
-
t.integer "
|
19
|
-
t.string "
|
18
|
+
t.integer "creator_id"
|
19
|
+
t.string "creator_type"
|
20
20
|
t.datetime "deleted_at"
|
21
21
|
t.integer "deleter_id"
|
22
22
|
t.string "deleter_type"
|
@@ -31,7 +31,7 @@ ActiveRecord::Schema.define(:version => 1) do
|
|
31
31
|
add_index "commontator_comments", ["cached_votes_down"], :name => "index_commontator_comments_on_cached_votes_down"
|
32
32
|
add_index "commontator_comments", ["cached_votes_total"], :name => "index_commontator_comments_on_cached_votes_total"
|
33
33
|
add_index "commontator_comments", ["cached_votes_up"], :name => "index_commontator_comments_on_cached_votes_up"
|
34
|
-
add_index "commontator_comments", ["
|
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
35
|
add_index "commontator_comments", ["thread_id"], :name => "index_commontator_comments_on_thread_id"
|
36
36
|
|
37
37
|
create_table "commontator_subscriptions", :force => true do |t|
|
@@ -348,3 +348,67 @@ Connecting to database specified by database.yml
|
|
348
348
|
Connecting to database specified by database.yml
|
349
349
|
Connecting to database specified by database.yml
|
350
350
|
Connecting to database specified by database.yml
|
351
|
+
Connecting to database specified by database.yml
|
352
|
+
Connecting to database specified by database.yml
|
353
|
+
Connecting to database specified by database.yml
|
354
|
+
Connecting to database specified by database.yml
|
355
|
+
Connecting to database specified by database.yml
|
356
|
+
Connecting to database specified by database.yml
|
357
|
+
Connecting to database specified by database.yml
|
358
|
+
[1m[36m (0.1ms)[0m [1mselect sqlite_version(*)[0m
|
359
|
+
[1m[35m (289.0ms)[0m CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
|
360
|
+
[1m[36m (0.1ms)[0m [1mPRAGMA index_list("schema_migrations")[0m
|
361
|
+
[1m[35m (265.1ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
362
|
+
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
363
|
+
Migrating to InstallCommontator (1)
|
364
|
+
[1m[35m (0.0ms)[0m begin transaction
|
365
|
+
[1m[36m (0.6ms)[0m [1mCREATE TABLE "commontator_comments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "body" text, "creator_id" integer, "creator_type" varchar(255), "deleted_at" datetime, "deleter_id" integer, "deleter_type" varchar(255), "thread_id" integer, "cached_votes_total" integer DEFAULT 0, "cached_votes_up" integer DEFAULT 0, "cached_votes_down" integer DEFAULT 0, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
366
|
+
[1m[35m (0.2ms)[0m CREATE TABLE "commontator_subscriptions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "subscriber_id" integer, "subscriber_type" varchar(255), "thread_id" integer, "is_unread" boolean, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
367
|
+
[1m[36m (0.2ms)[0m [1mCREATE TABLE "commontator_threads" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "commontable_id" integer, "commontable_type" varchar(255), "closed_at" datetime, "closer_id" integer, "closer_type" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
368
|
+
[1m[35m (0.0ms)[0m PRAGMA index_list("commontator_comments")
|
369
|
+
[1m[36m (0.2ms)[0m [1mCREATE INDEX "index_c_c_on_c_id_and_c_type_and_t_id" ON "commontator_comments" ("creator_id", "creator_type", "thread_id")[0m
|
370
|
+
[1m[35m (0.0ms)[0m PRAGMA index_list("commontator_comments")
|
371
|
+
[1m[36m (0.0ms)[0m [1mPRAGMA index_info('index_c_c_on_c_id_and_c_type_and_t_id')[0m
|
372
|
+
[1m[35m (0.2ms)[0m CREATE INDEX "index_commontator_comments_on_thread_id" ON "commontator_comments" ("thread_id")
|
373
|
+
[1m[36m (0.0ms)[0m [1mPRAGMA index_list("commontator_subscriptions")[0m
|
374
|
+
[1m[35m (8.3ms)[0m CREATE UNIQUE INDEX "index_c_s_on_s_id_and_s_type_and_t_id" ON "commontator_subscriptions" ("subscriber_id", "subscriber_type", "thread_id")
|
375
|
+
[1m[36m (0.0ms)[0m [1mPRAGMA index_list("commontator_subscriptions")[0m
|
376
|
+
[1m[35m (0.0ms)[0m PRAGMA index_info('index_c_s_on_s_id_and_s_type_and_t_id')
|
377
|
+
[1m[36m (0.2ms)[0m [1mCREATE INDEX "index_commontator_subscriptions_on_thread_id" ON "commontator_subscriptions" ("thread_id")[0m
|
378
|
+
[1m[35m (0.0ms)[0m PRAGMA index_list("commontator_threads")
|
379
|
+
[1m[36m (0.2ms)[0m [1mCREATE INDEX "index_commontator_threads_on_commontable_id_and_commontable_type" ON "commontator_threads" ("commontable_id", "commontable_type")[0m
|
380
|
+
[1m[35m (0.0ms)[0m PRAGMA index_list("commontator_comments")
|
381
|
+
[1m[36m (0.0ms)[0m [1mPRAGMA index_info('index_commontator_comments_on_thread_id')[0m
|
382
|
+
[1m[35m (0.0ms)[0m PRAGMA index_info('index_c_c_on_c_id_and_c_type_and_t_id')
|
383
|
+
[1m[36m (0.2ms)[0m [1mCREATE INDEX "index_commontator_comments_on_cached_votes_total" ON "commontator_comments" ("cached_votes_total")[0m
|
384
|
+
[1m[35m (0.0ms)[0m PRAGMA index_list("commontator_comments")
|
385
|
+
[1m[36m (0.0ms)[0m [1mPRAGMA index_info('index_commontator_comments_on_cached_votes_total')[0m
|
386
|
+
[1m[35m (0.0ms)[0m PRAGMA index_info('index_commontator_comments_on_thread_id')
|
387
|
+
[1m[36m (0.0ms)[0m [1mPRAGMA index_info('index_c_c_on_c_id_and_c_type_and_t_id')[0m
|
388
|
+
[1m[35m (0.2ms)[0m CREATE INDEX "index_commontator_comments_on_cached_votes_up" ON "commontator_comments" ("cached_votes_up")
|
389
|
+
[1m[36m (0.0ms)[0m [1mPRAGMA index_list("commontator_comments")[0m
|
390
|
+
[1m[35m (0.0ms)[0m PRAGMA index_info('index_commontator_comments_on_cached_votes_up')
|
391
|
+
[1m[36m (0.0ms)[0m [1mPRAGMA index_info('index_commontator_comments_on_cached_votes_total')[0m
|
392
|
+
[1m[35m (0.0ms)[0m PRAGMA index_info('index_commontator_comments_on_thread_id')
|
393
|
+
[1m[36m (0.0ms)[0m [1mPRAGMA index_info('index_c_c_on_c_id_and_c_type_and_t_id')[0m
|
394
|
+
[1m[35m (0.1ms)[0m CREATE INDEX "index_commontator_comments_on_cached_votes_down" ON "commontator_comments" ("cached_votes_down")
|
395
|
+
[1m[36m (0.1ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES ('1')[0m
|
396
|
+
[1m[35m (317.7ms)[0m commit transaction
|
397
|
+
[1m[36m (0.4ms)[0m [1mselect sqlite_version(*)[0m
|
398
|
+
[1m[35m (0.1ms)[0m SELECT "schema_migrations"."version" FROM "schema_migrations"
|
399
|
+
[1m[36m (0.1ms)[0m [1mPRAGMA index_list("commontator_comments")[0m
|
400
|
+
[1m[35m (0.0ms)[0m PRAGMA index_info('index_commontator_comments_on_cached_votes_down')
|
401
|
+
[1m[36m (0.0ms)[0m [1mPRAGMA index_info('index_commontator_comments_on_cached_votes_up')[0m
|
402
|
+
[1m[35m (0.0ms)[0m PRAGMA index_info('index_commontator_comments_on_cached_votes_total')
|
403
|
+
[1m[36m (0.0ms)[0m [1mPRAGMA index_info('index_commontator_comments_on_thread_id')[0m
|
404
|
+
[1m[35m (0.0ms)[0m PRAGMA index_info('index_c_c_on_c_id_and_c_type_and_t_id')
|
405
|
+
[1m[36m (0.0ms)[0m [1mPRAGMA index_list("commontator_subscriptions")[0m
|
406
|
+
[1m[35m (0.0ms)[0m PRAGMA index_info('index_commontator_subscriptions_on_thread_id')
|
407
|
+
[1m[36m (0.0ms)[0m [1mPRAGMA index_info('index_c_s_on_s_id_and_s_type_and_t_id')[0m
|
408
|
+
[1m[35m (0.0ms)[0m PRAGMA index_list("commontator_threads")
|
409
|
+
[1m[36m (0.0ms)[0m [1mPRAGMA index_info('index_commontator_threads_on_commontable_id_and_commontable_type')[0m
|
410
|
+
Connecting to database specified by database.yml
|
411
|
+
Connecting to database specified by database.yml
|
412
|
+
Connecting to database specified by database.yml
|
413
|
+
Connecting to database specified by database.yml
|
414
|
+
Connecting to database specified by database.yml
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: commontator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.12
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-07-
|
12
|
+
date: 2012-07-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -68,10 +68,8 @@ extra_rdoc_files: []
|
|
68
68
|
files:
|
69
69
|
- app/assets/stylesheets/commontator/application.css
|
70
70
|
- app/assets/stylesheets/commontator/comments.css
|
71
|
-
- app/assets/stylesheets/commontator/application.css~
|
72
71
|
- app/assets/stylesheets/commontator/comments.css~
|
73
72
|
- app/assets/stylesheets/commontator/threads.css
|
74
|
-
- app/assets/stylesheets/commontator/threads.css~
|
75
73
|
- app/assets/images/commontator/upvote.png
|
76
74
|
- app/assets/images/commontator/downvote_hover.png
|
77
75
|
- app/assets/images/commontator/upvote_hover.png
|
@@ -85,22 +83,15 @@ files:
|
|
85
83
|
- app/controllers/commontator/comments_controller.rb
|
86
84
|
- app/controllers/commontator/subscriptions_controller.rb~
|
87
85
|
- app/mailers/commontator/subscriptions_mailer.rb~
|
88
|
-
- app/mailers/commontator/subscription_mailer.rb~
|
89
86
|
- app/mailers/commontator/subscriptions_mailer.rb
|
90
87
|
- app/views/commontator/comments/_body.html.erb
|
91
88
|
- app/views/commontator/comments/_show.html.erb~
|
92
|
-
- app/views/commontator/comments/_votes.html.erb~
|
93
|
-
- app/views/commontator/comments/vote.js.erb~
|
94
|
-
- app/views/commontator/comments/edit.js.erb~
|
95
89
|
- app/views/commontator/comments/_form.html.erb
|
96
90
|
- app/views/commontator/comments/delete.js.erb
|
97
|
-
- app/views/commontator/comments/destroy.js.erb~
|
98
91
|
- app/views/commontator/comments/vote.js.erb
|
99
|
-
- app/views/commontator/comments/new.html.erb~
|
100
92
|
- app/views/commontator/comments/update.js.erb
|
101
93
|
- app/views/commontator/comments/_actions.html.erb~
|
102
94
|
- app/views/commontator/comments/update.js.erb~
|
103
|
-
- app/views/commontator/comments/new.js.erb~
|
104
95
|
- app/views/commontator/comments/_show.html.erb
|
105
96
|
- app/views/commontator/comments/_form.html.erb~
|
106
97
|
- app/views/commontator/comments/delete.js.erb~
|
@@ -110,90 +101,54 @@ files:
|
|
110
101
|
- app/views/commontator/comments/_votes.html.erb
|
111
102
|
- app/views/commontator/comments/create.js.erb
|
112
103
|
- app/views/commontator/comments/new.js.erb
|
113
|
-
- app/views/commontator/comments/edit.html.erb~
|
114
|
-
- app/views/commontator/comments/create.js.erb~
|
115
104
|
- app/views/commontator/subscriptions_mailer/comment_created_email.html.erb
|
116
|
-
- app/views/commontator/subscriptions_mailer/comment_created_email.html.erb~
|
117
105
|
- app/views/commontator/subscriptions/subscribe.js.erb
|
118
|
-
- app/views/commontator/subscriptions/_subscription_link.html.erb~
|
119
|
-
- app/views/commontator/subscriptions/_link.html.erb~
|
120
|
-
- app/views/commontator/subscriptions/destroy.js.erb~
|
121
106
|
- app/views/commontator/subscriptions/_link.html.erb
|
122
|
-
- app/views/commontator/
|
123
|
-
- app/views/commontator/
|
124
|
-
- app/views/commontator/
|
125
|
-
- app/views/commontator/subscriptions/subscribe.js.erb~
|
126
|
-
- app/views/commontator/shared/_thread_link.html.erb
|
127
|
-
- app/views/commontator/threads/show.js.erb~
|
107
|
+
- app/views/commontator/shared/_thread.html.erb~
|
108
|
+
- app/views/commontator/shared/_thread.html.erb
|
109
|
+
- app/views/commontator/shared/_thread_link.html.erb~
|
128
110
|
- app/views/commontator/threads/_show.html.erb~
|
129
|
-
- app/views/commontator/threads/_link.html.erb~
|
130
111
|
- app/views/commontator/threads/show.js.erb
|
131
|
-
- app/views/commontator/threads/close.js.erb~
|
132
|
-
- app/views/commontator/threads/_actions.html.erb~
|
133
112
|
- app/views/commontator/threads/_show.html.erb
|
134
|
-
- app/views/commontator/threads/show.html.erb~
|
135
113
|
- app/models/commontator/comment.rb
|
136
114
|
- app/models/commontator/subscription.rb
|
137
115
|
- app/models/commontator/comment.rb~
|
138
|
-
- app/models/commontator/subscription.rb~
|
139
|
-
- app/models/commontator/thread.rb~
|
140
116
|
- app/models/commontator/thread.rb
|
141
|
-
- app/helpers/commontator/commontable_helper.rb~
|
142
|
-
- app/helpers/commontator/comments_helper.rb
|
143
117
|
- app/helpers/commontator/comments_helper.rb~
|
144
|
-
- app/helpers/commontator/application_helper.rb~
|
145
118
|
- app/helpers/commontator/threads_helper.rb
|
146
|
-
- app/helpers/commontator/subscriptions_helper.rb
|
147
119
|
- app/helpers/commontator/subscriptions_helper.rb~
|
148
120
|
- app/helpers/commontator/threads_helper.rb~
|
149
|
-
- app/helpers/commontator/commontator_helper.rb~
|
150
|
-
- app/helpers/commontator/commontator_helper.rb
|
151
121
|
- app/helpers/commontator/application_helper.rb
|
152
122
|
- config/initializers/commontator.rb
|
153
|
-
- config/initializers/commontator.rb~
|
154
|
-
- config/routes.rb~
|
155
123
|
- config/routes.rb
|
156
|
-
- db/migrate/0_install_commontator.rb~
|
157
124
|
- db/migrate/0_install_commontator.rb
|
158
125
|
- lib/commontator.rb
|
159
126
|
- lib/commontator.rb~
|
160
|
-
- lib/tasks/commontator_tasks.rake~
|
161
127
|
- lib/tasks/commontator_tasks.rake
|
162
128
|
- lib/commontator/acts_as_commontable.rb
|
163
|
-
- lib/commontator/
|
129
|
+
- lib/commontator/controller_includes.rb
|
164
130
|
- lib/commontator/version.rb
|
165
131
|
- lib/commontator/engine.rb
|
166
|
-
- lib/commontator/
|
167
|
-
- lib/commontator/
|
132
|
+
- lib/commontator/shared_methods.rb~
|
133
|
+
- lib/commontator/shared_helper.rb~
|
168
134
|
- lib/commontator/commontable_config.rb
|
169
135
|
- lib/commontator/version.rb~
|
170
|
-
- lib/commontator/
|
136
|
+
- lib/commontator/shared_helper.rb
|
171
137
|
- lib/commontator/acts_as_commontator.rb
|
172
|
-
- lib/commontator/commontable_config.rb~
|
173
138
|
- lib/commontator/commontator_config.rb
|
139
|
+
- lib/commontator/controller_includes.rb~
|
174
140
|
- MIT-LICENSE
|
175
141
|
- Rakefile
|
176
142
|
- README.md
|
177
143
|
- test/test_helper.rb
|
178
144
|
- test/integration/navigation_test.rb
|
179
145
|
- test/unit/subscription_test.rb
|
180
|
-
- test/unit/subscription_test.rb~
|
181
|
-
- test/unit/thread_test.rb~
|
182
|
-
- test/unit/comment_thread_test.rb~
|
183
146
|
- test/unit/comment_test.rb
|
184
|
-
- test/unit/comment_test.rb~
|
185
|
-
- test/unit/comment_thread_subscription_test.rb~
|
186
147
|
- test/unit/thread_test.rb
|
187
148
|
- test/unit/helpers/subscriptions_helper_test.rb
|
188
149
|
- test/unit/helpers/comments_helper_test.rb
|
189
|
-
- test/unit/helpers/comment_thread_subscriptions_helper_test.rb~
|
190
|
-
- test/unit/helpers/subscriptions_helper_test.rb~
|
191
|
-
- test/unit/helpers/comments_helper_test.rb~
|
192
|
-
- test/functional/comments_controller_test.rb~
|
193
150
|
- test/functional/comments_controller_test.rb
|
194
|
-
- test/functional/comment_thread_subscriptions_controller_test.rb~
|
195
151
|
- test/functional/subscriptions_controller_test.rb
|
196
|
-
- test/functional/subscriptions_controller_test.rb~
|
197
152
|
- test/dummy/README.rdoc
|
198
153
|
- test/dummy/log/development.log
|
199
154
|
- test/dummy/db/development.sqlite3
|
@@ -217,14 +172,12 @@ files:
|
|
217
172
|
- test/dummy/config/initializers/wrap_parameters.rb
|
218
173
|
- test/dummy/config/initializers/commontator.rb
|
219
174
|
- test/dummy/config/initializers/secret_token.rb
|
220
|
-
- test/dummy/config/initializers/commontator.rb~
|
221
175
|
- test/dummy/config/initializers/session_store.rb
|
222
176
|
- test/dummy/config/initializers/inflections.rb
|
223
177
|
- test/dummy/config/locales/en.yml
|
224
178
|
- test/dummy/config/boot.rb
|
225
179
|
- test/dummy/config/application.rb
|
226
180
|
- test/dummy/config/environment.rb
|
227
|
-
- test/dummy/config/routes.rb~
|
228
181
|
- test/dummy/config/environments/test.rb
|
229
182
|
- test/dummy/config/environments/production.rb
|
230
183
|
- test/dummy/config/environments/development.rb
|
@@ -258,23 +211,12 @@ test_files:
|
|
258
211
|
- test/test_helper.rb
|
259
212
|
- test/integration/navigation_test.rb
|
260
213
|
- test/unit/subscription_test.rb
|
261
|
-
- test/unit/subscription_test.rb~
|
262
|
-
- test/unit/thread_test.rb~
|
263
|
-
- test/unit/comment_thread_test.rb~
|
264
214
|
- test/unit/comment_test.rb
|
265
|
-
- test/unit/comment_test.rb~
|
266
|
-
- test/unit/comment_thread_subscription_test.rb~
|
267
215
|
- test/unit/thread_test.rb
|
268
216
|
- test/unit/helpers/subscriptions_helper_test.rb
|
269
217
|
- test/unit/helpers/comments_helper_test.rb
|
270
|
-
- test/unit/helpers/comment_thread_subscriptions_helper_test.rb~
|
271
|
-
- test/unit/helpers/subscriptions_helper_test.rb~
|
272
|
-
- test/unit/helpers/comments_helper_test.rb~
|
273
|
-
- test/functional/comments_controller_test.rb~
|
274
218
|
- test/functional/comments_controller_test.rb
|
275
|
-
- test/functional/comment_thread_subscriptions_controller_test.rb~
|
276
219
|
- test/functional/subscriptions_controller_test.rb
|
277
|
-
- test/functional/subscriptions_controller_test.rb~
|
278
220
|
- test/dummy/README.rdoc
|
279
221
|
- test/dummy/log/development.log
|
280
222
|
- test/dummy/db/development.sqlite3
|
@@ -298,14 +240,12 @@ test_files:
|
|
298
240
|
- test/dummy/config/initializers/wrap_parameters.rb
|
299
241
|
- test/dummy/config/initializers/commontator.rb
|
300
242
|
- test/dummy/config/initializers/secret_token.rb
|
301
|
-
- test/dummy/config/initializers/commontator.rb~
|
302
243
|
- test/dummy/config/initializers/session_store.rb
|
303
244
|
- test/dummy/config/initializers/inflections.rb
|
304
245
|
- test/dummy/config/locales/en.yml
|
305
246
|
- test/dummy/config/boot.rb
|
306
247
|
- test/dummy/config/application.rb
|
307
248
|
- test/dummy/config/environment.rb
|
308
|
-
- test/dummy/config/routes.rb~
|
309
249
|
- test/dummy/config/environments/test.rb
|
310
250
|
- test/dummy/config/environments/production.rb
|
311
251
|
- test/dummy/config/environments/development.rb
|
@@ -1,88 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
3
|
-
* listed below.
|
4
|
-
*
|
5
|
-
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
6
|
-
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
|
7
|
-
*
|
8
|
-
* You're free to add application-wide styles to this file and they'll appear at the top of the
|
9
|
-
* compiled file, but it's generally better to create a new file per style scope.
|
10
|
-
*
|
11
|
-
*= require_self
|
12
|
-
*= require_tree .
|
13
|
-
*/
|
14
|
-
|
15
|
-
.comment {
|
16
|
-
font-size: 12px;
|
17
|
-
font-weight: normal;
|
18
|
-
font-style: normal;
|
19
|
-
margin-top: 15px;
|
20
|
-
margin-bottom: 15px;
|
21
|
-
border-left: 1px solid;
|
22
|
-
border-top: 1px solid;
|
23
|
-
padding: 8px;
|
24
|
-
padding-left: 15px;
|
25
|
-
border-color: #ddd;
|
26
|
-
color: #000;
|
27
|
-
background-color: #fff;
|
28
|
-
clear:both;
|
29
|
-
}
|
30
|
-
|
31
|
-
.comment_actions {
|
32
|
-
float:right;
|
33
|
-
}
|
34
|
-
|
35
|
-
.comment_actions a {
|
36
|
-
display:inline;
|
37
|
-
}
|
38
|
-
|
39
|
-
.comment_body_div {
|
40
|
-
float: left;
|
41
|
-
}
|
42
|
-
|
43
|
-
.comment_body {
|
44
|
-
clear:both;
|
45
|
-
margin:3px;
|
46
|
-
padding-left:8px;
|
47
|
-
padding-bottom:6px;
|
48
|
-
padding-top: 8px;
|
49
|
-
float: left;
|
50
|
-
}
|
51
|
-
|
52
|
-
.comment_body pre { /* When showing comments, allow <pre> to wrap */
|
53
|
-
white-space: pre-wrap; /* css-3 */
|
54
|
-
white-space: -moz-pre-wrap !important; /* Mozilla, since 1999 */
|
55
|
-
white-space: -pre-wrap; /* Opera 4-6 */
|
56
|
-
white-space: -o-pre-wrap; /* Opera 7 */
|
57
|
-
word-wrap: break-word; /* Internet Explorer 5.5+ */
|
58
|
-
}
|
59
|
-
|
60
|
-
.comment_profile_picture {
|
61
|
-
float:left;
|
62
|
-
padding-top: 8px;
|
63
|
-
height:auto;
|
64
|
-
}
|
65
|
-
|
66
|
-
.comment_timestamp {
|
67
|
-
color: #777;
|
68
|
-
}
|
69
|
-
|
70
|
-
.comment_votes {
|
71
|
-
float:right;
|
72
|
-
}
|
73
|
-
|
74
|
-
.new_comment_div textarea {
|
75
|
-
width: 100%;
|
76
|
-
}
|
77
|
-
|
78
|
-
.thread_new_comment {
|
79
|
-
display:none;
|
80
|
-
}
|
81
|
-
|
82
|
-
.thread_new_comment_body {
|
83
|
-
width: 100%;
|
84
|
-
}
|
85
|
-
|
86
|
-
.thread_new_comment_link {
|
87
|
-
float:left;
|
88
|
-
}
|
@@ -1,51 +0,0 @@
|
|
1
|
-
module Commontator
|
2
|
-
module CommentsHelper
|
3
|
-
def commontator_name(comment)
|
4
|
-
commontator = comment.commontator
|
5
|
-
return Commontator.commontator_missing_name if commontator.nil?
|
6
|
-
config = commontator.commontator_config
|
7
|
-
config.commontator_name_method.blank? ? config.commontator_missing_name : \
|
8
|
-
commontator.send(config.commontator_name_method)
|
9
|
-
end
|
10
|
-
|
11
|
-
def deleter_name(comment)
|
12
|
-
deleter = comment.deleter
|
13
|
-
return Commontator.commontator_missing_name if deleter.nil?
|
14
|
-
config = deleter.commontator_config
|
15
|
-
config.commontator_name_method.blank? ? config.commontator_missing_name : \
|
16
|
-
deleter.send(config.commontator_name_method)
|
17
|
-
end
|
18
|
-
|
19
|
-
def comment_timestamp(comment)
|
20
|
-
config = comment.thread.config
|
21
|
-
(comment.is_modified? ? 'Last modified on ' : \
|
22
|
-
config.comment_create_verb_past.capitalize + \
|
23
|
-
' on ') + comment.updated_at.strftime(config.timestamp_format)
|
24
|
-
end
|
25
|
-
|
26
|
-
def gravatar_url(comment, options = {})
|
27
|
-
commontator = comment.commontator
|
28
|
-
return '' if commontator.nil?
|
29
|
-
config = commontator.commontator_config
|
30
|
-
|
31
|
-
options[:secure] ||= request.ssl?
|
32
|
-
options[:size] ||= 50
|
33
|
-
|
34
|
-
hash = Digest::MD5.hexdigest(commontator.send(config.commontator_email_method))
|
35
|
-
base = options[:secure] ? "s://secure" : "://www"
|
36
|
-
|
37
|
-
"http#{base}.gravatar.com/avatar/#{hash}?s=#{options[:size]}"
|
38
|
-
end
|
39
|
-
|
40
|
-
def gravatar_image(comment, options = {})
|
41
|
-
commontator = comment.commontator
|
42
|
-
return '' if commontator.nil?
|
43
|
-
config = commontator.commontator_config
|
44
|
-
name = commontator.send(config.commontator_name_method)
|
45
|
-
image_tag(gravatar_url(comment, options),
|
46
|
-
{ :alt => name,
|
47
|
-
:title => name,
|
48
|
-
:border => 1 })
|
49
|
-
end
|
50
|
-
end
|
51
|
-
end
|