jinda 0.7.7.2 → 0.7.7.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (226) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +12 -1
  3. data/app/config/routes.rb +44 -0
  4. data/lib/generators/jinda/templates/README.md +3 -1
  5. data/lib/generators/jinda/templates/app/assets/stylesheets/application.css.scss +2 -2
  6. data/lib/generators/jinda/templates/app/assets/stylesheets/jinda_jqm.css.scss +32 -0
  7. data/lib/generators/jinda/templates/app/mailers/{application_mailer.rb → application_mailer.rb-org} +0 -0
  8. data/lib/generators/jinda/templates/config/mongoid.yml +3 -3
  9. data/lib/jinda/version.rb +1 -1
  10. data/test/Gemfile +2 -0
  11. data/test/dummy/Dockerfile +26 -0
  12. data/test/dummy/Gemfile +99 -0
  13. data/test/dummy/Gemfile.lock +515 -0
  14. data/test/dummy/{db/development.sqlite3 → README.md} +0 -0
  15. data/test/dummy/README.md.bak +24 -0
  16. data/test/dummy/Rakefile +1 -1
  17. data/test/dummy/app/assets/config/manifest.js +2 -1
  18. data/test/dummy/app/assets/config/manifest.js-rails +2 -0
  19. data/test/dummy/app/assets/javascripts/application.js +15 -0
  20. data/test/dummy/app/assets/stylesheets/{application.css → application.css.bak} +3 -3
  21. data/test/dummy/app/assets/stylesheets/application.css.scss +15 -0
  22. data/test/dummy/app/assets/stylesheets/jinda_jqm.css.scss +32 -0
  23. data/test/dummy/app/controllers/admins_controller.rb +6 -0
  24. data/test/dummy/app/controllers/api/v1/notes_controller.rb +81 -0
  25. data/test/dummy/app/controllers/application_controller.rb +39 -0
  26. data/test/dummy/app/controllers/application_controller.rb.bak +2 -0
  27. data/test/dummy/app/controllers/articles_controller.rb +110 -0
  28. data/test/dummy/app/controllers/comments_controller.rb +31 -0
  29. data/test/dummy/app/controllers/docs_controller.rb +56 -0
  30. data/test/dummy/app/controllers/identities_controller.rb +5 -0
  31. data/test/dummy/app/controllers/notes_controller.rb +84 -0
  32. data/test/dummy/app/controllers/password_resets.rb +28 -0
  33. data/test/dummy/app/controllers/password_resets_controller.rb +34 -0
  34. data/test/dummy/app/controllers/sessions_controller.rb +44 -0
  35. data/test/dummy/app/controllers/sitemap_controller.rb +12 -0
  36. data/test/dummy/app/controllers/users_controller.rb +35 -0
  37. data/test/dummy/app/helpers/admins_helper.rb +2 -0
  38. data/test/dummy/app/helpers/application_helper.rb +31 -0
  39. data/test/dummy/app/helpers/application_helper.rb.bak +2 -0
  40. data/test/dummy/app/helpers/articles_helper.rb +2 -0
  41. data/test/dummy/app/helpers/basic_helper.rb +2 -0
  42. data/test/dummy/app/helpers/comments_helper.rb +2 -0
  43. data/test/dummy/app/helpers/ctrs_helper.rb +2 -0
  44. data/test/dummy/app/helpers/devs_helper.rb +2 -0
  45. data/test/dummy/app/helpers/pictures_helper.rb +2 -0
  46. data/test/dummy/app/helpers/sitemap_helper.rb +2 -0
  47. data/test/dummy/app/helpers/users_helper.rb +2 -0
  48. data/test/dummy/app/jinda/index.mm +486 -0
  49. data/test/dummy/app/jinda/template/index.mm +366 -0
  50. data/test/dummy/app/jinda/template/linkview.haml +21 -0
  51. data/test/dummy/app/jinda/template/view.html.erb +34 -0
  52. data/test/dummy/app/mailers/application_mailer.rb +2 -2
  53. data/test/dummy/app/mailers/application_mailer.rb-org +4 -0
  54. data/test/dummy/app/mailers/jinda_mailer.rb +7 -0
  55. data/test/dummy/app/mailers/note_mailer.rb +10 -0
  56. data/test/dummy/app/mailers/user_mailer.rb +15 -0
  57. data/test/dummy/app/models/address.rb +14 -0
  58. data/test/dummy/app/models/article.rb +14 -0
  59. data/test/dummy/app/models/comment.rb +14 -0
  60. data/test/dummy/app/models/identity.rb +18 -0
  61. data/test/dummy/app/models/jinda/doc.rb +36 -0
  62. data/test/dummy/app/models/jinda/module.rb +11 -0
  63. data/test/dummy/app/models/jinda/notice.rb +14 -0
  64. data/test/dummy/app/models/jinda/role.rb +8 -0
  65. data/test/dummy/app/models/jinda/runseq.rb +24 -0
  66. data/test/dummy/app/models/jinda/service.rb +17 -0
  67. data/test/dummy/app/models/jinda/xmain.rb +38 -0
  68. data/test/dummy/app/models/note.rb +22 -0
  69. data/test/dummy/app/models/param.rb +41 -0
  70. data/test/dummy/app/models/person.rb +14 -0
  71. data/test/dummy/app/models/user.rb +66 -0
  72. data/test/dummy/app/views/adminbsbs/content.haml +241 -0
  73. data/test/dummy/app/views/admins/edit_role/edit_role.html.erb +7 -0
  74. data/test/dummy/app/views/admins/edit_role/select_user.html.erb +4 -0
  75. data/test/dummy/app/views/api/v1/note.haml +0 -0
  76. data/test/dummy/app/views/articles/_report.haml +35 -0
  77. data/test/dummy/app/views/articles/edit.haml +23 -0
  78. data/test/dummy/app/views/articles/edit_article/edit_article.html.erb +15 -0
  79. data/test/dummy/app/views/articles/edit_article/select_article.html.erb +12 -0
  80. data/test/dummy/app/views/articles/index.haml +5 -0
  81. data/test/dummy/app/views/articles/my.haml +5 -0
  82. data/test/dummy/app/views/articles/new_article/form_article.html.erb +16 -0
  83. data/test/dummy/app/views/articles/show.html.haml +58 -0
  84. data/test/dummy/app/views/articles/xedit_article/edit_article.html.erb +13 -0
  85. data/test/dummy/app/views/ctrs/vfolder1/viewfile1.html.erb +23 -0
  86. data/test/dummy/app/views/ctrs/vfolder1/viewfile2.html.erb +23 -0
  87. data/test/dummy/app/views/ctrs/vfolder2/viewfile2.html.erb +23 -0
  88. data/test/dummy/app/views/custom/_adsense.haml +6 -0
  89. data/test/dummy/app/views/docs/doc_edit/doc_edit.html.erb +21 -0
  90. data/test/dummy/app/views/docs/doc_edit/doc_select.html.erb +14 -0
  91. data/test/dummy/app/views/docs/doc_new/doc_form.html.erb +32 -0
  92. data/test/dummy/app/views/docs/doc_new/doc_form.md +36 -0
  93. data/test/dummy/app/views/docs/doc_xedit/doc_edit.html.erb +21 -0
  94. data/test/dummy/app/views/docs/edit/select_note.html.erb +14 -0
  95. data/test/dummy/app/views/docs/index.haml +21 -0
  96. data/test/dummy/app/views/docs/my.haml +27 -0
  97. data/test/dummy/app/views/identities/new.html.haml +32 -0
  98. data/test/dummy/app/views/jinda/_activity.md +10 -0
  99. data/test/dummy/app/views/jinda/_menu.haml +27 -0
  100. data/test/dummy/app/views/jinda/_menu_mm.haml +44 -0
  101. data/test/dummy/app/views/jinda/_model.md +5 -0
  102. data/test/dummy/app/views/jinda/_modul.md +9 -0
  103. data/test/dummy/app/views/jinda/_pending_home.haml +5 -0
  104. data/test/dummy/app/views/jinda/_pending_page.haml +24 -0
  105. data/test/dummy/app/views/jinda/_service.md +24 -0
  106. data/test/dummy/app/views/jinda/_static.haml +13 -0
  107. data/test/dummy/app/views/jinda/doc-thai.md +37 -0
  108. data/test/dummy/app/views/jinda/doc.md +36 -0
  109. data/test/dummy/app/views/jinda/error_logs.haml +22 -0
  110. data/test/dummy/app/views/jinda/feed.rss.builder +27 -0
  111. data/test/dummy/app/views/jinda/help.haml +20 -0
  112. data/test/dummy/app/views/jinda/index.html.haml +53 -0
  113. data/test/dummy/app/views/jinda/logs.haml +22 -0
  114. data/test/dummy/app/views/jinda/notice_logs.haml +18 -0
  115. data/test/dummy/app/views/jinda/pending.haml +1 -0
  116. data/test/dummy/app/views/jinda/run_form.haml +42 -0
  117. data/test/dummy/app/views/jinda/run_output.haml +38 -0
  118. data/test/dummy/app/views/jinda/search.haml +20 -0
  119. data/test/dummy/app/views/jinda/status.haml +61 -0
  120. data/test/dummy/app/views/jinda_mailer/gmail.html.erb +9 -0
  121. data/test/dummy/app/views/layouts/_head.html.erb +10 -0
  122. data/test/dummy/app/views/layouts/_meta_tag.html.erb +19 -0
  123. data/test/dummy/app/views/layouts/application.haml +4 -0
  124. data/test/dummy/app/views/layouts/{application.html.erb → application.html.erb.bak} +2 -1
  125. data/test/dummy/app/views/layouts/bsb/_footer.haml +7 -0
  126. data/test/dummy/app/views/layouts/bsb/_header.haml +147 -0
  127. data/test/dummy/app/views/layouts/bsb/_menu.haml +47 -0
  128. data/test/dummy/app/views/layouts/bsb/_menu_mm.haml +34 -0
  129. data/test/dummy/app/views/layouts/bsb/_rightbar.haml +123 -0
  130. data/test/dummy/app/views/layouts/bsb/_sidebar.haml +155 -0
  131. data/test/dummy/app/views/layouts/bsb/application.haml-bsb +47 -0
  132. data/test/dummy/app/views/layouts/gmail.html.erb +9 -0
  133. data/test/dummy/app/views/layouts/jqm/_full.haml +33 -0
  134. data/test/dummy/app/views/layouts/jqm/_page.haml +16 -0
  135. data/test/dummy/app/views/layouts/jqm/application.haml-jqm +4 -0
  136. data/test/dummy/app/views/layouts/mailer.html.haml +3 -0
  137. data/test/dummy/app/views/layouts/mailer.text.haml +1 -0
  138. data/test/dummy/app/views/layouts/mobile.html.erb +13 -0
  139. data/test/dummy/app/views/layouts/mobilejq.html.erb +31 -0
  140. data/test/dummy/app/views/layouts/print.html.erb +22 -0
  141. data/test/dummy/app/views/layouts/utf8.html.erb +22 -0
  142. data/test/dummy/app/views/note_mailer/gmail.html.haml +7 -0
  143. data/test/dummy/app/views/note_mailer/gmail.text.haml +8 -0
  144. data/test/dummy/app/views/notes/delete/select_note.html.erb +14 -0
  145. data/test/dummy/app/views/notes/edit/edit_note.html.erb +10 -0
  146. data/test/dummy/app/views/notes/edit/select_note.html.erb +14 -0
  147. data/test/dummy/app/views/notes/index.haml +71 -0
  148. data/test/dummy/app/views/notes/mail/display_mail.html.erb +20 -0
  149. data/test/dummy/app/views/notes/mail/select_note.html.erb +19 -0
  150. data/test/dummy/app/views/notes/mail/show.html.haml +13 -0
  151. data/test/dummy/app/views/notes/my.haml +21 -0
  152. data/test/dummy/app/views/notes/new/new_note.html.erb +13 -0
  153. data/test/dummy/app/views/notes/show.haml +10 -0
  154. data/test/dummy/app/views/notes/xedit/edit_note.html.erb +10 -0
  155. data/test/dummy/app/views/password_resets/edit.html.erb +21 -0
  156. data/test/dummy/app/views/password_resets/new.html.haml +11 -0
  157. data/test/dummy/app/views/sessions/new.html.haml +22 -0
  158. data/test/dummy/app/views/sitemap/index.xml.haml +10 -0
  159. data/test/dummy/app/views/user_mailer/password_reset.html.haml +3 -0
  160. data/test/dummy/app/views/user_mailer/password_reset.text.erb +3 -0
  161. data/test/dummy/app/views/user_mailer/password_reset.text.haml +3 -0
  162. data/test/dummy/app/views/users/index.haml +13 -0
  163. data/test/dummy/app/views/users/pwd/enter.html.erb +6 -0
  164. data/test/dummy/app/views/users/user/enter_user.html.erb +10 -0
  165. data/test/dummy/bin/rails +3 -3
  166. data/test/dummy/bin/rake +2 -2
  167. data/test/dummy/bin/setup +9 -17
  168. data/test/dummy/config/application.rb +51 -9
  169. data/test/dummy/config/boot.rb +3 -4
  170. data/test/dummy/config/cloudinary.yml +9 -0
  171. data/test/dummy/config/credentials.yml.enc +1 -0
  172. data/test/dummy/config/environment.rb +7 -1
  173. data/test/dummy/config/environments/development.rb +20 -20
  174. data/test/dummy/config/environments/production.rb +16 -40
  175. data/test/dummy/config/environments/test.rb +19 -11
  176. data/test/dummy/config/initializers/assets.rb +1 -1
  177. data/test/dummy/config/initializers/content_security_policy.rb +21 -24
  178. data/test/dummy/config/initializers/filter_parameter_logging.rb +6 -2
  179. data/test/dummy/config/initializers/fix_mongoid_generator.rb-org +14 -0
  180. data/test/dummy/config/initializers/inflections.rb +4 -4
  181. data/test/dummy/config/initializers/jinda.rb +14 -0
  182. data/test/dummy/config/initializers/mongoid.rb +10 -0
  183. data/test/dummy/config/initializers/omniauth.rb +17 -0
  184. data/test/dummy/config/initializers/permissions_policy.rb +11 -0
  185. data/test/dummy/config/locales/en.yml +3 -3
  186. data/test/dummy/config/mongoid.yml +196 -0
  187. data/test/dummy/config/mongoid.yml-docker +182 -0
  188. data/test/dummy/config/mongoid.yml-localhost +182 -0
  189. data/test/dummy/config/puma.rb +7 -2
  190. data/test/dummy/config/routes.rb +5 -1
  191. data/test/dummy/config.ru +2 -1
  192. data/test/dummy/db/seeds.rb +6 -0
  193. data/test/dummy/docker-compose.yml +19 -0
  194. data/test/dummy/dot/dot.env +2 -0
  195. data/test/dummy/entrypoint.sh +13 -0
  196. data/test/dummy/log/development.log +697 -6
  197. data/test/dummy/public/robots.txt +1 -0
  198. data/test/dummy/spec/controllers/api/v1_get_index_spec.rb +23 -0
  199. data/test/dummy/spec/controllers/api/v1_get_my_spec.rb +14 -0
  200. data/test/dummy/spec/controllers/api/v1_post_spec.rb +19 -0
  201. data/test/dummy/spec/controllers/sessions_controller_spec.rb +98 -0
  202. data/test/dummy/spec/features/userlogins_spec.rb +23 -0
  203. data/test/dummy/spec/mailers/note_spec.rb +24 -0
  204. data/test/dummy/spec/mailers/previews/note_preview.rb +9 -0
  205. data/test/dummy/spec/models/note_spec.rb +41 -0
  206. data/test/dummy/spec/models/user_spec.rb +12 -0
  207. data/test/dummy/spec/rails_helper.rb +42 -0
  208. data/test/dummy/spec/spec_helper.rb +80 -0
  209. data/test/dummy/spec/support/authentication_helper.rb +20 -0
  210. data/test/dummy/spec/support/databasecleaner.rb +13 -0
  211. data/test/dummy/spec/support/factory_bot.rb +12 -0
  212. data/test/dummy/spec/support/omniauth_macros.rb +38 -0
  213. data/test/dummy/spec/support/request_spec_helper.rb +8 -0
  214. data/test/dummy/spec/views/articles/_article.html.erb_spec.rbx +14 -0
  215. data/test/dummy/tmp/development_secret.txt +1 -1
  216. metadata +188 -17
  217. data/test/dummy/app/javascript/packs/application.js +0 -15
  218. data/test/dummy/app/models/application_record.rb +0 -3
  219. data/test/dummy/config/database.yml +0 -25
  220. data/test/dummy/config/initializers/application_controller_renderer.rb +0 -8
  221. data/test/dummy/config/initializers/backtrace_silencers.rb +0 -7
  222. data/test/dummy/config/initializers/cookies_serializer.rb +0 -5
  223. data/test/dummy/config/initializers/mime_types.rb +0 -4
  224. data/test/dummy/config/initializers/wrap_parameters.rb +0 -14
  225. data/test/dummy/config/spring.rb +0 -6
  226. data/test/dummy/config/storage.yml +0 -34
@@ -1,28 +1,25 @@
1
1
  # Be sure to restart your server when you modify this file.
2
2
 
3
- # Define an application-wide content security policy
4
- # For further information see the following documentation
5
- # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy
3
+ # Define an application-wide content security policy.
4
+ # See the Securing Rails Applications Guide for more information:
5
+ # https://guides.rubyonrails.org/security.html#content-security-policy-header
6
6
 
7
- # Rails.application.config.content_security_policy do |policy|
8
- # policy.default_src :self, :https
9
- # policy.font_src :self, :https, :data
10
- # policy.img_src :self, :https, :data
11
- # policy.object_src :none
12
- # policy.script_src :self, :https
13
- # policy.style_src :self, :https
14
-
15
- # # Specify URI for violation reports
16
- # # policy.report_uri "/csp-violation-report-endpoint"
7
+ # Rails.application.configure do
8
+ # config.content_security_policy do |policy|
9
+ # policy.default_src :self, :https
10
+ # policy.font_src :self, :https, :data
11
+ # policy.img_src :self, :https, :data
12
+ # policy.object_src :none
13
+ # policy.script_src :self, :https
14
+ # policy.style_src :self, :https
15
+ # # Specify URI for violation reports
16
+ # # policy.report_uri "/csp-violation-report-endpoint"
17
+ # end
18
+ #
19
+ # # Generate session nonces for permitted importmap and inline scripts
20
+ # config.content_security_policy_nonce_generator = ->(request) { request.session.id.to_s }
21
+ # config.content_security_policy_nonce_directives = %w(script-src)
22
+ #
23
+ # # Report violations without enforcing the policy.
24
+ # # config.content_security_policy_report_only = true
17
25
  # end
18
-
19
- # If you are using UJS then enable automatic nonce generation
20
- # Rails.application.config.content_security_policy_nonce_generator = -> request { SecureRandom.base64(16) }
21
-
22
- # Set the nonce only to specific directives
23
- # Rails.application.config.content_security_policy_nonce_directives = %w(script-src)
24
-
25
- # Report CSP violations to a specified URI
26
- # For further information see the following documentation:
27
- # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy-Report-Only
28
- # Rails.application.config.content_security_policy_report_only = true
@@ -1,4 +1,8 @@
1
1
  # Be sure to restart your server when you modify this file.
2
2
 
3
- # Configure sensitive parameters which will be filtered from the log file.
4
- Rails.application.config.filter_parameters += [:password]
3
+ # Configure parameters to be filtered from the log file. Use this to limit dissemination of
4
+ # sensitive information. See the ActiveSupport::ParameterFilter documentation for supported
5
+ # notations and behaviors.
6
+ Rails.application.config.filter_parameters += [
7
+ :passw, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn
8
+ ]
@@ -0,0 +1,14 @@
1
+ require 'rails/generators'
2
+ require 'rails/generators/mongoid/config/config_generator'
3
+
4
+ if Gem::Version.new(Mongoid::VERSION) >= Gem::Version.new('7.3.0')
5
+ warn("You may need not this file: #{__FILE__}\nAfter https://github.com/mongodb/mongoid/pull/4953 is released.")
6
+ end
7
+ Mongoid::Generators::ConfigGenerator.class_eval do
8
+ def app_name
9
+ # Rails::Application.subclasses.first.parent.to_s.underscore
10
+ # No more Module#parent
11
+ # See https://github.com/rails/rails/commit/167b4153cac0069a21e0bb9689cb16f34f6abbaa
12
+ Rails::Application.subclasses.first.module_parent_name.underscore
13
+ end
14
+ end
@@ -4,13 +4,13 @@
4
4
  # are locale specific, and you may define rules for as many different
5
5
  # locales as you wish. All of these examples are active by default:
6
6
  # ActiveSupport::Inflector.inflections(:en) do |inflect|
7
- # inflect.plural /^(ox)$/i, '\1en'
8
- # inflect.singular /^(ox)en/i, '\1'
9
- # inflect.irregular 'person', 'people'
7
+ # inflect.plural /^(ox)$/i, "\\1en"
8
+ # inflect.singular /^(ox)en/i, "\\1"
9
+ # inflect.irregular "person", "people"
10
10
  # inflect.uncountable %w( fish sheep )
11
11
  # end
12
12
 
13
13
  # These inflection rules are supported but not enabled by default:
14
14
  # ActiveSupport::Inflector.inflections(:en) do |inflect|
15
- # inflect.acronym 'RESTful'
15
+ # inflect.acronym "RESTful"
16
16
  # end
@@ -0,0 +1,14 @@
1
+ # encoding: utf-8
2
+ MM = "#{Rails.root}/app/jinda/index.mm"
3
+ DEFAULT_TITLE = 'Jinda'
4
+ DEFAULT_HEADER = 'Jinda'
5
+ DEFAULT_DESCRIPTION = 'Rails Application Generator'
6
+ DEFAULT_KEYWORDS = %w[Jinda Rails ruby Generator, Prateep Kul]
7
+ GMAP = false
8
+ # ADSENSE = true
9
+ NEXT = "Next >"
10
+ # comment IMAGE_LOCATION to use cloudinary (specify params in config/cloudinary.yml)
11
+ IMAGE_LOCATION = "upload"
12
+ # for debugging
13
+ # DONT_SEND_MAIL = true
14
+
@@ -0,0 +1,10 @@
1
+ # encoding: utf-8
2
+ #
3
+ # Mongoid 6 follows the new pattern of AR5 requiring a belongs_to relation to always require its parent
4
+ # belongs_to` will now trigger a validation error by default if the association is not present.
5
+ # You can turn this off on a per-association basis with `optional: true`.
6
+ # (Note this new default only applies to new Rails apps that will be generated with
7
+ # `config.active_record.belongs_to_required_by_default = true` in initializer.)
8
+ #
9
+ Mongoid::Config.belongs_to_required_by_default = false
10
+
@@ -0,0 +1,17 @@
1
+
2
+ Rails.application.config.middleware.use OmniAuth::Builder do
3
+ provider :identity,
4
+ :fields => [:code, :email],
5
+ :on_failed_registration=> lambda { |env|
6
+ IdentitiesController.action(:new).call(env)
7
+ }
8
+ provider :facebook, ENV['FACEBOOK_API'], ENV['FACEBOOK_KEY']
9
+ provider :google_oauth2, ENV['GOOGLE_CLIENT_ID'], ENV['GOOGLE_CLIENT_SECRET'], skip_jwt: true
10
+ end
11
+
12
+ # https://stackoverflow.com/questions/11461084/handle-omniautherror-invalid-credentials-for-identity-login
13
+ OmniAuth.config.on_failure = Proc.new { |env|
14
+ OmniAuth::FailureEndpoint.new(env).redirect_to_failure
15
+ }
16
+
17
+
@@ -0,0 +1,11 @@
1
+ # 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 |f|
5
+ # f.camera :none
6
+ # f.gyroscope :none
7
+ # f.microphone :none
8
+ # f.usb :none
9
+ # f.fullscreen :self
10
+ # f.payment :self, "https://secure.example.com"
11
+ # end
@@ -4,11 +4,11 @@
4
4
  #
5
5
  # To use the locales, use `I18n.t`:
6
6
  #
7
- # I18n.t 'hello'
7
+ # I18n.t "hello"
8
8
  #
9
9
  # In views, this is aliased to just `t`:
10
10
  #
11
- # <%= t('hello') %>
11
+ # <%= t("hello") %>
12
12
  #
13
13
  # To use a different locale, set it with `I18n.locale`:
14
14
  #
@@ -24,7 +24,7 @@
24
24
  # Instead, surround them with single quotes.
25
25
  #
26
26
  # en:
27
- # 'true': 'foo'
27
+ # "true": "foo"
28
28
  #
29
29
  # To learn more, please read the Rails Internationalization guide
30
30
  # available at https://guides.rubyonrails.org/i18n.html.
@@ -0,0 +1,196 @@
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/dummy_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: dummy_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
+ options:
18
+ # Note that all options listed below are Ruby driver client options (the mongo gem).
19
+ # Please refer to the driver documentation of the version of the mongo gem you are using
20
+ # for the most up-to-date list of options.
21
+ #
22
+ # Change the default write concern. (default = { w: 1 })
23
+ # write:
24
+ # w: 1
25
+
26
+ # Change the default read preference. Valid options for mode are: :secondary,
27
+ # :secondary_preferred, :primary, :primary_preferred, :nearest
28
+ # (default: primary)
29
+ # read:
30
+ # mode: :secondary_preferred
31
+ # tag_sets:
32
+ # - use: web
33
+
34
+ # The name of the user for authentication.
35
+ # user: 'user'
36
+
37
+ # The password of the user for authentication.
38
+ # password: 'password'
39
+
40
+ # The user's database roles.
41
+ # roles:
42
+ # - 'dbOwner'
43
+
44
+ # Change the default authentication mechanism. Valid options are: :scram,
45
+ # :mongodb_cr, :mongodb_x509, and :plain. Note that all authentication
46
+ # mechanisms require username and password, with the exception of :mongodb_x509.
47
+ # Default on mongoDB 3.0 is :scram, default on 2.4 and 2.6 is :plain.
48
+ # auth_mech: :scram
49
+
50
+ # The database or source to authenticate the user against.
51
+ # (default: the database specified above or admin)
52
+ # auth_source: admin
53
+
54
+ # Force a the driver cluster to behave in a certain manner instead of auto-
55
+ # discovering. Can be one of: :direct, :replica_set, :sharded. Set to :direct
56
+ # when connecting to hidden members of a replica set.
57
+ # connect: :direct
58
+
59
+ # Changes the default time in seconds the server monitors refresh their status
60
+ # via hello commands. (default: 10)
61
+ # heartbeat_frequency: 10
62
+
63
+ # The time in seconds for selecting servers for a near read preference. (default: 0.015)
64
+ # local_threshold: 0.015
65
+
66
+ # The timeout in seconds for selecting a server for an operation. (default: 30)
67
+ # server_selection_timeout: 30
68
+
69
+ # The maximum number of connections in the connection pool. (default: 5)
70
+ # max_pool_size: 5
71
+
72
+ # The minimum number of connections in the connection pool. (default: 1)
73
+ # min_pool_size: 1
74
+
75
+ # The time to wait, in seconds, in the connection pool for a connection
76
+ # to be checked in before timing out. (default: 5)
77
+ # wait_queue_timeout: 5
78
+
79
+ # The time to wait to establish a connection before timing out, in seconds.
80
+ # (default: 10)
81
+ # connect_timeout: 10
82
+
83
+ # How long to wait for a response for each operation sent to the
84
+ # server. This timeout should be set to a value larger than the
85
+ # processing time for the longest operation that will be executed
86
+ # by the application. Note that this is a client-side timeout;
87
+ # the server may continue executing an operation after the client
88
+ # aborts it with the SocketTimeout exception.
89
+ # (default: nil, meaning no timeout)
90
+ # socket_timeout: 5
91
+
92
+ # The name of the replica set to connect to. Servers provided as seeds that do
93
+ # not belong to this replica set will be ignored.
94
+ # replica_set: name
95
+
96
+ # Whether to connect to the servers via ssl. (default: false)
97
+ # ssl: true
98
+
99
+ # The certificate file used to identify the connection against MongoDB.
100
+ # ssl_cert: /path/to/my.cert
101
+
102
+ # The private keyfile used to identify the connection against MongoDB.
103
+ # Note that even if the key is stored in the same file as the certificate,
104
+ # both need to be explicitly specified.
105
+ # ssl_key: /path/to/my.key
106
+
107
+ # A passphrase for the private key.
108
+ # ssl_key_pass_phrase: password
109
+
110
+ # Whether to do peer certification validation. (default: true)
111
+ # ssl_verify: true
112
+
113
+ # The file containing concatenated certificate authority certificates
114
+ # used to validate certs passed from the other end of the connection.
115
+ # ssl_ca_cert: /path/to/ca.cert
116
+
117
+ # Whether to truncate long log lines. (default: true)
118
+ # truncate_logs: true
119
+
120
+ # Configure Mongoid specific options. (optional)
121
+ options:
122
+ # Application name that is printed to the mongodb logs upon establishing
123
+ # a connection in server versions >= 3.4. Note that the name cannot
124
+ # exceed 128 bytes. It is also used as the database name if the
125
+ # database name is not explicitly defined. (default: nil)
126
+ # app_name: MyApplicationName
127
+
128
+ production:
129
+ clients:
130
+ default:
131
+ uri: <%= ENV['MONGODB_URI'] %>
132
+ options:
133
+ raise_not_found_error: false
134
+ belongs_to_required_by_default: false
135
+
136
+
137
+ # Mark belongs_to associations as required by default, so that saving a
138
+ # model with a missing belongs_to association will trigger a validation
139
+ # error. (default: true)
140
+ # belongs_to_required_by_default: true
141
+ belongs_to_required_by_default: false
142
+
143
+ # Raise an exception when a field is redefined. (default: false)
144
+ # duplicate_fields_exception: false
145
+
146
+ # Include the root model name in json serialization. (default: false)
147
+ # include_root_in_json: false
148
+
149
+ # Include the _type field in serialization. (default: false)
150
+ # include_type_for_serialization: false
151
+
152
+ # Whether to join nested persistence contexts for atomic operations
153
+ # to parent contexts by default. (default: false)
154
+ # join_contexts: false
155
+
156
+ # Set the Mongoid and Ruby driver log levels when Mongoid is not using
157
+ # Ruby on Rails logger instance. (default: :info)
158
+ # log_level: :info
159
+
160
+ # Preload all models in development, needed when models use
161
+ # inheritance. (default: false)
162
+ # preload_models: false
163
+
164
+ # Raise an error when performing a #find and the document is not found.
165
+ # (default: true)
166
+ # raise_not_found_error: true
167
+ raise_not_found_error: false
168
+
169
+ # Raise an error when defining a scope with the same name as an
170
+ # existing method. (default: false)
171
+ # scope_overwrite_exception: false
172
+
173
+ # Use ActiveSupport's time zone in time operations instead of
174
+ # the Ruby default time zone. See the time zone section below for
175
+ # further information. (default: true)
176
+ # use_activesupport_time_zone: true
177
+
178
+ # Return stored times as UTC. See the time zone section below for
179
+ # further information. Most applications should not use this option.
180
+ # (default: false)
181
+ # use_utc: false
182
+
183
+ # (Deprecated) In MongoDB 4.0 and earlier, set whether to create
184
+ # indexes in the background by default. (default: false)
185
+ # background_indexing: false
186
+
187
+ test:
188
+ clients:
189
+ default:
190
+ database: dummy_test
191
+ hosts:
192
+ - localhost:27017
193
+ options:
194
+ read:
195
+ mode: :primary
196
+ max_pool_size: 1
@@ -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