jinda 0.7.7.4 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +46 -29
- data/Rakefile +103 -1
- data/app/assets/config/manifest.js +4 -1
- data/app/assets/javascripts/jinda_bootstrap.js +20 -0
- data/app/assets/stylesheets/_jinda_bootstrap_theme.scss +190 -0
- data/{lib/generators/jinda/templates/app/assets/stylesheets/jinda_jqm.css.scss → app/assets/stylesheets/jinda_bootstrap.css.scss} +12 -10
- data/app/config/routes.rb +38 -28
- data/app/controllers/concerns/jinda_general_concern.rb +86 -87
- data/app/controllers/concerns/jinda_run_concern.rb +184 -184
- data/app/controllers/jinda_controller.rb +23 -22
- data/bin/lint_modified +21 -0
- data/config/routes.rb +41 -22
- data/lib/generators/jinda/config_generator.rb +102 -81
- data/lib/generators/jinda/install_generator.rb +305 -148
- data/lib/generators/jinda/install_generator.rb.bak2 +268 -0
- data/lib/generators/jinda/installer/gems_install.rb +125 -127
- data/lib/generators/jinda/minitest_generator.rb +19 -18
- data/lib/generators/jinda/rspec_generator.rb +15 -14
- data/lib/generators/jinda/templates/DOCKER.md +188 -0
- data/lib/generators/jinda/templates/Dockerfile +15 -5
- data/lib/generators/jinda/templates/README.md +3 -3
- data/lib/generators/jinda/templates/app/assets/config/manifest.js +4 -0
- data/lib/generators/jinda/templates/app/assets/javascripts/application.js +8 -8
- data/lib/generators/jinda/templates/app/channels/application_cable/channel.rb +2 -0
- data/lib/generators/jinda/templates/app/channels/application_cable/connection.rb +2 -0
- data/{test/dummy → lib/generators/jinda/templates}/app/controllers/adminltes_controller.rb +1 -0
- data/lib/generators/jinda/templates/app/controllers/api/v1/notes_controller.rb +80 -78
- data/lib/generators/jinda/templates/app/controllers/jinda_org/admins_controller.rb +4 -2
- data/lib/generators/jinda/templates/app/controllers/jinda_org/application_controller.rb +11 -9
- data/lib/generators/jinda/templates/app/controllers/jinda_org/articles_controller.rb +40 -44
- data/lib/generators/jinda/templates/app/controllers/jinda_org/comments_controller.rb +10 -8
- data/lib/generators/jinda/templates/app/controllers/jinda_org/docs_controller.rb +23 -24
- data/lib/generators/jinda/templates/app/controllers/jinda_org/identities_controller.rb +3 -1
- data/lib/generators/jinda/templates/app/controllers/jinda_org/notes_controller.rb +25 -27
- data/lib/generators/jinda/templates/app/controllers/jinda_org/password_resets_controller.rb +16 -18
- data/lib/generators/jinda/templates/app/controllers/jinda_org/sessions_controller.rb +13 -14
- data/lib/generators/jinda/templates/app/controllers/jinda_org/sitemap_controller.rb +4 -4
- data/lib/generators/jinda/templates/app/controllers/jinda_org/users_controller.rb +14 -14
- data/lib/generators/jinda/templates/app/controllers/mindmap_editor_controller.rb +74 -0
- data/lib/generators/jinda/templates/app/helpers/admins_helper.rb +2 -0
- data/lib/generators/jinda/templates/app/helpers/application_helper.rb +21 -20
- data/lib/generators/jinda/templates/app/helpers/articles_helper.rb +2 -0
- data/lib/generators/jinda/templates/app/helpers/basic_helper.rb +2 -0
- data/lib/generators/jinda/templates/app/helpers/comments_helper.rb +2 -0
- data/lib/generators/jinda/templates/app/helpers/ctrs_helper.rb +2 -0
- data/lib/generators/jinda/templates/app/helpers/devs_helper.rb +2 -0
- data/lib/generators/jinda/templates/app/helpers/mindmap_editor_helper.rb +3 -0
- data/lib/generators/jinda/templates/app/helpers/pictures_helper.rb +2 -0
- data/lib/generators/jinda/templates/app/helpers/sitemap_helper.rb +2 -0
- data/lib/generators/jinda/templates/app/helpers/users_helper.rb +2 -0
- data/lib/generators/jinda/templates/app/jinda/index.mm +276 -298
- data/lib/generators/jinda/templates/app/jinda/template/index.mm +1 -0
- data/lib/generators/jinda/templates/app/mailers/jinda_mailer.rb +5 -3
- data/lib/generators/jinda/templates/app/mailers/note_mailer.rb +6 -4
- data/lib/generators/jinda/templates/app/mailers/user_mailer.rb +5 -5
- data/lib/generators/jinda/templates/app/models/address.rb +10 -8
- data/lib/generators/jinda/templates/app/models/article.rb +8 -6
- data/lib/generators/jinda/templates/app/models/comment.rb +10 -8
- data/lib/generators/jinda/templates/app/models/identity.rb +11 -10
- data/lib/generators/jinda/templates/app/models/jinda/doc.rb +36 -33
- data/lib/generators/jinda/templates/app/models/jinda/jinda_module.rb +15 -0
- data/lib/generators/jinda/templates/app/models/jinda/module.rb +14 -10
- data/lib/generators/jinda/templates/app/models/jinda/notice.rb +15 -11
- data/lib/generators/jinda/templates/app/models/jinda/role.rb +11 -7
- data/lib/generators/jinda/templates/app/models/jinda/runseq.rb +23 -20
- data/lib/generators/jinda/templates/app/models/jinda/service.rb +19 -15
- data/lib/generators/jinda/templates/app/models/jinda/xmain.rb +42 -36
- data/lib/generators/jinda/templates/app/models/note.rb +14 -10
- data/lib/generators/jinda/templates/app/models/param.rb +23 -20
- data/lib/generators/jinda/templates/app/models/person.rb +9 -7
- data/lib/generators/jinda/templates/app/models/user.rb +42 -41
- data/lib/generators/jinda/templates/app/views/articles/show.html.haml +2 -2
- data/lib/generators/jinda/templates/app/views/identities/new.html.haml +13 -0
- data/lib/generators/jinda/templates/app/views/jinda/_static_bootstrap.haml +23 -0
- data/lib/generators/jinda/templates/app/views/jinda/feed.rss.builder +15 -13
- data/lib/generators/jinda/templates/app/views/jinda/index.html.haml +3 -2
- data/lib/generators/jinda/templates/app/views/layouts/application.haml +31 -4
- data/lib/generators/jinda/templates/app/views/layouts/lte/_header.haml +54 -0
- data/{test/dummy → lib/generators/jinda/templates}/app/views/layouts/lte/_sidebar.haml +1 -1
- data/lib/generators/jinda/templates/app/views/mindmap_editor/edit.html.haml +126 -0
- data/lib/generators/jinda/templates/app/views/mindmap_editor/save.html.haml +2 -0
- data/lib/generators/jinda/templates/app/views/sessions/new.html.haml +13 -0
- data/lib/generators/jinda/templates/bin/lint_modified +21 -0
- data/lib/generators/jinda/templates/config/mongoid.yml +3 -3
- data/lib/generators/jinda/templates/config/mongoid.yml-docker +3 -3
- data/lib/generators/jinda/templates/config/mongoid.yml-localhost +3 -3
- data/lib/generators/jinda/templates/docker-compose-mongodb.yml +13 -0
- data/lib/generators/jinda/templates/docker-compose-web.yml +36 -0
- data/lib/generators/jinda/templates/docker-compose.yml +10 -14
- data/lib/generators/jinda/templates/spec/controllers/api/v1_get_index_spec.rb +15 -14
- data/lib/generators/jinda/templates/spec/controllers/api/v1_get_my_spec.rb +9 -4
- data/lib/generators/jinda/templates/spec/controllers/api/v1_post_spec.rb +4 -3
- data/lib/generators/jinda/templates/spec/controllers/sessions_controller_spec.rb +82 -90
- data/lib/generators/jinda/templates/spec/features/userlogins_spec.rb +12 -15
- data/lib/generators/jinda/templates/spec/mailers/note_spec.rb +5 -8
- data/lib/generators/jinda/templates/spec/mailers/previews/note_preview.rb +3 -5
- data/lib/generators/jinda/templates/spec/models/note_spec.rb +36 -35
- data/lib/generators/jinda/templates/spec/models/user_spec.rb +10 -8
- data/lib/generators/jinda/templates/spec/rails_helper.rb +29 -31
- data/lib/generators/jinda/templates/spec/spec_helper.rb +19 -17
- data/lib/generators/jinda/templates/spec/support/authentication_helper.rb +8 -7
- data/lib/generators/jinda/templates/spec/support/databasecleaner.rb +3 -1
- data/lib/generators/jinda/templates/spec/support/factory_bot.rb +7 -5
- data/lib/generators/jinda/templates/spec/support/omniauth_macros.rb +14 -19
- data/lib/generators/jinda/templates/spec/support/request_spec_helper.rb +3 -1
- data/lib/generators/jinda/templates/spec/views/articles/_article.html.erb_spec.rbx +9 -8
- data/lib/generators/jinda/templates/test/application_system_test_case.rb +3 -1
- data/lib/generators/jinda/templates/test/integration/jinda_routes_test.rb +16 -21
- data/lib/generators/jinda/templates/test/test_helper.rb +7 -3
- data/lib/jinda/date_helpers.rb +50 -41
- data/lib/jinda/gem_helpers.rb +10 -8
- data/lib/jinda/gen_class.rb +14 -12
- data/lib/jinda/gen_controller.rb +9 -8
- data/lib/jinda/gen_freemind.rb +33 -32
- data/lib/jinda/gen_helpers.rb +146 -139
- data/lib/jinda/gen_models.rb +125 -131
- data/lib/jinda/gen_modules.rb +21 -16
- data/lib/jinda/gen_runseq.rb +71 -67
- data/lib/jinda/gen_services.rb +74 -80
- data/lib/jinda/gen_xmain.rb +38 -36
- data/lib/jinda/get_app.rb +31 -29
- data/lib/jinda/helpers.rb +4 -4
- data/lib/jinda/init_vars.rb +41 -36
- data/lib/jinda/mindmap_converter.rb +196 -0
- data/lib/jinda/railtie.rb +10 -2
- data/lib/jinda/rake_views.rb +61 -60
- data/lib/jinda/refresh.rb +67 -61
- data/lib/jinda/themes.rb +80 -60
- data/lib/jinda/version.rb +3 -1
- data/lib/jinda.rb +2 -0
- data/lib/tasks/jinda.rake +25 -22
- data/test/INTEGRATION_TEST_README.md +374 -0
- data/test/LOCAL_DEVELOPMENT.md +345 -0
- data/test/README.md +243 -0
- data/test/TEST_INFRASTRUCTURE.md +412 -0
- data/test/TEST_INSTALLATION_SH_FIXES.md +205 -0
- data/test/UNIT_TESTS_README.md +366 -0
- data/test/api_notes_controller_test.rb +231 -0
- data/test/dummy/DOCKER.md +188 -0
- data/test/dummy/Dockerfile +15 -7
- data/test/dummy/Gemfile +38 -29
- data/test/dummy/Gemfile.lock +671 -292
- data/test/dummy/app/assets/config/manifest.js +4 -0
- data/test/dummy/app/channels/application_cable/channel.rb +2 -0
- data/test/dummy/app/channels/application_cable/connection.rb +2 -0
- data/test/dummy/app/controllers/admins_controller.rb +4 -2
- data/test/dummy/app/controllers/api/v1/notes_controller.rb +80 -78
- data/test/dummy/app/controllers/application_controller.rb +11 -9
- data/test/dummy/app/controllers/articles_controller.rb +40 -44
- data/test/dummy/app/controllers/comments_controller.rb +10 -8
- data/test/dummy/app/controllers/ctrs_controller.rb +2 -0
- data/test/dummy/app/controllers/devs_controller.rb +2 -0
- data/test/dummy/app/controllers/docs_controller.rb +23 -24
- data/test/dummy/app/controllers/identities_controller.rb +3 -1
- data/test/dummy/app/controllers/mindmap_editor_controller.rb +74 -0
- data/test/dummy/app/controllers/notes_controller.rb +25 -27
- data/test/dummy/app/controllers/password_resets_controller.rb +16 -18
- data/test/dummy/app/controllers/sessions_controller.rb +13 -14
- data/test/dummy/app/controllers/sitemap_controller.rb +4 -4
- data/test/dummy/app/controllers/users_controller.rb +14 -14
- data/test/dummy/app/helpers/admins_helper.rb +2 -0
- data/test/dummy/app/helpers/application_helper.rb +21 -20
- data/test/dummy/app/helpers/articles_helper.rb +2 -0
- data/test/dummy/app/helpers/basic_helper.rb +2 -0
- data/test/dummy/app/helpers/comments_helper.rb +2 -0
- data/test/dummy/app/helpers/ctrs_helper.rb +2 -0
- data/test/dummy/app/helpers/devs_helper.rb +2 -0
- data/test/dummy/app/helpers/mindmap_editor_helper.rb +3 -0
- data/test/dummy/app/helpers/pictures_helper.rb +2 -0
- data/test/dummy/app/helpers/sitemap_helper.rb +2 -0
- data/test/dummy/app/helpers/users_helper.rb +2 -0
- data/test/dummy/app/jinda/index.mm +384 -486
- data/test/dummy/app/jinda/template/index.mm +1 -0
- data/test/dummy/app/mailers/application_mailer.rb +2 -2
- data/test/dummy/app/mailers/application_mailer.rb-org +4 -0
- data/test/dummy/app/mailers/jinda_mailer.rb +5 -3
- data/test/dummy/app/mailers/note_mailer.rb +6 -4
- data/test/dummy/app/mailers/user_mailer.rb +5 -5
- data/test/dummy/app/models/address.rb +2 -0
- data/test/dummy/app/models/article.rb +2 -0
- data/test/dummy/app/models/comment.rb +3 -2
- data/test/dummy/app/models/identity.rb +11 -10
- data/test/dummy/app/models/jinda/doc.rb +36 -33
- data/test/dummy/app/models/jinda/jinda_module.rb +15 -0
- data/test/dummy/app/models/jinda/module.rb +14 -10
- data/test/dummy/app/models/jinda/notice.rb +15 -11
- data/test/dummy/app/models/jinda/role.rb +11 -7
- data/test/dummy/app/models/jinda/runseq.rb +23 -20
- data/test/dummy/app/models/jinda/service.rb +19 -15
- data/test/dummy/app/models/jinda/xmain.rb +42 -36
- data/test/dummy/app/models/note.rb +3 -8
- data/test/dummy/app/models/param.rb +23 -20
- data/test/dummy/app/models/person.rb +2 -0
- data/test/dummy/app/models/picture.rb +11 -0
- data/test/dummy/app/models/user.rb +42 -41
- data/test/dummy/app/views/admins/index.haml +21 -0
- data/test/dummy/app/views/api/v1/notes/delete/select_note.html.erb +21 -0
- data/test/dummy/app/views/api/v1/notes/edit/edit_note.html.erb +21 -0
- data/test/dummy/app/views/api/v1/notes/index.haml +21 -0
- data/test/dummy/app/views/api/v1/notes/new/new_note.html.erb +21 -0
- data/test/dummy/app/views/articles/show.html.haml +2 -2
- data/test/dummy/app/views/devs/index.haml +21 -0
- data/test/dummy/app/views/jinda/feed.rss.builder +15 -13
- data/test/dummy/app/views/jinda/index.html.haml +3 -2
- data/test/dummy/app/views/layouts/application.haml +2 -2
- data/test/dummy/app/views/mindmap_editor/edit.html.haml +126 -0
- data/test/dummy/app/views/mindmap_editor/save.html.haml +2 -0
- data/test/dummy/bin/docker-entrypoint +3 -0
- data/test/dummy/bin/lint_modified +21 -0
- data/test/dummy/bin/setup +1 -1
- data/test/dummy/config/application.rb +7 -2
- data/test/dummy/config/boot.rb +2 -1
- data/test/dummy/config/cable.yml +1 -1
- data/test/dummy/config/credentials.yml.enc +1 -1
- data/test/dummy/config/environments/development.rb +7 -1
- data/test/dummy/config/environments/production.rb +30 -26
- data/test/dummy/config/environments/test.rb +12 -8
- data/test/dummy/config/initializers/content_security_policy.rb +2 -2
- data/test/dummy/config/initializers/filter_parameter_logging.rb +3 -3
- data/test/dummy/config/initializers/mindmap_converter.rb +5 -0
- data/test/dummy/config/initializers/mongoid.rb +24 -9
- data/test/dummy/config/initializers/omniauth.rb +5 -0
- data/test/dummy/config/initializers/permissions_policy.rb +11 -9
- data/test/dummy/config/locales/en.yml +11 -13
- data/test/dummy/config/mongoid.yml +172 -53
- data/test/dummy/config/mongoid.yml-docker +3 -3
- data/test/dummy/config/mongoid.yml-localhost +3 -3
- data/test/dummy/config/puma.rb +21 -20
- data/test/dummy/config/routes.rb +7 -1
- data/test/dummy/docker-compose-mongodb.yml +13 -0
- data/test/dummy/docker-compose-web.yml +36 -0
- data/test/dummy/docker-compose.yml +10 -18
- data/test/dummy/log/development.log +5834 -2261
- data/test/dummy/spec/controllers/api/v1_get_index_spec.rb +15 -14
- data/test/dummy/spec/controllers/api/v1_get_my_spec.rb +9 -4
- data/test/dummy/spec/controllers/api/v1_post_spec.rb +4 -3
- data/test/dummy/spec/controllers/sessions_controller_spec.rb +82 -90
- data/test/dummy/spec/factories/pictures.rb +5 -0
- data/test/dummy/spec/features/userlogins_spec.rb +12 -15
- data/test/dummy/spec/mailers/note_spec.rb +5 -8
- data/test/dummy/spec/mailers/previews/note_preview.rb +3 -5
- data/test/dummy/spec/models/note_spec.rb +36 -35
- data/test/dummy/spec/models/picture_spec.rb +5 -0
- data/test/dummy/spec/models/user_spec.rb +10 -8
- data/test/dummy/spec/rails_helper.rb +29 -31
- data/test/dummy/spec/requests/ctrs_spec.rb +7 -0
- data/test/dummy/spec/requests/devs_spec.rb +7 -0
- data/test/dummy/spec/spec_helper.rb +19 -17
- data/test/dummy/spec/support/authentication_helper.rb +8 -7
- data/test/dummy/spec/support/databasecleaner.rb +3 -1
- data/test/dummy/spec/support/factory_bot.rb +7 -5
- data/test/dummy/spec/support/omniauth_macros.rb +14 -19
- data/test/dummy/spec/support/request_spec_helper.rb +3 -1
- data/test/dummy/spec/views/articles/_article.html.erb_spec.rbx +9 -8
- data/test/generated_app_test.rb +261 -0
- data/test/installation_test.rb +368 -0
- data/test/integration_test.rb +398 -0
- data/test/jenkins_stage_test.rb +182 -0
- data/test/note_model_test.rb +224 -0
- data/test/note_validation_integration_test.rb +292 -0
- data/test/run_unit_tests.sh +91 -0
- data/test/test_helper.rb +8 -16
- metadata +188 -60
- data/lib/generators/jinda/templates/app/assets/stylesheets/application.css.scss +0 -15
- data/lib/generators/jinda/templates/app/controllers/jinda_org/password_resets.rb +0 -28
- data/lib/generators/jinda/templates/app/views/layouts/_head.html.erb +0 -10
- data/lib/generators/jinda/templates/app/views/layouts/_meta_tag.html.erb +0 -19
- data/lib/generators/jinda/templates/app/views/layouts/bsb/_footer.haml +0 -7
- data/lib/generators/jinda/templates/app/views/layouts/bsb/_header.haml +0 -147
- data/lib/generators/jinda/templates/app/views/layouts/bsb/_menu.haml +0 -47
- data/lib/generators/jinda/templates/app/views/layouts/bsb/_menu_mm.haml +0 -34
- data/lib/generators/jinda/templates/app/views/layouts/bsb/_sidebar.haml +0 -155
- data/lib/generators/jinda/templates/app/views/layouts/bsb/application.haml-bsb +0 -47
- data/lib/generators/jinda/templates/app/views/layouts/gmail.html.erb +0 -9
- data/lib/generators/jinda/templates/app/views/layouts/jqm/_full.haml +0 -33
- data/lib/generators/jinda/templates/app/views/layouts/jqm/_page.haml +0 -16
- data/lib/generators/jinda/templates/app/views/layouts/jqm/application.haml-jqm +0 -4
- data/lib/generators/jinda/templates/app/views/layouts/mailer.html.erb +0 -13
- data/lib/generators/jinda/templates/app/views/layouts/mailer.html.haml +0 -3
- data/lib/generators/jinda/templates/app/views/layouts/mailer.text.erb +0 -1
- data/lib/generators/jinda/templates/app/views/layouts/mailer.text.haml +0 -1
- data/lib/generators/jinda/templates/app/views/layouts/mobile.html.erb +0 -13
- data/lib/generators/jinda/templates/app/views/layouts/mobilejq.html.erb +0 -31
- data/lib/generators/jinda/templates/app/views/layouts/print.html.erb +0 -22
- data/lib/generators/jinda/templates/app/views/layouts/utf8.html.erb +0 -22
- data/lib/generators/jinda/templates/config/initializers/fix_mongoid_generator.rb-org +0 -14
- data/test/dummy/Guardfile +0 -96
- data/test/dummy/app/controllers/application_controller.rb.bak +0 -2
- data/test/dummy/app/controllers/password_resets.rb +0 -28
- data/test/dummy/app/helpers/application_helper.rb.bak +0 -2
- data/test/dummy/app/views/identities/new-bak.html.haml +0 -32
- data/test/dummy/app/views/layouts/application.haml.bak +0 -4
- data/test/dummy/app/views/layouts/application.html.erb.bak +0 -15
- data/test/dummy/app/views/layouts/lte/_header.haml +0 -111
- data/test/dummy/app/views/layouts/lte/_rightbar.haml +0 -123
- data/test/dummy/app/views/sessions/new-bak.html.haml +0 -22
- data/test/dummy/config/initializers/fix_mongoid_generator.rb-org +0 -14
- data/test/dummy/tmp/development_secret.txt +0 -1
- data/test/integration/navigation_test.rb +0 -7
- data/test/jinda_test.rb +0 -7
- /data/{test/dummy → lib/generators/jinda/templates}/app/assets/stylesheets/application.scss +0 -0
- /data/{test/dummy → lib/generators/jinda/templates}/app/assets/stylesheets/jinda.scss +0 -0
- /data/lib/generators/jinda/templates/app/mailers/{application_mailer.rb → application_mailer.rb-org} +0 -0
- /data/{test/dummy → lib/generators/jinda/templates}/app/views/adminltes/dashboard1.haml +0 -0
- /data/{test/dummy → lib/generators/jinda/templates}/app/views/adminltes/dashboard2.haml +0 -0
- /data/{test/dummy → lib/generators/jinda/templates}/app/views/layouts/lte/_flash.haml +0 -0
- /data/{test/dummy → lib/generators/jinda/templates}/app/views/layouts/lte/_footer.haml +0 -0
- /data/{test/dummy → lib/generators/jinda/templates}/app/views/layouts/lte/_menu.haml +0 -0
- /data/{test/dummy → lib/generators/jinda/templates}/app/views/layouts/lte/_menu_mm.haml +0 -0
- /data/lib/generators/jinda/templates/app/views/layouts/{bsb → lte}/_rightbar.haml +0 -0
|
@@ -4,7 +4,7 @@ Rails.application.configure do
|
|
|
4
4
|
# Settings specified here will take precedence over those in config/application.rb.
|
|
5
5
|
|
|
6
6
|
# Code is not reloaded between requests.
|
|
7
|
-
config.
|
|
7
|
+
config.enable_reloading = false
|
|
8
8
|
|
|
9
9
|
# Eager load code on boot. This eager loads most of Rails and
|
|
10
10
|
# your application in memory, allowing both threaded web servers
|
|
@@ -13,21 +13,20 @@ Rails.application.configure do
|
|
|
13
13
|
config.eager_load = true
|
|
14
14
|
|
|
15
15
|
# Full error reports are disabled and caching is turned on.
|
|
16
|
-
config.consider_all_requests_local
|
|
16
|
+
config.consider_all_requests_local = false
|
|
17
17
|
config.action_controller.perform_caching = true
|
|
18
18
|
|
|
19
|
-
# Ensures that a master key has been made available in
|
|
20
|
-
#
|
|
19
|
+
# Ensures that a master key has been made available in ENV["RAILS_MASTER_KEY"], config/master.key, or an environment
|
|
20
|
+
# key such as config/credentials/production.key. This key is used to decrypt credentials (and other encrypted files).
|
|
21
21
|
# config.require_master_key = true
|
|
22
22
|
|
|
23
|
-
# Disable serving static files from
|
|
24
|
-
#
|
|
25
|
-
config.public_file_server.enabled = ENV["RAILS_SERVE_STATIC_FILES"].present?
|
|
23
|
+
# Disable serving static files from `public/`, relying on NGINX/Apache to do so instead.
|
|
24
|
+
# config.public_file_server.enabled = false
|
|
26
25
|
|
|
27
26
|
# Compress CSS using a preprocessor.
|
|
28
27
|
# config.assets.css_compressor = :sass
|
|
29
28
|
|
|
30
|
-
# Do not
|
|
29
|
+
# Do not fall back to assets pipeline if a precompiled asset is missed.
|
|
31
30
|
config.assets.compile = false
|
|
32
31
|
config.assets.compile = true
|
|
33
32
|
|
|
@@ -43,22 +42,32 @@ Rails.application.configure do
|
|
|
43
42
|
# config.action_cable.url = "wss://example.com/cable"
|
|
44
43
|
# config.action_cable.allowed_request_origins = [ "http://example.com", /http:\/\/example.*/ ]
|
|
45
44
|
|
|
45
|
+
# Assume all access to the app is happening through a SSL-terminating reverse proxy.
|
|
46
|
+
# Can be used together with config.force_ssl for Strict-Transport-Security and secure cookies.
|
|
47
|
+
# config.assume_ssl = true
|
|
48
|
+
|
|
46
49
|
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
|
47
|
-
|
|
50
|
+
config.force_ssl = true
|
|
48
51
|
|
|
49
|
-
#
|
|
50
|
-
|
|
51
|
-
|
|
52
|
+
# Log to STDOUT by default
|
|
53
|
+
config.logger = ActiveSupport::Logger.new(STDOUT)
|
|
54
|
+
.tap { |logger| logger.formatter = ::Logger::Formatter.new }
|
|
55
|
+
.then { |logger| ActiveSupport::TaggedLogging.new(logger) }
|
|
52
56
|
|
|
53
57
|
# Prepend all log lines with the following tags.
|
|
54
58
|
config.log_tags = [ :request_id ]
|
|
55
59
|
|
|
60
|
+
# "info" includes generic and useful information about system operation, but avoids logging too much
|
|
61
|
+
# information to avoid inadvertent exposure of personally identifiable information (PII). If you
|
|
62
|
+
# want to log everything, set the level to "debug".
|
|
63
|
+
config.log_level = ENV.fetch("RAILS_LOG_LEVEL", "info")
|
|
64
|
+
|
|
56
65
|
# Use a different cache store in production.
|
|
57
66
|
# config.cache_store = :mem_cache_store
|
|
58
67
|
|
|
59
68
|
# Use a real queuing backend for Active Job (and separate queues per environment).
|
|
60
|
-
# config.active_job.queue_adapter
|
|
61
|
-
# config.active_job.queue_name_prefix = "
|
|
69
|
+
# config.active_job.queue_adapter = :resque
|
|
70
|
+
# config.active_job.queue_name_prefix = "jinda_test_app_1768068735_production"
|
|
62
71
|
|
|
63
72
|
config.action_mailer.perform_caching = false
|
|
64
73
|
|
|
@@ -73,16 +82,11 @@ Rails.application.configure do
|
|
|
73
82
|
# Don't log any deprecations.
|
|
74
83
|
config.active_support.report_deprecations = false
|
|
75
84
|
|
|
76
|
-
#
|
|
77
|
-
config.
|
|
78
|
-
|
|
79
|
-
#
|
|
80
|
-
#
|
|
81
|
-
#
|
|
82
|
-
|
|
83
|
-
if ENV["RAILS_LOG_TO_STDOUT"].present?
|
|
84
|
-
logger = ActiveSupport::Logger.new(STDOUT)
|
|
85
|
-
logger.formatter = config.log_formatter
|
|
86
|
-
config.logger = ActiveSupport::TaggedLogging.new(logger)
|
|
87
|
-
end
|
|
85
|
+
# Enable DNS rebinding protection and other `Host` header attacks.
|
|
86
|
+
# config.hosts = [
|
|
87
|
+
# "example.com", # Allow requests from example.com
|
|
88
|
+
# /.*\.example\.com/ # Allow requests from subdomains like `www.example.com`
|
|
89
|
+
# ]
|
|
90
|
+
# Skip DNS rebinding protection for the default health check endpoint.
|
|
91
|
+
# config.host_authorization = { exclude: ->(request) { request.path == "/up" } }
|
|
88
92
|
end
|
|
@@ -8,12 +8,13 @@ require "active_support/core_ext/integer/time"
|
|
|
8
8
|
Rails.application.configure do
|
|
9
9
|
# Settings specified here will take precedence over those in config/application.rb.
|
|
10
10
|
|
|
11
|
-
#
|
|
12
|
-
config.
|
|
11
|
+
# While tests run files are not watched, reloading is not necessary.
|
|
12
|
+
config.enable_reloading = false
|
|
13
13
|
|
|
14
|
-
# Eager loading loads your
|
|
15
|
-
# this
|
|
16
|
-
#
|
|
14
|
+
# Eager loading loads your entire application. When running a single test locally,
|
|
15
|
+
# this is usually not necessary, and can slow down your test suite. However, it's
|
|
16
|
+
# recommended that you enable it in continuous integration systems to ensure eager
|
|
17
|
+
# loading is working properly before deploying your code.
|
|
17
18
|
config.eager_load = ENV["CI"].present?
|
|
18
19
|
|
|
19
20
|
# Configure public file server for tests with Cache-Control for performance.
|
|
@@ -23,12 +24,12 @@ Rails.application.configure do
|
|
|
23
24
|
}
|
|
24
25
|
|
|
25
26
|
# Show full error reports and disable caching.
|
|
26
|
-
config.consider_all_requests_local
|
|
27
|
+
config.consider_all_requests_local = true
|
|
27
28
|
config.action_controller.perform_caching = false
|
|
28
29
|
config.cache_store = :null_store
|
|
29
30
|
|
|
30
|
-
#
|
|
31
|
-
config.action_dispatch.show_exceptions =
|
|
31
|
+
# Render exception templates for rescuable exceptions and raise for other exceptions.
|
|
32
|
+
config.action_dispatch.show_exceptions = :rescuable
|
|
32
33
|
|
|
33
34
|
# Disable request forgery protection in test environment.
|
|
34
35
|
config.action_controller.allow_forgery_protection = false
|
|
@@ -54,4 +55,7 @@ Rails.application.configure do
|
|
|
54
55
|
|
|
55
56
|
# Annotate rendered view with file names.
|
|
56
57
|
# config.action_view.annotate_rendered_view_with_filenames = true
|
|
58
|
+
|
|
59
|
+
# Raise error when a before_action's only/except options reference missing actions
|
|
60
|
+
config.action_controller.raise_on_missing_callback_actions = true
|
|
57
61
|
end
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
# # policy.report_uri "/csp-violation-report-endpoint"
|
|
17
17
|
# end
|
|
18
18
|
#
|
|
19
|
-
# # Generate session nonces for permitted importmap and inline
|
|
19
|
+
# # Generate session nonces for permitted importmap, inline scripts, and inline styles.
|
|
20
20
|
# config.content_security_policy_nonce_generator = ->(request) { request.session.id.to_s }
|
|
21
|
-
# config.content_security_policy_nonce_directives = %w(script-src)
|
|
21
|
+
# config.content_security_policy_nonce_directives = %w(script-src style-src)
|
|
22
22
|
#
|
|
23
23
|
# # Report violations without enforcing the policy.
|
|
24
24
|
# # config.content_security_policy_report_only = true
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Be sure to restart your server when you modify this file.
|
|
2
2
|
|
|
3
|
-
# Configure parameters to be filtered from the log file.
|
|
4
|
-
#
|
|
5
|
-
# notations and behaviors.
|
|
3
|
+
# Configure parameters to be partially matched (e.g. passw matches password) and filtered from the log file.
|
|
4
|
+
# Use this to limit dissemination of sensitive information.
|
|
5
|
+
# See the ActiveSupport::ParameterFilter documentation for supported notations and behaviors.
|
|
6
6
|
Rails.application.config.filter_parameters += [
|
|
7
7
|
:passw, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn
|
|
8
8
|
]
|
|
@@ -1,10 +1,25 @@
|
|
|
1
|
-
#
|
|
1
|
+
# rubocop:todo all
|
|
2
|
+
Mongoid.configure do
|
|
3
|
+
target_version = "9.0"
|
|
4
|
+
|
|
5
|
+
# Load Mongoid behavior defaults. This automatically sets
|
|
6
|
+
# features flags (refer to documentation)
|
|
7
|
+
config.load_defaults target_version
|
|
8
|
+
|
|
9
|
+
# It is recommended to use config/mongoid.yml for most Mongoid-related
|
|
10
|
+
# configuration, whenever possible, but if you prefer, you can set
|
|
11
|
+
# configuration values here, instead:
|
|
12
|
+
#
|
|
13
|
+
# config.log_level = :debug
|
|
2
14
|
#
|
|
3
|
-
#
|
|
4
|
-
#
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
15
|
+
# Note that the settings in config/mongoid.yml always take precedence,
|
|
16
|
+
# whatever else is set here.
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
# Enable Mongo driver query cache for Rack
|
|
20
|
+
# Rails.application.config.middleware.use(Mongo::QueryCache::Middleware)
|
|
21
|
+
|
|
22
|
+
# Enable Mongo driver query cache for ActiveJob
|
|
23
|
+
# ActiveSupport.on_load(:active_job) do
|
|
24
|
+
# include Mongo::QueryCache::Middleware::ActiveJob
|
|
25
|
+
# end
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
|
|
2
|
+
require 'omniauth'
|
|
3
|
+
require 'omniauth'
|
|
2
4
|
Rails.application.config.middleware.use OmniAuth::Builder do
|
|
3
5
|
provider :identity,
|
|
4
6
|
:fields => [:code, :email],
|
|
@@ -9,6 +11,9 @@ Rails.application.config.middleware.use OmniAuth::Builder do
|
|
|
9
11
|
provider :google_oauth2, ENV['GOOGLE_CLIENT_ID'], ENV['GOOGLE_CLIENT_SECRET'], skip_jwt: true
|
|
10
12
|
end
|
|
11
13
|
|
|
14
|
+
# Allow both POST and GET requests for OmniAuth (Rails 7 compatibility)
|
|
15
|
+
OmniAuth.config.allowed_request_methods = [:post, :get]
|
|
16
|
+
|
|
12
17
|
# https://stackoverflow.com/questions/11461084/handle-omniautherror-invalid-credentials-for-identity-login
|
|
13
18
|
OmniAuth.config.on_failure = Proc.new { |env|
|
|
14
19
|
OmniAuth::FailureEndpoint.new(env).redirect_to_failure
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
|
2
|
+
|
|
1
3
|
# Define an application-wide HTTP permissions policy. For further
|
|
2
|
-
# information see https://developers.google.com/web/updates/2018/06/feature-policy
|
|
3
|
-
|
|
4
|
-
# Rails.application.config.permissions_policy do |
|
|
5
|
-
#
|
|
6
|
-
#
|
|
7
|
-
#
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
#
|
|
4
|
+
# information see: https://developers.google.com/web/updates/2018/06/feature-policy
|
|
5
|
+
|
|
6
|
+
# Rails.application.config.permissions_policy do |policy|
|
|
7
|
+
# policy.camera :none
|
|
8
|
+
# policy.gyroscope :none
|
|
9
|
+
# policy.microphone :none
|
|
10
|
+
# policy.usb :none
|
|
11
|
+
# policy.fullscreen :self
|
|
12
|
+
# policy.payment :self, "https://secure.example.com"
|
|
11
13
|
# end
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# Files in the config/locales directory are used for internationalization
|
|
2
|
-
#
|
|
3
|
-
#
|
|
1
|
+
# Files in the config/locales directory are used for internationalization and
|
|
2
|
+
# are automatically loaded by Rails. If you want to use locales other than
|
|
3
|
+
# English, add the necessary files in this directory.
|
|
4
4
|
#
|
|
5
5
|
# To use the locales, use `I18n.t`:
|
|
6
6
|
#
|
|
@@ -16,18 +16,16 @@
|
|
|
16
16
|
#
|
|
17
17
|
# This would use the information in config/locales/es.yml.
|
|
18
18
|
#
|
|
19
|
-
#
|
|
20
|
-
#
|
|
19
|
+
# To learn more about the API, please read the Rails Internationalization guide
|
|
20
|
+
# at https://guides.rubyonrails.org/i18n.html.
|
|
21
21
|
#
|
|
22
|
-
#
|
|
22
|
+
# Be aware that YAML interprets the following case-insensitive strings as
|
|
23
|
+
# booleans: `true`, `false`, `on`, `off`, `yes`, `no`. Therefore, these strings
|
|
24
|
+
# must be quoted to be interpreted as strings. For example:
|
|
23
25
|
#
|
|
24
|
-
#
|
|
25
|
-
#
|
|
26
|
-
#
|
|
27
|
-
# "true": "foo"
|
|
28
|
-
#
|
|
29
|
-
# To learn more, please read the Rails Internationalization guide
|
|
30
|
-
# available at https://guides.rubyonrails.org/i18n.html.
|
|
26
|
+
# en:
|
|
27
|
+
# "yes": yup
|
|
28
|
+
# enabled: "ON"
|
|
31
29
|
|
|
32
30
|
en:
|
|
33
31
|
hello: "Hello world"
|
|
@@ -4,22 +4,21 @@ development:
|
|
|
4
4
|
# Defines the default client. (required)
|
|
5
5
|
default:
|
|
6
6
|
# Mongoid can connect to a URI accepted by the driver:
|
|
7
|
-
# uri: mongodb://user:password@mongodb.domain.com:27017/
|
|
7
|
+
# uri: mongodb://user:password@mongodb.domain.com:27017/jinda_test_app1768068735_development
|
|
8
8
|
|
|
9
9
|
# Otherwise define the parameters separately.
|
|
10
10
|
# This defines the name of the default database that Mongoid can connect to.
|
|
11
11
|
# (required).
|
|
12
|
-
database:
|
|
12
|
+
database: jinda_test_app1768068735_development
|
|
13
13
|
# Provides the hosts the default client can connect to. Must be an array
|
|
14
14
|
# of host:port pairs. (required)
|
|
15
15
|
hosts:
|
|
16
|
-
|
|
17
|
-
- mongodb
|
|
16
|
+
- localhost:27017
|
|
18
17
|
options:
|
|
19
18
|
# Note that all options listed below are Ruby driver client options (the mongo gem).
|
|
20
19
|
# Please refer to the driver documentation of the version of the mongo gem you are using
|
|
21
20
|
# for the most up-to-date list of options.
|
|
22
|
-
|
|
21
|
+
|
|
23
22
|
# Change the default write concern. (default = { w: 1 })
|
|
24
23
|
# write:
|
|
25
24
|
# w: 1
|
|
@@ -42,23 +41,25 @@ development:
|
|
|
42
41
|
# roles:
|
|
43
42
|
# - 'dbOwner'
|
|
44
43
|
|
|
45
|
-
# Change the default authentication mechanism. Valid options
|
|
46
|
-
# :mongodb_cr, :mongodb_x509,
|
|
47
|
-
#
|
|
48
|
-
#
|
|
44
|
+
# Change the default authentication mechanism. Valid options include:
|
|
45
|
+
# :scram, :scram256, :mongodb_cr, :mongodb_x509, :gssapi, :aws, :plain.
|
|
46
|
+
# MongoDB Server defaults to :scram, which will use "SCRAM-SHA-256" if available,
|
|
47
|
+
# otherwise fallback to "SCRAM-SHA-1" (:scram256 will always use "SCRAM-SHA-256".)
|
|
48
|
+
# This setting is handled by the MongoDB Ruby Driver. Please refer to:
|
|
49
|
+
# https://mongodb.com/docs/ruby-driver/current/reference/authentication/
|
|
49
50
|
# auth_mech: :scram
|
|
50
51
|
|
|
51
52
|
# The database or source to authenticate the user against.
|
|
52
53
|
# (default: the database specified above or admin)
|
|
53
54
|
# auth_source: admin
|
|
54
55
|
|
|
55
|
-
# Force
|
|
56
|
-
#
|
|
56
|
+
# Force the driver cluster to behave in a certain manner instead of auto-discovering.
|
|
57
|
+
# Can be one of: :direct, :replica_set, :sharded. Set to :direct
|
|
57
58
|
# when connecting to hidden members of a replica set.
|
|
58
59
|
# connect: :direct
|
|
59
60
|
|
|
60
61
|
# Changes the default time in seconds the server monitors refresh their status
|
|
61
|
-
# via
|
|
62
|
+
# via hello commands. (default: 10)
|
|
62
63
|
# heartbeat_frequency: 10
|
|
63
64
|
|
|
64
65
|
# The time in seconds for selecting servers for a near read preference. (default: 0.015)
|
|
@@ -81,14 +82,24 @@ development:
|
|
|
81
82
|
# (default: 10)
|
|
82
83
|
# connect_timeout: 10
|
|
83
84
|
|
|
84
|
-
#
|
|
85
|
-
#
|
|
85
|
+
# How long to wait for a response for each operation sent to the
|
|
86
|
+
# server. This timeout should be set to a value larger than the
|
|
87
|
+
# processing time for the longest operation that will be executed
|
|
88
|
+
# by the application. Note that this is a client-side timeout;
|
|
89
|
+
# the server may continue executing an operation after the client
|
|
90
|
+
# aborts it with the SocketTimeout exception.
|
|
91
|
+
# (default: nil, meaning no timeout)
|
|
86
92
|
# socket_timeout: 5
|
|
87
93
|
|
|
88
94
|
# The name of the replica set to connect to. Servers provided as seeds that do
|
|
89
95
|
# not belong to this replica set will be ignored.
|
|
90
96
|
# replica_set: name
|
|
91
97
|
|
|
98
|
+
# Compressors to use for wire protocol compression. (default is to not use compression)
|
|
99
|
+
# "zstd" requires zstd-ruby gem. "snappy" requires snappy gem.
|
|
100
|
+
# Refer to: https://www.mongodb.com/docs/ruby-driver/current/reference/create-client/#compression
|
|
101
|
+
# compressors: ["zstd", "snappy", "zlib"]
|
|
102
|
+
|
|
92
103
|
# Whether to connect to the servers via ssl. (default: false)
|
|
93
104
|
# ssl: true
|
|
94
105
|
|
|
@@ -109,71 +120,179 @@ development:
|
|
|
109
120
|
# The file containing concatenated certificate authority certificates
|
|
110
121
|
# used to validate certs passed from the other end of the connection.
|
|
111
122
|
# ssl_ca_cert: /path/to/ca.cert
|
|
112
|
-
|
|
123
|
+
|
|
113
124
|
# Whether to truncate long log lines. (default: true)
|
|
114
125
|
# truncate_logs: true
|
|
115
126
|
|
|
116
|
-
# Configure Mongoid
|
|
127
|
+
# Configure Mongoid-specific options. (optional)
|
|
117
128
|
options:
|
|
118
|
-
#
|
|
129
|
+
# Allow BSON::Decimal128 to be parsed and returned directly in
|
|
130
|
+
# field values. When BSON 5 is present and the this option is set to false
|
|
131
|
+
# (the default), BSON::Decimal128 values in the database will be returned
|
|
132
|
+
# as BigDecimal.
|
|
133
|
+
#
|
|
134
|
+
# @note this option only has effect when BSON 5+ is present. Otherwise,
|
|
135
|
+
# the setting is ignored.
|
|
136
|
+
# allow_bson5_decimal128: false
|
|
137
|
+
|
|
138
|
+
# When this flag is false, named scopes cannot unset a default scope.
|
|
139
|
+
# This is the traditional (and default) behavior in Mongoid 9 and earlier.
|
|
140
|
+
#
|
|
141
|
+
# Setting this flag to true will allow named scopes to unset the default
|
|
142
|
+
# scope. This will be the default in Mongoid 10.
|
|
143
|
+
#
|
|
144
|
+
# See https://jira.mongodb.org/browse/MONGOID-5785 for more details.
|
|
145
|
+
# allow_scopes_to_unset_default_scope: false
|
|
146
|
+
|
|
147
|
+
# Application name that is printed to the MongoDB logs upon establishing
|
|
148
|
+
# a connection. Note that the name cannot exceed 128 bytes in length.
|
|
149
|
+
# It is also used as the database name if the database name is not
|
|
150
|
+
# explicitly defined.
|
|
151
|
+
# app_name: nil
|
|
152
|
+
|
|
153
|
+
# When this flag is false, callbacks for embedded documents will not be
|
|
154
|
+
# called. This is the default in 9.0.
|
|
155
|
+
#
|
|
156
|
+
# Setting this flag to true restores the pre-9.0 behavior, where callbacks
|
|
157
|
+
# for embedded documents are called. This may lead to stack overflow errors
|
|
158
|
+
# if there are more than cicrca 1000 embedded documents in the root
|
|
159
|
+
# document's dependencies graph.
|
|
160
|
+
# See https://jira.mongodb.org/browse/MONGOID-5658 for more details.
|
|
161
|
+
# around_callbacks_for_embeds: false
|
|
162
|
+
|
|
163
|
+
# Sets the async_query_executor for the application. By default the thread pool executor
|
|
164
|
+
# is set to `:immediate. Options are:
|
|
165
|
+
#
|
|
166
|
+
# - :immediate - Initializes a single +Concurrent::ImmediateExecutor+
|
|
167
|
+
# - :global_thread_pool - Initializes a single +Concurrent::ThreadPoolExecutor+
|
|
168
|
+
# that uses the +global_executor_concurrency+ for the +max_threads+ value.
|
|
169
|
+
# async_query_executor: :immediate
|
|
170
|
+
|
|
171
|
+
# Mark belongs_to associations as required by default, so that saving a
|
|
172
|
+
# model with a missing belongs_to association will trigger a validation
|
|
173
|
+
# error.
|
|
174
|
+
# belongs_to_required_by_default: true
|
|
175
|
+
belongs_to_required_by_default: false
|
|
176
|
+
|
|
177
|
+
# Set the global discriminator key.
|
|
178
|
+
# discriminator_key: "_type"
|
|
179
|
+
|
|
180
|
+
# Raise an exception when a field is redefined.
|
|
181
|
+
# duplicate_fields_exception: false
|
|
182
|
+
|
|
183
|
+
# Defines how many asynchronous queries can be executed concurrently.
|
|
184
|
+
# This option should be set only if `async_query_executor` is set
|
|
185
|
+
# to `:global_thread_pool`.
|
|
186
|
+
# global_executor_concurrency: nil
|
|
187
|
+
|
|
188
|
+
# When this flag is true, any attempt to change the _id of a persisted
|
|
189
|
+
# document will raise an exception (`Errors::ImmutableAttribute`).
|
|
190
|
+
# This is the default in 9.0. Setting this flag to false restores the
|
|
191
|
+
# pre-9.0 behavior, where changing the _id of a persisted
|
|
192
|
+
# document might be ignored, or it might work, depending on the situation.
|
|
193
|
+
# immutable_ids: true
|
|
194
|
+
|
|
195
|
+
# Include the root model name in json serialization.
|
|
119
196
|
# include_root_in_json: false
|
|
120
197
|
|
|
121
|
-
# Include the _type field in serialization.
|
|
198
|
+
# # Include the _type field in serialization.
|
|
122
199
|
# include_type_for_serialization: false
|
|
123
200
|
|
|
124
|
-
#
|
|
125
|
-
#
|
|
201
|
+
# Whether to join nested persistence contexts for atomic operations
|
|
202
|
+
# to parent contexts by default.
|
|
203
|
+
# join_contexts: false
|
|
204
|
+
|
|
205
|
+
# When this flag is false (the default as of Mongoid 9.0), a document that
|
|
206
|
+
# is created or loaded will remember the storage options that were active
|
|
207
|
+
# when it was loaded, and will use those same options by default when
|
|
208
|
+
# saving or reloading itself.
|
|
209
|
+
#
|
|
210
|
+
# When this flag is true you'll get pre-9.0 behavior, where a document will
|
|
211
|
+
# not remember the storage options from when it was loaded/created, and
|
|
212
|
+
# subsequent updates will need to explicitly set up those options each time.
|
|
213
|
+
#
|
|
214
|
+
# For example:
|
|
215
|
+
#
|
|
216
|
+
# record = Model.with(collection: 'other_collection') { Model.first }
|
|
217
|
+
#
|
|
218
|
+
# This will try to load the first document from 'other_collection' and
|
|
219
|
+
# instantiate it as a Model instance. Pre-9.0, the record object would
|
|
220
|
+
# not remember that it came from 'other_collection', and attempts to
|
|
221
|
+
# update it or reload it would fail unless you first remembered to
|
|
222
|
+
# explicitly specify the collection every time.
|
|
223
|
+
#
|
|
224
|
+
# As of Mongoid 9.0, the record will remember that it came from
|
|
225
|
+
# 'other_collection', and updates and reloads will automatically default
|
|
226
|
+
# to that collection, for that record object.
|
|
227
|
+
# legacy_persistence_context_behavior: false
|
|
228
|
+
|
|
229
|
+
# When this flag is false, a document will become read-only only once the
|
|
230
|
+
# #readonly! method is called, and an error will be raised on attempting
|
|
231
|
+
# to save or update such documents, instead of just on delete. When this
|
|
232
|
+
# flag is true, a document is only read-only if it has been projected
|
|
233
|
+
# using #only or #without, and read-only documents will not be
|
|
234
|
+
# deletable/destroyable, but they will be savable/updatable.
|
|
235
|
+
# When this feature flag is turned on, the read-only state will be reset on
|
|
236
|
+
# reload, but when it is turned off, it won't be.
|
|
237
|
+
# legacy_readonly: false
|
|
238
|
+
|
|
239
|
+
# The log level.
|
|
240
|
+
#
|
|
241
|
+
# It must be set prior to referencing clients or Mongo.logger,
|
|
242
|
+
# changes to this option are not be propagated to any clients and
|
|
243
|
+
# loggers that already exist.
|
|
244
|
+
#
|
|
245
|
+
# Additionally, only when the clients are configured via the
|
|
246
|
+
# configuration file is the log level given by this option honored.
|
|
247
|
+
# log_level: :info
|
|
248
|
+
|
|
249
|
+
# Store BigDecimals as Decimal128s instead of strings in the db.
|
|
250
|
+
# map_big_decimal_to_decimal128: true
|
|
251
|
+
|
|
252
|
+
# Preload all models in development, needed when models use inheritance.
|
|
126
253
|
# preload_models: false
|
|
127
254
|
|
|
255
|
+
# When this flag is true, callbacks for every embedded document will be
|
|
256
|
+
# called only once, even if the embedded document is embedded in multiple
|
|
257
|
+
# documents in the root document's dependencies graph.
|
|
258
|
+
# This is the default in 9.0. Setting this flag to false restores the
|
|
259
|
+
# pre-9.0 behavior, where callbacks are called for every occurrence of an
|
|
260
|
+
# embedded document. The pre-9.0 behavior leads to a problem that for multi
|
|
261
|
+
# level nested documents callbacks are called multiple times.
|
|
262
|
+
# See https://jira.mongodb.org/browse/MONGOID-5542
|
|
263
|
+
# prevent_multiple_calls_of_embedded_callbacks: true
|
|
264
|
+
|
|
128
265
|
# Raise an error when performing a #find and the document is not found.
|
|
129
|
-
# (default: true)
|
|
130
266
|
# raise_not_found_error: true
|
|
131
267
|
raise_not_found_error: false
|
|
132
268
|
|
|
133
269
|
# Raise an error when defining a scope with the same name as an
|
|
134
|
-
# existing method.
|
|
270
|
+
# existing method.
|
|
135
271
|
# scope_overwrite_exception: false
|
|
136
272
|
|
|
137
|
-
#
|
|
138
|
-
# existing method. (default: false)
|
|
139
|
-
# duplicate_fields_exception: false
|
|
140
|
-
|
|
141
|
-
# Use Active Support's time zone in conversions. (default: true)
|
|
142
|
-
# use_activesupport_time_zone: true
|
|
143
|
-
|
|
144
|
-
# Ensure all times are UTC in the app side. (default: false)
|
|
273
|
+
# Return stored times as UTC.
|
|
145
274
|
# use_utc: false
|
|
146
275
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
#
|
|
150
|
-
#
|
|
151
|
-
|
|
152
|
-
#
|
|
153
|
-
# `belongs_to` will trigger a validation error if the association
|
|
154
|
-
# is not present. (default: true)
|
|
155
|
-
# belongs_to_required_by_default: true
|
|
156
|
-
belongs_to_required_by_default: false
|
|
276
|
+
# Configure Driver-specific options. (optional)
|
|
277
|
+
driver_options:
|
|
278
|
+
# When this flag is off, an aggregation done on a view will be executed over
|
|
279
|
+
# the documents included in that view, instead of all documents in the
|
|
280
|
+
# collection. When this flag is on, the view fiter is ignored.
|
|
281
|
+
# broken_view_aggregate: true
|
|
157
282
|
|
|
158
|
-
#
|
|
159
|
-
#
|
|
160
|
-
#
|
|
283
|
+
# When this flag is set to false, the view options will be correctly
|
|
284
|
+
# propagated to readable methods.
|
|
285
|
+
# broken_view_options: true
|
|
161
286
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
uri: <%= ENV['MONGODB_URI'] %>
|
|
166
|
-
options:
|
|
167
|
-
raise_not_found_error: false
|
|
168
|
-
belongs_to_required_by_default: false
|
|
287
|
+
# When this flag is set to true, the update and replace methods will
|
|
288
|
+
# validate the paramters and raise an error if they are invalid.
|
|
289
|
+
# validate_update_replace: false
|
|
169
290
|
|
|
170
291
|
|
|
171
|
-
# Use background indexes by default if `background` option not specified. (default: false)
|
|
172
|
-
# background_indexing: false
|
|
173
292
|
test:
|
|
174
293
|
clients:
|
|
175
294
|
default:
|
|
176
|
-
database:
|
|
295
|
+
database: jinda_test_app1768068735_test
|
|
177
296
|
hosts:
|
|
178
297
|
- localhost:27017
|
|
179
298
|
options:
|
|
@@ -4,12 +4,12 @@ development:
|
|
|
4
4
|
# Defines the default client. (required)
|
|
5
5
|
default:
|
|
6
6
|
# Mongoid can connect to a URI accepted by the driver:
|
|
7
|
-
# uri: mongodb://user:password@mongodb.domain.com:27017/
|
|
7
|
+
# uri: mongodb://user:password@mongodb.domain.com:27017/jinda_development
|
|
8
8
|
|
|
9
9
|
# Otherwise define the parameters separately.
|
|
10
10
|
# This defines the name of the default database that Mongoid can connect to.
|
|
11
11
|
# (required).
|
|
12
|
-
database:
|
|
12
|
+
database: jinda_development
|
|
13
13
|
# Provides the hosts the default client can connect to. Must be an array
|
|
14
14
|
# of host:port pairs. (required)
|
|
15
15
|
hosts:
|
|
@@ -173,7 +173,7 @@ production:
|
|
|
173
173
|
test:
|
|
174
174
|
clients:
|
|
175
175
|
default:
|
|
176
|
-
database:
|
|
176
|
+
database: jinda_test
|
|
177
177
|
hosts:
|
|
178
178
|
- localhost:27017
|
|
179
179
|
options:
|
|
@@ -4,12 +4,12 @@ development:
|
|
|
4
4
|
# Defines the default client. (required)
|
|
5
5
|
default:
|
|
6
6
|
# Mongoid can connect to a URI accepted by the driver:
|
|
7
|
-
# uri: mongodb://user:password@mongodb.domain.com:27017/
|
|
7
|
+
# uri: mongodb://user:password@mongodb.domain.com:27017/jinda_development
|
|
8
8
|
|
|
9
9
|
# Otherwise define the parameters separately.
|
|
10
10
|
# This defines the name of the default database that Mongoid can connect to.
|
|
11
11
|
# (required).
|
|
12
|
-
database:
|
|
12
|
+
database: jinda_development
|
|
13
13
|
# Provides the hosts the default client can connect to. Must be an array
|
|
14
14
|
# of host:port pairs. (required)
|
|
15
15
|
hosts:
|
|
@@ -173,7 +173,7 @@ production:
|
|
|
173
173
|
test:
|
|
174
174
|
clients:
|
|
175
175
|
default:
|
|
176
|
-
database:
|
|
176
|
+
database: jinda_test
|
|
177
177
|
hosts:
|
|
178
178
|
- localhost:27017
|
|
179
179
|
options:
|