commontator 0.4.1 → 0.5.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (117) hide show
  1. data/README.md +35 -23
  2. data/app/assets/stylesheets/commontator/comments.css +1 -1
  3. data/app/assets/stylesheets/commontator/comments.css~ +0 -4
  4. data/app/controllers/commontator/application_controller.rb +4 -5
  5. data/app/controllers/commontator/application_controller.rb~ +5 -5
  6. data/app/controllers/commontator/comments_controller.rb +30 -30
  7. data/app/controllers/commontator/comments_controller.rb~ +31 -31
  8. data/app/controllers/commontator/subscriptions_controller.rb +8 -7
  9. data/app/controllers/commontator/subscriptions_controller.rb~ +6 -7
  10. data/app/controllers/commontator/threads_controller.rb +8 -9
  11. data/app/controllers/commontator/threads_controller.rb~ +9 -10
  12. data/app/helpers/commontator/comments_helper.rb~ +14 -24
  13. data/app/helpers/commontator/subscriptions_helper.rb~ +3 -3
  14. data/app/helpers/commontator/threads_helper.rb +0 -8
  15. data/app/helpers/commontator/threads_helper.rb~ +5 -5
  16. data/app/mailers/commontator/subscriptions_mailer.rb +8 -8
  17. data/app/mailers/commontator/subscriptions_mailer.rb~ +9 -10
  18. data/app/models/commontator/comment.rb +14 -6
  19. data/app/models/commontator/comment.rb~ +15 -12
  20. data/app/views/commontator/comments/_actions.html.erb +6 -5
  21. data/app/views/commontator/comments/_actions.html.erb~ +6 -5
  22. data/app/views/commontator/comments/_body.html.erb +2 -1
  23. data/app/views/commontator/comments/_body.html.erb~ +1 -2
  24. data/app/views/commontator/comments/_form.html.erb +8 -3
  25. data/app/views/commontator/comments/_form.html.erb~ +7 -4
  26. data/app/views/commontator/comments/_show.html.erb +11 -8
  27. data/app/views/commontator/comments/_show.html.erb~ +11 -8
  28. data/app/views/commontator/comments/_votes.html.erb +7 -6
  29. data/app/views/commontator/comments/create.js.erb +4 -2
  30. data/app/views/commontator/comments/delete.js.erb +5 -3
  31. data/app/views/commontator/comments/delete.js.erb~ +5 -3
  32. data/app/views/commontator/comments/update.js.erb +1 -1
  33. data/app/views/commontator/comments/update.js.erb~ +1 -1
  34. data/app/views/commontator/comments/vote.js.erb +2 -1
  35. data/app/views/commontator/shared/_thread.html.erb +17 -0
  36. data/app/views/commontator/shared/_thread.html.erb~ +16 -0
  37. data/app/views/commontator/shared/_thread_link.html.erb~ +16 -0
  38. data/app/views/commontator/subscriptions/_link.html.erb +3 -2
  39. data/app/views/commontator/subscriptions/subscribe.js.erb +2 -1
  40. data/app/views/commontator/subscriptions_mailer/comment_created_email.html.erb +1 -1
  41. data/app/views/commontator/threads/_show.html.erb +18 -11
  42. data/app/views/commontator/threads/_show.html.erb~ +18 -11
  43. data/app/views/commontator/threads/show.js.erb +2 -1
  44. data/config/initializers/commontator.rb +14 -14
  45. data/db/migrate/0_install_commontator.rb +3 -3
  46. data/lib/commontator.rb +5 -6
  47. data/lib/commontator.rb~ +5 -6
  48. data/lib/commontator/acts_as_commontable.rb +2 -0
  49. data/lib/commontator/acts_as_commontator.rb +2 -0
  50. data/lib/commontator/controller_includes.rb +23 -0
  51. data/lib/commontator/controller_includes.rb~ +23 -0
  52. data/lib/commontator/shared_helper.rb +42 -0
  53. data/lib/commontator/shared_helper.rb~ +42 -0
  54. data/lib/commontator/shared_methods.rb~ +24 -0
  55. data/lib/commontator/version.rb +1 -1
  56. data/lib/commontator/version.rb~ +1 -1
  57. data/test/dummy/config/initializers/commontator.rb +15 -15
  58. data/test/dummy/db/development.sqlite3 +0 -0
  59. data/test/dummy/db/migrate/1_install_commontator.commontator.rb +3 -3
  60. data/test/dummy/db/schema.rb +3 -3
  61. data/test/dummy/log/development.log +64 -0
  62. metadata +10 -70
  63. data/app/assets/stylesheets/commontator/application.css~ +0 -88
  64. data/app/assets/stylesheets/commontator/threads.css~ +0 -13
  65. data/app/helpers/commontator/application_helper.rb~ +0 -11
  66. data/app/helpers/commontator/comments_helper.rb +0 -51
  67. data/app/helpers/commontator/commontable_helper.rb~ +0 -9
  68. data/app/helpers/commontator/commontator_helper.rb +0 -8
  69. data/app/helpers/commontator/commontator_helper.rb~ +0 -8
  70. data/app/helpers/commontator/subscriptions_helper.rb +0 -8
  71. data/app/mailers/commontator/subscription_mailer.rb~ +0 -38
  72. data/app/models/commontator/subscription.rb~ +0 -21
  73. data/app/models/commontator/thread.rb~ +0 -143
  74. data/app/views/commontator/comments/_votes.html.erb~ +0 -62
  75. data/app/views/commontator/comments/create.js.erb~ +0 -15
  76. data/app/views/commontator/comments/destroy.js.erb~ +0 -1
  77. data/app/views/commontator/comments/edit.html.erb~ +0 -6
  78. data/app/views/commontator/comments/edit.js.erb~ +0 -5
  79. data/app/views/commontator/comments/new.html.erb~ +0 -8
  80. data/app/views/commontator/comments/new.js.erb~ +0 -12
  81. data/app/views/commontator/comments/vote.js.erb~ +0 -5
  82. data/app/views/commontator/shared/_thread_link.html.erb +0 -13
  83. data/app/views/commontator/subscriptions/_index.html.erb~ +0 -16
  84. data/app/views/commontator/subscriptions/_link.html.erb~ +0 -15
  85. data/app/views/commontator/subscriptions/_subscription_link.html.erb~ +0 -13
  86. data/app/views/commontator/subscriptions/create.js.erb~ +0 -5
  87. data/app/views/commontator/subscriptions/destroy.js.erb~ +0 -3
  88. data/app/views/commontator/subscriptions/index.html.erb~ +0 -16
  89. data/app/views/commontator/subscriptions/subscribe.js.erb~ +0 -5
  90. data/app/views/commontator/subscriptions_mailer/comment_created_email.html.erb~ +0 -6
  91. data/app/views/commontator/threads/_actions.html.erb~ +0 -28
  92. data/app/views/commontator/threads/_link.html.erb~ +0 -14
  93. data/app/views/commontator/threads/close.js.erb~ +0 -5
  94. data/app/views/commontator/threads/show.html.erb~ +0 -3
  95. data/app/views/commontator/threads/show.js.erb~ +0 -6
  96. data/config/initializers/commontator.rb~ +0 -179
  97. data/config/routes.rb~ +0 -24
  98. data/db/migrate/0_install_commontator.rb~ +0 -48
  99. data/lib/commontator/acts_as_commontable.rb~ +0 -39
  100. data/lib/commontator/acts_as_commontator.rb~ +0 -28
  101. data/lib/commontator/commontable_config.rb~ +0 -13
  102. data/lib/commontator/commontator_config.rb~ +0 -13
  103. data/lib/commontator/routes.rb~ +0 -37
  104. data/lib/tasks/commontator_tasks.rake~ +0 -41
  105. data/test/dummy/config/initializers/commontator.rb~ +0 -179
  106. data/test/dummy/config/routes.rb~ +0 -3
  107. data/test/functional/comment_thread_subscriptions_controller_test.rb~ +0 -125
  108. data/test/functional/comments_controller_test.rb~ +0 -184
  109. data/test/functional/subscriptions_controller_test.rb~ +0 -122
  110. data/test/unit/comment_test.rb~ +0 -38
  111. data/test/unit/comment_thread_subscription_test.rb~ +0 -18
  112. data/test/unit/comment_thread_test.rb~ +0 -60
  113. data/test/unit/helpers/comment_thread_subscriptions_helper_test.rb~ +0 -7
  114. data/test/unit/helpers/comments_helper_test.rb~ +0 -7
  115. data/test/unit/helpers/subscriptions_helper_test.rb~ +0 -4
  116. data/test/unit/subscription_test.rb~ +0 -15
  117. 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 "commontator_id"
7
- t.string "commontator_type"
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, [:commontator_id, :commontator_type, :thread_id], :name => "index_c_c_on_c_id_and_c_type_and_t_id"
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
@@ -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 "commontator_id"
19
- t.string "commontator_type"
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", ["commontator_id", "commontator_type", "thread_id"], :name => "index_c_c_on_c_id_and_c_type_and_t_id"
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
+  (0.1ms) select sqlite_version(*)
359
+  (289.0ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
360
+  (0.1ms) PRAGMA index_list("schema_migrations")
361
+  (265.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
362
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
363
+ Migrating to InstallCommontator (1)
364
+  (0.0ms) begin transaction
365
+  (0.6ms) CREATE 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) 
366
+  (0.2ms) 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
+  (0.2ms) CREATE 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) 
368
+  (0.0ms) PRAGMA index_list("commontator_comments")
369
+  (0.2ms) CREATE INDEX "index_c_c_on_c_id_and_c_type_and_t_id" ON "commontator_comments" ("creator_id", "creator_type", "thread_id")
370
+  (0.0ms) PRAGMA index_list("commontator_comments")
371
+  (0.0ms) PRAGMA index_info('index_c_c_on_c_id_and_c_type_and_t_id')
372
+  (0.2ms) CREATE INDEX "index_commontator_comments_on_thread_id" ON "commontator_comments" ("thread_id")
373
+  (0.0ms) PRAGMA index_list("commontator_subscriptions")
374
+  (8.3ms) 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
+  (0.0ms) PRAGMA index_list("commontator_subscriptions")
376
+  (0.0ms) PRAGMA index_info('index_c_s_on_s_id_and_s_type_and_t_id')
377
+  (0.2ms) CREATE INDEX "index_commontator_subscriptions_on_thread_id" ON "commontator_subscriptions" ("thread_id")
378
+  (0.0ms) PRAGMA index_list("commontator_threads")
379
+  (0.2ms) CREATE INDEX "index_commontator_threads_on_commontable_id_and_commontable_type" ON "commontator_threads" ("commontable_id", "commontable_type")
380
+  (0.0ms) PRAGMA index_list("commontator_comments")
381
+  (0.0ms) PRAGMA index_info('index_commontator_comments_on_thread_id')
382
+  (0.0ms) PRAGMA index_info('index_c_c_on_c_id_and_c_type_and_t_id')
383
+  (0.2ms) CREATE INDEX "index_commontator_comments_on_cached_votes_total" ON "commontator_comments" ("cached_votes_total")
384
+  (0.0ms) PRAGMA index_list("commontator_comments")
385
+  (0.0ms) PRAGMA index_info('index_commontator_comments_on_cached_votes_total')
386
+  (0.0ms) PRAGMA index_info('index_commontator_comments_on_thread_id')
387
+  (0.0ms) PRAGMA index_info('index_c_c_on_c_id_and_c_type_and_t_id')
388
+  (0.2ms) CREATE INDEX "index_commontator_comments_on_cached_votes_up" ON "commontator_comments" ("cached_votes_up")
389
+  (0.0ms) PRAGMA index_list("commontator_comments")
390
+  (0.0ms) PRAGMA index_info('index_commontator_comments_on_cached_votes_up')
391
+  (0.0ms) PRAGMA index_info('index_commontator_comments_on_cached_votes_total')
392
+  (0.0ms) PRAGMA index_info('index_commontator_comments_on_thread_id')
393
+  (0.0ms) PRAGMA index_info('index_c_c_on_c_id_and_c_type_and_t_id')
394
+  (0.1ms) CREATE INDEX "index_commontator_comments_on_cached_votes_down" ON "commontator_comments" ("cached_votes_down")
395
+  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('1')
396
+  (317.7ms) commit transaction
397
+  (0.4ms) select sqlite_version(*)
398
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"
399
+  (0.1ms) PRAGMA index_list("commontator_comments")
400
+  (0.0ms) PRAGMA index_info('index_commontator_comments_on_cached_votes_down')
401
+  (0.0ms) PRAGMA index_info('index_commontator_comments_on_cached_votes_up')
402
+  (0.0ms) PRAGMA index_info('index_commontator_comments_on_cached_votes_total')
403
+  (0.0ms) PRAGMA index_info('index_commontator_comments_on_thread_id')
404
+  (0.0ms) PRAGMA index_info('index_c_c_on_c_id_and_c_type_and_t_id')
405
+  (0.0ms) PRAGMA index_list("commontator_subscriptions")
406
+  (0.0ms) PRAGMA index_info('index_commontator_subscriptions_on_thread_id')
407
+  (0.0ms) PRAGMA index_info('index_c_s_on_s_id_and_s_type_and_t_id')
408
+  (0.0ms) PRAGMA index_list("commontator_threads")
409
+  (0.0ms) PRAGMA index_info('index_commontator_threads_on_commontable_id_and_commontable_type')
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.1
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 00:00:00.000000000 Z
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/subscriptions/index.html.erb~
123
- - app/views/commontator/subscriptions/_index.html.erb~
124
- - app/views/commontator/subscriptions/create.js.erb~
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/commontator_config.rb~
129
+ - lib/commontator/controller_includes.rb
164
130
  - lib/commontator/version.rb
165
131
  - lib/commontator/engine.rb
166
- - lib/commontator/acts_as_commontator.rb~
167
- - lib/commontator/acts_as_commontable.rb~
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/routes.rb~
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,13 +0,0 @@
1
- .thread_header {
2
- font-size: 16px;
3
- font-weight: bold;
4
- font-style: normal;
5
- }
6
-
7
- .thread_new_comment {
8
- display: none;
9
- }
10
-
11
- .thread_new_comment textarea {
12
- width: 100%;
13
- }
@@ -1,11 +0,0 @@
1
- module Commontator
2
- module ApplicationHelper
3
- def commontable_url(thread)
4
- thread.config.commontable_url_proc.call(main_app, thread.commontable)
5
- end
6
-
7
- def javascript_proc
8
- Commontator.javascript_proc.call(self).html_safe
9
- end
10
- end
11
- end
@@ -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