reviewable 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (104) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.rdoc +3 -0
  4. data/Rakefile +23 -0
  5. data/app/assets/javascripts/reviewable/application.js +13 -0
  6. data/app/assets/stylesheets/reviewable/application.css +15 -0
  7. data/app/controllers/reviewable/questions_controller.rb +58 -0
  8. data/app/controllers/reviewable/reviewable_controller.rb +5 -0
  9. data/app/controllers/reviewable/reviews_controller.rb +58 -0
  10. data/app/helpers/reviewable/application_helper.rb +4 -0
  11. data/app/models/reviewable/question.rb +37 -0
  12. data/app/models/reviewable/review.rb +24 -0
  13. data/app/views/layouts/reviewable/application.html.erb +14 -0
  14. data/app/views/reviewable/questions/_form.html.erb +28 -0
  15. data/app/views/reviewable/questions/_question.html.erb +10 -0
  16. data/app/views/reviewable/questions/_question.json.jbuilder +10 -0
  17. data/app/views/reviewable/questions/edit.html.erb +3 -0
  18. data/app/views/reviewable/questions/index.html.erb +21 -0
  19. data/app/views/reviewable/questions/index.json.jbuilder +5 -0
  20. data/app/views/reviewable/questions/new.html.erb +3 -0
  21. data/config/routes.rb +3 -0
  22. data/db/migrate/20141013142401_enable_uuid_ossp_extension.rb +7 -0
  23. data/db/migrate/20141013142552_create_reviewable_reviews.rb +15 -0
  24. data/db/migrate/20141013145632_create_reviewable_questions.rb +15 -0
  25. data/lib/reviewable.rb +4 -0
  26. data/lib/reviewable/acts_as_reviewable.rb +25 -0
  27. data/lib/reviewable/engine.rb +22 -0
  28. data/lib/reviewable/version.rb +3 -0
  29. data/lib/tasks/reviewable_tasks.rake +4 -0
  30. data/spec/dummy/README.rdoc +28 -0
  31. data/spec/dummy/Rakefile +6 -0
  32. data/spec/dummy/app/assets/javascripts/application.js +13 -0
  33. data/spec/dummy/app/assets/stylesheets/application.css +15 -0
  34. data/spec/dummy/app/controllers/application_controller.rb +5 -0
  35. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  36. data/spec/dummy/app/models/product.rb +4 -0
  37. data/spec/dummy/app/models/user.rb +2 -0
  38. data/spec/dummy/app/views/layouts/application.html.erb +14 -0
  39. data/spec/dummy/bin/bundle +3 -0
  40. data/spec/dummy/bin/rails +4 -0
  41. data/spec/dummy/bin/rake +4 -0
  42. data/spec/dummy/config.ru +4 -0
  43. data/spec/dummy/config/application.rb +23 -0
  44. data/spec/dummy/config/boot.rb +5 -0
  45. data/spec/dummy/config/database.yml +85 -0
  46. data/spec/dummy/config/environment.rb +5 -0
  47. data/spec/dummy/config/environments/development.rb +37 -0
  48. data/spec/dummy/config/environments/production.rb +78 -0
  49. data/spec/dummy/config/environments/test.rb +39 -0
  50. data/spec/dummy/config/initializers/assets.rb +8 -0
  51. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  52. data/spec/dummy/config/initializers/cookies_serializer.rb +3 -0
  53. data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  54. data/spec/dummy/config/initializers/inflections.rb +16 -0
  55. data/spec/dummy/config/initializers/mime_types.rb +4 -0
  56. data/spec/dummy/config/initializers/session_store.rb +3 -0
  57. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  58. data/spec/dummy/config/locales/en.yml +23 -0
  59. data/spec/dummy/config/routes.rb +4 -0
  60. data/spec/dummy/config/secrets.yml +22 -0
  61. data/spec/dummy/db/development.sqlite3 +0 -0
  62. data/spec/dummy/db/migrate/20141013173317_create_products.rb +9 -0
  63. data/spec/dummy/db/migrate/20141013174327_create_users.rb +9 -0
  64. data/spec/dummy/db/schema.rb +56 -0
  65. data/spec/dummy/log/development.log +256 -0
  66. data/spec/dummy/log/test.log +41431 -0
  67. data/spec/dummy/public/404.html +67 -0
  68. data/spec/dummy/public/422.html +67 -0
  69. data/spec/dummy/public/500.html +66 -0
  70. data/spec/dummy/public/favicon.ico +0 -0
  71. data/spec/dummy/tmp/cache/assets/test/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
  72. data/spec/dummy/tmp/cache/assets/test/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
  73. data/spec/dummy/tmp/cache/assets/test/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
  74. data/spec/dummy/tmp/cache/assets/test/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
  75. data/spec/dummy/tmp/cache/assets/test/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
  76. data/spec/dummy/tmp/cache/assets/test/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
  77. data/spec/dummy/tmp/capybara/capybara-201410141638119443873212.html +24 -0
  78. data/spec/dummy/tmp/capybara/capybara-201410141807209663577120.html +34 -0
  79. data/spec/dummy/tmp/capybara/capybara-201410141808528516645046.html +34 -0
  80. data/spec/dummy/tmp/capybara/capybara-201410141809478831156886.html +34 -0
  81. data/spec/dummy/tmp/capybara/capybara-201410141811022811314427.html +34 -0
  82. data/spec/dummy/tmp/capybara/capybara-201410141813201391325985.html +34 -0
  83. data/spec/dummy/tmp/capybara/capybara-201410141855296114330585.html +86 -0
  84. data/spec/dummy/tmp/capybara/capybara-201410141857326053813040.html +34 -0
  85. data/spec/dummy/tmp/capybara/capybara-201410141857482438637842.html +35 -0
  86. data/spec/dummy/tmp/capybara/capybara-201410141858304336368395.html +35 -0
  87. data/spec/dummy/tmp/capybara/capybara-20141014185925908498887.html +86 -0
  88. data/spec/dummy/tmp/capybara/capybara-201410141904184954015862.html +35 -0
  89. data/spec/dummy/tmp/capybara/capybara-201410141905062396116920.html +46 -0
  90. data/spec/dummy/tmp/capybara/capybara-201410141905261123020644.html +46 -0
  91. data/spec/factories/product.rb +7 -0
  92. data/spec/factories/question.rb +25 -0
  93. data/spec/factories/review.rb +22 -0
  94. data/spec/factories/user.rb +7 -0
  95. data/spec/features/questions/question_create_spec.rb +43 -0
  96. data/spec/features/questions/question_delete_spec.rb +30 -0
  97. data/spec/features/questions/question_edit_spec.rb +106 -0
  98. data/spec/features/questions/question_index_spec.rb +23 -0
  99. data/spec/models/acts_as_reviewable_spec.rb +12 -0
  100. data/spec/models/reviewable/question_spec.rb +27 -0
  101. data/spec/models/reviewable/review_spec.rb +61 -0
  102. data/spec/rails_helper.rb +60 -0
  103. data/spec/spec_helper.rb +78 -0
  104. metadata +263 -0
@@ -0,0 +1,8 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Version of your assets, change this if you want to expire all your assets.
4
+ Rails.application.config.assets.version = '1.0'
5
+
6
+ # Precompile additional assets.
7
+ # application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
8
+ # Rails.application.config.assets.precompile += %w( search.js )
@@ -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!
@@ -0,0 +1,3 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ Rails.application.config.action_dispatch.cookies_serializer = :json
@@ -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]
@@ -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
@@ -0,0 +1,4 @@
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
@@ -0,0 +1,3 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ Rails.application.config.session_store :cookie_store, key: '_dummy_session'
@@ -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
@@ -0,0 +1,23 @@
1
+ # Files in the config/locales directory are used for internationalization
2
+ # and are automatically loaded by Rails. If you want to use locales other
3
+ # than English, add the necessary files in this directory.
4
+ #
5
+ # To use the locales, use `I18n.t`:
6
+ #
7
+ # I18n.t 'hello'
8
+ #
9
+ # In views, this is aliased to just `t`:
10
+ #
11
+ # <%= t('hello') %>
12
+ #
13
+ # To use a different locale, set it with `I18n.locale`:
14
+ #
15
+ # I18n.locale = :es
16
+ #
17
+ # This would use the information in config/locales/es.yml.
18
+ #
19
+ # To learn more, please read the Rails Internationalization guide
20
+ # available at http://guides.rubyonrails.org/i18n.html.
21
+
22
+ en:
23
+ hello: "Hello world"
@@ -0,0 +1,4 @@
1
+ Rails.application.routes.draw do
2
+
3
+ mount Reviewable::Engine => "/reviewable"
4
+ end
@@ -0,0 +1,22 @@
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 the secrets in this file are kept private
11
+ # if you're sharing your code publicly.
12
+
13
+ development:
14
+ secret_key_base: f547d0516335732c4562fdb933a7903cb16d21059cf689614e218a444e3128d873afb778f033cb0d86f0a5e5f125cafbdf7caaf5c27b9b95435a024534095d6b
15
+
16
+ test:
17
+ secret_key_base: 92b0b2ab4d6bd7d86faf2a5e4941d2248b5a911126ca1415b319d634f374b940aba802516fb15c74eb82e610c91cbab6328231d2b16a1c1dc2408346e8eac0ca
18
+
19
+ # Do not keep production secrets in the repository,
20
+ # instead read values from the environment.
21
+ production:
22
+ secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
@@ -0,0 +1,9 @@
1
+ class CreateProducts < ActiveRecord::Migration
2
+ def change
3
+ create_table :products do |t|
4
+ t.string :title
5
+
6
+ t.timestamps
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ class CreateUsers < ActiveRecord::Migration
2
+ def change
3
+ create_table :users do |t|
4
+ t.string :name
5
+
6
+ t.timestamps
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,56 @@
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 that you check this file into your version control system.
13
+
14
+ ActiveRecord::Schema.define(version: 20141013174327) do
15
+
16
+ # These are extensions that must be enabled in order to support this database
17
+ enable_extension "plpgsql"
18
+ enable_extension "uuid-ossp"
19
+
20
+ create_table "products", force: true do |t|
21
+ t.string "title"
22
+ t.datetime "created_at"
23
+ t.datetime "updated_at"
24
+ end
25
+
26
+ create_table "reviewable_questions", force: true do |t|
27
+ t.string "question_text"
28
+ t.string "question_type"
29
+ t.string "slug"
30
+ t.string "answer_options_string"
31
+ t.integer "answer_min"
32
+ t.integer "answer_max"
33
+ t.boolean "enabled"
34
+ t.datetime "created_at"
35
+ t.datetime "updated_at"
36
+ end
37
+
38
+ create_table "reviewable_reviews", force: true do |t|
39
+ t.integer "reviewable_object_id"
40
+ t.string "reviewable_object_type"
41
+ t.integer "reviewer_id"
42
+ t.string "reviewer_type"
43
+ t.uuid "uuid", default: "uuid_generate_v4()"
44
+ t.json "results"
45
+ t.datetime "submitted_at"
46
+ t.datetime "created_at"
47
+ t.datetime "updated_at"
48
+ end
49
+
50
+ create_table "users", force: true do |t|
51
+ t.string "name"
52
+ t.datetime "created_at"
53
+ t.datetime "updated_at"
54
+ end
55
+
56
+ end
@@ -0,0 +1,256 @@
1
+  (21.1ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
2
+  (0.3ms) select sqlite_version(*)
3
+  (1.2ms) 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 CreateReviewableReviews (20141013142552)
6
+  (0.2ms) begin transaction
7
+  (0.1ms) rollback transaction
8
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
9
+ Migrating to CreateReviewableReviews (20141013142552)
10
+  (0.1ms) begin transaction
11
+  (0.1ms) rollback transaction
12
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
13
+ Migrating to EnableUuidOsspExtension (20141013142401)
14
+  (0.1ms) begin transaction
15
+ SQL (0.6ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20141013142401"]]
16
+  (33.5ms) commit transaction
17
+ Migrating to CreateReviewableReviews (20141013142552)
18
+  (0.1ms) begin transaction
19
+  (0.1ms) rollback transaction
20
+  (19.0ms) CREATE TABLE "schema_migrations" ("version" character varying(255) NOT NULL) 
21
+  (16.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
22
+ ActiveRecord::SchemaMigration Load (0.6ms) SELECT "schema_migrations".* FROM "schema_migrations"
23
+ Migrating to EnableUuidOsspExtension (20141013142401)
24
+  (0.5ms) BEGIN
25
+ SQL (15.7ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20141013142401"]]
26
+  (16.5ms) COMMIT
27
+ Migrating to CreateReviewableReviews (20141013142552)
28
+  (0.2ms) BEGIN
29
+ SQL (280.8ms) CREATE EXTENSION IF NOT EXISTS "uuid-ossp"
30
+  (13.5ms) CREATE TABLE "reviewable_reviews" ("id" serial primary key, "reviewable_id" integer, "reviewable_type" character varying(255), "reviewer_id" integer, "reviewer_type" character varying(255), "uuid" uuid DEFAULT uuid_generate_v4(), "results" json, "submitted_at" timestamp, "created_at" timestamp, "updated_at" timestamp) 
31
+ SQL (1.8ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20141013142552"]]
32
+  (1.4ms) COMMIT
33
+ ActiveRecord::SchemaMigration Load (6.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
34
+ ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"
35
+ ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
36
+ Migrating to CreateReviewableReviews (20141013142552)
37
+  (0.1ms) BEGIN
38
+  (26.9ms) DROP TABLE "reviewable_reviews"
39
+ SQL (7.4ms) DROP EXTENSION IF EXISTS "uuid-ossp" CASCADE
40
+ SQL (31.8ms) DELETE FROM "schema_migrations" WHERE "schema_migrations"."version" = '20141013142552'
41
+  (27.3ms) COMMIT
42
+ ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
43
+ ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
44
+ Migrating to CreateReviewableReviews (20141013142552)
45
+  (0.2ms) BEGIN
46
+ SQL (71.7ms) CREATE EXTENSION IF NOT EXISTS "uuid-ossp"
47
+  (95.7ms) CREATE TABLE "reviewable_reviews" ("id" serial primary key, "reviewable_object_id" integer, "reviewable_object_type" character varying(255), "reviewer_id" integer, "reviewer_type" character varying(255), "uuid" uuid DEFAULT uuid_generate_v4(), "results" json, "submitted_at" timestamp, "created_at" timestamp, "updated_at" timestamp)
48
+ SQL (0.5ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20141013142552"]]
49
+  (25.6ms) COMMIT
50
+ Migrating to CreateReviewableQuestions (20141013145632)
51
+  (38.1ms) BEGIN
52
+  (67.0ms) CREATE TABLE "reviewable_questions" ("id" serial primary key, "text" character varying(255), "enabled" boolean, "created_at" timestamp, "updated_at" timestamp)
53
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20141013145632"]]
54
+  (16.0ms) COMMIT
55
+ ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
56
+ ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
57
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
58
+ Migrating to CreateReviewableQuestions (20141013145632)
59
+  (0.1ms) BEGIN
60
+  (1.4ms) DROP TABLE "reviewable_questions"
61
+ SQL (0.5ms) DELETE FROM "schema_migrations" WHERE "schema_migrations"."version" = '20141013145632'
62
+  (54.1ms) COMMIT
63
+ ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
64
+ ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
65
+ ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
66
+ ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
67
+ Migrating to CreateProducts (20141013173317)
68
+  (0.2ms) BEGIN
69
+  (39.6ms) CREATE TABLE "products" ("id" serial primary key, "title" character varying(255), "created_at" timestamp, "updated_at" timestamp) 
70
+ SQL (29.9ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20141013173317"]]
71
+  (26.9ms) COMMIT
72
+ ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
73
+ ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"
74
+ Migrating to CreateUsers (20141013174327)
75
+  (0.2ms) BEGIN
76
+  (19.9ms) CREATE TABLE "users" ("id" serial primary key, "name" character varying(255), "created_at" timestamp, "updated_at" timestamp) 
77
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20141013174327"]]
78
+  (15.0ms) COMMIT
79
+ ActiveRecord::SchemaMigration Load (0.6ms) SELECT "schema_migrations".* FROM "schema_migrations"
80
+  (2.4ms) CREATE TABLE "schema_migrations" ("version" character varying(255) NOT NULL) 
81
+  (2.7ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
82
+ ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"
83
+ Migrating to EnableUuidOsspExtension (20141013142401)
84
+  (0.2ms) BEGIN
85
+ SQL (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20141013142401"]]
86
+  (0.4ms) COMMIT
87
+ Migrating to CreateReviewableReviews (20141013142552)
88
+  (0.1ms) BEGIN
89
+ SQL (31.4ms) CREATE EXTENSION IF NOT EXISTS "uuid-ossp"
90
+  (20.6ms) CREATE TABLE "reviewable_reviews" ("id" serial primary key, "reviewable_object_id" integer, "reviewable_object_type" character varying(255), "reviewer_id" integer, "reviewer_type" character varying(255), "uuid" uuid DEFAULT uuid_generate_v4(), "results" json DEFAULT '{}', "submitted_at" timestamp, "created_at" timestamp, "updated_at" timestamp) 
91
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20141013142552"]]
92
+  (0.8ms) COMMIT
93
+ Migrating to CreateReviewableQuestions (20141013145632)
94
+  (0.3ms) BEGIN
95
+  (3.7ms) CREATE TABLE "reviewable_questions" ("id" serial primary key, "question_text" character varying(255), "question_type" character varying(255), "slug" character varying(255), "answer_options" character varying(255)[], "answer_min" integer, "answer_max" integer, "enabled" boolean, "created_at" timestamp, "updated_at" timestamp) 
96
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20141013145632"]]
97
+  (0.5ms) COMMIT
98
+ Migrating to CreateProducts (20141013173317)
99
+  (0.2ms) BEGIN
100
+  (2.0ms) CREATE TABLE "products" ("id" serial primary key, "title" character varying(255), "created_at" timestamp, "updated_at" timestamp) 
101
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20141013173317"]]
102
+  (0.4ms) COMMIT
103
+ Migrating to CreateUsers (20141013174327)
104
+  (0.3ms) BEGIN
105
+  (2.8ms) CREATE TABLE "users" ("id" serial primary key, "name" character varying(255), "created_at" timestamp, "updated_at" timestamp) 
106
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20141013174327"]]
107
+  (0.5ms) COMMIT
108
+ ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"
109
+  (122.4ms) DROP DATABASE IF EXISTS "reviewable_dummy_development"
110
+  (269.1ms) CREATE DATABASE "reviewable_dummy_development" ENCODING = 'unicode'
111
+ SQL (0.5ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"
112
+ SQL (3.9ms) CREATE EXTENSION IF NOT EXISTS "uuid-ossp"
113
+  (4.7ms) CREATE TABLE "products" ("id" serial primary key, "title" character varying(255), "created_at" timestamp, "updated_at" timestamp) 
114
+  (4.0ms) CREATE TABLE "reviewable_questions" ("id" serial primary key, "question_text" character varying(255), "question_type" character varying(255), "slug" character varying(255), "answer_options" character varying(255)[], "answer_min" integer, "answer_max" integer, "enabled" boolean, "created_at" timestamp, "updated_at" timestamp)
115
+  (4.5ms) CREATE TABLE "reviewable_reviews" ("id" serial primary key, "reviewable_object_id" integer, "reviewable_object_type" character varying(255), "reviewer_id" integer, "reviewer_type" character varying(255), "uuid" uuid DEFAULT uuid_generate_v4(), "results" json DEFAULT '{}', "submitted_at" timestamp, "created_at" timestamp, "updated_at" timestamp) 
116
+  (2.3ms) CREATE TABLE "users" ("id" serial primary key, "name" character varying(255), "created_at" timestamp, "updated_at" timestamp)
117
+  (0.9ms) CREATE TABLE "schema_migrations" ("version" character varying(255) NOT NULL) 
118
+  (1.6ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
119
+  (0.3ms) SELECT version FROM "schema_migrations"
120
+  (0.6ms) INSERT INTO "schema_migrations" (version) VALUES ('20141013174327')
121
+  (0.5ms) INSERT INTO "schema_migrations" (version) VALUES ('20141013173317')
122
+  (32.7ms) CREATE TABLE "schema_migrations" ("version" character varying(255) NOT NULL) 
123
+  (80.5ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
124
+ ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
125
+ Migrating to EnableUuidOsspExtension (20141013142401)
126
+  (0.2ms) BEGIN
127
+ SQL (15.5ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20141013142401"]]
128
+  (15.6ms) COMMIT
129
+ Migrating to CreateReviewableReviews (20141013142552)
130
+  (0.1ms) BEGIN
131
+ SQL (50.9ms) CREATE EXTENSION IF NOT EXISTS "uuid-ossp"
132
+  (17.2ms) CREATE TABLE "reviewable_reviews" ("id" serial primary key, "reviewable_object_id" integer, "reviewable_object_type" character varying(255), "reviewer_id" integer, "reviewer_type" character varying(255), "uuid" uuid DEFAULT uuid_generate_v4(), "results" json, "submitted_at" timestamp, "created_at" timestamp, "updated_at" timestamp) 
133
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20141013142552"]]
134
+  (16.2ms) COMMIT
135
+ Migrating to CreateReviewableQuestions (20141013145632)
136
+  (15.5ms) BEGIN
137
+  (59.1ms) CREATE TABLE "reviewable_questions" ("id" serial primary key, "question_text" character varying(255), "question_type" character varying(255), "slug" character varying(255), "answer_options" character varying(255)[], "answer_min" integer, "answer_max" integer, "enabled" boolean, "created_at" timestamp, "updated_at" timestamp) 
138
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20141013145632"]]
139
+  (20.1ms) COMMIT
140
+ Migrating to CreateProducts (20141013173317)
141
+  (15.7ms) BEGIN
142
+  (18.7ms) CREATE TABLE "products" ("id" serial primary key, "title" character varying(255), "created_at" timestamp, "updated_at" timestamp) 
143
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20141013173317"]]
144
+  (0.7ms) COMMIT
145
+ Migrating to CreateUsers (20141013174327)
146
+  (14.6ms) BEGIN
147
+  (2.8ms) CREATE TABLE "users" ("id" serial primary key, "name" character varying(255), "created_at" timestamp, "updated_at" timestamp) 
148
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20141013174327"]]
149
+  (0.6ms) COMMIT
150
+ ActiveRecord::SchemaMigration Load (0.6ms) SELECT "schema_migrations".* FROM "schema_migrations"
151
+  (122.6ms) DROP DATABASE IF EXISTS "reviewable_dummy_development"
152
+  (248.9ms) CREATE DATABASE "reviewable_dummy_development" ENCODING = 'unicode'
153
+ SQL (0.6ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"
154
+ SQL (3.8ms) CREATE EXTENSION IF NOT EXISTS "uuid-ossp"
155
+  (4.4ms) CREATE TABLE "products" ("id" serial primary key, "title" character varying(255), "created_at" timestamp, "updated_at" timestamp) 
156
+  (3.6ms) CREATE TABLE "reviewable_questions" ("id" serial primary key, "question_text" character varying(255), "question_type" character varying(255), "slug" character varying(255), "answer_options" character varying(255)[], "answer_min" integer, "answer_max" integer, "enabled" boolean, "created_at" timestamp, "updated_at" timestamp)
157
+  (4.3ms) CREATE TABLE "reviewable_reviews" ("id" serial primary key, "reviewable_object_id" integer, "reviewable_object_type" character varying(255), "reviewer_id" integer, "reviewer_type" character varying(255), "uuid" uuid DEFAULT uuid_generate_v4(), "results" json, "submitted_at" timestamp, "created_at" timestamp, "updated_at" timestamp) 
158
+  (2.2ms) CREATE TABLE "users" ("id" serial primary key, "name" character varying(255), "created_at" timestamp, "updated_at" timestamp)
159
+  (1.0ms) CREATE TABLE "schema_migrations" ("version" character varying(255) NOT NULL) 
160
+  (1.3ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
161
+  (0.3ms) SELECT version FROM "schema_migrations"
162
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20141013174327')
163
+  (0.6ms) INSERT INTO "schema_migrations" (version) VALUES ('20141013173317')
164
+  (0.5ms) SELECT "reviewable_questions"."id" FROM "reviewable_questions" WHERE "reviewable_questions"."enabled" = 't'
165
+  (0.1ms) BEGIN
166
+ SQL (1.0ms) INSERT INTO "reviewable_reviews" ("created_at", "results", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2014-10-14 10:34:26.308776"], ["results", "{}"], ["updated_at", "2014-10-14 10:34:26.308776"]]
167
+  (0.5ms) COMMIT
168
+ Reviewable::Review Load (41.7ms) SELECT "reviewable_reviews".* FROM "reviewable_reviews" WHERE "reviewable_reviews"."id" = $1 LIMIT 1 [["id", 5]]
169
+  (704.3ms) CREATE TABLE "schema_migrations" ("version" character varying(255) NOT NULL) 
170
+  (125.5ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
171
+ ActiveRecord::SchemaMigration Load (16.6ms) SELECT "schema_migrations".* FROM "schema_migrations"
172
+ Migrating to EnableUuidOsspExtension (20141013142401)
173
+  (0.4ms) BEGIN
174
+ SQL (38.7ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20141013142401"]]
175
+  (62.4ms) COMMIT
176
+ Migrating to CreateReviewableReviews (20141013142552)
177
+  (0.2ms) BEGIN
178
+ SQL (688.3ms) CREATE EXTENSION IF NOT EXISTS "uuid-ossp"
179
+  (278.0ms) CREATE TABLE "reviewable_reviews" ("id" serial primary key, "reviewable_object_id" integer, "reviewable_object_type" character varying(255), "reviewer_id" integer, "reviewer_type" character varying(255), "uuid" uuid DEFAULT uuid_generate_v4(), "results" json, "submitted_at" timestamp, "created_at" timestamp, "updated_at" timestamp) 
180
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20141013142552"]]
181
+  (69.0ms) COMMIT
182
+ Migrating to CreateReviewableQuestions (20141013145632)
183
+  (16.6ms) BEGIN
184
+  (59.4ms) CREATE TABLE "reviewable_questions" ("id" serial primary key, "question_text" character varying(255), "question_type" character varying(255), "slug" character varying(255), "answer_options" character varying(255), "answer_min" integer, "answer_max" integer, "enabled" boolean, "created_at" timestamp, "updated_at" timestamp) 
185
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20141013145632"]]
186
+  (37.4ms) COMMIT
187
+ Migrating to CreateProducts (20141013173317)
188
+  (16.4ms) BEGIN
189
+  (48.6ms) CREATE TABLE "products" ("id" serial primary key, "title" character varying(255), "created_at" timestamp, "updated_at" timestamp) 
190
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20141013173317"]]
191
+  (37.3ms) COMMIT
192
+ Migrating to CreateUsers (20141013174327)
193
+  (15.5ms) BEGIN
194
+  (70.8ms) CREATE TABLE "users" ("id" serial primary key, "name" character varying(255), "created_at" timestamp, "updated_at" timestamp) 
195
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20141013174327"]]
196
+  (26.5ms) COMMIT
197
+ ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"
198
+  (240.0ms) DROP DATABASE IF EXISTS "reviewable_dummy_development"
199
+  (8575.9ms) CREATE DATABASE "reviewable_dummy_development" ENCODING = 'unicode'
200
+ SQL (0.4ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"
201
+ SQL (20.4ms) CREATE EXTENSION IF NOT EXISTS "uuid-ossp"
202
+  (68.4ms) CREATE TABLE "products" ("id" serial primary key, "title" character varying(255), "created_at" timestamp, "updated_at" timestamp) 
203
+  (52.7ms) CREATE TABLE "reviewable_questions" ("id" serial primary key, "question_text" character varying(255), "question_type" character varying(255), "slug" character varying(255), "answer_options" character varying(255), "answer_min" integer, "answer_max" integer, "enabled" boolean, "created_at" timestamp, "updated_at" timestamp)
204
+  (53.6ms) CREATE TABLE "reviewable_reviews" ("id" serial primary key, "reviewable_object_id" integer, "reviewable_object_type" character varying(255), "reviewer_id" integer, "reviewer_type" character varying(255), "uuid" uuid DEFAULT uuid_generate_v4(), "results" json, "submitted_at" timestamp, "created_at" timestamp, "updated_at" timestamp) 
205
+  (36.5ms) CREATE TABLE "users" ("id" serial primary key, "name" character varying(255), "created_at" timestamp, "updated_at" timestamp)
206
+  (16.5ms) CREATE TABLE "schema_migrations" ("version" character varying(255) NOT NULL) 
207
+  (42.3ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
208
+  (0.8ms) SELECT version FROM "schema_migrations"
209
+  (16.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20141013174327')
210
+  (32.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20141013173317')
211
+  (3.2ms) CREATE TABLE "schema_migrations" ("version" character varying(255) NOT NULL) 
212
+  (1.8ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
213
+ ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"
214
+ Migrating to EnableUuidOsspExtension (20141013142401)
215
+  (0.2ms) BEGIN
216
+ SQL (15.4ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20141013142401"]]
217
+  (15.5ms) COMMIT
218
+ Migrating to CreateReviewableReviews (20141013142552)
219
+  (0.2ms) BEGIN
220
+ SQL (3.7ms) CREATE EXTENSION IF NOT EXISTS "uuid-ossp"
221
+  (5.3ms) CREATE TABLE "reviewable_reviews" ("id" serial primary key, "reviewable_object_id" integer, "reviewable_object_type" character varying(255), "reviewer_id" integer, "reviewer_type" character varying(255), "uuid" uuid DEFAULT uuid_generate_v4(), "results" json, "submitted_at" timestamp, "created_at" timestamp, "updated_at" timestamp) 
222
+ SQL (0.5ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20141013142552"]]
223
+  (0.9ms) COMMIT
224
+ Migrating to CreateReviewableQuestions (20141013145632)
225
+  (0.8ms) BEGIN
226
+  (4.6ms) CREATE TABLE "reviewable_questions" ("id" serial primary key, "question_text" character varying(255), "question_type" character varying(255), "slug" character varying(255), "answer_options_string" character varying(255), "answer_min" integer, "answer_max" integer, "enabled" boolean, "created_at" timestamp, "updated_at" timestamp) 
227
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20141013145632"]]
228
+  (0.5ms) COMMIT
229
+ Migrating to CreateProducts (20141013173317)
230
+  (0.3ms) BEGIN
231
+  (2.9ms) CREATE TABLE "products" ("id" serial primary key, "title" character varying(255), "created_at" timestamp, "updated_at" timestamp) 
232
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20141013173317"]]
233
+  (0.4ms) COMMIT
234
+ Migrating to CreateUsers (20141013174327)
235
+  (0.3ms) BEGIN
236
+  (2.9ms) CREATE TABLE "users" ("id" serial primary key, "name" character varying(255), "created_at" timestamp, "updated_at" timestamp) 
237
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20141013174327"]]
238
+  (0.7ms) COMMIT
239
+ ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
240
+  (134.0ms) DROP DATABASE IF EXISTS "reviewable_dummy_development"
241
+  (1580.9ms) CREATE DATABASE "reviewable_dummy_development" ENCODING = 'unicode'
242
+ SQL (0.5ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"
243
+ SQL (19.1ms) CREATE EXTENSION IF NOT EXISTS "uuid-ossp"
244
+  (65.4ms) CREATE TABLE "products" ("id" serial primary key, "title" character varying(255), "created_at" timestamp, "updated_at" timestamp) 
245
+  (51.5ms) CREATE TABLE "reviewable_questions" ("id" serial primary key, "question_text" character varying(255), "question_type" character varying(255), "slug" character varying(255), "answer_options_string" character varying(255), "answer_min" integer, "answer_max" integer, "enabled" boolean, "created_at" timestamp, "updated_at" timestamp)
246
+  (60.1ms) CREATE TABLE "reviewable_reviews" ("id" serial primary key, "reviewable_object_id" integer, "reviewable_object_type" character varying(255), "reviewer_id" integer, "reviewer_type" character varying(255), "uuid" uuid DEFAULT uuid_generate_v4(), "results" json, "submitted_at" timestamp, "created_at" timestamp, "updated_at" timestamp) 
247
+  (35.3ms) CREATE TABLE "users" ("id" serial primary key, "name" character varying(255), "created_at" timestamp, "updated_at" timestamp)
248
+  (16.7ms) CREATE TABLE "schema_migrations" ("version" character varying(255) NOT NULL) 
249
+  (33.7ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
250
+  (0.4ms) SELECT version FROM "schema_migrations"
251
+  (15.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20141013174327')
252
+  (31.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20141013173317')
253
+  (5074.8ms) DROP DATABASE IF EXISTS "reviewable_dummy_development"
254
+ PG::ObjectInUse: ERROR: database "reviewable_dummy_development" is being accessed by other users
255
+ DETAIL: There are 2 other sessions using the database.
256
+ : DROP DATABASE IF EXISTS "reviewable_dummy_development"