tasuku 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.md +82 -0
- data/Rakefile +28 -0
- data/app/assets/javascripts/tasks/application.js +13 -0
- data/app/assets/stylesheets/tasks/application.css +15 -0
- data/app/controllers/tasks/application_controller.rb +13 -0
- data/app/controllers/tasks/taskables/image/responses_controller.rb +32 -0
- data/app/controllers/tasks/taskables/questions/answers_controller.rb +37 -0
- data/app/controllers/tasks/taskables/text/responses_controller.rb +32 -0
- data/app/controllers/tasks/taskables/url/responses_controller.rb +32 -0
- data/app/controllers/tasks/taskables/verifications/confirmations_controller.rb +28 -0
- data/app/controllers/tasks/tasks_controller.rb +7 -0
- data/app/helpers/tasks/application_helper.rb +7 -0
- data/app/helpers/tasks/taskables/verifications_helper.rb +18 -0
- data/app/models/tasks/task.rb +5 -0
- data/app/models/tasks/taskables.rb +7 -0
- data/app/models/tasks/taskables/image.rb +7 -0
- data/app/models/tasks/taskables/image/request.rb +7 -0
- data/app/models/tasks/taskables/image/response.rb +17 -0
- data/app/models/tasks/taskables/question.rb +7 -0
- data/app/models/tasks/taskables/question/answer.rb +39 -0
- data/app/models/tasks/taskables/question/option.rb +7 -0
- data/app/models/tasks/taskables/question/vote.rb +6 -0
- data/app/models/tasks/taskables/taskable.rb +31 -0
- data/app/models/tasks/taskables/taskable/response.rb +9 -0
- data/app/models/tasks/taskables/taskable/submission.rb +39 -0
- data/app/models/tasks/taskables/text.rb +7 -0
- data/app/models/tasks/taskables/text/request.rb +7 -0
- data/app/models/tasks/taskables/text/response.rb +15 -0
- data/app/models/tasks/taskables/url.rb +7 -0
- data/app/models/tasks/taskables/url/request.rb +5 -0
- data/app/models/tasks/taskables/url/response.rb +18 -0
- data/app/models/tasks/taskables/verification.rb +7 -0
- data/app/models/tasks/taskables/verification/confirmation.rb +12 -0
- data/app/uploaders/tasks/image_uploader.rb +58 -0
- data/app/views/tasks/taskables/image/requests/_request.html.erb +19 -0
- data/app/views/tasks/taskables/image/responses/_form.html.erb +8 -0
- data/app/views/tasks/taskables/image/responses/create.html.erb +2 -0
- data/app/views/tasks/taskables/questions/_question.html.erb +27 -0
- data/app/views/tasks/taskables/questions/answers/_form.html.erb +16 -0
- data/app/views/tasks/taskables/questions/answers/_statistics.html.erb +26 -0
- data/app/views/tasks/taskables/text/requests/_request.html.erb +19 -0
- data/app/views/tasks/taskables/text/responses/_form.html.erb +5 -0
- data/app/views/tasks/taskables/text/responses/create.html.erb +2 -0
- data/app/views/tasks/taskables/url/requests/_request.html.erb +19 -0
- data/app/views/tasks/taskables/url/responses/_form.html.erb +5 -0
- data/app/views/tasks/taskables/url/responses/create.html.erb +2 -0
- data/app/views/tasks/taskables/verifications/_verification.html.erb +1 -0
- data/app/views/tasks/taskables/verifications/confirmations/_form.html.erb +3 -0
- data/app/views/tasks/tasks/_task.html.erb +3 -0
- data/app/views/tasks/tasks/show.html.erb +1 -0
- data/config/locales/en.yml +24 -0
- data/config/locales/nb.yml +122 -0
- data/config/routes.rb +35 -0
- data/db/migrate/20140315151838_create_tasks_tasks.rb +9 -0
- data/db/migrate/20140315152116_create_tasks_taskables_verifications.rb +11 -0
- data/db/migrate/20140315153512_create_tasks_taskables_verification_confirmations.rb +13 -0
- data/db/migrate/20140316203422_create_tasks_taskables_questions.rb +9 -0
- data/db/migrate/20140316203812_create_tasks_taskables_question_options.rb +10 -0
- data/db/migrate/20140316204119_create_tasks_taskables_question_answers.rb +12 -0
- data/db/migrate/20140316221703_remove_unique_constraint_on_task_taskable_question_answer_index.rb +6 -0
- data/db/migrate/20140320123047_remove_unique_constraint_on_confirmation_author.rb +6 -0
- data/db/migrate/20140402132837_create_tasks_taskables_image_requests.rb +9 -0
- data/db/migrate/20140402135306_create_tasks_taskables_image_responses.rb +13 -0
- data/db/migrate/20140403090537_remove_unique_constraint_on_image_response_author.rb +6 -0
- data/db/migrate/20140404113158_add_description_to_taskables_questions.rb +5 -0
- data/db/migrate/20140404130151_add_description_to_tasks_taskables_image_requests.rb +5 -0
- data/db/migrate/20140512072931_create_tasks_taskables_url_requests.rb +10 -0
- data/db/migrate/20140512074135_create_tasks_taskables_url_responses.rb +13 -0
- data/db/migrate/20140512120632_create_tasks_taskables_question_votes.rb +10 -0
- data/db/migrate/20140512121254_add_multiple_to_question.rb +5 -0
- data/db/migrate/20140512131526_remove_option_id_from_questions.rb +21 -0
- data/db/migrate/20140514082129_create_tasks_taskables_text_requests.rb +10 -0
- data/db/migrate/20140514082143_create_tasks_taskables_text_responses.rb +13 -0
- data/db/migrate/20140520122938_add_correct_to_tasks_taskables_question_option.rb +5 -0
- data/db/migrate/20140521134515_add_show_statistics_to_tasks_taskables_question.rb +5 -0
- data/db/migrate/20140523091152_add_images.rb +8 -0
- data/db/migrate/20140604075046_add_obligatory_to_tasks_task.rb +5 -0
- data/db/migrate/20140605095241_create_tasks_taskables_taskable_responses.rb +10 -0
- data/db/migrate/20140605124021_add_task_to_response.rb +6 -0
- data/db/migrate/20140606072225_migrate_existing_date.rb +15 -0
- data/lib/generators/tasks/install/USAGE +8 -0
- data/lib/generators/tasks/install/install_generator.rb +23 -0
- data/lib/generators/tasks/install/templates/tasks.rb +3 -0
- data/lib/generators/tasks/views/USAGE +5 -0
- data/lib/generators/tasks/views/views_generator.rb +9 -0
- data/lib/tasks.rb +20 -0
- data/lib/tasks/concerns.rb +7 -0
- data/lib/tasks/concerns/controllers.rb +5 -0
- data/lib/tasks/concerns/controllers/tasks_controller.rb +18 -0
- data/lib/tasks/concerns/illustratable.rb +9 -0
- data/lib/tasks/concerns/models.rb +4 -0
- data/lib/tasks/concerns/models/task.rb +25 -0
- data/lib/tasks/concerns/models/taskables.rb +7 -0
- data/lib/tasks/concerns/models/taskables/image.rb +3 -0
- data/lib/tasks/concerns/models/taskables/image/request.rb +18 -0
- data/lib/tasks/concerns/models/taskables/question.rb +31 -0
- data/lib/tasks/concerns/models/taskables/text.rb +3 -0
- data/lib/tasks/concerns/models/taskables/text/request.rb +18 -0
- data/lib/tasks/concerns/models/taskables/url.rb +3 -0
- data/lib/tasks/concerns/models/taskables/url/request.rb +18 -0
- data/lib/tasks/concerns/models/taskables/verification.rb +20 -0
- data/lib/tasks/concerns/redirectable.rb +11 -0
- data/lib/tasks/concerns/verifiable.rb +9 -0
- data/lib/tasks/engine.rb +22 -0
- data/lib/tasks/seeds.rb +13 -0
- data/lib/tasks/tasks_tasks.rake +4 -0
- data/lib/tasks/version.rb +3 -0
- data/lib/tasuku.rb +1 -0
- data/spec/controllers/tasks/taskables/image/responses_controller_spec.rb +37 -0
- data/spec/controllers/tasks/taskables/questions/answers_controller_spec.rb +39 -0
- data/spec/controllers/tasks/taskables/text/responses_controller_spec.rb +37 -0
- data/spec/controllers/tasks/taskables/verifications/confirmations_controller_spec.rb +38 -0
- data/spec/controllers/tasks/tasks_controller_spec.rb +17 -0
- data/spec/dummy/README.rdoc +28 -0
- data/spec/dummy/Rakefile +6 -0
- data/spec/dummy/app/assets/javascripts/application.js +13 -0
- data/spec/dummy/app/assets/stylesheets/application.css +15 -0
- data/spec/dummy/app/controllers/application_controller.rb +7 -0
- data/spec/dummy/app/helpers/application_helper.rb +5 -0
- data/spec/dummy/app/models/article.rb +3 -0
- data/spec/dummy/app/models/user.rb +2 -0
- data/spec/dummy/app/views/layouts/application.html.erb +17 -0
- data/spec/dummy/bin/bundle +3 -0
- data/spec/dummy/bin/rails +4 -0
- data/spec/dummy/bin/rake +4 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/config/application.rb +29 -0
- data/spec/dummy/config/boot.rb +5 -0
- data/spec/dummy/config/database.yml +30 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +37 -0
- data/spec/dummy/config/environments/production.rb +83 -0
- data/spec/dummy/config/environments/test.rb +39 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/cookies_serializer.rb +3 -0
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/spec/dummy/config/initializers/inflections.rb +16 -0
- data/spec/dummy/config/initializers/mime_types.rb +5 -0
- data/spec/dummy/config/initializers/session_store.rb +3 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy/config/locales/en.yml +23 -0
- data/spec/dummy/config/routes.rb +4 -0
- data/spec/dummy/config/secrets.yml +22 -0
- data/spec/dummy/db/migrate/20140315162017_create_users.rb +8 -0
- data/spec/dummy/db/migrate/20140315185502_create_articles.rb +8 -0
- data/spec/dummy/db/schema.rb +166 -0
- data/spec/dummy/db/seeds.rb +3 -0
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/development.log +90 -0
- data/spec/dummy/log/test.log +2568 -0
- data/spec/dummy/public/404.html +67 -0
- data/spec/dummy/public/422.html +67 -0
- data/spec/dummy/public/500.html +66 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/public/uploads/tasks/taskables/image/request/image/1/doge.jpg +0 -0
- data/spec/dummy/public/uploads/tasks/taskables/image/response/image/1/doge.jpg +0 -0
- data/spec/dummy/public/uploads/tasks/taskables/question/image/1/doge.jpg +0 -0
- data/spec/dummy/public/uploads/tasks/taskables/text/request/image/1/doge.jpg +0 -0
- data/spec/dummy/public/uploads/tasks/taskables/url/request/image/1/doge.jpg +0 -0
- data/spec/dummy/spec/factories/articles.rb +6 -0
- data/spec/dummy/spec/factories/users.rb +6 -0
- data/spec/dummy/spec/models/article_spec.rb +4 -0
- data/spec/dummy/spec/models/user_spec.rb +4 -0
- data/spec/factories/tasks_taskables_image_requests.rb +7 -0
- data/spec/factories/tasks_taskables_image_responses.rb +8 -0
- data/spec/factories/tasks_taskables_question_answers.rb +17 -0
- data/spec/factories/tasks_taskables_question_options.rb +10 -0
- data/spec/factories/tasks_taskables_question_votes.rb +8 -0
- data/spec/factories/tasks_taskables_questions.rb +19 -0
- data/spec/factories/tasks_taskables_taskable_responses.rb +8 -0
- data/spec/factories/tasks_taskables_text_requests.rb +5 -0
- data/spec/factories/tasks_taskables_text_responses.rb +6 -0
- data/spec/factories/tasks_taskables_url_requests.rb +8 -0
- data/spec/factories/tasks_taskables_url_responses.rb +9 -0
- data/spec/factories/tasks_taskables_verification_confirmations.rb +8 -0
- data/spec/factories/tasks_taskables_verifications.rb +7 -0
- data/spec/factories/tasks_tasks.rb +14 -0
- data/spec/fixtures/doge.jpg +0 -0
- data/spec/helpers/tasks/taskables/verifications_helper_spec.rb +20 -0
- data/spec/lib/generators/views_generators_spec.rb +22 -0
- data/spec/lib/tasks/concerns/verifiable_spec.rb +23 -0
- data/spec/models/tasks/task_spec.rb +20 -0
- data/spec/models/tasks/taskables/image/request_spec.rb +6 -0
- data/spec/models/tasks/taskables/image/response_spec.rb +18 -0
- data/spec/models/tasks/taskables/question/answer_spec.rb +91 -0
- data/spec/models/tasks/taskables/question/option_spec.rb +6 -0
- data/spec/models/tasks/taskables/question/vote_spec.rb +6 -0
- data/spec/models/tasks/taskables/question_spec.rb +18 -0
- data/spec/models/tasks/taskables/taskable/response_spec.rb +7 -0
- data/spec/models/tasks/taskables/taskable/submission_spec.rb +30 -0
- data/spec/models/tasks/taskables/taskable_spec.rb +49 -0
- data/spec/models/tasks/taskables/text/request_spec.rb +6 -0
- data/spec/models/tasks/taskables/text/response_spec.rb +17 -0
- data/spec/models/tasks/taskables/url/request_spec.rb +6 -0
- data/spec/models/tasks/taskables/url/response_spec.rb +6 -0
- data/spec/models/tasks/taskables/verification/confirmation_spec.rb +6 -0
- data/spec/models/tasks/taskables/verification_spec.rb +18 -0
- data/spec/spec_helper.rb +31 -0
- data/spec/support/fixture.rb +3 -0
- data/spec/support/shared_examples_for_redirectable.rb +37 -0
- data/spec/support/trackable_submission_spec.rb +14 -0
- data/spec/views/tasks/taskables/image/requests/_request.html.erb_spec.rb +35 -0
- data/spec/views/tasks/taskables/image/responses/create.html.erb_spec.rb +4 -0
- data/spec/views/tasks/taskables/questions/_question.html.erb_spec.rb +35 -0
- data/spec/views/tasks/taskables/questions/answers/_form.html.erb_spec.rb +18 -0
- data/spec/views/tasks/taskables/text/requests/_request.html.erb_spec.rb +35 -0
- data/spec/views/tasks/taskables/url/requests/_request.html.erb_spec.rb +35 -0
- data/spec/views/tasks/taskables/verifications/confirmations/_form.html.erb_spec.rb +17 -0
- data/spec/views/tasks/tasks/show.html.erb_spec.rb +4 -0
- metadata +550 -0
@@ -0,0 +1,39 @@
|
|
1
|
+
Rails.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_assets = 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
|
+
# Print deprecation notices to the stderr.
|
35
|
+
config.active_support.deprecation = :stderr
|
36
|
+
|
37
|
+
# Raises error for missing translations
|
38
|
+
# config.action_view.raise_on_missing_translations = true
|
39
|
+
end
|
@@ -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,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,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,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: dbdb1cd33f6a3743a09bdce5c85b4b559246d528afe5951d35abb01147206b91b02ca0a1e3e8d1253ef3c6d95b1083c2bfe0c75c4fed5b43a4b5c68d091a437f
|
15
|
+
|
16
|
+
test:
|
17
|
+
secret_key_base: ed5c12631c8aa4915dab3d530f2cd6e1ff18e83390ea8c957fefbd15c75c1cc4213e25be2eaad43ca33cfb309e859d4a2d8f1dfd0c4908a737550151723c5051
|
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,166 @@
|
|
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: 20140605124021) do
|
15
|
+
|
16
|
+
create_table "articles", force: true do |t|
|
17
|
+
t.datetime "created_at"
|
18
|
+
t.datetime "updated_at"
|
19
|
+
end
|
20
|
+
|
21
|
+
create_table "tasks_taskables_image_requests", force: true do |t|
|
22
|
+
t.text "text"
|
23
|
+
t.datetime "created_at"
|
24
|
+
t.datetime "updated_at"
|
25
|
+
t.text "description"
|
26
|
+
t.string "image"
|
27
|
+
end
|
28
|
+
|
29
|
+
create_table "tasks_taskables_image_responses", force: true do |t|
|
30
|
+
t.string "image"
|
31
|
+
t.integer "request_id"
|
32
|
+
t.integer "author_id"
|
33
|
+
t.string "author_type"
|
34
|
+
t.datetime "created_at"
|
35
|
+
t.datetime "updated_at"
|
36
|
+
end
|
37
|
+
|
38
|
+
add_index "tasks_taskables_image_responses", ["author_id", "author_type"], name: "tasks_taskable_image_responses_author"
|
39
|
+
add_index "tasks_taskables_image_responses", ["request_id"], name: "index_tasks_taskables_image_responses_on_request_id"
|
40
|
+
|
41
|
+
create_table "tasks_taskables_question_answers", force: true do |t|
|
42
|
+
t.integer "author_id"
|
43
|
+
t.string "author_type"
|
44
|
+
t.datetime "created_at"
|
45
|
+
t.datetime "updated_at"
|
46
|
+
end
|
47
|
+
|
48
|
+
add_index "tasks_taskables_question_answers", ["author_id", "author_type"], name: "tasks_taskable_question_answers_author"
|
49
|
+
|
50
|
+
create_table "tasks_taskables_question_options", force: true do |t|
|
51
|
+
t.text "text"
|
52
|
+
t.integer "question_id"
|
53
|
+
t.datetime "created_at"
|
54
|
+
t.datetime "updated_at"
|
55
|
+
t.boolean "correct", default: false
|
56
|
+
end
|
57
|
+
|
58
|
+
add_index "tasks_taskables_question_options", ["question_id"], name: "index_tasks_taskables_question_options_on_question_id"
|
59
|
+
|
60
|
+
create_table "tasks_taskables_question_votes", force: true do |t|
|
61
|
+
t.integer "answer_id"
|
62
|
+
t.integer "option_id"
|
63
|
+
t.datetime "created_at"
|
64
|
+
t.datetime "updated_at"
|
65
|
+
end
|
66
|
+
|
67
|
+
add_index "tasks_taskables_question_votes", ["answer_id"], name: "index_tasks_taskables_question_votes_on_answer_id"
|
68
|
+
add_index "tasks_taskables_question_votes", ["option_id"], name: "index_tasks_taskables_question_votes_on_option_id"
|
69
|
+
|
70
|
+
create_table "tasks_taskables_questions", force: true do |t|
|
71
|
+
t.text "text"
|
72
|
+
t.datetime "created_at"
|
73
|
+
t.datetime "updated_at"
|
74
|
+
t.text "description"
|
75
|
+
t.boolean "multiple"
|
76
|
+
t.boolean "show_statistics", default: true
|
77
|
+
t.string "image"
|
78
|
+
end
|
79
|
+
|
80
|
+
create_table "tasks_taskables_taskable_responses", force: true do |t|
|
81
|
+
t.integer "submittable_id"
|
82
|
+
t.string "submittable_type"
|
83
|
+
t.integer "author_id"
|
84
|
+
t.string "author_type"
|
85
|
+
t.datetime "created_at"
|
86
|
+
t.datetime "updated_at"
|
87
|
+
t.integer "task_id"
|
88
|
+
end
|
89
|
+
|
90
|
+
add_index "tasks_taskables_taskable_responses", ["task_id"], name: "index_tasks_taskables_taskable_responses_on_task_id"
|
91
|
+
|
92
|
+
create_table "tasks_taskables_text_requests", force: true do |t|
|
93
|
+
t.text "text"
|
94
|
+
t.text "description"
|
95
|
+
t.datetime "created_at"
|
96
|
+
t.datetime "updated_at"
|
97
|
+
t.string "image"
|
98
|
+
end
|
99
|
+
|
100
|
+
create_table "tasks_taskables_text_responses", force: true do |t|
|
101
|
+
t.text "text"
|
102
|
+
t.integer "request_id"
|
103
|
+
t.integer "author_id"
|
104
|
+
t.string "author_type"
|
105
|
+
t.datetime "created_at"
|
106
|
+
t.datetime "updated_at"
|
107
|
+
end
|
108
|
+
|
109
|
+
add_index "tasks_taskables_text_responses", ["author_id", "author_type"], name: "tasks_taskable_text_responses_author", unique: true
|
110
|
+
|
111
|
+
create_table "tasks_taskables_url_requests", force: true do |t|
|
112
|
+
t.text "text"
|
113
|
+
t.text "description"
|
114
|
+
t.datetime "created_at"
|
115
|
+
t.datetime "updated_at"
|
116
|
+
t.string "image"
|
117
|
+
end
|
118
|
+
|
119
|
+
create_table "tasks_taskables_url_responses", force: true do |t|
|
120
|
+
t.text "url"
|
121
|
+
t.integer "request_id"
|
122
|
+
t.integer "author_id"
|
123
|
+
t.string "author_type"
|
124
|
+
t.datetime "created_at"
|
125
|
+
t.datetime "updated_at"
|
126
|
+
end
|
127
|
+
|
128
|
+
add_index "tasks_taskables_url_responses", ["author_id", "author_type"], name: "tasks_taskable_url_responses_author", unique: true
|
129
|
+
add_index "tasks_taskables_url_responses", ["request_id"], name: "index_tasks_taskables_url_responses_on_request_id"
|
130
|
+
|
131
|
+
create_table "tasks_taskables_verification_confirmations", force: true do |t|
|
132
|
+
t.integer "verification_id"
|
133
|
+
t.integer "author_id"
|
134
|
+
t.string "author_type"
|
135
|
+
t.datetime "created_at"
|
136
|
+
t.datetime "updated_at"
|
137
|
+
end
|
138
|
+
|
139
|
+
add_index "tasks_taskables_verification_confirmations", ["author_id", "author_type"], name: "tasks_taskable_verification_confirmation_author"
|
140
|
+
add_index "tasks_taskables_verification_confirmations", ["verification_id"], name: "tasks_taskable_verification_confirmation_verification"
|
141
|
+
|
142
|
+
create_table "tasks_taskables_verifications", force: true do |t|
|
143
|
+
t.integer "verifiable_id"
|
144
|
+
t.string "verifiable_type"
|
145
|
+
t.datetime "created_at"
|
146
|
+
t.datetime "updated_at"
|
147
|
+
end
|
148
|
+
|
149
|
+
add_index "tasks_taskables_verifications", ["verifiable_id", "verifiable_type"], name: "index_tasks_taskable_verifications_verifiable", unique: true
|
150
|
+
|
151
|
+
create_table "tasks_tasks", force: true do |t|
|
152
|
+
t.integer "taskable_id"
|
153
|
+
t.string "taskable_type"
|
154
|
+
t.datetime "created_at"
|
155
|
+
t.datetime "updated_at"
|
156
|
+
t.boolean "obligatory", default: false, null: false
|
157
|
+
end
|
158
|
+
|
159
|
+
add_index "tasks_tasks", ["taskable_id", "taskable_type"], name: "index_tasks_tasks_on_taskable_id_and_taskable_type"
|
160
|
+
|
161
|
+
create_table "users", force: true do |t|
|
162
|
+
t.datetime "created_at"
|
163
|
+
t.datetime "updated_at"
|
164
|
+
end
|
165
|
+
|
166
|
+
end
|
Binary file
|
@@ -0,0 +1,90 @@
|
|
1
|
+
[1m[36m (1.0ms)[0m [1mCREATE TABLE "articles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime) [0m
|
2
|
+
[1m[35m (0.7ms)[0m CREATE TABLE "tasks_taskables_image_requests" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "text" text, "created_at" datetime, "updated_at" datetime, "description" text, "image" varchar(255))
|
3
|
+
[1m[36m (0.9ms)[0m [1mCREATE TABLE "tasks_taskables_image_responses" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "image" varchar(255), "request_id" integer, "author_id" integer, "author_type" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
4
|
+
[1m[35m (0.5ms)[0m select sqlite_version(*)
|
5
|
+
[1m[36m (0.8ms)[0m [1mCREATE INDEX "tasks_taskable_image_responses_author" ON "tasks_taskables_image_responses" ("author_id", "author_type")[0m
|
6
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
7
|
+
FROM sqlite_master
|
8
|
+
WHERE name='tasks_taskable_image_responses_author' AND type='index'
|
9
|
+
UNION ALL
|
10
|
+
SELECT sql
|
11
|
+
FROM sqlite_temp_master
|
12
|
+
WHERE name='tasks_taskable_image_responses_author' AND type='index'
|
13
|
+
|
14
|
+
[1m[36m (0.9ms)[0m [1mCREATE INDEX "index_tasks_taskables_image_responses_on_request_id" ON "tasks_taskables_image_responses" ("request_id")[0m
|
15
|
+
[1m[35m (0.8ms)[0m CREATE TABLE "tasks_taskables_question_answers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "author_id" integer, "author_type" varchar(255), "created_at" datetime, "updated_at" datetime)
|
16
|
+
[1m[36m (0.8ms)[0m [1mCREATE INDEX "tasks_taskable_question_answers_author" ON "tasks_taskables_question_answers" ("author_id", "author_type")[0m
|
17
|
+
[1m[35m (0.9ms)[0m CREATE TABLE "tasks_taskables_question_options" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "text" text, "question_id" integer, "created_at" datetime, "updated_at" datetime, "correct" boolean DEFAULT 'f')
|
18
|
+
[1m[36m (0.8ms)[0m [1mCREATE INDEX "index_tasks_taskables_question_options_on_question_id" ON "tasks_taskables_question_options" ("question_id")[0m
|
19
|
+
[1m[35m (0.8ms)[0m CREATE TABLE "tasks_taskables_question_votes" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "answer_id" integer, "option_id" integer, "created_at" datetime, "updated_at" datetime)
|
20
|
+
[1m[36m (0.7ms)[0m [1mCREATE INDEX "index_tasks_taskables_question_votes_on_answer_id" ON "tasks_taskables_question_votes" ("answer_id")[0m
|
21
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
22
|
+
FROM sqlite_master
|
23
|
+
WHERE name='index_tasks_taskables_question_votes_on_answer_id' AND type='index'
|
24
|
+
UNION ALL
|
25
|
+
SELECT sql
|
26
|
+
FROM sqlite_temp_master
|
27
|
+
WHERE name='index_tasks_taskables_question_votes_on_answer_id' AND type='index'
|
28
|
+
|
29
|
+
[1m[36m (0.8ms)[0m [1mCREATE INDEX "index_tasks_taskables_question_votes_on_option_id" ON "tasks_taskables_question_votes" ("option_id")[0m
|
30
|
+
[1m[35m (0.9ms)[0m CREATE TABLE "tasks_taskables_questions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "text" text, "created_at" datetime, "updated_at" datetime, "description" text, "multiple" boolean, "show_statistics" boolean DEFAULT 't', "image" varchar(255))
|
31
|
+
[1m[36m (0.8ms)[0m [1mCREATE TABLE "tasks_taskables_text_requests" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "text" text, "description" text, "created_at" datetime, "updated_at" datetime, "image" varchar(255)) [0m
|
32
|
+
[1m[35m (0.9ms)[0m CREATE TABLE "tasks_taskables_text_responses" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "text" text, "request_id" integer, "author_id" integer, "author_type" varchar(255), "created_at" datetime, "updated_at" datetime)
|
33
|
+
[1m[36m (0.7ms)[0m [1mCREATE UNIQUE INDEX "tasks_taskable_text_responses_author" ON "tasks_taskables_text_responses" ("author_id", "author_type")[0m
|
34
|
+
[1m[35m (0.7ms)[0m CREATE TABLE "tasks_taskables_url_requests" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "text" text, "description" text, "created_at" datetime, "updated_at" datetime, "image" varchar(255))
|
35
|
+
[1m[36m (0.8ms)[0m [1mCREATE TABLE "tasks_taskables_url_responses" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "url" text, "request_id" integer, "author_id" integer, "author_type" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
36
|
+
[1m[35m (0.8ms)[0m CREATE UNIQUE INDEX "tasks_taskable_url_responses_author" ON "tasks_taskables_url_responses" ("author_id", "author_type")
|
37
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
38
|
+
FROM sqlite_master
|
39
|
+
WHERE name='tasks_taskable_url_responses_author' AND type='index'
|
40
|
+
UNION ALL
|
41
|
+
SELECT sql
|
42
|
+
FROM sqlite_temp_master
|
43
|
+
WHERE name='tasks_taskable_url_responses_author' AND type='index'
|
44
|
+
[0m
|
45
|
+
[1m[35m (0.7ms)[0m CREATE INDEX "index_tasks_taskables_url_responses_on_request_id" ON "tasks_taskables_url_responses" ("request_id")
|
46
|
+
[1m[36m (0.9ms)[0m [1mCREATE TABLE "tasks_taskables_verification_confirmations" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "verification_id" integer, "author_id" integer, "author_type" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
47
|
+
[1m[35m (0.8ms)[0m CREATE INDEX "tasks_taskable_verification_confirmation_author" ON "tasks_taskables_verification_confirmations" ("author_id", "author_type")
|
48
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
49
|
+
FROM sqlite_master
|
50
|
+
WHERE name='tasks_taskable_verification_confirmation_author' AND type='index'
|
51
|
+
UNION ALL
|
52
|
+
SELECT sql
|
53
|
+
FROM sqlite_temp_master
|
54
|
+
WHERE name='tasks_taskable_verification_confirmation_author' AND type='index'
|
55
|
+
[0m
|
56
|
+
[1m[35m (0.8ms)[0m CREATE INDEX "tasks_taskable_verification_confirmation_verification" ON "tasks_taskables_verification_confirmations" ("verification_id")
|
57
|
+
[1m[36m (0.8ms)[0m [1mCREATE TABLE "tasks_taskables_verifications" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "verifiable_id" integer, "verifiable_type" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
58
|
+
[1m[35m (1.0ms)[0m CREATE UNIQUE INDEX "index_tasks_taskable_verifications_verifiable" ON "tasks_taskables_verifications" ("verifiable_id", "verifiable_type")
|
59
|
+
[1m[36m (0.7ms)[0m [1mCREATE TABLE "tasks_tasks" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "taskable_id" integer, "taskable_type" varchar(255), "created_at" datetime, "updated_at" datetime, "obligatory" boolean DEFAULT 'f' NOT NULL) [0m
|
60
|
+
[1m[35m (0.8ms)[0m CREATE INDEX "index_tasks_tasks_on_taskable_id_and_taskable_type" ON "tasks_tasks" ("taskable_id", "taskable_type")
|
61
|
+
[1m[36m (0.9ms)[0m [1mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime) [0m
|
62
|
+
[1m[35m (1.0ms)[0m CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
|
63
|
+
[1m[36m (0.9ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
64
|
+
[1m[35m (0.1ms)[0m SELECT version FROM "schema_migrations"
|
65
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140604075046')[0m
|
66
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140315162017')
|
67
|
+
[1m[36m (0.7ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140315185502')[0m
|
68
|
+
[1m[35m (0.6ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140315151838')
|
69
|
+
[1m[36m (0.6ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140315152116')[0m
|
70
|
+
[1m[35m (0.6ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140315153512')
|
71
|
+
[1m[36m (0.7ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140316203422')[0m
|
72
|
+
[1m[35m (0.7ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140316203812')
|
73
|
+
[1m[36m (0.7ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140316204119')[0m
|
74
|
+
[1m[35m (0.6ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140316221703')
|
75
|
+
[1m[36m (0.6ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140320123047')[0m
|
76
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140402132837')
|
77
|
+
[1m[36m (0.7ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140402135306')[0m
|
78
|
+
[1m[35m (0.6ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140403090537')
|
79
|
+
[1m[36m (0.7ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140404113158')[0m
|
80
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140404130151')
|
81
|
+
[1m[36m (0.7ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140512072931')[0m
|
82
|
+
[1m[35m (0.6ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140512074135')
|
83
|
+
[1m[36m (0.5ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140512120632')[0m
|
84
|
+
[1m[35m (0.5ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140512121254')
|
85
|
+
[1m[36m (0.6ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140512131526')[0m
|
86
|
+
[1m[35m (0.5ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140514082129')
|
87
|
+
[1m[36m (0.5ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140514082143')[0m
|
88
|
+
[1m[35m (0.6ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140520122938')
|
89
|
+
[1m[36m (0.6ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140521134515')[0m
|
90
|
+
[1m[35m (0.5ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140523091152')
|