jinda 0.6.1 → 0.6.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/generators/jinda/config_generator.rb +7 -0
- data/lib/generators/jinda/install_generator.rb +45 -42
- data/lib/generators/jinda/templates/Dockerfile +24 -0
- data/lib/generators/jinda/templates/app/assets/javascripts/application.js +1 -10
- data/lib/generators/jinda/templates/app/assets/stylesheets/application.css.scss +1 -20
- data/lib/generators/jinda/templates/app/controllers/jinda_org/articles_controller.rb +5 -3
- data/lib/generators/jinda/templates/app/controllers/jinda_org/comments_controller.rb +19 -7
- data/lib/generators/jinda/templates/app/jinda/index.mm +22 -19
- data/lib/generators/jinda/templates/app/models/comment.rb +5 -3
- data/lib/generators/jinda/templates/app/views/articles/show.html.haml +2 -1
- data/lib/generators/jinda/templates/config/mongoid.yml-docker +182 -0
- data/lib/generators/jinda/templates/config/mongoid.yml-localhost +182 -0
- data/lib/generators/jinda/templates/docker-compose.yml +16 -0
- data/lib/generators/jinda/templates/entrypoint.sh +12 -0
- data/lib/jinda.rb +2 -1
- data/lib/jinda/date_helpers.rb +109 -0
- data/lib/jinda/{gemhelpers.rb → gem_helpers.rb} +0 -1
- data/lib/jinda/gen_class.rb +13 -0
- data/lib/jinda/gen_controller.rb +10 -0
- data/lib/jinda/gen_freemind.rb +33 -0
- data/lib/jinda/gen_helpers.rb +141 -0
- data/lib/jinda/gen_models.rb +137 -0
- data/lib/jinda/gen_runseq.rb +71 -0
- data/lib/jinda/gen_services.rb +90 -0
- data/lib/jinda/gen_xmain.rb +38 -0
- data/lib/jinda/get_app.rb +34 -0
- data/lib/jinda/helpers.rb +17 -995
- data/lib/jinda/init_vars.rb +36 -0
- data/lib/jinda/rake_views.rb +59 -0
- data/lib/jinda/refresh.rb +67 -0
- data/lib/jinda/themes.rb +163 -0
- data/lib/jinda/version.rb +1 -1
- data/test/dummy/Rakefile +6 -0
- data/test/dummy/app/assets/config/manifest.js +3 -0
- data/test/dummy/app/assets/stylesheets/application.css +15 -0
- data/test/dummy/app/channels/application_cable/channel.rb +4 -0
- data/test/dummy/app/channels/application_cable/connection.rb +4 -0
- data/test/dummy/app/controllers/application_controller.rb +2 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/javascript/packs/application.js +15 -0
- data/test/dummy/app/jobs/application_job.rb +7 -0
- data/test/dummy/app/mailers/application_mailer.rb +4 -0
- data/test/dummy/app/models/application_record.rb +3 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/dummy/app/views/layouts/mailer.html.erb +13 -0
- data/test/dummy/app/views/layouts/mailer.text.erb +1 -0
- data/test/dummy/bin/rails +4 -0
- data/test/dummy/bin/rake +4 -0
- data/test/dummy/bin/setup +33 -0
- data/test/dummy/config.ru +5 -0
- data/test/dummy/config/application.rb +19 -0
- data/test/dummy/config/boot.rb +5 -0
- data/test/dummy/config/cable.yml +10 -0
- data/test/dummy/config/database.yml +25 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +62 -0
- data/test/dummy/config/environments/production.rb +112 -0
- data/test/dummy/config/environments/test.rb +49 -0
- data/test/dummy/config/initializers/application_controller_renderer.rb +8 -0
- data/test/dummy/config/initializers/assets.rb +12 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/content_security_policy.rb +28 -0
- data/test/dummy/config/initializers/cookies_serializer.rb +5 -0
- data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/test/dummy/config/initializers/inflections.rb +16 -0
- data/test/dummy/config/initializers/mime_types.rb +4 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +33 -0
- data/test/dummy/config/puma.rb +38 -0
- data/test/dummy/config/routes.rb +3 -0
- data/test/dummy/config/spring.rb +6 -0
- data/test/dummy/config/storage.yml +34 -0
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/log/development.log +8 -0
- data/test/dummy/public/404.html +67 -0
- data/test/dummy/public/422.html +67 -0
- data/test/dummy/public/500.html +66 -0
- data/test/dummy/public/apple-touch-icon-precomposed.png +0 -0
- data/test/dummy/public/apple-touch-icon.png +0 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/tmp/development_secret.txt +1 -0
- data/test/integration/navigation_test.rb +7 -0
- data/test/jinda_test.rb +7 -0
- data/test/test_helper.rb +19 -0
- metadata +90 -156
- data/lib/generators/jinda/templates/app/assets/images/4dcity-old.ico +0 -0
- data/lib/generators/jinda/templates/app/assets/images/4dcity.ico +0 -0
- data/lib/generators/jinda/templates/app/assets/images/account.png +0 -0
- data/lib/generators/jinda/templates/app/assets/images/add.png +0 -0
- data/lib/generators/jinda/templates/app/assets/images/ajax-loader-circle.gif +0 -0
- data/lib/generators/jinda/templates/app/assets/images/ajax-loader.gif +0 -0
- data/lib/generators/jinda/templates/app/assets/images/anchor.png +0 -0
- data/lib/generators/jinda/templates/app/assets/images/application_double.png +0 -0
- data/lib/generators/jinda/templates/app/assets/images/application_form_edit.png +0 -0
- data/lib/generators/jinda/templates/app/assets/images/arrow_left.png +0 -0
- data/lib/generators/jinda/templates/app/assets/images/arrow_right.png +0 -0
- data/lib/generators/jinda/templates/app/assets/images/arrow_turn_left.png +0 -0
- data/lib/generators/jinda/templates/app/assets/images/arrow_turn_right.png +0 -0
- data/lib/generators/jinda/templates/app/assets/images/calendar.png +0 -0
- data/lib/generators/jinda/templates/app/assets/images/cancel.png +0 -0
- data/lib/generators/jinda/templates/app/assets/images/chart_bar.png +0 -0
- data/lib/generators/jinda/templates/app/assets/images/clock.png +0 -0
- data/lib/generators/jinda/templates/app/assets/images/cog.png +0 -0
- data/lib/generators/jinda/templates/app/assets/images/control_fastforward.png +0 -0
- data/lib/generators/jinda/templates/app/assets/images/control_play.png +0 -0
- data/lib/generators/jinda/templates/app/assets/images/cross.png +0 -0
- data/lib/generators/jinda/templates/app/assets/images/delete.png +0 -0
- data/lib/generators/jinda/templates/app/assets/images/external-link.png +0 -0
- data/lib/generators/jinda/templates/app/assets/images/facebook-continue-button.png +0 -0
- data/lib/generators/jinda/templates/app/assets/images/facebooksmall.png +0 -0
- data/lib/generators/jinda/templates/app/assets/images/favicon.ico +0 -0
- data/lib/generators/jinda/templates/app/assets/images/freemind(mm).png +0 -0
- data/lib/generators/jinda/templates/app/assets/images/google-continue-button.png +0 -0
- data/lib/generators/jinda/templates/app/assets/images/help.png +0 -0
- data/lib/generators/jinda/templates/app/assets/images/highway-menu.png +0 -0
- data/lib/generators/jinda/templates/app/assets/images/highway.png +0 -0
- data/lib/generators/jinda/templates/app/assets/images/house.png +0 -0
- data/lib/generators/jinda/templates/app/assets/images/icons-18-black.png +0 -0
- data/lib/generators/jinda/templates/app/assets/images/icons-18-white.png +0 -0
- data/lib/generators/jinda/templates/app/assets/images/icons-36-black.png +0 -0
- data/lib/generators/jinda/templates/app/assets/images/icons-36-white.png +0 -0
- data/lib/generators/jinda/templates/app/assets/images/logo.png +0 -0
- data/lib/generators/jinda/templates/app/assets/images/logo_jinda.png +0 -0
- data/lib/generators/jinda/templates/app/assets/images/logout.png +0 -0
- data/lib/generators/jinda/templates/app/assets/images/new.gif +0 -0
- data/lib/generators/jinda/templates/app/assets/images/new.png +0 -0
- data/lib/generators/jinda/templates/app/assets/images/page.png +0 -0
- data/lib/generators/jinda/templates/app/assets/images/page_attach.png +0 -0
- data/lib/generators/jinda/templates/app/assets/images/page_green.png +0 -0
- data/lib/generators/jinda/templates/app/assets/images/page_output.png +0 -0
- data/lib/generators/jinda/templates/app/assets/images/page_pdf.png +0 -0
- data/lib/generators/jinda/templates/app/assets/images/pencil.png +0 -0
- data/lib/generators/jinda/templates/app/assets/images/printer.png +0 -0
- data/lib/generators/jinda/templates/app/assets/images/refresh.png +0 -0
- data/lib/generators/jinda/templates/app/assets/images/report.png +0 -0
- data/lib/generators/jinda/templates/app/assets/images/rssmall.png +0 -0
- data/lib/generators/jinda/templates/app/assets/images/tick.png +0 -0
- data/lib/generators/jinda/templates/app/assets/images/twittersmall.png +0 -0
- data/lib/generators/jinda/templates/app/assets/images/user.png +0 -0
- data/lib/generators/jinda/templates/app/assets/images/user_admin_gear.png +0 -0
- data/lib/generators/jinda/templates/app/assets/images/view_code.png +0 -0
- data/lib/generators/jinda/templates/app/assets/javascripts/application.js-jqm +0 -27
- data/lib/generators/jinda/templates/app/assets/javascripts/cable.js +0 -13
- data/lib/generators/jinda/templates/app/assets/javascripts/disable_enter_key.js +0 -10
- data/lib/generators/jinda/templates/app/assets/javascripts/iscroll-wrapper.js +0 -32
- data/lib/generators/jinda/templates/app/assets/javascripts/iscroll.js +0 -1084
- data/lib/generators/jinda/templates/app/assets/javascripts/jinda.js +0 -14
- data/lib/generators/jinda/templates/app/assets/javascripts/jquery.mobile-1.2.1.js +0 -9272
- data/lib/generators/jinda/templates/app/assets/javascripts/jquery.mobile.datebox.js +0 -1778
- data/lib/generators/jinda/templates/app/assets/javascripts/jquery.mobile.splitview.js +0 -695
- data/lib/generators/jinda/templates/app/assets/stylesheets/app.scss +0 -90
- data/lib/generators/jinda/templates/app/assets/stylesheets/articles.scss +0 -94
- data/lib/generators/jinda/templates/app/assets/stylesheets/fonts/sarabun.eot +0 -0
- data/lib/generators/jinda/templates/app/assets/stylesheets/fonts/sarabun.ttf +0 -0
- data/lib/generators/jinda/templates/app/assets/stylesheets/fonts/sarabun.woff +0 -0
- data/lib/generators/jinda/templates/app/assets/stylesheets/fonts/sarabun_bold.ttf +0 -0
- data/lib/generators/jinda/templates/app/assets/stylesheets/fonts/sarabun_bolditalic.ttf +0 -0
- data/lib/generators/jinda/templates/app/assets/stylesheets/fonts/sarabun_italic.ttf +0 -0
- data/lib/generators/jinda/templates/app/assets/stylesheets/fonts/thsarabunnew-webfont.eot +0 -0
- data/lib/generators/jinda/templates/app/assets/stylesheets/fonts/thsarabunnew-webfont.ttf +0 -0
- data/lib/generators/jinda/templates/app/assets/stylesheets/fonts/thsarabunnew-webfont.woff +0 -0
- data/lib/generators/jinda/templates/app/assets/stylesheets/fonts/thsarabunnew.css +0 -47
- data/lib/generators/jinda/templates/app/assets/stylesheets/fonts/thsarabunnew_bold-webfont.eot +0 -0
- data/lib/generators/jinda/templates/app/assets/stylesheets/fonts/thsarabunnew_bold-webfont.ttf +0 -0
- data/lib/generators/jinda/templates/app/assets/stylesheets/fonts/thsarabunnew_bold-webfont.woff +0 -0
- data/lib/generators/jinda/templates/app/assets/stylesheets/fonts/thsarabunnew_bolditalic-webfont.eot +0 -0
- data/lib/generators/jinda/templates/app/assets/stylesheets/fonts/thsarabunnew_bolditalic-webfont.ttf +0 -0
- data/lib/generators/jinda/templates/app/assets/stylesheets/fonts/thsarabunnew_bolditalic-webfont.woff +0 -0
- data/lib/generators/jinda/templates/app/assets/stylesheets/fonts/thsarabunnew_italic-webfont.eot +0 -0
- data/lib/generators/jinda/templates/app/assets/stylesheets/fonts/thsarabunnew_italic-webfont.ttf +0 -0
- data/lib/generators/jinda/templates/app/assets/stylesheets/fonts/thsarabunnew_italic-webfont.woff +0 -0
- data/lib/generators/jinda/templates/app/assets/stylesheets/images/ajax-loader.gif +0 -0
- data/lib/generators/jinda/templates/app/assets/stylesheets/images/button_black.png +0 -0
- data/lib/generators/jinda/templates/app/assets/stylesheets/images/button_blue.png +0 -0
- data/lib/generators/jinda/templates/app/assets/stylesheets/images/button_red.png +0 -0
- data/lib/generators/jinda/templates/app/assets/stylesheets/images/icons-18-black.png +0 -0
- data/lib/generators/jinda/templates/app/assets/stylesheets/images/icons-18-white.png +0 -0
- data/lib/generators/jinda/templates/app/assets/stylesheets/images/icons-36-black.png +0 -0
- data/lib/generators/jinda/templates/app/assets/stylesheets/images/icons-36-white.png +0 -0
- data/lib/generators/jinda/templates/app/assets/stylesheets/images/indicator.gif +0 -0
- data/lib/generators/jinda/templates/app/assets/stylesheets/jinda.css +0 -52
- data/lib/generators/jinda/templates/app/assets/stylesheets/jquery.mobile-1.2.1.css +0 -2339
- data/lib/generators/jinda/templates/app/assets/stylesheets/jquery.mobile.datebox.css +0 -65
- data/lib/generators/jinda/templates/app/assets/stylesheets/jquery.mobile.grids.collapsible.css +0 -122
- data/lib/generators/jinda/templates/app/assets/stylesheets/jquery.mobile.splitview.css +0 -128
- data/lib/generators/jinda/templates/app/assets/stylesheets/kul-4.2.css +0 -1516
- data/lib/generators/jinda/templates/app/assets/stylesheets/kul-4.2.min.css +0 -11
- data/lib/generators/jinda/templates/app/assets/stylesheets/modules.scss +0 -84
- data/lib/generators/jinda/templates/app/assets/stylesheets/sarabun.css +0 -37
- data/lib/generators/jinda/templates/app/assets/stylesheets/social.scss +0 -133
- data/lib/generators/jinda/templates/app/controllers/concerns/jinda_general_concern.rb +0 -179
- data/lib/generators/jinda/templates/app/controllers/concerns/jinda_run_concern.rb +0 -365
- data/lib/generators/jinda/templates/app/controllers/jinda_org/devs_controller.rb +0 -2
- data/lib/generators/jinda/templates/app/controllers/jinda_org/jinda_controller.rb +0 -66
- data/lib/generators/jinda/templates/app/views/jinda/_activity.md +0 -10
- data/lib/generators/jinda/templates/app/views/jinda/_menu.haml +0 -27
- data/lib/generators/jinda/templates/app/views/jinda/_menu_mm.haml +0 -44
- data/lib/generators/jinda/templates/app/views/jinda/_model.md +0 -5
- data/lib/generators/jinda/templates/app/views/jinda/_modul.md +0 -9
- data/lib/generators/jinda/templates/app/views/jinda/_pending_home.haml +0 -5
- data/lib/generators/jinda/templates/app/views/jinda/_pending_page.haml +0 -24
- data/lib/generators/jinda/templates/app/views/jinda/_service.md +0 -24
- data/lib/generators/jinda/templates/app/views/jinda/_static.haml +0 -13
- data/lib/generators/jinda/templates/app/views/jinda/doc-thai.md +0 -37
- data/lib/generators/jinda/templates/app/views/jinda/doc.md +0 -36
- data/lib/generators/jinda/templates/app/views/jinda/error_logs.haml +0 -22
- data/lib/generators/jinda/templates/app/views/jinda/feed.rss.builder +0 -27
- data/lib/generators/jinda/templates/app/views/jinda/help.haml +0 -20
- data/lib/generators/jinda/templates/app/views/jinda/index.html.haml +0 -53
- data/lib/generators/jinda/templates/app/views/jinda/logs.haml +0 -22
- data/lib/generators/jinda/templates/app/views/jinda/notice_logs.haml +0 -18
- data/lib/generators/jinda/templates/app/views/jinda/pending.haml +0 -1
- data/lib/generators/jinda/templates/app/views/jinda/run_form.haml +0 -42
- data/lib/generators/jinda/templates/app/views/jinda/run_output.haml +0 -38
- data/lib/generators/jinda/templates/app/views/jinda/search.haml +0 -20
- data/lib/generators/jinda/templates/app/views/jinda/status.haml +0 -61
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a1d3b5d1b0bb5e86730495489becf0992dea17013d78b342c60b99a2b529c42e
|
4
|
+
data.tar.gz: a75414817131984c8c5cf440169ec3a25fed3e364036cb919e26c0d474d221db
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f49309793d39cb287ebfb218d9ef03bd68db3af2ed7731aa7915cf522e66ac9a55e04c9483d9f9ec354339f16bfad9b81a711dd84301b2f645b2e29208da0d76
|
7
|
+
data.tar.gz: 61a3db47b440f9a9d58bdb9ae47c927b1fa48951043555c32c7a2d9601a6a536f91a306a1c983d06b216fb4da18d5a678a6d7a491cb5d90da9b7f8488b7caf4d
|
data/README.md
CHANGED
@@ -65,6 +65,13 @@ module Jinda
|
|
65
65
|
end
|
66
66
|
end
|
67
67
|
|
68
|
+
# desc "Setup Dockerfile"
|
69
|
+
# def setup_docker
|
70
|
+
# FileUtils.mv "Dockerfile", "Dockerfile"
|
71
|
+
# FileUtils.mv "docker-compose.yml", "docker-compose.yml"
|
72
|
+
# FileUtils.mv "entrypoint.sh", "entrypoint.sh"
|
73
|
+
# end
|
74
|
+
|
68
75
|
def finish
|
69
76
|
puts " configured omniauth.\n"
|
70
77
|
puts " configured Mongoid.\n"
|
@@ -79,13 +79,14 @@ module Jinda
|
|
79
79
|
# inside("app/assets/javascripts") {(File.file? "application.js") ? ( say "Please include application-org.js in application.js", :red) : (FileUtils.mv 'application-org.js', 'application.js')}
|
80
80
|
# inside("app/assets/stylesheets") {(File.file? "application.css") ? ( say "Please include application-org.css in application.css", :red) : (FileUtils.mv 'application-org.css', 'application.css')}
|
81
81
|
# inside("app/assets/stylesheets") {(File.file? "application.css.scss") ? ( say "Please include application-org.css.scss in application.css.scss", :red) : (FileUtils.mv 'application-org.css.scss', 'application.css.scss')}
|
82
|
-
inside("app/controllers") {(File.file? "application_controller.rb") ? ( say "Pleas merge existing jinda_org/application_controller.rb after this installation", :red) : (FileUtils.mv 'jinda_org/application_controller.rb', 'application_controller.rb')}
|
83
82
|
inside("app/controllers") {(File.file? "admins_controller.rb") ? ( say "Please merge existing jinda_org/admins_controller.rb after this installation", :red) : (FileUtils.mv 'jinda_org/admins_controller.rb', 'admins_controller.rb')}
|
84
83
|
inside("app/controllers") {(File.file? "articles_controller.rb") ? ( say "Please merge existing jinda_org/articles_controller.rb after this installation", :red) : (FileUtils.mv 'jinda_org/articles_controller.rb', 'articles_controller.rb')}
|
85
84
|
inside("app/controllers") {(File.file? "comments_controller.rb") ? ( say "Please merge existing jinda_org/comments_controller.rb after this installation", :red) : (FileUtils.mv 'jinda_org/comments_controller.rb', 'comments_controller.rb')}
|
86
85
|
inside("app/controllers") {(File.file? "docs_controller.rb") ? ( say "Please merge existing jinda_org/docs_controller.rb after this installation", :red) : (FileUtils.mv 'jinda_org/docs_controller.rb', 'docs_controller.rb')}
|
87
86
|
inside("app/controllers") {(File.file? "identities_controller.rb") ? ( say "Please merge existing jinda_org/identities_controller.rb after this installation", :red) : (FileUtils.mv 'jinda_org/identities_controller.rb', 'identities_controller.rb')}
|
88
|
-
inside("app/controllers") {(File.file? "
|
87
|
+
inside("app/controllers") {(File.file? "application_controller.rb") ? ( say "Pleas merge existing jinda_org/application_controller.rb after this installation", :red) : (FileUtils.mv 'jinda_org/application_controller.rb', 'application_controller.rb')}
|
88
|
+
## Moved to Engine
|
89
|
+
# inside("app/controllers") {(File.file? "jinda_controller.rb") ? ( say "Please merge existing jinda_org/jinda_controller.rb after this installation", :red) : (FileUtils.mv 'jinda_org/jinda_controller.rb', 'jinda_controller.rb')}
|
89
90
|
inside("app/controllers") {(File.file? "password_resets_controller.rb") ? ( say "Please merge existing jinda_org/password_resets_controller.rb after this installation", :red) : (FileUtils.mv 'jinda_org/password_resets_controller.rb', 'password_resets_controller.rb')}
|
90
91
|
inside("app/controllers") {(File.file? "password_resets.rb") ? ( say "Please merge existing jinda_org/password_resets.rb after this installation", :red) : (FileUtils.mv 'jinda_org/password_resets.rb', 'password_resets.rb')}
|
91
92
|
inside("app/controllers") {(File.file? "sessions_controller.rb") ? ( say "Please merge existing jinda_org/sessions_controller.rb after this installation", :red) : (FileUtils.mv 'jinda_org/sessions_controller.rb', 'sessions_controller.rb')}
|
@@ -94,49 +95,50 @@ module Jinda
|
|
94
95
|
inside("app/controllers") {(File.file? "notes_controller.rb") ? ( say "Please merge existing jinda_org/notes_controller.rb after this installation", :red) : (FileUtils.mv 'jinda_org/notes_controller.rb', 'notes_controller.rb')}
|
95
96
|
end
|
96
97
|
# routes created each line as reversed order in routes
|
98
|
+
# Moved routes to Engine
|
97
99
|
def setup_routes
|
98
100
|
# route "end"
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
101
|
+
# route " end"
|
102
|
+
# route " namespace :v1 do resources :notes, :only => [:index] end"
|
103
|
+
# route " namespace :api do"
|
104
|
+
# route "post '/api/v1/notes' => 'api/v1/notes#create', as: 'api_v1_notes'"
|
105
|
+
# route "get '/api/v1/notes/my' => 'api/v1/notes#my'"
|
106
|
+
# route "\# api"
|
105
107
|
route "root :to => 'jinda#index'"
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
108
|
+
# route "resources :jinda, :only => [:index, :new]"
|
109
|
+
# route "resources :password_resets"
|
110
|
+
# route "resources :sessions"
|
111
|
+
# route "resources :identities"
|
112
|
+
# route "resources :users"
|
113
|
+
# route "resources :docs"
|
114
|
+
# route "resources :notes"
|
115
|
+
# route "resources :comments"
|
116
|
+
# route "resources :articles do resources :comments end"
|
117
|
+
# route "get '/jinda/document/:id' => 'jinda#document'"
|
118
|
+
# route "get '/notes/destroy/:id' => 'notes#destroy'"
|
119
|
+
# route "get '/notes/my/destroy/:id' => 'notes#destroy'"
|
120
|
+
# route "get '/docs/my/destroy' => 'docs#destroy'"
|
121
|
+
# route "get '/notes/my' => 'notes/my'"
|
122
|
+
# route "get '/docs/my' => 'docs/my'"
|
123
|
+
# route "get '/articles/edit' => 'articles/edit'"
|
124
|
+
# route "get '/articles/show' => 'articles/show'"
|
125
|
+
# route "get '/articles/my/destroy' => 'articles#destroy'"
|
126
|
+
# route "get '/articles/my' => 'articles#my'"
|
127
|
+
# route "get '/logout' => 'sessions#destroy', :as => 'logout'"
|
128
|
+
# route "get '/auth/failure' => 'sessions#destroy'"
|
129
|
+
# route "get '/auth/:provider/callback' => 'sessions#create'"
|
130
|
+
# route "post '/auth/:provider/callback' => 'sessions#create'"
|
131
|
+
# route "\# end jinda method routes"
|
132
|
+
# route "post '/jinda/end_output' => 'jinda#end_output'"
|
133
|
+
# route "post '/jinda/end_form' => 'jinda#end_form'"
|
134
|
+
# route "post '/jinda/pending' => 'jinda#index'"
|
135
|
+
# route "post '/jinda/init' => 'jinda#init'"
|
136
|
+
# route "jinda_methods.each do \|aktion\| get \"/jinda/\#\{aktion\}\" => \"jinda#\#\{aktion\}\" end"
|
137
|
+
# route "jinda_methods += ['error_logs', 'notice_logs', 'cancel', 'run_output', 'end_output']"
|
138
|
+
# route "jinda_methods += ['run_redirect', 'run_direct_to','run_if']"
|
139
|
+
# route "jinda_methods += ['init', 'run', 'run_mail', 'document', 'run_do', 'run_form', 'end_form']"
|
140
|
+
# route "jinda_methods = ['pending', 'status', 'search', 'doc', 'doc_print', 'logs', 'ajax_notice']"
|
141
|
+
# route "\# start jiinda method routes"
|
140
142
|
end
|
141
143
|
|
142
144
|
def setup_env
|
@@ -210,6 +212,7 @@ Mongoid::Config.belongs_to_required_by_default = false
|
|
210
212
|
end
|
211
213
|
inject_into_file 'config/environments/development.rb', :after => 'config.action_mailer.raise_delivery_errors = false' do
|
212
214
|
"\n config.action_mailer.default_url_options = { :host => 'localhost:3000' }"
|
215
|
+
"\n config.assets.check_precompiled_asset = false"
|
213
216
|
end
|
214
217
|
inject_into_file 'config/environments/production.rb', :after => 'config.assets.compile = false' do
|
215
218
|
"\n config.assets.compile = true"
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# https://docs.docker.com/compose/rails/
|
2
|
+
FROM ruby:2.6.3
|
3
|
+
RUN apt-get update -qq
|
4
|
+
RUN mkdir /myapp
|
5
|
+
WORKDIR /myapp
|
6
|
+
COPY Gemfile /myapp/Gemfile
|
7
|
+
# COPY Gemfile.lock /myapp/Gemfile.lock
|
8
|
+
|
9
|
+
RUN bundle install
|
10
|
+
COPY . /myapp
|
11
|
+
|
12
|
+
# Set Rails environment to production
|
13
|
+
# ENV RAILS_ENV production
|
14
|
+
# RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - \
|
15
|
+
# && apt install -y nodejs
|
16
|
+
|
17
|
+
# Add a script to be executed every time the container starts.
|
18
|
+
COPY entrypoint.sh /usr/bin/
|
19
|
+
RUN chmod +x /usr/bin/entrypoint.sh
|
20
|
+
ENTRYPOINT ["entrypoint.sh"]
|
21
|
+
EXPOSE 3000
|
22
|
+
|
23
|
+
# Start the main process.
|
24
|
+
CMD ["rails", "server", "-b", "0.0.0.0"]
|
@@ -10,15 +10,6 @@
|
|
10
10
|
// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
|
11
11
|
// GO AFTER THE REQUIRES BELOW.
|
12
12
|
//
|
13
|
-
//= require
|
14
|
-
//= require jquery_ujs
|
15
|
-
//= require jquery.mobile.splitview
|
16
|
-
//= require jquery.mobile-1.2.1
|
17
|
-
//= require jquery.mobile.datebox
|
18
|
-
//= require iscroll-wrapper
|
19
|
-
//= require iscroll
|
20
|
-
//= require jinda
|
21
|
-
// require turbolinks
|
22
|
-
// require disable_enter_key.js
|
13
|
+
//= require jinda_jqm
|
23
14
|
|
24
15
|
|
@@ -12,23 +12,4 @@
|
|
12
12
|
*= require_self
|
13
13
|
*= require normalize-rails
|
14
14
|
*/
|
15
|
-
|
16
|
-
@import "jquery.mobile-1.2.1";
|
17
|
-
@import "jquery.mobile.splitview";
|
18
|
-
@import "jquery.mobile.grids.collapsible";
|
19
|
-
@import "jquery.mobile.datebox.css";
|
20
|
-
@import "sarabun";
|
21
|
-
@import "jinda";
|
22
|
-
@import "kul-4.2";
|
23
|
-
@import "articles";
|
24
|
-
@import "app.scss";
|
25
|
-
@import "font-awesome-sprockets";
|
26
|
-
@import "font-awesome";
|
27
|
-
@import "social";
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
15
|
+
@import "jinda_jqm"
|
@@ -12,8 +12,10 @@ class ArticlesController < ApplicationController
|
|
12
12
|
end
|
13
13
|
|
14
14
|
def show
|
15
|
-
@article = Article.find(
|
16
|
-
@
|
15
|
+
@article = Article.find(article_params)
|
16
|
+
@commentable = @article
|
17
|
+
@comments = @commentable.comments.desc(:created_at).page(params[:page]).per(10)
|
18
|
+
|
17
19
|
prepare_meta_tags(title: @article.title,
|
18
20
|
description: @article.text,
|
19
21
|
keywords: @article.keywords)
|
@@ -92,7 +94,7 @@ class ArticlesController < ApplicationController
|
|
92
94
|
end
|
93
95
|
|
94
96
|
def article_params
|
95
|
-
params[:article_id]
|
97
|
+
[params[:article_id], params[:id]].detect { |p| !p.nil? }
|
96
98
|
end
|
97
99
|
|
98
100
|
def load_edit_article
|
@@ -1,19 +1,31 @@
|
|
1
1
|
class CommentsController < ApplicationController
|
2
|
+
before_action :comment_params, only: [:create]
|
3
|
+
before_action :load_commmentable
|
4
|
+
|
5
|
+
def index
|
6
|
+
@comments = @commentable.comments
|
7
|
+
end
|
2
8
|
|
3
9
|
def create
|
4
|
-
@
|
5
|
-
@comment = @article.comments.new(comment_params)
|
10
|
+
@comment = @commentable.comments.new comment_params
|
6
11
|
@comment.save!
|
7
|
-
redirect_to
|
12
|
+
redirect_to [@commentable], notice: "Comment created"
|
8
13
|
end
|
9
14
|
|
10
15
|
private
|
11
16
|
|
12
|
-
def article_params
|
13
|
-
|
14
|
-
end
|
17
|
+
# def article_params
|
18
|
+
# params.require(:comment).permit(:article_id)
|
19
|
+
# end
|
15
20
|
|
16
21
|
def comment_params
|
17
|
-
|
22
|
+
resource = request.path.split('/')[1]
|
23
|
+
commentable_id = "#{resource.singularize.to_sym}_id" #:article_id
|
24
|
+
params.require(:comment).permit(:body, :user_id, commentable_id.to_sym)
|
18
25
|
end
|
26
|
+
|
27
|
+
def load_commmentable
|
28
|
+
resource, id = request.path.split('/')[1,2]
|
29
|
+
@commentable = resource.singularize.classify.constantize.find(id)
|
30
|
+
end
|
19
31
|
end
|
@@ -25,7 +25,7 @@
|
|
25
25
|
</node>
|
26
26
|
</node>
|
27
27
|
</node>
|
28
|
-
<node CREATED="1275752678377" ID="ID_1348489452" MODIFIED="
|
28
|
+
<node CREATED="1275752678377" FOLDED="true" ID="ID_1348489452" MODIFIED="1602251558474" TEXT="admins:Admin">
|
29
29
|
<node CREATED="1275752688167" ID="ID_229996461" MODIFIED="1275752690948" TEXT="role:a"/>
|
30
30
|
<node CREATED="1282722836614" ID="ID_1213363124" MODIFIED="1330477902602" TEXT="edit_role:edit user role">
|
31
31
|
<node CREATED="1282722862918" ID="ID_1190117882" MODIFIED="1330477922159" TEXT="select_user:select user">
|
@@ -44,7 +44,7 @@
|
|
44
44
|
<node CREATED="1275790679363" ID="ID_829325467" MODIFIED="1511159696044" TEXT="link: logs: /jinda/logs"/>
|
45
45
|
<node CREATED="1507573166973" ID="ID_351025910" MODIFIED="1511159700908" TEXT="link: docs: /jinda/doc"/>
|
46
46
|
</node>
|
47
|
-
<node CREATED="1273706796854" ID="ID_1003882979" MODIFIED="
|
47
|
+
<node CREATED="1273706796854" FOLDED="true" ID="ID_1003882979" MODIFIED="1602251560242" TEXT="devs: Developer">
|
48
48
|
<node CREATED="1275373154914" ID="ID_340725299" MODIFIED="1275373158632" TEXT="role:d"/>
|
49
49
|
<node CREATED="1275788317299" ID="ID_716276608" MODIFIED="1511159716471" TEXT="link: error_logs: /jinda/error_logs"/>
|
50
50
|
<node CREATED="1275788317299" ID="ID_1570419198" MODIFIED="1587858894833" TEXT="link: notice_logs: /jinda/notice_logs"/>
|
@@ -87,7 +87,7 @@
|
|
87
87
|
</node>
|
88
88
|
</node>
|
89
89
|
</node>
|
90
|
-
<node CREATED="1493393619430" ID="ID_554831343" MODIFIED="
|
90
|
+
<node CREATED="1493393619430" FOLDED="true" ID="ID_554831343" MODIFIED="1602251562724" TEXT="notes: Notes">
|
91
91
|
<node CREATED="1493489768542" ID="ID_737469676" MODIFIED="1589772615102" TEXT="link:My Notes: /notes/my">
|
92
92
|
<node CREATED="1493490295677" ID="ID_514416082" MODIFIED="1493490302239" TEXT="role:m"/>
|
93
93
|
</node>
|
@@ -151,7 +151,7 @@
|
|
151
151
|
</node>
|
152
152
|
</node>
|
153
153
|
</node>
|
154
|
-
<node CREATED="1493393619430" ID="ID_328863650" MODIFIED="
|
154
|
+
<node CREATED="1493393619430" FOLDED="true" ID="ID_328863650" MODIFIED="1602251538059" TEXT="articles: Article">
|
155
155
|
<node CREATED="1493419096527" ID="ID_1521905276" MODIFIED="1493478060121" TEXT="link: All Articles: /articles"/>
|
156
156
|
<node CREATED="1493489768542" FOLDED="true" ID="ID_1376361427" MODIFIED="1589757167952" TEXT="link: My article: /articles/my">
|
157
157
|
<node CREATED="1493490295677" ID="ID_628476988" MODIFIED="1493490302239" TEXT="role:m"/>
|
@@ -199,7 +199,7 @@
|
|
199
199
|
</node>
|
200
200
|
</node>
|
201
201
|
</node>
|
202
|
-
<node CREATED="1493664700564" ID="ID_704959130" MODIFIED="
|
202
|
+
<node CREATED="1493664700564" FOLDED="true" ID="ID_704959130" MODIFIED="1602251564023" TEXT="comments: Comment">
|
203
203
|
<icon BUILTIN="button_cancel"/>
|
204
204
|
<node CREATED="1493665155709" ID="ID_1973520751" MODIFIED="1591392666652" TEXT="new_comment: New Comment">
|
205
205
|
<icon BUILTIN="button_cancel"/>
|
@@ -281,7 +281,7 @@
|
|
281
281
|
<node CREATED="1273819855875" ID="ID_1429503284" MODIFIED="1330477311102" TEXT="a: admin"/>
|
282
282
|
<node CREATED="1273819859775" ID="ID_568365839" MODIFIED="1330477315009" TEXT="d: developer"/>
|
283
283
|
</node>
|
284
|
-
<node CREATED="1273819456867"
|
284
|
+
<node CREATED="1273819456867" ID="ID_1677010054" MODIFIED="1602123498759" POSITION="left" TEXT="models">
|
285
285
|
<node CREATED="1292122118499" FOLDED="true" ID="ID_1957754752" MODIFIED="1493705885123" TEXT="person">
|
286
286
|
<node CREATED="1292122135809" ID="ID_1617970069" MODIFIED="1332878659106" TEXT="fname"/>
|
287
287
|
<node CREATED="1292122150362" ID="ID_1200135538" MODIFIED="1332878662388" TEXT="lname"/>
|
@@ -305,7 +305,7 @@
|
|
305
305
|
<node CREATED="1292243471343" ID="ID_1859608350" MODIFIED="1310195256623" TEXT="lat: float"/>
|
306
306
|
<node CREATED="1292243477436" ID="ID_48497260" MODIFIED="1310195262534" TEXT="lng: float"/>
|
307
307
|
</node>
|
308
|
-
<node CREATED="1493418879485"
|
308
|
+
<node CREATED="1493418879485" ID="ID_1995497233" MODIFIED="1602529325998" TEXT="article">
|
309
309
|
<node CREATED="1493418891110" ID="ID_364756011" MODIFIED="1493418905253" TEXT="title"/>
|
310
310
|
<node CREATED="1493418906868" ID="ID_1676483995" MODIFIED="1493418911919" TEXT="text"/>
|
311
311
|
<node CREATED="1493487131376" ID="ID_1334057464" MODIFIED="1538328284823" TEXT="belongs_to :user, :class_name => "User"">
|
@@ -320,18 +320,6 @@
|
|
320
320
|
<node CREATED="1494181636998" ID="ID_229502630" MODIFIED="1494181660419" TEXT="body"/>
|
321
321
|
<node CREATED="1497913676275" ID="ID_404103076" MODIFIED="1497913685065" TEXT="keywords"/>
|
322
322
|
</node>
|
323
|
-
<node CREATED="1493418915637" FOLDED="true" ID="ID_429078131" MODIFIED="1583097162517" TEXT="comment">
|
324
|
-
<node CREATED="1493418939760" ID="ID_1251093062" MODIFIED="1493418943423" TEXT="body"/>
|
325
|
-
<node CREATED="1493418945686" ID="ID_911071644" MODIFIED="1493418986711" TEXT="belongs_to :article">
|
326
|
-
<icon BUILTIN="edit"/>
|
327
|
-
</node>
|
328
|
-
<node CREATED="1493643129947" ID="ID_588013696" MODIFIED="1493643146424" TEXT="belongs_to :user">
|
329
|
-
<icon BUILTIN="edit"/>
|
330
|
-
</node>
|
331
|
-
<node CREATED="1493718512191" ID="ID_173203253" MODIFIED="1493718583874" TEXT="validates :body, :user_id, :article_id, presence: true">
|
332
|
-
<icon BUILTIN="edit"/>
|
333
|
-
</node>
|
334
|
-
</node>
|
335
323
|
<node CREATED="1494040082403" FOLDED="true" ID="ID_864577403" MODIFIED="1583097161145" TEXT="picture">
|
336
324
|
<node CREATED="1494040091583" ID="ID_679208099" MODIFIED="1494040119098" TEXT="picture"/>
|
337
325
|
<node CREATED="1494040120208" ID="ID_1266154874" MODIFIED="1494040125130" TEXT="description"/>
|
@@ -361,6 +349,21 @@
|
|
361
349
|
<icon BUILTIN="edit"/>
|
362
350
|
</node>
|
363
351
|
</node>
|
352
|
+
<node CREATED="1493418915637" ID="ID_429078131" MODIFIED="1602591443455" TEXT="comment">
|
353
|
+
<node CREATED="1493418939760" ID="ID_1251093062" MODIFIED="1493418943423" TEXT="body"/>
|
354
|
+
<node CREATED="1493418945686" ID="ID_911071644" MODIFIED="1602529513657" TEXT="belongs_to :article, :class_name => "Article" ">
|
355
|
+
<icon BUILTIN="edit"/>
|
356
|
+
</node>
|
357
|
+
<node CREATED="1493643129947" ID="ID_588013696" MODIFIED="1602110865206" TEXT="belongs_to :user, :class_name => "User" ">
|
358
|
+
<icon BUILTIN="edit"/>
|
359
|
+
</node>
|
360
|
+
<node CREATED="1601847760278" ID="ID_1288333428" MODIFIED="1602591549062" TEXT="belongs_to :commentable, polymorphic: true ">
|
361
|
+
<icon BUILTIN="edit"/>
|
362
|
+
</node>
|
363
|
+
<node CREATED="1602591560333" ID="ID_598892151" MODIFIED="1602592677709" TEXT="index({ commentable_id: 1, commentable_type: 1}) ">
|
364
|
+
<icon BUILTIN="edit"/>
|
365
|
+
</node>
|
366
|
+
</node>
|
364
367
|
</node>
|
365
368
|
</node>
|
366
369
|
</map>
|
@@ -4,8 +4,10 @@ class Comment
|
|
4
4
|
# jinda begin
|
5
5
|
include Mongoid::Timestamps
|
6
6
|
field :body, :type => String
|
7
|
-
belongs_to :article
|
8
|
-
belongs_to :user, :class_name => "User"
|
9
|
-
|
7
|
+
belongs_to :article, :class_name => "Article"
|
8
|
+
belongs_to :user, :class_name => "User"
|
9
|
+
belongs_to :job, :class_name => "Job"
|
10
|
+
belongs_to :commentable, polymorphic: true
|
11
|
+
index({ commentable_id: 1, commentable_type: 1})
|
10
12
|
# jinda end
|
11
13
|
end
|
@@ -17,7 +17,8 @@
|
|
17
17
|
-#
|
18
18
|
- if login?
|
19
19
|
%h3 Add a comment:
|
20
|
-
|
20
|
+
=# form_for([@comment, @article.comments.build]) do |f|
|
21
|
+
= form_with(model: [@article, Comment.new], local: true) do |f|
|
21
22
|
= f.hidden_field :article_id, :value => @article.id
|
22
23
|
= f.label :body, "Comment"
|
23
24
|
= f.text_area :body
|
@@ -0,0 +1,182 @@
|
|
1
|
+
development:
|
2
|
+
# Configure available database clients. (required)
|
3
|
+
clients:
|
4
|
+
# Defines the default client. (required)
|
5
|
+
default:
|
6
|
+
# Mongoid can connect to a URI accepted by the driver:
|
7
|
+
# uri: mongodb://user:password@mongodb.domain.com:27017/shop263603_development
|
8
|
+
|
9
|
+
# Otherwise define the parameters separately.
|
10
|
+
# This defines the name of the default database that Mongoid can connect to.
|
11
|
+
# (required).
|
12
|
+
database: shop263603_development
|
13
|
+
# Provides the hosts the default client can connect to. Must be an array
|
14
|
+
# of host:port pairs. (required)
|
15
|
+
hosts:
|
16
|
+
# - localhost:27017
|
17
|
+
- mongodb
|
18
|
+
options:
|
19
|
+
# Note that all options listed below are Ruby driver client options (the mongo gem).
|
20
|
+
# Please refer to the driver documentation of the version of the mongo gem you are using
|
21
|
+
# for the most up-to-date list of options.
|
22
|
+
#
|
23
|
+
# Change the default write concern. (default = { w: 1 })
|
24
|
+
# write:
|
25
|
+
# w: 1
|
26
|
+
|
27
|
+
# Change the default read preference. Valid options for mode are: :secondary,
|
28
|
+
# :secondary_preferred, :primary, :primary_preferred, :nearest
|
29
|
+
# (default: primary)
|
30
|
+
# read:
|
31
|
+
# mode: :secondary_preferred
|
32
|
+
# tag_sets:
|
33
|
+
# - use: web
|
34
|
+
|
35
|
+
# The name of the user for authentication.
|
36
|
+
# user: 'user'
|
37
|
+
|
38
|
+
# The password of the user for authentication.
|
39
|
+
# password: 'password'
|
40
|
+
|
41
|
+
# The user's database roles.
|
42
|
+
# roles:
|
43
|
+
# - 'dbOwner'
|
44
|
+
|
45
|
+
# Change the default authentication mechanism. Valid options are: :scram,
|
46
|
+
# :mongodb_cr, :mongodb_x509, and :plain. Note that all authentication
|
47
|
+
# mechanisms require username and password, with the exception of :mongodb_x509.
|
48
|
+
# Default on mongoDB 3.0 is :scram, default on 2.4 and 2.6 is :plain.
|
49
|
+
# auth_mech: :scram
|
50
|
+
|
51
|
+
# The database or source to authenticate the user against.
|
52
|
+
# (default: the database specified above or admin)
|
53
|
+
# auth_source: admin
|
54
|
+
|
55
|
+
# Force a the driver cluster to behave in a certain manner instead of auto-
|
56
|
+
# discovering. Can be one of: :direct, :replica_set, :sharded. Set to :direct
|
57
|
+
# when connecting to hidden members of a replica set.
|
58
|
+
# connect: :direct
|
59
|
+
|
60
|
+
# Changes the default time in seconds the server monitors refresh their status
|
61
|
+
# via ismaster commands. (default: 10)
|
62
|
+
# heartbeat_frequency: 10
|
63
|
+
|
64
|
+
# The time in seconds for selecting servers for a near read preference. (default: 0.015)
|
65
|
+
# local_threshold: 0.015
|
66
|
+
|
67
|
+
# The timeout in seconds for selecting a server for an operation. (default: 30)
|
68
|
+
# server_selection_timeout: 30
|
69
|
+
|
70
|
+
# The maximum number of connections in the connection pool. (default: 5)
|
71
|
+
# max_pool_size: 5
|
72
|
+
|
73
|
+
# The minimum number of connections in the connection pool. (default: 1)
|
74
|
+
# min_pool_size: 1
|
75
|
+
|
76
|
+
# The time to wait, in seconds, in the connection pool for a connection
|
77
|
+
# to be checked in before timing out. (default: 5)
|
78
|
+
# wait_queue_timeout: 5
|
79
|
+
|
80
|
+
# The time to wait to establish a connection before timing out, in seconds.
|
81
|
+
# (default: 10)
|
82
|
+
# connect_timeout: 10
|
83
|
+
|
84
|
+
# The timeout to wait to execute operations on a socket before raising an error.
|
85
|
+
# (default: 5)
|
86
|
+
# socket_timeout: 5
|
87
|
+
|
88
|
+
# The name of the replica set to connect to. Servers provided as seeds that do
|
89
|
+
# not belong to this replica set will be ignored.
|
90
|
+
# replica_set: name
|
91
|
+
|
92
|
+
# Whether to connect to the servers via ssl. (default: false)
|
93
|
+
# ssl: true
|
94
|
+
|
95
|
+
# The certificate file used to identify the connection against MongoDB.
|
96
|
+
# ssl_cert: /path/to/my.cert
|
97
|
+
|
98
|
+
# The private keyfile used to identify the connection against MongoDB.
|
99
|
+
# Note that even if the key is stored in the same file as the certificate,
|
100
|
+
# both need to be explicitly specified.
|
101
|
+
# ssl_key: /path/to/my.key
|
102
|
+
|
103
|
+
# A passphrase for the private key.
|
104
|
+
# ssl_key_pass_phrase: password
|
105
|
+
|
106
|
+
# Whether to do peer certification validation. (default: true)
|
107
|
+
# ssl_verify: true
|
108
|
+
|
109
|
+
# The file containing concatenated certificate authority certificates
|
110
|
+
# used to validate certs passed from the other end of the connection.
|
111
|
+
# ssl_ca_cert: /path/to/ca.cert
|
112
|
+
|
113
|
+
# Whether to truncate long log lines. (default: true)
|
114
|
+
# truncate_logs: true
|
115
|
+
|
116
|
+
# Configure Mongoid specific options. (optional)
|
117
|
+
options:
|
118
|
+
# Includes the root model name in json serialization. (default: false)
|
119
|
+
# include_root_in_json: false
|
120
|
+
|
121
|
+
# Include the _type field in serialization. (default: false)
|
122
|
+
# include_type_for_serialization: false
|
123
|
+
|
124
|
+
# Preload all models in development, needed when models use
|
125
|
+
# inheritance. (default: false)
|
126
|
+
# preload_models: false
|
127
|
+
|
128
|
+
# Raise an error when performing a #find and the document is not found.
|
129
|
+
# (default: true)
|
130
|
+
# raise_not_found_error: true
|
131
|
+
raise_not_found_error: false
|
132
|
+
|
133
|
+
# Raise an error when defining a scope with the same name as an
|
134
|
+
# existing method. (default: false)
|
135
|
+
# scope_overwrite_exception: false
|
136
|
+
|
137
|
+
# Raise an error when defining a field with the same name as an
|
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)
|
145
|
+
# use_utc: false
|
146
|
+
|
147
|
+
# Set the Mongoid and Ruby driver log levels when not in a Rails
|
148
|
+
# environment. The Mongoid logger will be set to the Rails logger
|
149
|
+
# otherwise.(default: :info)
|
150
|
+
# log_level: :info
|
151
|
+
|
152
|
+
# Control whether `belongs_to` association is required. By default
|
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
|
157
|
+
|
158
|
+
# Application name that is printed to the mongodb logs upon establishing a
|
159
|
+
# connection in server versions >= 3.4. Note that the name cannot exceed 128 bytes.
|
160
|
+
# app_name: MyApplicationName
|
161
|
+
|
162
|
+
production:
|
163
|
+
clients:
|
164
|
+
default:
|
165
|
+
uri: <%= ENV['MONGODB_URI'] %>
|
166
|
+
options:
|
167
|
+
raise_not_found_error: false
|
168
|
+
belongs_to_required_by_default: false
|
169
|
+
|
170
|
+
|
171
|
+
# Use background indexes by default if `background` option not specified. (default: false)
|
172
|
+
# background_indexing: false
|
173
|
+
test:
|
174
|
+
clients:
|
175
|
+
default:
|
176
|
+
database: shop263603_test
|
177
|
+
hosts:
|
178
|
+
- localhost:27017
|
179
|
+
options:
|
180
|
+
read:
|
181
|
+
mode: :primary
|
182
|
+
max_pool_size: 1
|