commontator 4.10.3 → 4.10.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (131) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +7 -6
  3. data/app/models/commontator/subscription.rb +4 -2
  4. data/app/models/commontator/subscription.rb~ +23 -0
  5. data/app/views/commontator/comments/_votes.html.erb +8 -8
  6. data/config/locales/{commontator/en.yml → en.yml} +0 -0
  7. data/lib/commontator/engine.rb +0 -3
  8. data/lib/commontator/version.rb +1 -1
  9. data/lib/commontator/version.rb~ +3 -0
  10. data/spec/controllers/commontator/comments_controller_spec.rb +566 -0
  11. data/spec/controllers/commontator/comments_controller_spec.rb~ +565 -0
  12. data/spec/controllers/commontator/subscriptions_controller_spec.rb +102 -0
  13. data/spec/controllers/commontator/subscriptions_controller_spec.rb~ +101 -0
  14. data/spec/controllers/commontator/threads_controller_spec.rb +130 -0
  15. data/spec/controllers/commontator/threads_controller_spec.rb~ +130 -0
  16. data/spec/dummy/README.md +1 -0
  17. data/spec/dummy/README.md~ +3 -0
  18. data/spec/dummy/Rakefile +1 -0
  19. data/spec/dummy/Rakefile~ +6 -0
  20. data/spec/dummy/app/assets/javascripts/application.js +1 -0
  21. data/spec/dummy/app/assets/javascripts/application.js~ +15 -0
  22. data/spec/dummy/app/assets/stylesheets/application.css +1 -0
  23. data/spec/dummy/app/assets/stylesheets/application.css~ +13 -0
  24. data/spec/dummy/app/controllers/application_controller.rb +1 -0
  25. data/spec/dummy/app/controllers/application_controller.rb~ +3 -0
  26. data/spec/dummy/app/controllers/dummy_models_controller.rb +12 -6
  27. data/spec/dummy/app/controllers/dummy_models_controller.rb~ +34 -0
  28. data/spec/dummy/app/helpers/application_helper.rb +4 -3
  29. data/spec/dummy/app/helpers/application_helper.rb~ +15 -0
  30. data/spec/dummy/app/models/dummy_model.rb +1 -0
  31. data/spec/dummy/app/models/dummy_model.rb~ +3 -0
  32. data/spec/dummy/app/models/dummy_user.rb +2 -1
  33. data/spec/dummy/app/models/dummy_user.rb~ +13 -0
  34. data/spec/dummy/app/views/dummy_model/show.html.erb +1 -0
  35. data/spec/dummy/app/views/dummy_model/show.html.erb~ +1 -0
  36. data/spec/dummy/app/views/layouts/application.html.erb +1 -0
  37. data/spec/dummy/app/views/layouts/application.html.erb~ +14 -0
  38. data/spec/dummy/config.ru +1 -0
  39. data/spec/dummy/config.ru~ +4 -0
  40. data/spec/dummy/config/application.rb +1 -0
  41. data/spec/dummy/config/application.rb~ +26 -0
  42. data/spec/dummy/config/boot.rb +1 -0
  43. data/spec/dummy/config/boot.rb~ +5 -0
  44. data/spec/dummy/config/database.yml +1 -0
  45. data/spec/dummy/config/database.yml~ +25 -0
  46. data/spec/dummy/config/environment.rb +1 -0
  47. data/spec/dummy/config/environment.rb~ +5 -0
  48. data/spec/dummy/config/environments/development.rb +1 -0
  49. data/spec/dummy/config/environments/development.rb~ +31 -0
  50. data/spec/dummy/config/environments/production.rb +1 -0
  51. data/spec/dummy/config/environments/production.rb~ +82 -0
  52. data/spec/dummy/config/environments/test.rb +1 -0
  53. data/spec/dummy/config/environments/test.rb~ +40 -0
  54. data/spec/dummy/config/initializers/backtrace_silencers.rb +1 -0
  55. data/spec/dummy/config/initializers/backtrace_silencers.rb~ +7 -0
  56. data/spec/dummy/config/initializers/commontator.rb +1 -0
  57. data/spec/dummy/config/initializers/commontator.rb~ +14 -0
  58. data/spec/dummy/config/initializers/filter_parameter_logging.rb +1 -0
  59. data/spec/dummy/config/initializers/filter_parameter_logging.rb~ +4 -0
  60. data/spec/dummy/config/initializers/inflections.rb +1 -0
  61. data/spec/dummy/config/initializers/inflections.rb~ +16 -0
  62. data/spec/dummy/config/initializers/mime_types.rb +1 -0
  63. data/spec/dummy/config/initializers/mime_types.rb~ +5 -0
  64. data/spec/dummy/config/initializers/secret_token.rb +1 -0
  65. data/spec/dummy/config/initializers/secret_token.rb~ +12 -0
  66. data/spec/dummy/config/initializers/session_store.rb +1 -0
  67. data/spec/dummy/config/initializers/session_store.rb~ +3 -0
  68. data/spec/dummy/config/initializers/wrap_parameters.rb +1 -0
  69. data/spec/dummy/config/initializers/wrap_parameters.rb~ +14 -0
  70. data/spec/dummy/config/routes.rb +2 -1
  71. data/spec/dummy/config/routes.rb~ +7 -0
  72. data/spec/dummy/db/migrate/1_create_dummy_models.rb +1 -0
  73. data/spec/dummy/db/migrate/1_create_dummy_models.rb~ +7 -0
  74. data/spec/dummy/db/migrate/2_create_dummy_users.rb +1 -0
  75. data/spec/dummy/db/migrate/2_create_dummy_users.rb~ +7 -0
  76. data/spec/dummy/db/migrate/3_acts_as_votable_migration.rb +1 -0
  77. data/spec/dummy/db/migrate/3_acts_as_votable_migration.rb~ +27 -0
  78. data/spec/dummy/db/test.sqlite3 +0 -0
  79. data/spec/dummy/log/development.log +33 -119
  80. data/spec/dummy/log/test.log +33394 -31595
  81. data/spec/dummy/public/404.html +1 -0
  82. data/spec/dummy/public/404.html~ +26 -0
  83. data/spec/dummy/public/422.html +1 -0
  84. data/spec/dummy/public/422.html~ +26 -0
  85. data/spec/dummy/public/500.html +1 -0
  86. data/spec/dummy/public/500.html~ +25 -0
  87. data/spec/dummy/script/rails +1 -0
  88. data/spec/dummy/script/rails~ +6 -0
  89. data/spec/dummy/tmp/cache/assets/test/sprockets/{72b63dddbc5c995f79af8e3c94904fd9 → 02d4b791eb831cf2057bf4703a1218d1} +0 -0
  90. data/spec/dummy/tmp/cache/assets/test/sprockets/{a77b1a9223d168112e1705c29220116f → 0f196a1a50363b0a076ec6e1ee5417f6} +0 -0
  91. data/spec/dummy/tmp/cache/assets/test/sprockets/{afa63eb365bdf4f42584b17ac9176b9d → a3fb9025f90ff05a6fd4afc7ded2692c} +0 -0
  92. data/spec/dummy/tmp/cache/assets/test/sprockets/a41c8be5379abec3c0d0d98e2f0d5609 +0 -0
  93. data/spec/dummy/tmp/cache/assets/test/sprockets/{a473b3873e554893372a53d71f5e9879 → c69ee3cc5796188d873574179290a6ef} +0 -0
  94. data/spec/dummy/tmp/cache/assets/test/sprockets/{f721383d531f067d82b071e14aed7a92 → e1f674c11941d62aac1764ef3a7134e4} +0 -0
  95. data/spec/dummy/tmp/cache/assets/test/sprockets/{d2244ccef8e05bb993f75715af0344cc → e85565206c3e5fdf9dfeb367c85557b1} +0 -0
  96. data/spec/helpers/commontator/application_helper_spec.rb +10 -0
  97. data/spec/helpers/commontator/application_helper_spec.rb~ +9 -0
  98. data/spec/lib/commontator/acts_as_commontable_spec.rb +16 -15
  99. data/spec/lib/commontator/acts_as_commontable_spec.rb~ +25 -0
  100. data/spec/lib/commontator/acts_as_commontator_spec.rb +17 -16
  101. data/spec/lib/commontator/acts_as_commontator_spec.rb~ +52 -0
  102. data/spec/lib/commontator/commontable_config_spec.rb +9 -8
  103. data/spec/lib/commontator/commontable_config_spec.rb~ +29 -0
  104. data/spec/lib/commontator/commontator_config_spec.rb +9 -8
  105. data/spec/lib/commontator/commontator_config_spec.rb~ +29 -0
  106. data/spec/lib/commontator/controller_includes_spec.rb +10 -7
  107. data/spec/lib/commontator/controller_includes_spec.rb~ +18 -0
  108. data/spec/lib/commontator/shared_helper_spec.rb +14 -9
  109. data/spec/lib/commontator/shared_helper_spec.rb~ +22 -0
  110. data/spec/lib/commontator_spec.rb +7 -6
  111. data/spec/lib/commontator_spec.rb~ +26 -0
  112. data/spec/mailers/commontator/subscriptions_mailer_spec.rb +30 -0
  113. data/spec/{app/mailers/commontator/subscriptions_mailer_spec.rb → mailers/commontator/subscriptions_mailer_spec.rb~} +12 -12
  114. data/spec/models/commontator/comment_spec.rb +82 -0
  115. data/spec/models/commontator/comment_spec.rb~ +82 -0
  116. data/spec/{app/models → models}/commontator/subscription_spec.rb +14 -13
  117. data/spec/models/commontator/subscription_spec.rb~ +38 -0
  118. data/spec/models/commontator/thread_spec.rb +122 -0
  119. data/spec/{app/models/commontator/thread_spec.rb → models/commontator/thread_spec.rb~} +52 -50
  120. data/spec/rails_helper.rb +71 -0
  121. data/spec/rails_helper.rb~ +74 -0
  122. data/spec/spec_helper.rb +77 -27
  123. data/spec/spec_helper.rb~ +86 -0
  124. metadata +184 -78
  125. data/spec/app/controllers/commontator/comments_controller_spec.rb +0 -582
  126. data/spec/app/controllers/commontator/subscriptions_controller_spec.rb +0 -99
  127. data/spec/app/controllers/commontator/threads_controller_spec.rb +0 -127
  128. data/spec/app/helpers/commontator/application_helper_spec.rb +0 -9
  129. data/spec/app/models/commontator/comment_spec.rb +0 -73
  130. data/spec/dummy/db/development.sqlite3 +0 -0
  131. data/spec/dummy/tmp/cache/assets/test/sprockets/decb63cac838a5314aa0c22a979f5ac9 +0 -0
@@ -38,3 +38,4 @@ Dummy::Application.configure do
38
38
 
39
39
  config.active_support.test_order = :sorted
40
40
  end
41
+
@@ -0,0 +1,40 @@
1
+ Dummy::Application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb.
3
+
4
+ # The test environment is used exclusively to run your application's
5
+ # test suite. You never need to work with it otherwise. Remember that
6
+ # your test database is "scratch space" for the test suite and is wiped
7
+ # and recreated between test runs. Don't rely on the data there!
8
+ config.cache_classes = true
9
+
10
+ # Do not eager load code on boot. This avoids loading your whole application
11
+ # just for the purpose of running a single test. If you are using a tool that
12
+ # preloads Rails for running tests, you may have to set it to true.
13
+ config.eager_load = false
14
+
15
+ # Configure static asset server for tests with Cache-Control for performance.
16
+ config.serve_static_files = true
17
+ config.static_cache_control = "public, max-age=3600"
18
+
19
+ # Show full error reports and disable caching.
20
+ config.consider_all_requests_local = true
21
+ config.action_controller.perform_caching = false
22
+
23
+ # Raise exceptions instead of rendering exception templates.
24
+ config.action_dispatch.show_exceptions = false
25
+
26
+ # Disable request forgery protection in test environment.
27
+ config.action_controller.allow_forgery_protection = false
28
+
29
+ # Tell Action Mailer not to deliver emails to the real world.
30
+ # The :test delivery method accumulates sent emails in the
31
+ # ActionMailer::Base.deliveries array.
32
+ config.action_mailer.delivery_method = :test
33
+
34
+ config.action_mailer.default_url_options = { :host => "test.example.com" }
35
+
36
+ # Print deprecation notices to the stderr.
37
+ config.active_support.deprecation = :stderr
38
+
39
+ config.active_support.test_order = :sorted
40
+ end
@@ -5,3 +5,4 @@
5
5
 
6
6
  # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
7
7
  # Rails.backtrace_cleaner.remove_silencers!
8
+
@@ -0,0 +1,7 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
4
+ # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
5
+
6
+ # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
7
+ # Rails.backtrace_cleaner.remove_silencers!
@@ -12,3 +12,4 @@ Commontator.configure do |config|
12
12
 
13
13
  config.thread_subscription = :m
14
14
  end
15
+
@@ -0,0 +1,14 @@
1
+ # Dummy application configuration file
2
+ Commontator.configure do |config|
3
+ config.javascript_proc = lambda { |view| '// Some javascript' }
4
+
5
+ config.user_name_proc = lambda { |user| user.try(:name) || 'Anonymous' }
6
+
7
+ config.thread_read_proc = lambda { |thread, user| user && user.can_read }
8
+
9
+ config.thread_moderator_proc = lambda { |thread, user| user.is_admin || user.can_edit }
10
+
11
+ config.comment_voting = :ld
12
+
13
+ config.thread_subscription = :m
14
+ end
@@ -2,3 +2,4 @@
2
2
 
3
3
  # Configure sensitive parameters which will be filtered from the log file.
4
4
  Rails.application.config.filter_parameters += [:password]
5
+
@@ -0,0 +1,4 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Configure sensitive parameters which will be filtered from the log file.
4
+ Rails.application.config.filter_parameters += [:password]
@@ -14,3 +14,4 @@
14
14
  # ActiveSupport::Inflector.inflections(:en) do |inflect|
15
15
  # inflect.acronym 'RESTful'
16
16
  # end
17
+
@@ -0,0 +1,16 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Add new inflection rules using the following format. Inflections
4
+ # are locale specific, and you may define rules for as many different
5
+ # locales as you wish. All of these examples are active by default:
6
+ # ActiveSupport::Inflector.inflections(:en) do |inflect|
7
+ # inflect.plural /^(ox)$/i, '\1en'
8
+ # inflect.singular /^(ox)en/i, '\1'
9
+ # inflect.irregular 'person', 'people'
10
+ # inflect.uncountable %w( fish sheep )
11
+ # end
12
+
13
+ # These inflection rules are supported but not enabled by default:
14
+ # ActiveSupport::Inflector.inflections(:en) do |inflect|
15
+ # inflect.acronym 'RESTful'
16
+ # end
@@ -3,3 +3,4 @@
3
3
  # Add new mime types for use in respond_to blocks:
4
4
  # Mime::Type.register "text/richtext", :rtf
5
5
  # Mime::Type.register_alias "text/html", :iphone
6
+
@@ -0,0 +1,5 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Add new mime types for use in respond_to blocks:
4
+ # Mime::Type.register "text/richtext", :rtf
5
+ # Mime::Type.register_alias "text/html", :iphone
@@ -10,3 +10,4 @@
10
10
  # Make sure your secret_key_base is kept private
11
11
  # if you're sharing your code publicly.
12
12
  Dummy::Application.config.secret_key_base = 'dummy'
13
+
@@ -0,0 +1,12 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Your secret key is used for verifying the integrity of signed cookies.
4
+ # If you change this key, all old signed cookies will become invalid!
5
+
6
+ # Make sure the secret is at least 30 characters and all random,
7
+ # no regular words or you'll be exposed to dictionary attacks.
8
+ # You can use `rake secret` to generate a secure secret key.
9
+
10
+ # Make sure your secret_key_base is kept private
11
+ # if you're sharing your code publicly.
12
+ Dummy::Application.config.secret_key_base = 'dummy'
@@ -1,3 +1,4 @@
1
1
  # Be sure to restart your server when you modify this file.
2
2
 
3
3
  Dummy::Application.config.session_store :cookie_store, key: '_dummy_session'
4
+
@@ -0,0 +1,3 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ Dummy::Application.config.session_store :cookie_store, key: '_dummy_session'
@@ -12,3 +12,4 @@ end
12
12
  # ActiveSupport.on_load(:active_record) do
13
13
  # self.include_root_in_json = true
14
14
  # end
15
+
@@ -0,0 +1,14 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # This file contains settings for ActionController::ParamsWrapper which
4
+ # is enabled by default.
5
+
6
+ # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
7
+ ActiveSupport.on_load(:action_controller) do
8
+ wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
9
+ end
10
+
11
+ # To enable root element in JSON for ActiveRecord objects.
12
+ # ActiveSupport.on_load(:active_record) do
13
+ # self.include_root_in_json = true
14
+ # end
@@ -2,6 +2,7 @@ Rails.application.routes.draw do
2
2
  resources :dummy_models, :only => [:show] do
3
3
  get :hide, :on => :member
4
4
  end
5
-
5
+
6
6
  mount Commontator::Engine => "/commontator"
7
7
  end
8
+
@@ -0,0 +1,7 @@
1
+ Rails.application.routes.draw do
2
+ resources :dummy_models, :only => [:show] do
3
+ get :hide, :on => :member
4
+ end
5
+
6
+ mount Commontator::Engine => "/commontator"
7
+ end
@@ -5,3 +5,4 @@ class CreateDummyModels < ActiveRecord::Migration
5
5
  end
6
6
  end
7
7
  end
8
+
@@ -0,0 +1,7 @@
1
+ class CreateDummyModels < ActiveRecord::Migration
2
+ def change
3
+ create_table "dummy_models" do |t|
4
+ t.timestamps
5
+ end
6
+ end
7
+ end
@@ -5,3 +5,4 @@ class CreateDummyUsers < ActiveRecord::Migration
5
5
  end
6
6
  end
7
7
  end
8
+
@@ -0,0 +1,7 @@
1
+ class CreateDummyUsers < ActiveRecord::Migration
2
+ def change
3
+ create_table "dummy_users" do |t|
4
+ t.timestamps
5
+ end
6
+ end
7
+ end
@@ -25,3 +25,4 @@ class ActsAsVotableMigration < ActiveRecord::Migration
25
25
  drop_table :votes
26
26
  end
27
27
  end
28
+
@@ -0,0 +1,27 @@
1
+ class ActsAsVotableMigration < ActiveRecord::Migration
2
+ def self.up
3
+ create_table :votes do |t|
4
+
5
+ t.references :votable, :polymorphic => true
6
+ t.references :voter, :polymorphic => true
7
+
8
+ t.boolean :vote_flag
9
+ t.string :vote_scope
10
+ t.integer :vote_weight
11
+
12
+ t.timestamps
13
+ end
14
+
15
+ if ActiveRecord::VERSION::MAJOR < 4
16
+ add_index :votes, [:votable_id, :votable_type]
17
+ add_index :votes, [:voter_id, :voter_type]
18
+ end
19
+
20
+ add_index :votes, [:voter_id, :voter_type, :vote_scope]
21
+ add_index :votes, [:votable_id, :votable_type, :vote_scope]
22
+ end
23
+
24
+ def self.down
25
+ drop_table :votes
26
+ end
27
+ end
Binary file
@@ -1,103 +1,23 @@
1
-  (1.5ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
1
+  (4.4ms) CREATE TABLE "commontator_comments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "creator_type" varchar, "creator_id" integer, "editor_type" varchar, "editor_id" integer, "thread_id" integer NOT NULL, "body" text NOT NULL, "deleted_at" datetime, "cached_votes_up" integer DEFAULT 0, "cached_votes_down" integer DEFAULT 0, "created_at" datetime, "updated_at" datetime) 
2
2
   (0.1ms) select sqlite_version(*)
3
-  (0.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
4
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
5
- Migrating to InstallCommontator (0)
6
-  (0.0ms) begin transaction
7
-  (0.4ms) CREATE TABLE "commontator_comments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "creator_type" varchar(255), "creator_id" integer, "editor_type" varchar(255), "editor_id" integer, "thread_id" integer NOT NULL, "body" text NOT NULL, "deleted_at" datetime, "cached_votes_up" integer DEFAULT 0, "cached_votes_down" integer DEFAULT 0, "created_at" datetime, "updated_at" datetime)
8
-  (0.1ms) CREATE INDEX "index_commontator_comments_on_c_id_and_c_type_and_t_id" ON "commontator_comments" ("creator_id", "creator_type", "thread_id")
3
+  (2.9ms) CREATE INDEX "index_commontator_comments_on_cached_votes_down" ON "commontator_comments" ("cached_votes_down")
9
4
   (0.1ms) SELECT sql
10
5
  FROM sqlite_master
11
- WHERE name='index_commontator_comments_on_c_id_and_c_type_and_t_id' AND type='index'
6
+ WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index'
12
7
  UNION ALL
13
8
  SELECT sql
14
9
  FROM sqlite_temp_master
15
- WHERE name='index_commontator_comments_on_c_id_and_c_type_and_t_id' AND type='index'
10
+ WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index'
16
11
 
17
-  (0.1ms) CREATE INDEX "index_commontator_comments_on_thread_id_and_created_at" ON "commontator_comments" ("thread_id", "created_at")
12
+  (2.6ms) CREATE INDEX "index_commontator_comments_on_cached_votes_up" ON "commontator_comments" ("cached_votes_up")
18
13
   (0.1ms) SELECT sql
19
- FROM sqlite_master
20
- WHERE name='index_commontator_comments_on_thread_id_and_created_at' AND type='index'
21
- UNION ALL
22
- SELECT sql
23
- FROM sqlite_temp_master
24
- WHERE name='index_commontator_comments_on_thread_id_and_created_at' AND type='index'
25
-
26
-  (0.1ms)  SELECT sql
27
- FROM sqlite_master
28
- WHERE name='index_commontator_comments_on_c_id_and_c_type_and_t_id' AND type='index'
29
- UNION ALL
30
- SELECT sql
31
- FROM sqlite_temp_master
32
- WHERE name='index_commontator_comments_on_c_id_and_c_type_and_t_id' AND type='index'
33
- 
34
-  (0.1ms) CREATE INDEX "index_commontator_comments_on_cached_votes_up" ON "commontator_comments" ("cached_votes_up")
35
-  (0.1ms)  SELECT sql
36
14
  FROM sqlite_master
37
15
  WHERE name='index_commontator_comments_on_cached_votes_up' AND type='index'
38
16
  UNION ALL
39
17
  SELECT sql
40
18
  FROM sqlite_temp_master
41
19
  WHERE name='index_commontator_comments_on_cached_votes_up' AND type='index'
42
- 
43
-  (0.1ms) SELECT sql
44
- FROM sqlite_master
45
- WHERE name='index_commontator_comments_on_thread_id_and_created_at' AND type='index'
46
- UNION ALL
47
- SELECT sql
48
- FROM sqlite_temp_master
49
- WHERE name='index_commontator_comments_on_thread_id_and_created_at' AND type='index'
50
20
 
51
-  (0.1ms)  SELECT sql
52
- FROM sqlite_master
53
- WHERE name='index_commontator_comments_on_c_id_and_c_type_and_t_id' AND type='index'
54
- UNION ALL
55
- SELECT sql
56
- FROM sqlite_temp_master
57
- WHERE name='index_commontator_comments_on_c_id_and_c_type_and_t_id' AND type='index'
58
- 
59
-  (0.1ms) CREATE INDEX "index_commontator_comments_on_cached_votes_down" ON "commontator_comments" ("cached_votes_down")
60
-  (0.3ms) CREATE TABLE "commontator_subscriptions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "subscriber_type" varchar(255) NOT NULL, "subscriber_id" integer NOT NULL, "thread_id" integer NOT NULL, "created_at" datetime, "updated_at" datetime) 
61
-  (0.5ms) CREATE UNIQUE INDEX "index_commontator_subscriptions_on_s_id_and_s_type_and_t_id" ON "commontator_subscriptions" ("subscriber_id", "subscriber_type", "thread_id")
62
-  (0.1ms)  SELECT sql
63
- FROM sqlite_master
64
- WHERE name='index_commontator_subscriptions_on_s_id_and_s_type_and_t_id' AND type='index'
65
- UNION ALL
66
- SELECT sql
67
- FROM sqlite_temp_master
68
- WHERE name='index_commontator_subscriptions_on_s_id_and_s_type_and_t_id' AND type='index'
69
- 
70
-  (0.1ms) CREATE INDEX "index_commontator_subscriptions_on_thread_id" ON "commontator_subscriptions" ("thread_id")
71
-  (0.1ms) CREATE TABLE "commontator_threads" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "commontable_type" varchar(255), "commontable_id" integer, "closed_at" datetime, "closer_type" varchar(255), "closer_id" integer, "created_at" datetime, "updated_at" datetime) 
72
-  (0.1ms) CREATE UNIQUE INDEX "index_commontator_threads_on_c_id_and_c_type" ON "commontator_threads" ("commontable_id", "commontable_type")
73
- SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "0"]]
74
-  (0.7ms) commit transaction
75
- Migrating to CreateDummyModels (1)
76
-  (0.0ms) begin transaction
77
-  (0.2ms) CREATE TABLE "dummy_models" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)
78
- SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "1"]]
79
-  (0.6ms) commit transaction
80
- Migrating to CreateDummyUsers (2)
81
-  (0.0ms) begin transaction
82
-  (0.2ms) CREATE TABLE "dummy_users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)
83
- SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "2"]]
84
-  (0.6ms) commit transaction
85
- Migrating to ActsAsVotableMigration (3)
86
-  (0.0ms) begin transaction
87
-  (0.3ms) CREATE TABLE "votes" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "votable_id" integer, "votable_type" varchar(255), "voter_id" integer, "voter_type" varchar(255), "vote_flag" boolean, "vote_scope" varchar(255), "vote_weight" integer, "created_at" datetime, "updated_at" datetime)
88
-  (0.1ms) CREATE INDEX "index_votes_on_voter_id_and_voter_type_and_vote_scope" ON "votes" ("voter_id", "voter_type", "vote_scope")
89
-  (0.1ms) SELECT sql
90
- FROM sqlite_master
91
- WHERE name='index_votes_on_voter_id_and_voter_type_and_vote_scope' AND type='index'
92
- UNION ALL
93
- SELECT sql
94
- FROM sqlite_temp_master
95
- WHERE name='index_votes_on_voter_id_and_voter_type_and_vote_scope' AND type='index'
96
-
97
-  (0.1ms) CREATE INDEX "index_votes_on_votable_id_and_votable_type_and_vote_scope" ON "votes" ("votable_id", "votable_type", "vote_scope")
98
- SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "3"]]
99
-  (0.7ms) commit transaction
100
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
101
21
   (0.1ms)  SELECT sql
102
22
  FROM sqlite_master
103
23
  WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index'
@@ -106,68 +26,62 @@ Migrating to ActsAsVotableMigration (3)
106
26
  FROM sqlite_temp_master
107
27
  WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index'
108
28
  
109
-  (0.1ms) SELECT sql
29
+  (2.5ms) CREATE INDEX "index_commontator_comments_on_c_id_and_c_type_and_t_id" ON "commontator_comments" ("creator_id", "creator_type", "thread_id")
30
+  (0.2ms)  SELECT sql
110
31
  FROM sqlite_master
111
- WHERE name='index_commontator_comments_on_cached_votes_up' AND type='index'
112
- UNION ALL
113
- SELECT sql
114
- FROM sqlite_temp_master
115
- WHERE name='index_commontator_comments_on_cached_votes_up' AND type='index'
116
-
117
-  (0.1ms)  SELECT sql
118
- FROM sqlite_master
119
- WHERE name='index_commontator_comments_on_thread_id_and_created_at' AND type='index'
32
+ WHERE name='index_commontator_comments_on_c_id_and_c_type_and_t_id' AND type='index'
120
33
  UNION ALL
121
34
  SELECT sql
122
35
  FROM sqlite_temp_master
123
- WHERE name='index_commontator_comments_on_thread_id_and_created_at' AND type='index'
36
+ WHERE name='index_commontator_comments_on_c_id_and_c_type_and_t_id' AND type='index'
124
37
  
125
38
   (0.1ms) SELECT sql
126
39
  FROM sqlite_master
127
- WHERE name='index_commontator_comments_on_c_id_and_c_type_and_t_id' AND type='index'
40
+ WHERE name='index_commontator_comments_on_cached_votes_up' AND type='index'
128
41
  UNION ALL
129
42
  SELECT sql
130
43
  FROM sqlite_temp_master
131
- WHERE name='index_commontator_comments_on_c_id_and_c_type_and_t_id' AND type='index'
44
+ WHERE name='index_commontator_comments_on_cached_votes_up' AND type='index'
132
45
 
133
46
   (0.1ms)  SELECT sql
134
47
  FROM sqlite_master
135
- WHERE name='index_commontator_subscriptions_on_thread_id' AND type='index'
48
+ WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index'
136
49
  UNION ALL
137
50
  SELECT sql
138
51
  FROM sqlite_temp_master
139
- WHERE name='index_commontator_subscriptions_on_thread_id' AND type='index'
52
+ WHERE name='index_commontator_comments_on_cached_votes_down' AND type='index'
140
53
  
141
-  (0.1ms) SELECT sql
54
+  (3.1ms) CREATE INDEX "index_commontator_comments_on_thread_id_and_created_at" ON "commontator_comments" ("thread_id", "created_at")
55
+  (3.1ms) CREATE TABLE "commontator_subscriptions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "subscriber_type" varchar NOT NULL, "subscriber_id" integer NOT NULL, "thread_id" integer NOT NULL, "created_at" datetime, "updated_at" datetime) 
56
+  (3.0ms) CREATE UNIQUE INDEX "index_commontator_subscriptions_on_s_id_and_s_type_and_t_id" ON "commontator_subscriptions" ("subscriber_id", "subscriber_type", "thread_id")
57
+  (0.2ms)  SELECT sql
142
58
  FROM sqlite_master
143
59
  WHERE name='index_commontator_subscriptions_on_s_id_and_s_type_and_t_id' AND type='index'
144
60
  UNION ALL
145
61
  SELECT sql
146
62
  FROM sqlite_temp_master
147
63
  WHERE name='index_commontator_subscriptions_on_s_id_and_s_type_and_t_id' AND type='index'
148
-
149
-  (0.1ms)  SELECT sql
150
- FROM sqlite_master
151
- WHERE name='index_commontator_threads_on_c_id_and_c_type' AND type='index'
152
- UNION ALL
153
- SELECT sql
154
- FROM sqlite_temp_master
155
- WHERE name='index_commontator_threads_on_c_id_and_c_type' AND type='index'
156
64
  
157
-  (0.1ms) SELECT sql
65
+  (2.9ms) CREATE INDEX "index_commontator_subscriptions_on_thread_id" ON "commontator_subscriptions" ("thread_id")
66
+  (2.8ms) CREATE TABLE "commontator_threads" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "commontable_type" varchar, "commontable_id" integer, "closed_at" datetime, "closer_type" varchar, "closer_id" integer, "created_at" datetime, "updated_at" datetime) 
67
+  (3.4ms) CREATE UNIQUE INDEX "index_commontator_threads_on_c_id_and_c_type" ON "commontator_threads" ("commontable_id", "commontable_type")
68
+  (3.7ms) CREATE TABLE "dummy_models" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime) 
69
+  (3.1ms) CREATE TABLE "dummy_users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)
70
+  (3.7ms) CREATE TABLE "votes" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "votable_id" integer, "votable_type" varchar, "voter_id" integer, "voter_type" varchar, "vote_flag" boolean, "vote_scope" varchar, "vote_weight" integer, "created_at" datetime, "updated_at" datetime) 
71
+  (2.9ms) CREATE INDEX "index_votes_on_votable_id_and_votable_type_and_vote_scope" ON "votes" ("votable_id", "votable_type", "vote_scope")
72
+  (0.2ms)  SELECT sql
158
73
  FROM sqlite_master
159
74
  WHERE name='index_votes_on_votable_id_and_votable_type_and_vote_scope' AND type='index'
160
75
  UNION ALL
161
76
  SELECT sql
162
77
  FROM sqlite_temp_master
163
78
  WHERE name='index_votes_on_votable_id_and_votable_type_and_vote_scope' AND type='index'
164
-
165
-  (0.1ms)  SELECT sql
166
- FROM sqlite_master
167
- WHERE name='index_votes_on_voter_id_and_voter_type_and_vote_scope' AND type='index'
168
- UNION ALL
169
- SELECT sql
170
- FROM sqlite_temp_master
171
- WHERE name='index_votes_on_voter_id_and_voter_type_and_vote_scope' AND type='index'
172
79
  
173
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
80
+  (3.0ms) CREATE INDEX "index_votes_on_voter_id_and_voter_type_and_vote_scope" ON "votes" ("voter_id", "voter_type", "vote_scope")
81
+  (2.9ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
82
+  (3.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
83
+  (0.1ms) SELECT version FROM "schema_migrations"
84
+  (2.7ms) INSERT INTO "schema_migrations" (version) VALUES ('3')
85
+  (2.6ms) INSERT INTO "schema_migrations" (version) VALUES ('1')
86
+  (2.1ms) INSERT INTO "schema_migrations" (version) VALUES ('2')
87
+  (3.4ms) INSERT INTO "schema_migrations" (version) VALUES ('0')