dm_event 4.2.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +23 -0
- data/README.md +33 -0
- data/Rakefile +36 -0
- data/app/assets/images/dm_event/payment_logos/sofort/at/100x38.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/at/200x75.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/at/250x94.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/at/28x7.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/at/320x120.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/at/42x11.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/at/75x28.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/at/icon-32x22.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/at/icon-32x24.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/at/icon-48x32.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/at/icon-48x34.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/at/icon-64x42.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/at/icon-64x44.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/be/100x38.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/be/200x75.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/be/250x94.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/be/28x7.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/be/320x120.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/be/42x11.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/be/75x28.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/be/icon-32x22.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/be/icon-32x24.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/be/icon-48x32.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/be/icon-48x34.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/be/icon-64x42.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/be/icon-64x44.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/ch/100x38.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/ch/200x75.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/ch/250x94.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/ch/28x7.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/ch/320x120.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/ch/42x11.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/ch/75x28.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/ch/icon-32x22.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/ch/icon-32x24.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/ch/icon-48x32.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/ch/icon-48x34.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/ch/icon-64x42.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/ch/icon-64x44.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/de/100x38.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/de/200x75.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/de/250x94.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/de/28x7.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/de/320x120.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/de/42x11.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/de/75x28.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/de/icon-32x22.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/de/icon-32x24.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/de/icon-48x32.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/de/icon-48x34.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/de/icon-64x42.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/de/icon-64x44.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/es/100x38.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/es/200x75.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/es/250x94.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/es/28x7.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/es/320x120.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/es/42x11.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/es/75x28.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/es/icon-32x22.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/es/icon-32x24.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/es/icon-48x32.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/es/icon-48x34.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/es/icon-64x42.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/es/icon-64x44.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/fr/100x38.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/fr/200x75.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/fr/250x94.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/fr/28x7.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/fr/320x120.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/fr/42x11.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/fr/75x28.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/fr/icon-32x22.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/fr/icon-32x24.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/fr/icon-48x32.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/fr/icon-48x34.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/fr/icon-64x42.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/fr/icon-64x44.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/it/100x38.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/it/200x75.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/it/250x94.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/it/28x7.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/it/320x120.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/it/42x11.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/it/75x28.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/it/icon-32x22.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/it/icon-32x24.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/it/icon-48x32.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/it/icon-48x34.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/it/icon-64x42.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/it/icon-64x44.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/nl/100x38.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/nl/200x75.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/nl/250x94.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/nl/28x7.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/nl/320x120.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/nl/42x11.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/nl/75x28.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/nl/icon-32x22.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/nl/icon-32x24.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/nl/icon-48x32.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/nl/icon-48x34.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/nl/icon-64x42.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/nl/icon-64x44.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/pl/100x38.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/pl/200x75.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/pl/250x94.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/pl/28x7.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/pl/320x120.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/pl/42x11.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/pl/75x28.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/pl/icon-32x22.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/pl/icon-32x24.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/pl/icon-48x32.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/pl/icon-48x34.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/pl/icon-64x42.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/pl/icon-64x44.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/uk/100x38.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/uk/200x75.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/uk/250x94.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/uk/28x7.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/uk/320x120.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/uk/42x11.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/uk/75x28.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/uk/icon-32x22.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/uk/icon-32x24.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/uk/icon-48x32.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/uk/icon-48x34.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/uk/icon-64x42.png +0 -0
- data/app/assets/images/dm_event/payment_logos/sofort/uk/icon-64x44.png +0 -0
- data/app/assets/javascripts/dm_event/admin.js +94 -0
- data/app/assets/stylesheets/dm_event/admin.css +152 -0
- data/app/assets/stylesheets/dm_event/application.css +65 -0
- data/app/controllers/dm_event/admin/admin_controller.rb +13 -0
- data/app/controllers/dm_event/admin/registrations_controller.rb +411 -0
- data/app/controllers/dm_event/admin/workshop_prices_controller.rb +73 -0
- data/app/controllers/dm_event/admin/workshops_controller.rb +147 -0
- data/app/controllers/dm_event/application_controller.rb +23 -0
- data/app/controllers/dm_event/payments_controller.rb +83 -0
- data/app/controllers/dm_event/registrations_controller.rb +368 -0
- data/app/datatables/registration_datatable.rb +117 -0
- data/app/helpers/dm_event/application_helper.rb +4 -0
- data/app/helpers/dm_event/registrations_helper.rb +14 -0
- data/app/helpers/dm_event/workshops_helper.rb +41 -0
- data/app/mailers/payment_reminder_mailer.rb +25 -0
- data/app/mailers/registration_notify_mailer.rb +31 -0
- data/app/models/dm_event/concerns/ability.rb +38 -0
- data/app/models/dm_event/concerns/registration_state_email.rb +80 -0
- data/app/models/dm_event/concerns/registration_state_machine.rb +218 -0
- data/app/models/dm_event/concerns/user_profile.rb +20 -0
- data/app/models/dm_event/model_decorators.rb +6 -0
- data/app/models/dm_event/permitted_params.rb +35 -0
- data/app/models/payment.rb +48 -0
- data/app/models/registration.rb +297 -0
- data/app/models/workshop.rb +247 -0
- data/app/models/workshop_price.rb +118 -0
- data/app/presenters/event_common_presenter.rb +31 -0
- data/app/presenters/registration_presenter.rb +34 -0
- data/app/presenters/workshop_presenter.rb +22 -0
- data/app/views/dm_event/admin/registrations/_form.html.erb +297 -0
- data/app/views/dm_event/admin/registrations/action_state.js.erb +1 -0
- data/app/views/dm_event/admin/registrations/edit.html.erb +1 -0
- data/app/views/dm_event/admin/registrations/index.html.erb +0 -0
- data/app/views/dm_event/admin/workshop_prices/_form.html.erb +62 -0
- data/app/views/dm_event/admin/workshop_prices/edit.html.erb +2 -0
- data/app/views/dm_event/admin/workshop_prices/index.html.erb +31 -0
- data/app/views/dm_event/admin/workshop_prices/new.html.erb +2 -0
- data/app/views/dm_event/admin/workshops/_form.html.erb +61 -0
- data/app/views/dm_event/admin/workshops/_header_menu.html.erb +21 -0
- data/app/views/dm_event/admin/workshops/_registration_stats.html.erb +58 -0
- data/app/views/dm_event/admin/workshops/additional_configuration.html.erb +47 -0
- data/app/views/dm_event/admin/workshops/edit.html.erb +2 -0
- data/app/views/dm_event/admin/workshops/edit_system_email.html.erb +75 -0
- data/app/views/dm_event/admin/workshops/financials.html.erb +179 -0
- data/app/views/dm_event/admin/workshops/index.html.erb +100 -0
- data/app/views/dm_event/admin/workshops/lost_users.html.erb +44 -0
- data/app/views/dm_event/admin/workshops/new.html.erb +2 -0
- data/app/views/dm_event/admin/workshops/show.html.erb +47 -0
- data/app/views/dm_event/admin/workshops/user_outstanding_balances.html.erb +29 -0
- data/app/views/dm_event/liquid_tags/_funding_project_status.html.erb +27 -0
- data/app/views/dm_event/payments/_registrations_paypal_standard.html.erb +23 -0
- data/app/views/dm_event/payments/_registrations_sofort.html.erb +18 -0
- data/app/views/dm_event/registrations/_section_address.html.erb +30 -0
- data/app/views/dm_event/registrations/_section_custom_fields.html.erb +7 -0
- data/app/views/dm_event/registrations/_section_prices.html.erb +33 -0
- data/app/views/dm_event/registrations/_workshop_price.html.erb +18 -0
- data/app/views/dm_event/registrations/choose_payment.html.erb +5 -0
- data/app/views/dm_event/registrations/closed.html.erb +14 -0
- data/app/views/dm_event/registrations/new.html.erb +30 -0
- data/app/views/dm_event/registrations/success.html.erb +15 -0
- data/app/views/layouts/email_templates/dm_event_email_layout.html.erb +318 -0
- data/app/views/layouts/email_templates/dm_event_email_layout.text.erb +1 -0
- data/app/views/layouts/email_templates/dm_event_payment_reminder.html.erb +22 -0
- data/app/views/layouts/email_templates/dm_event_payment_reminder.text.erb +19 -0
- data/app/views/layouts/email_templates/dm_event_registration_notify.html.erb +21 -0
- data/app/views/layouts/email_templates/dm_event_registration_notify.text.erb +13 -0
- data/config/initializers/dm_event.rb +1 -0
- data/config/initializers/liquid_init.rb +2 -0
- data/config/locales/ems.cs.yml +51 -0
- data/config/locales/ems.de.yml +51 -0
- data/config/locales/ems.en.yml +51 -0
- data/config/locales/ems.fi.yml +51 -0
- data/config/locales/ems.ja.yml +51 -0
- data/config/routes.rb +40 -0
- data/db/migrate/20130510155617_create_events.rb +98 -0
- data/db/migrate/20130516124327_add_locale_to_registration.rb +5 -0
- data/db/migrate/20130516204454_add_user_profile_to_registration.rb +11 -0
- data/db/migrate/20130518092324_add_require_address.rb +7 -0
- data/db/migrate/20130609145812_add_workshop_published.rb +5 -0
- data/db/migrate/20130624134506_add_amount_currency.rb +16 -0
- data/db/migrate/20130703131515_add_workshop_currency.rb +5 -0
- data/db/migrate/20130913083529_add_event_funding_type.rb +6 -0
- data/db/migrate/20130914105736_add_enable_payments.rb +5 -0
- data/db/migrate/20130916160033_add_sidebar_to_workshop.rb +5 -0
- data/db/migrate/20130917161700_add_show_address.rb +5 -0
- data/db/migrate/20131116180719_add_default_funding_goal.rb +8 -0
- data/db/migrate/20131127165445_add_payment_reminder.rb +5 -0
- data/db/migrate/20140122204702_add_event_image.rb +5 -0
- data/db/migrate/20140523165342_add_workshop_summary.rb +5 -0
- data/db/migrate/20140605052208_add_uuid_to_registration.rb +10 -0
- data/db/migrate/20140707152124_add_registration_comment_count.rb +5 -0
- data/db/migrate/20140708142312_add_payment_comment.rb +20 -0
- data/db/migrate/20150709125105_add_payment_reminder_history.rb +16 -0
- data/db/migrate/20160810081542_add_bcc_contact_email.rb +5 -0
- data/db/migrate/20160821150120_index_foreign_keys_in_ems_registrations.rb +9 -0
- data/db/migrate/20160821150121_index_foreign_keys_in_ems_workshop_price_translations.rb +5 -0
- data/db/migrate/20160821150122_index_foreign_keys_in_ems_workshop_prices.rb +6 -0
- data/db/migrate/20160821150123_index_foreign_keys_in_ems_workshop_translations.rb +5 -0
- data/db/migrate/20160821150124_index_foreign_keys_in_ems_workshops.rb +6 -0
- data/lib/dm_event/engine.rb +20 -0
- data/lib/dm_event/liquid/tags/funding_project_status.rb +55 -0
- data/lib/dm_event.rb +4 -0
- data/lib/tasks/dm_event_tasks.rake +4 -0
- data/spec/controllers/registrations_controller_spec.rb +152 -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 +5 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/models/ability.rb +10 -0
- data/spec/dummy/app/models/user.rb +6 -0
- data/spec/dummy/app/views/layouts/application.html.erb +14 -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/application.rb +26 -0
- data/spec/dummy/config/boot.rb +5 -0
- data/spec/dummy/config/database.yml +25 -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 +82 -0
- data/spec/dummy/config/environments/test.rb +39 -0
- data/spec/dummy/config/initializers/assets.rb +8 -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 +4 -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 +11 -0
- data/spec/dummy/config/secrets.yml +22 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/migrate/20141114170927_add_globalize_countries.dm_core.rb +50 -0
- data/spec/dummy/db/migrate/20141114170928_devise_create_users.dm_core.rb +46 -0
- data/spec/dummy/db/migrate/20141114170929_add_user_fields.dm_core.rb +14 -0
- data/spec/dummy/db/migrate/20141114170930_rolify_create_roles.dm_core.rb +20 -0
- data/spec/dummy/db/migrate/20141114170931_add_last_access.dm_core.rb +10 -0
- data/spec/dummy/db/migrate/20141114170932_create_versions.dm_core.rb +19 -0
- data/spec/dummy/db/migrate/20141114170933_add_object_changes_column_to_versions.dm_core.rb +12 -0
- data/spec/dummy/db/migrate/20141114170934_create_dm_core_accounts.dm_core.rb +13 -0
- data/spec/dummy/db/migrate/20141114170935_add_account_to_users.dm_core.rb +9 -0
- data/spec/dummy/db/migrate/20141114170936_create_preferences.dm_core.rb +13 -0
- data/spec/dummy/db/migrate/20141114170937_create_comments.dm_core.rb +22 -0
- data/spec/dummy/db/migrate/20141114170938_add_activity.dm_core.rb +21 -0
- data/spec/dummy/db/migrate/20141114170939_add_type_to_comments.dm_core.rb +9 -0
- data/spec/dummy/db/migrate/20141114170940_add_category.dm_core.rb +28 -0
- data/spec/dummy/db/migrate/20141114170941_create_email_table.dm_core.rb +26 -0
- data/spec/dummy/db/migrate/20141114170942_add_user_profile.dm_core.rb +46 -0
- data/spec/dummy/db/migrate/20141114170943_add_profile_email.dm_core.rb +14 -0
- data/spec/dummy/db/migrate/20141114170944_create_payment_history.dm_core.rb +37 -0
- data/spec/dummy/db/migrate/20141114170945_change_anchor_field.dm_core.rb +10 -0
- data/spec/dummy/db/migrate/20141114170946_create_user_site_profile.dm_core.rb +27 -0
- data/spec/dummy/db/migrate/20141114170947_add_avatar.dm_core.rb +12 -0
- data/spec/dummy/db/migrate/20141114170948_add_notify_to_payment_history.dm_core.rb +8 -0
- data/spec/dummy/db/migrate/20141114170949_acts_as_votable_migration.dm_core.rb +28 -0
- data/spec/dummy/db/migrate/20141114170950_add_user_site_profile_uuid.dm_core.rb +19 -0
- data/spec/dummy/db/migrate/20141114170951_add_invoice_id.dm_core.rb +7 -0
- data/spec/dummy/db/migrate/20141114170952_acts_as_follower_migration.dm_core.rb +18 -0
- data/spec/dummy/db/migrate/20141114170953_rename_invoice_id.dm_core.rb +12 -0
- data/spec/dummy/db/migrate/20141114170954_add_core_addresses.dm_core.rb +18 -0
- data/spec/dummy/db/migrate/20141114170955_papertrail_increase_column.dm_core.rb +9 -0
- data/spec/dummy/db/migrate/20141114170956_acts_as_taggable_on_migration.dm_core.rb +32 -0
- data/spec/dummy/db/migrate/20141114170957_add_missing_unique_indices.dm_core.rb +23 -0
- data/spec/dummy/db/migrate/20141114170958_add_taggings_counter_cache_to_tags.dm_core.rb +16 -0
- data/spec/dummy/db/migrate/20141114170959_create_custom_fields.dm_core.rb +40 -0
- data/spec/dummy/db/migrate/20141114170960_add_missing_taggable_index.dm_core.rb +11 -0
- data/spec/dummy/db/migrate/20141119103740_create_cms.dm_cms.rb +92 -0
- data/spec/dummy/db/migrate/20141119103741_add_account_to_cms.dm_cms.rb +11 -0
- data/spec/dummy/db/migrate/20141119103742_create_blog.dm_cms.rb +62 -0
- data/spec/dummy/db/migrate/20141119103743_add_notification_sent.dm_cms.rb +6 -0
- data/spec/dummy/db/migrate/20141119103744_add_blog_comment.dm_cms.rb +8 -0
- data/spec/dummy/db/migrate/20141119103745_add_blog_image.dm_cms.rb +6 -0
- data/spec/dummy/db/migrate/20141119103746_rename_snippet_slug.dm_cms.rb +14 -0
- data/spec/dummy/db/migrate/20141119103747_add_requires_subscription_blog.dm_cms.rb +8 -0
- data/spec/dummy/db/migrate/20141119103748_add_pages_ranked_model.dm_cms.rb +23 -0
- data/spec/dummy/db/migrate/20141119103749_add_blog_owner.dm_cms.rb +7 -0
- data/spec/dummy/db/migrate/20141119103750_create_media_files.dm_cms.rb +30 -0
- data/spec/dummy/db/migrate/20141119103751_add_cmspage_summary.dm_cms.rb +7 -0
- data/spec/dummy/db/migrate/20141119103752_add_blog_image_email_header.dm_cms.rb +6 -0
- data/spec/dummy/db/migrate/20141119103753_add_header_image.dm_cms.rb +10 -0
- data/spec/dummy/db/migrate/20160128154135_add_favored_locale.dm_core.rb +17 -0
- data/spec/dummy/db/migrate/20160128154136_update_papertrail_v4.dm_core.rb +41 -0
- data/spec/dummy/db/schema.rb +677 -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/factories/account_factory.rb +7 -0
- data/spec/factories/registration_factory.rb +13 -0
- data/spec/factories/workshop_factory.rb +25 -0
- data/spec/factories/workshop_price_factory.rb +19 -0
- data/spec/models/registration_spec.rb +83 -0
- data/spec/models/workshop_spec.rb +26 -0
- data/spec/rails_helper.rb +70 -0
- data/spec/spec_helper.rb +85 -0
- data/spec/support/accounts.rb +17 -0
- data/spec/support/devise.rb +44 -0
- data/spec/support/fix_locale.rb +57 -0
- metadata +520 -0
@@ -0,0 +1,55 @@
|
|
1
|
+
module Liquid
|
2
|
+
# {% video_frame width : 720, caption : 'some caption', class : some_class
|
3
|
+
# title: 'some_title', :id : some_id, alt : alt_text, side : right %}
|
4
|
+
#------------------------------------------------------------------------------
|
5
|
+
class FundingProjectStatus < DmCore::LiquidBlock
|
6
|
+
include ActionView::Helpers::TagHelper
|
7
|
+
include ActionView::Helpers::AssetTagHelper
|
8
|
+
# include Sprockets::Rails::Helper
|
9
|
+
include DmCore::UrlHelper
|
10
|
+
include DmCore::ParamsHelper
|
11
|
+
include DmCore::AccountHelper
|
12
|
+
|
13
|
+
#------------------------------------------------------------------------------
|
14
|
+
def render(context)
|
15
|
+
@attributes.reverse_merge! 'class' => '', 'width' => '', 'style' => '',
|
16
|
+
'button_text' => '', 'button_link' => ''
|
17
|
+
|
18
|
+
output = super
|
19
|
+
content = output.strip
|
20
|
+
workshop_id = @attributes['project_id'] unless @attributes['project_id'].blank?
|
21
|
+
image = file_url(@attributes["image"], account_site_assets: context_account_site_assets(context), default_folder: 'images', protected: @attributes['protected'].as_boolean)
|
22
|
+
@attributes['style'] += css_style_width(@attributes['width'])
|
23
|
+
|
24
|
+
context.registers[:view].render(partial: 'dm_event/liquid_tags/funding_project_status',
|
25
|
+
locals: { content: content,
|
26
|
+
workshop_id: workshop_id,
|
27
|
+
image: image,
|
28
|
+
div_class: @attributes['class'],
|
29
|
+
div_style: @attributes['style'],
|
30
|
+
button_text: @attributes['button_text'],
|
31
|
+
button_link: @attributes['button_link']
|
32
|
+
})
|
33
|
+
end
|
34
|
+
|
35
|
+
#------------------------------------------------------------------------------
|
36
|
+
def self.details
|
37
|
+
{ name: self.tag_name,
|
38
|
+
summary: 'Funding Project Status',
|
39
|
+
description: "",
|
40
|
+
example: self.example,
|
41
|
+
category: 'structure'
|
42
|
+
}
|
43
|
+
end
|
44
|
+
def self.example
|
45
|
+
example = <<-END_OF_STRING
|
46
|
+
{% funding_project_status %}
|
47
|
+
...content
|
48
|
+
{% endfunding_project_status %}
|
49
|
+
END_OF_STRING
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
Template.register_tag('funding_project_status', FundingProjectStatus)
|
54
|
+
|
55
|
+
end
|
data/lib/dm_event.rb
ADDED
@@ -0,0 +1,152 @@
|
|
1
|
+
require 'rails_helper'
|
2
|
+
|
3
|
+
describe DmEvent::RegistrationsController do
|
4
|
+
|
5
|
+
routes { DmEvent::Engine.routes }
|
6
|
+
# login_admin
|
7
|
+
|
8
|
+
describe 'GET #new' do
|
9
|
+
it "write tests"
|
10
|
+
# let(:workshop) { create(:workshop) }
|
11
|
+
#
|
12
|
+
# #------------------------------------------------------------------------------
|
13
|
+
# it "assigns a new Post to @post" do
|
14
|
+
# get :new, workshop_id: workshop
|
15
|
+
# expect(assigns(:registration)).to be_a_new(Registration)
|
16
|
+
# end
|
17
|
+
#
|
18
|
+
# # #------------------------------------------------------------------------------
|
19
|
+
# # it "renders the :new template" do
|
20
|
+
# # get :new, cms_blog_id: blog
|
21
|
+
# # expect(response).to render_template :new
|
22
|
+
# # end
|
23
|
+
end
|
24
|
+
|
25
|
+
# # describe 'GET #edit' do
|
26
|
+
# # let(:blog) { create(:blog) }
|
27
|
+
# # let(:post) { blog.posts.create(attributes_for(:post)) }
|
28
|
+
# #
|
29
|
+
# # #------------------------------------------------------------------------------
|
30
|
+
# # it "assigns the requested post to @post" do
|
31
|
+
# # get :edit, cms_blog_id: blog, id: post
|
32
|
+
# # expect(assigns(:post)).to eq post
|
33
|
+
# # end
|
34
|
+
# #
|
35
|
+
# # #------------------------------------------------------------------------------
|
36
|
+
# # it "renders the :edit template" do
|
37
|
+
# # get :edit, cms_blog_id: blog, id: post
|
38
|
+
# # expect(response).to render_template :edit
|
39
|
+
# # end
|
40
|
+
# #
|
41
|
+
# # #------------------------------------------------------------------------------
|
42
|
+
# # it "ensure the edited post is scoped to the correct blog (same slugs, different blogs)" do
|
43
|
+
# # blog2 = create(:news_blog)
|
44
|
+
# # post2 = blog2.posts.create(attributes_for(:post))
|
45
|
+
# #
|
46
|
+
# # get :edit, cms_blog_id: blog, id: post
|
47
|
+
# # expect(assigns(:post)).to eq post
|
48
|
+
# # get :edit, cms_blog_id: blog2, id: post2
|
49
|
+
# # expect(assigns(:post)).to eq post2
|
50
|
+
# # end
|
51
|
+
# # end
|
52
|
+
#
|
53
|
+
# # describe "POST #create" do
|
54
|
+
# # let(:blog) { create(:blog) }
|
55
|
+
# #
|
56
|
+
# # context "with valid attributes" do
|
57
|
+
# # #------------------------------------------------------------------------------
|
58
|
+
# # it "saves the new post in the database" do
|
59
|
+
# # expect {
|
60
|
+
# # post :create, cms_blog_id: blog, cms_post: attributes_for(:post)
|
61
|
+
# # }.to change(blog.posts, :count).by(1)
|
62
|
+
# # end
|
63
|
+
# #
|
64
|
+
# # #------------------------------------------------------------------------------
|
65
|
+
# # it "redirects to blog#show" do
|
66
|
+
# # post :create, cms_blog_id: blog, cms_post: attributes_for(:post)
|
67
|
+
# # expect(response).to redirect_to admin_cms_blog_url(assigns[:blog])
|
68
|
+
# # end
|
69
|
+
# # end
|
70
|
+
# #
|
71
|
+
# # context "with invalid attributes" do
|
72
|
+
# # #------------------------------------------------------------------------------
|
73
|
+
# # it "does not save the new post in the database" do
|
74
|
+
# # expect {
|
75
|
+
# # post :create, cms_blog_id: blog, cms_post: attributes_for(:invalid_post)
|
76
|
+
# # }.to_not change(blog.posts, :count)
|
77
|
+
# # end
|
78
|
+
# #
|
79
|
+
# # #------------------------------------------------------------------------------
|
80
|
+
# # it "re-renders the :new template" do
|
81
|
+
# # post :create, cms_blog_id: blog, cms_post: attributes_for(:invalid_post)
|
82
|
+
# # expect(response).to render_template :new
|
83
|
+
# # end
|
84
|
+
# # end
|
85
|
+
# # end
|
86
|
+
#
|
87
|
+
# # describe 'PATCH #update' do
|
88
|
+
# # let(:blog) { create(:blog) }
|
89
|
+
# # let(:post) { blog.posts.create(attributes_for(:post)) }
|
90
|
+
# #
|
91
|
+
# # context "with valid attributes" do
|
92
|
+
# # #------------------------------------------------------------------------------
|
93
|
+
# # it "locates the requested @post" do
|
94
|
+
# # blog2 = create(:news_blog)
|
95
|
+
# # post2 = blog2.posts.create(attributes_for(:post))
|
96
|
+
# #
|
97
|
+
# # patch :update, cms_blog_id: blog, id: post, cms_post: attributes_for(:post)
|
98
|
+
# # expect(assigns(:post)).to eq post
|
99
|
+
# # patch :update, cms_blog_id: blog2, id: post2, cms_post: attributes_for(:post)
|
100
|
+
# # expect(assigns(:post)).to eq post2
|
101
|
+
# # end
|
102
|
+
# #
|
103
|
+
# # #------------------------------------------------------------------------------
|
104
|
+
# # it "updates the post in the database" do
|
105
|
+
# # patch :update, cms_blog_id: blog, id: post, cms_post: attributes_for(:post, title: 'Updated title', content: 'Updated content')
|
106
|
+
# # post.reload
|
107
|
+
# # expect(post.title).to eq('Updated title')
|
108
|
+
# # expect(post.content).to eq('Updated content')
|
109
|
+
# # end
|
110
|
+
# #
|
111
|
+
# # #------------------------------------------------------------------------------
|
112
|
+
# # it "redirects to the blog" do
|
113
|
+
# # patch :update, cms_blog_id: blog, id: post, cms_post: attributes_for(:post)
|
114
|
+
# # expect(response).to redirect_to admin_cms_blog_url(blog)
|
115
|
+
# # end
|
116
|
+
# # end
|
117
|
+
# #
|
118
|
+
# # context "with invalid attributes" do
|
119
|
+
# # #------------------------------------------------------------------------------
|
120
|
+
# # it "does not update the post" do
|
121
|
+
# # patch :update, cms_blog_id: blog, id: post, cms_post: attributes_for(:post, title: 'Updated title', content: nil)
|
122
|
+
# # post.reload
|
123
|
+
# # expect(post.title).to eq(attributes_for(:post)[:title])
|
124
|
+
# # expect(post.content).to eq(attributes_for(:post)[:content])
|
125
|
+
# # end
|
126
|
+
# #
|
127
|
+
# # #------------------------------------------------------------------------------
|
128
|
+
# # it "re-renders the #edit template" do
|
129
|
+
# # patch :update, cms_blog_id: blog, id: post, cms_post: attributes_for(:post, title: 'Updated title', content: nil)
|
130
|
+
# # expect(response).to render_template :edit
|
131
|
+
# # end
|
132
|
+
# # end
|
133
|
+
# # end
|
134
|
+
#
|
135
|
+
# # describe 'DELETE #destroy' do
|
136
|
+
# # let(:blog) { create(:blog) }
|
137
|
+
# # let(:post) { blog.posts.create(attributes_for(:post)) }
|
138
|
+
# #
|
139
|
+
# # #------------------------------------------------------------------------------
|
140
|
+
# # it "deletes the post from the blog" do
|
141
|
+
# # post # make sure post is created before the expect
|
142
|
+
# # expect { delete :destroy, cms_blog_id: blog, id: post }.to change(blog.posts, :count).by(-1)
|
143
|
+
# # end
|
144
|
+
# #
|
145
|
+
# # #------------------------------------------------------------------------------
|
146
|
+
# # it "redirects to cms_blogs#index" do
|
147
|
+
# # delete :destroy, cms_blog_id: blog, id: post
|
148
|
+
# # expect(response).to redirect_to admin_cms_blog_url(blog)
|
149
|
+
# # end
|
150
|
+
# # end
|
151
|
+
#
|
152
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
== README
|
2
|
+
|
3
|
+
This README would normally document whatever steps are necessary to get the
|
4
|
+
application up and running.
|
5
|
+
|
6
|
+
Things you may want to cover:
|
7
|
+
|
8
|
+
* Ruby version
|
9
|
+
|
10
|
+
* System dependencies
|
11
|
+
|
12
|
+
* Configuration
|
13
|
+
|
14
|
+
* Database creation
|
15
|
+
|
16
|
+
* Database initialization
|
17
|
+
|
18
|
+
* How to run the test suite
|
19
|
+
|
20
|
+
* Services (job queues, cache servers, search engines, etc.)
|
21
|
+
|
22
|
+
* Deployment instructions
|
23
|
+
|
24
|
+
* ...
|
25
|
+
|
26
|
+
|
27
|
+
Please feel free to use a different markup language if you do not plan to run
|
28
|
+
<tt>rake doc:app</tt>.
|
data/spec/dummy/Rakefile
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
2
|
+
// listed below.
|
3
|
+
//
|
4
|
+
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
|
5
|
+
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
|
6
|
+
//
|
7
|
+
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
8
|
+
// compiled file.
|
9
|
+
//
|
10
|
+
// Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
|
11
|
+
// about supported directives.
|
12
|
+
//
|
13
|
+
//= require_tree .
|
@@ -0,0 +1,15 @@
|
|
1
|
+
/*
|
2
|
+
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
3
|
+
* listed below.
|
4
|
+
*
|
5
|
+
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
6
|
+
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
|
7
|
+
*
|
8
|
+
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
|
9
|
+
* compiled file so the styles you add here take precedence over styles defined in any styles
|
10
|
+
* defined in the other CSS/SCSS files in this directory. It is generally better to create a new
|
11
|
+
* file per style scope.
|
12
|
+
*
|
13
|
+
*= require_tree .
|
14
|
+
*= require_self
|
15
|
+
*/
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# Application's CanCan ability class, include all gem abilities
|
2
|
+
#------------------------------------------------------------------------------
|
3
|
+
class Ability
|
4
|
+
include CanCan::Ability
|
5
|
+
include DmCore::Concerns::Ability
|
6
|
+
|
7
|
+
def initialize(user)
|
8
|
+
dm_core_abilities(user) if respond_to? :dm_core_abilities
|
9
|
+
end
|
10
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>Dummy</title>
|
5
|
+
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
|
6
|
+
<%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
|
7
|
+
<%= csrf_meta_tags %>
|
8
|
+
</head>
|
9
|
+
<body>
|
10
|
+
|
11
|
+
<%= yield %>
|
12
|
+
|
13
|
+
</body>
|
14
|
+
</html>
|
data/spec/dummy/bin/rake
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
require File.expand_path('../boot', __FILE__)
|
2
|
+
|
3
|
+
require 'rails/all'
|
4
|
+
|
5
|
+
Bundler.require(*Rails.groups)
|
6
|
+
require "dm_core"
|
7
|
+
|
8
|
+
module Dummy
|
9
|
+
class Application < Rails::Application
|
10
|
+
# Settings in config/environments/* take precedence over those specified here.
|
11
|
+
# Application configuration should go into files in config/initializers
|
12
|
+
# -- all .rb files in that directory are automatically loaded.
|
13
|
+
|
14
|
+
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
15
|
+
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
16
|
+
# config.time_zone = 'Central Time (US & Canada)'
|
17
|
+
|
18
|
+
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
19
|
+
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
20
|
+
# config.i18n.default_locale = :de
|
21
|
+
|
22
|
+
# Do not swallow errors in after_commit/after_rollback callbacks.
|
23
|
+
config.active_record.raise_in_transactional_callbacks = true
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# SQLite version 3.x
|
2
|
+
# gem install sqlite3
|
3
|
+
#
|
4
|
+
# Ensure the SQLite 3 gem is defined in your Gemfile
|
5
|
+
# gem 'sqlite3'
|
6
|
+
#
|
7
|
+
default: &default
|
8
|
+
adapter: sqlite3
|
9
|
+
pool: 5
|
10
|
+
timeout: 5000
|
11
|
+
|
12
|
+
development:
|
13
|
+
<<: *default
|
14
|
+
database: db/development.sqlite3
|
15
|
+
|
16
|
+
# Warning: The database defined as "test" will be erased and
|
17
|
+
# re-generated from your development database when you run "rake".
|
18
|
+
# Do not set this db to the same as development or production.
|
19
|
+
test:
|
20
|
+
<<: *default
|
21
|
+
database: db/test.sqlite3
|
22
|
+
|
23
|
+
production:
|
24
|
+
<<: *default
|
25
|
+
database: db/production.sqlite3
|
@@ -0,0 +1,37 @@
|
|
1
|
+
Rails.application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb.
|
3
|
+
|
4
|
+
# In the development environment your application's code is reloaded on
|
5
|
+
# every request. This slows down response time but is perfect for development
|
6
|
+
# since you don't have to restart the web server when you make code changes.
|
7
|
+
config.cache_classes = false
|
8
|
+
|
9
|
+
# Do not eager load code on boot.
|
10
|
+
config.eager_load = false
|
11
|
+
|
12
|
+
# Show full error reports and disable caching.
|
13
|
+
config.consider_all_requests_local = true
|
14
|
+
config.action_controller.perform_caching = false
|
15
|
+
|
16
|
+
# Don't care if the mailer can't send.
|
17
|
+
config.action_mailer.raise_delivery_errors = false
|
18
|
+
|
19
|
+
# Print deprecation notices to the Rails logger.
|
20
|
+
config.active_support.deprecation = :log
|
21
|
+
|
22
|
+
# Raise an error on page load if there are pending migrations.
|
23
|
+
config.active_record.migration_error = :page_load
|
24
|
+
|
25
|
+
# Debug mode disables concatenation and preprocessing of assets.
|
26
|
+
# This option may cause significant delays in view rendering with a large
|
27
|
+
# number of complex assets.
|
28
|
+
config.assets.debug = true
|
29
|
+
|
30
|
+
# Adds additional error checking when serving assets at runtime.
|
31
|
+
# Checks for improperly declared sprockets dependencies.
|
32
|
+
# Raises helpful error messages.
|
33
|
+
config.assets.raise_runtime_errors = true
|
34
|
+
|
35
|
+
# Raises error for missing translations
|
36
|
+
# config.action_view.raise_on_missing_translations = true
|
37
|
+
end
|
@@ -0,0 +1,82 @@
|
|
1
|
+
Rails.application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb.
|
3
|
+
|
4
|
+
# Code is not reloaded between requests.
|
5
|
+
config.cache_classes = true
|
6
|
+
|
7
|
+
# Eager load code on boot. This eager loads most of Rails and
|
8
|
+
# your application in memory, allowing both threaded web servers
|
9
|
+
# and those relying on copy on write to perform better.
|
10
|
+
# Rake tasks automatically ignore this option for performance.
|
11
|
+
config.eager_load = true
|
12
|
+
|
13
|
+
# Full error reports are disabled and caching is turned on.
|
14
|
+
config.consider_all_requests_local = false
|
15
|
+
config.action_controller.perform_caching = true
|
16
|
+
|
17
|
+
# Enable Rack::Cache to put a simple HTTP cache in front of your application
|
18
|
+
# Add `rack-cache` to your Gemfile before enabling this.
|
19
|
+
# For large-scale production use, consider using a caching reverse proxy like nginx, varnish or squid.
|
20
|
+
# config.action_dispatch.rack_cache = true
|
21
|
+
|
22
|
+
# Disable Rails's static asset server (Apache or nginx will already do this).
|
23
|
+
config.serve_static_files = false
|
24
|
+
|
25
|
+
# Compress JavaScripts and CSS.
|
26
|
+
config.assets.js_compressor = :uglifier
|
27
|
+
# config.assets.css_compressor = :sass
|
28
|
+
|
29
|
+
# Do not fallback to assets pipeline if a precompiled asset is missed.
|
30
|
+
config.assets.compile = false
|
31
|
+
|
32
|
+
# Generate digests for assets URLs.
|
33
|
+
config.assets.digest = true
|
34
|
+
|
35
|
+
# `config.assets.precompile` has moved to config/initializers/assets.rb
|
36
|
+
|
37
|
+
# Specifies the header that your server uses for sending files.
|
38
|
+
# config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
|
39
|
+
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
|
40
|
+
|
41
|
+
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
42
|
+
# config.force_ssl = true
|
43
|
+
|
44
|
+
# Set to :debug to see everything in the log.
|
45
|
+
config.log_level = :info
|
46
|
+
|
47
|
+
# Prepend all log lines with the following tags.
|
48
|
+
# config.log_tags = [ :subdomain, :uuid ]
|
49
|
+
|
50
|
+
# Use a different logger for distributed setups.
|
51
|
+
# config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
|
52
|
+
|
53
|
+
# Use a different cache store in production.
|
54
|
+
# config.cache_store = :mem_cache_store
|
55
|
+
|
56
|
+
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
|
57
|
+
# config.action_controller.asset_host = "http://assets.example.com"
|
58
|
+
|
59
|
+
# Precompile additional assets.
|
60
|
+
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
|
61
|
+
# config.assets.precompile += %w( search.js )
|
62
|
+
|
63
|
+
# Ignore bad email addresses and do not raise email delivery errors.
|
64
|
+
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
|
65
|
+
# config.action_mailer.raise_delivery_errors = false
|
66
|
+
|
67
|
+
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
68
|
+
# the I18n.default_locale when a translation cannot be found).
|
69
|
+
config.i18n.fallbacks = true
|
70
|
+
|
71
|
+
# Send deprecation notices to registered listeners.
|
72
|
+
config.active_support.deprecation = :notify
|
73
|
+
|
74
|
+
# Disable automatic flushing of the log to improve performance.
|
75
|
+
# config.autoflush_log = false
|
76
|
+
|
77
|
+
# Use default logging formatter so that PID and timestamp are not suppressed.
|
78
|
+
config.log_formatter = ::Logger::Formatter.new
|
79
|
+
|
80
|
+
# Do not dump schema after migrations.
|
81
|
+
config.active_record.dump_schema_after_migration = false
|
82
|
+
end
|
@@ -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_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
|
+
# 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,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,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
|