jinda 0.7.7.2 → 0.7.7.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/config/routes.rb +44 -0
- data/lib/generators/jinda/templates/README.md +3 -1
- data/lib/generators/jinda/templates/app/assets/stylesheets/application.css.scss +2 -2
- data/lib/generators/jinda/templates/app/assets/stylesheets/jinda_jqm.css.scss +32 -0
- data/lib/jinda/version.rb +1 -1
- data/test/dummy/Dockerfile +28 -0
- data/test/dummy/Gemfile +102 -0
- data/test/dummy/Gemfile.lock +514 -0
- data/test/dummy/Guardfile +96 -0
- data/test/dummy/{db/development.sqlite3 → README.md} +0 -0
- data/test/dummy/Rakefile +1 -1
- data/test/dummy/app/assets/config/manifest.js +2 -1
- data/test/dummy/app/assets/config/manifest.js-rails +2 -0
- data/test/dummy/app/{javascript/packs → assets/javascripts}/application.js +4 -4
- data/test/dummy/app/assets/stylesheets/application.scss +23 -0
- data/test/dummy/app/assets/stylesheets/jinda.scss +253 -0
- data/test/dummy/app/controllers/adminltes_controller.rb +2 -0
- data/test/dummy/app/controllers/admins_controller.rb +6 -0
- data/test/dummy/app/controllers/api/v1/notes_controller.rb +81 -0
- data/test/dummy/app/controllers/application_controller.rb +39 -0
- data/test/dummy/app/controllers/application_controller.rb.bak +2 -0
- data/test/dummy/app/controllers/articles_controller.rb +110 -0
- data/test/dummy/app/controllers/comments_controller.rb +31 -0
- data/test/dummy/app/controllers/docs_controller.rb +56 -0
- data/test/dummy/app/controllers/identities_controller.rb +5 -0
- data/test/dummy/app/controllers/notes_controller.rb +84 -0
- data/test/dummy/app/controllers/password_resets.rb +28 -0
- data/test/dummy/app/controllers/password_resets_controller.rb +34 -0
- data/test/dummy/app/controllers/sessions_controller.rb +44 -0
- data/test/dummy/app/controllers/sitemap_controller.rb +12 -0
- data/test/dummy/app/controllers/users_controller.rb +35 -0
- data/test/dummy/app/helpers/admins_helper.rb +2 -0
- data/test/dummy/app/helpers/application_helper.rb +31 -0
- data/test/dummy/app/helpers/application_helper.rb.bak +2 -0
- 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/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 +486 -0
- data/test/dummy/app/jinda/template/index.mm +366 -0
- data/test/dummy/app/jinda/template/linkview.haml +21 -0
- data/test/dummy/app/jinda/template/view.html.erb +34 -0
- data/test/dummy/app/mailers/jinda_mailer.rb +7 -0
- data/test/dummy/app/mailers/note_mailer.rb +10 -0
- data/test/dummy/app/mailers/user_mailer.rb +15 -0
- data/test/dummy/app/models/address.rb +14 -0
- data/test/dummy/app/models/article.rb +14 -0
- data/test/dummy/app/models/comment.rb +14 -0
- data/test/dummy/app/models/identity.rb +18 -0
- data/test/dummy/app/models/jinda/doc.rb +36 -0
- data/test/dummy/app/models/jinda/module.rb +11 -0
- data/test/dummy/app/models/jinda/notice.rb +14 -0
- data/test/dummy/app/models/jinda/role.rb +8 -0
- data/test/dummy/app/models/jinda/runseq.rb +24 -0
- data/test/dummy/app/models/jinda/service.rb +17 -0
- data/test/dummy/app/models/jinda/xmain.rb +38 -0
- data/test/dummy/app/models/note.rb +22 -0
- data/test/dummy/app/models/param.rb +41 -0
- data/test/dummy/app/models/person.rb +14 -0
- data/test/dummy/app/models/user.rb +66 -0
- data/test/dummy/app/views/adminbsbs/content.haml +241 -0
- data/test/dummy/app/views/adminltes/dashboard1.haml +461 -0
- data/test/dummy/app/views/adminltes/dashboard2.haml +656 -0
- data/test/dummy/app/views/admins/edit_role/edit_role.html.erb +7 -0
- data/test/dummy/app/views/admins/edit_role/select_user.html.erb +4 -0
- data/test/dummy/app/views/api/v1/note.haml +0 -0
- data/test/dummy/app/views/articles/_report.haml +35 -0
- data/test/dummy/app/views/articles/edit.haml +23 -0
- data/test/dummy/app/views/articles/edit_article/edit_article.html.erb +15 -0
- data/test/dummy/app/views/articles/edit_article/select_article.html.erb +12 -0
- data/test/dummy/app/views/articles/index.haml +5 -0
- data/test/dummy/app/views/articles/my.haml +5 -0
- data/test/dummy/app/views/articles/new_article/form_article.html.erb +16 -0
- data/test/dummy/app/views/articles/show.html.haml +58 -0
- data/test/dummy/app/views/articles/xedit_article/edit_article.html.erb +13 -0
- data/test/dummy/app/views/ctrs/vfolder1/viewfile1.html.erb +23 -0
- data/test/dummy/app/views/ctrs/vfolder1/viewfile2.html.erb +23 -0
- data/test/dummy/app/views/ctrs/vfolder2/viewfile2.html.erb +23 -0
- data/test/dummy/app/views/custom/_adsense.haml +6 -0
- data/test/dummy/app/views/docs/doc_edit/doc_edit.html.erb +21 -0
- data/test/dummy/app/views/docs/doc_edit/doc_select.html.erb +14 -0
- data/test/dummy/app/views/docs/doc_new/doc_form.html.erb +32 -0
- data/test/dummy/app/views/docs/doc_new/doc_form.md +36 -0
- data/test/dummy/app/views/docs/doc_xedit/doc_edit.html.erb +21 -0
- data/test/dummy/app/views/docs/edit/select_note.html.erb +14 -0
- data/test/dummy/app/views/docs/index.haml +21 -0
- data/test/dummy/app/views/docs/my.haml +27 -0
- data/test/dummy/app/views/identities/new-bak.html.haml +32 -0
- data/test/dummy/app/views/identities/new.html.haml +45 -0
- data/test/dummy/app/views/jinda/_activity.md +10 -0
- data/test/dummy/app/views/jinda/_menu.haml +27 -0
- data/test/dummy/app/views/jinda/_menu_mm.haml +44 -0
- data/test/dummy/app/views/jinda/_model.md +5 -0
- data/test/dummy/app/views/jinda/_modul.md +9 -0
- data/test/dummy/app/views/jinda/_pending_home.haml +5 -0
- data/test/dummy/app/views/jinda/_pending_page.haml +24 -0
- data/test/dummy/app/views/jinda/_service.md +24 -0
- data/test/dummy/app/views/jinda/_static.haml +13 -0
- data/test/dummy/app/views/jinda/doc-thai.md +37 -0
- data/test/dummy/app/views/jinda/doc.md +36 -0
- data/test/dummy/app/views/jinda/error_logs.haml +22 -0
- data/test/dummy/app/views/jinda/feed.rss.builder +27 -0
- data/test/dummy/app/views/jinda/help.haml +20 -0
- data/test/dummy/app/views/jinda/index.html.haml +53 -0
- data/test/dummy/app/views/jinda/logs.haml +22 -0
- data/test/dummy/app/views/jinda/notice_logs.haml +18 -0
- data/test/dummy/app/views/jinda/pending.haml +1 -0
- data/test/dummy/app/views/jinda/run_form.haml +42 -0
- data/test/dummy/app/views/jinda/run_output.haml +38 -0
- data/test/dummy/app/views/jinda/search.haml +20 -0
- data/test/dummy/app/views/jinda/status.haml +61 -0
- data/test/dummy/app/views/jinda_mailer/gmail.html.erb +9 -0
- data/test/dummy/app/views/layouts/_head.html.erb +10 -0
- data/test/dummy/app/views/layouts/_meta_tag.html.erb +19 -0
- data/test/dummy/app/views/layouts/application.haml +51 -0
- data/test/dummy/app/views/layouts/application.haml.bak +4 -0
- data/test/dummy/app/views/layouts/{application.html.erb → application.html.erb.bak} +2 -1
- data/test/dummy/app/views/layouts/bsb/_footer.haml +7 -0
- data/test/dummy/app/views/layouts/bsb/_header.haml +147 -0
- data/test/dummy/app/views/layouts/bsb/_menu.haml +47 -0
- data/test/dummy/app/views/layouts/bsb/_menu_mm.haml +34 -0
- data/test/dummy/app/views/layouts/bsb/_rightbar.haml +123 -0
- data/test/dummy/app/views/layouts/bsb/_sidebar.haml +155 -0
- data/test/dummy/app/views/layouts/bsb/application.haml-bsb +47 -0
- data/test/dummy/app/views/layouts/gmail.html.erb +9 -0
- data/test/dummy/app/views/layouts/jqm/_full.haml +33 -0
- data/test/dummy/app/views/layouts/jqm/_page.haml +16 -0
- data/test/dummy/app/views/layouts/jqm/application.haml-jqm +4 -0
- data/test/dummy/app/views/layouts/lte/_flash.haml +9 -0
- data/test/dummy/app/views/layouts/lte/_footer.haml +7 -0
- data/test/dummy/app/views/layouts/lte/_header.haml +111 -0
- data/test/dummy/app/views/layouts/lte/_menu.haml +42 -0
- data/test/dummy/app/views/layouts/lte/_menu_mm.haml +36 -0
- data/test/dummy/app/views/layouts/lte/_rightbar.haml +123 -0
- data/test/dummy/app/views/layouts/lte/_sidebar.haml +154 -0
- data/test/dummy/app/views/layouts/mailer.html.haml +3 -0
- data/test/dummy/app/views/layouts/mailer.text.haml +1 -0
- data/test/dummy/app/views/layouts/mobile.html.erb +13 -0
- data/test/dummy/app/views/layouts/mobilejq.html.erb +31 -0
- data/test/dummy/app/views/layouts/print.html.erb +22 -0
- data/test/dummy/app/views/layouts/utf8.html.erb +22 -0
- data/test/dummy/app/views/note_mailer/gmail.html.haml +7 -0
- data/test/dummy/app/views/note_mailer/gmail.text.haml +8 -0
- data/test/dummy/app/views/notes/delete/select_note.html.erb +14 -0
- data/test/dummy/app/views/notes/edit/edit_note.html.erb +10 -0
- data/test/dummy/app/views/notes/edit/select_note.html.erb +14 -0
- data/test/dummy/app/views/notes/index.haml +71 -0
- data/test/dummy/app/views/notes/mail/display_mail.html.erb +20 -0
- data/test/dummy/app/views/notes/mail/select_note.html.erb +19 -0
- data/test/dummy/app/views/notes/mail/show.html.haml +13 -0
- data/test/dummy/app/views/notes/my.haml +21 -0
- data/test/dummy/app/views/notes/new/new_note.html.erb +13 -0
- data/test/dummy/app/views/notes/show.haml +10 -0
- data/test/dummy/app/views/notes/xedit/edit_note.html.erb +10 -0
- data/test/dummy/app/views/password_resets/edit.html.erb +21 -0
- data/test/dummy/app/views/password_resets/new.html.haml +11 -0
- data/test/dummy/app/views/sessions/new-bak.html.haml +22 -0
- data/test/dummy/app/views/sessions/new.html.haml +35 -0
- data/test/dummy/app/views/sitemap/index.xml.haml +10 -0
- data/test/dummy/app/views/user_mailer/password_reset.html.haml +3 -0
- data/test/dummy/app/views/user_mailer/password_reset.text.erb +3 -0
- data/test/dummy/app/views/user_mailer/password_reset.text.haml +3 -0
- data/test/dummy/app/views/users/index.haml +13 -0
- data/test/dummy/app/views/users/pwd/enter.html.erb +6 -0
- data/test/dummy/app/views/users/user/enter_user.html.erb +10 -0
- data/test/dummy/bin/rails +3 -3
- data/test/dummy/bin/rake +2 -2
- data/test/dummy/bin/setup +9 -17
- data/test/dummy/config/application.rb +51 -9
- data/test/dummy/config/boot.rb +3 -4
- data/test/dummy/config/cloudinary.yml +9 -0
- data/test/dummy/config/credentials.yml.enc +1 -0
- data/test/dummy/config/environment.rb +7 -1
- data/test/dummy/config/environments/development.rb +20 -20
- data/test/dummy/config/environments/production.rb +16 -40
- data/test/dummy/config/environments/test.rb +19 -11
- data/test/dummy/config/initializers/assets.rb +1 -1
- data/test/dummy/config/initializers/content_security_policy.rb +21 -24
- data/test/dummy/config/initializers/filter_parameter_logging.rb +6 -2
- data/test/dummy/config/initializers/fix_mongoid_generator.rb-org +14 -0
- data/test/dummy/config/initializers/inflections.rb +4 -4
- data/test/dummy/config/initializers/jinda.rb +14 -0
- data/test/dummy/config/initializers/mongoid.rb +10 -0
- data/test/dummy/config/initializers/omniauth.rb +17 -0
- data/test/dummy/config/initializers/permissions_policy.rb +11 -0
- data/test/dummy/config/locales/en.yml +3 -3
- data/test/dummy/config/mongoid.yml +182 -0
- data/test/dummy/config/mongoid.yml-docker +182 -0
- data/test/dummy/config/mongoid.yml-localhost +182 -0
- data/test/dummy/config/puma.rb +7 -2
- data/test/dummy/config/routes.rb +5 -1
- data/test/dummy/config.ru +2 -1
- data/test/dummy/db/seeds.rb +6 -0
- data/test/dummy/docker-compose.yml +21 -0
- data/test/dummy/dot/dot.env +2 -0
- data/test/dummy/entrypoint.sh +13 -0
- data/test/dummy/log/development.log +2329 -6
- data/test/dummy/public/robots.txt +1 -0
- data/test/dummy/spec/controllers/api/v1_get_index_spec.rb +23 -0
- data/test/dummy/spec/controllers/api/v1_get_my_spec.rb +14 -0
- data/test/dummy/spec/controllers/api/v1_post_spec.rb +19 -0
- data/test/dummy/spec/controllers/sessions_controller_spec.rb +98 -0
- data/test/dummy/spec/features/userlogins_spec.rb +23 -0
- data/test/dummy/spec/mailers/note_spec.rb +24 -0
- data/test/dummy/spec/mailers/previews/note_preview.rb +9 -0
- data/test/dummy/spec/models/note_spec.rb +41 -0
- data/test/dummy/spec/models/user_spec.rb +12 -0
- data/test/dummy/spec/rails_helper.rb +42 -0
- data/test/dummy/spec/spec_helper.rb +80 -0
- data/test/dummy/spec/support/authentication_helper.rb +20 -0
- data/test/dummy/spec/support/databasecleaner.rb +13 -0
- data/test/dummy/spec/support/factory_bot.rb +12 -0
- data/test/dummy/spec/support/omniauth_macros.rb +38 -0
- data/test/dummy/spec/support/request_spec_helper.rb +8 -0
- data/test/dummy/spec/views/articles/_article.html.erb_spec.rbx +14 -0
- data/test/dummy/tmp/development_secret.txt +1 -1
- metadata +197 -16
- data/test/dummy/app/assets/stylesheets/application.css +0 -15
- data/test/dummy/app/models/application_record.rb +0 -3
- data/test/dummy/config/database.yml +0 -25
- data/test/dummy/config/initializers/application_controller_renderer.rb +0 -8
- data/test/dummy/config/initializers/backtrace_silencers.rb +0 -7
- data/test/dummy/config/initializers/cookies_serializer.rb +0 -5
- data/test/dummy/config/initializers/mime_types.rb +0 -4
- data/test/dummy/config/initializers/wrap_parameters.rb +0 -14
- data/test/dummy/config/spring.rb +0 -6
- data/test/dummy/config/storage.yml +0 -34
@@ -1,3 +1,5 @@
|
|
1
|
+
require "active_support/core_ext/integer/time"
|
2
|
+
|
1
3
|
Rails.application.configure do
|
2
4
|
# Settings specified here will take precedence over those in config/application.rb.
|
3
5
|
|
@@ -20,35 +22,33 @@ Rails.application.configure do
|
|
20
22
|
|
21
23
|
# Disable serving static files from the `/public` folder by default since
|
22
24
|
# Apache or NGINX already handles this.
|
23
|
-
config.public_file_server.enabled = ENV[
|
25
|
+
config.public_file_server.enabled = ENV["RAILS_SERVE_STATIC_FILES"].present?
|
24
26
|
|
25
27
|
# Compress CSS using a preprocessor.
|
26
28
|
# config.assets.css_compressor = :sass
|
27
29
|
|
28
30
|
# Do not fallback to assets pipeline if a precompiled asset is missed.
|
29
31
|
config.assets.compile = false
|
32
|
+
config.assets.compile = true
|
30
33
|
|
31
34
|
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
|
32
|
-
# config.
|
35
|
+
# config.asset_host = "http://assets.example.com"
|
33
36
|
|
34
37
|
# Specifies the header that your server uses for sending files.
|
35
|
-
# config.action_dispatch.x_sendfile_header =
|
36
|
-
# config.action_dispatch.x_sendfile_header =
|
37
|
-
|
38
|
-
# Store uploaded files on the local file system (see config/storage.yml for options).
|
39
|
-
config.active_storage.service = :local
|
38
|
+
# config.action_dispatch.x_sendfile_header = "X-Sendfile" # for Apache
|
39
|
+
# config.action_dispatch.x_sendfile_header = "X-Accel-Redirect" # for NGINX
|
40
40
|
|
41
41
|
# Mount Action Cable outside main process or domain.
|
42
42
|
# config.action_cable.mount_path = nil
|
43
|
-
# config.action_cable.url =
|
44
|
-
# config.action_cable.allowed_request_origins = [
|
43
|
+
# config.action_cable.url = "wss://example.com/cable"
|
44
|
+
# config.action_cable.allowed_request_origins = [ "http://example.com", /http:\/\/example.*/ ]
|
45
45
|
|
46
46
|
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
47
47
|
# config.force_ssl = true
|
48
48
|
|
49
|
-
#
|
50
|
-
#
|
51
|
-
config.log_level = :
|
49
|
+
# Include generic and useful information about system operation, but avoid logging too much
|
50
|
+
# information to avoid inadvertent exposure of personally identifiable information (PII).
|
51
|
+
config.log_level = :info
|
52
52
|
|
53
53
|
# Prepend all log lines with the following tags.
|
54
54
|
config.log_tags = [ :request_id ]
|
@@ -70,43 +70,19 @@ Rails.application.configure do
|
|
70
70
|
# the I18n.default_locale when a translation cannot be found).
|
71
71
|
config.i18n.fallbacks = true
|
72
72
|
|
73
|
-
#
|
74
|
-
config.active_support.
|
73
|
+
# Don't log any deprecations.
|
74
|
+
config.active_support.report_deprecations = false
|
75
75
|
|
76
76
|
# Use default logging formatter so that PID and timestamp are not suppressed.
|
77
77
|
config.log_formatter = ::Logger::Formatter.new
|
78
78
|
|
79
79
|
# Use a different logger for distributed setups.
|
80
|
-
# require
|
81
|
-
# config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new
|
80
|
+
# require "syslog/logger"
|
81
|
+
# config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new "app-name")
|
82
82
|
|
83
83
|
if ENV["RAILS_LOG_TO_STDOUT"].present?
|
84
84
|
logger = ActiveSupport::Logger.new(STDOUT)
|
85
85
|
logger.formatter = config.log_formatter
|
86
86
|
config.logger = ActiveSupport::TaggedLogging.new(logger)
|
87
87
|
end
|
88
|
-
|
89
|
-
# Do not dump schema after migrations.
|
90
|
-
config.active_record.dump_schema_after_migration = false
|
91
|
-
|
92
|
-
# Inserts middleware to perform automatic connection switching.
|
93
|
-
# The `database_selector` hash is used to pass options to the DatabaseSelector
|
94
|
-
# middleware. The `delay` is used to determine how long to wait after a write
|
95
|
-
# to send a subsequent read to the primary.
|
96
|
-
#
|
97
|
-
# The `database_resolver` class is used by the middleware to determine which
|
98
|
-
# database is appropriate to use based on the time delay.
|
99
|
-
#
|
100
|
-
# The `database_resolver_context` class is used by the middleware to set
|
101
|
-
# timestamps for the last write to the primary. The resolver uses the context
|
102
|
-
# class timestamps to determine how long to wait before reading from the
|
103
|
-
# replica.
|
104
|
-
#
|
105
|
-
# By default Rails will store a last write timestamp in the session. The
|
106
|
-
# DatabaseSelector middleware is designed as such you can define your own
|
107
|
-
# strategy for connection switching and pass that into the middleware through
|
108
|
-
# these configuration options.
|
109
|
-
# config.active_record.database_selector = { delay: 2.seconds }
|
110
|
-
# config.active_record.database_resolver = ActiveRecord::Middleware::DatabaseSelector::Resolver
|
111
|
-
# config.active_record.database_resolver_context = ActiveRecord::Middleware::DatabaseSelector::Resolver::Session
|
112
88
|
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require "active_support/core_ext/integer/time"
|
2
|
+
|
1
3
|
# The test environment is used exclusively to run your application's
|
2
4
|
# test suite. You never need to work with it otherwise. Remember that
|
3
5
|
# your test database is "scratch space" for the test suite and is wiped
|
@@ -6,18 +8,18 @@
|
|
6
8
|
Rails.application.configure do
|
7
9
|
# Settings specified here will take precedence over those in config/application.rb.
|
8
10
|
|
9
|
-
config.
|
10
|
-
config.
|
11
|
+
# Turn false under Spring and add config.action_view.cache_template_loading = true.
|
12
|
+
config.cache_classes = true
|
11
13
|
|
12
|
-
#
|
13
|
-
#
|
14
|
-
#
|
15
|
-
config.eager_load =
|
14
|
+
# Eager loading loads your whole application. When running a single test locally,
|
15
|
+
# this probably isn't necessary. It's a good idea to do in a continuous integration
|
16
|
+
# system, or in some way before deploying your code.
|
17
|
+
config.eager_load = ENV["CI"].present?
|
16
18
|
|
17
19
|
# Configure public file server for tests with Cache-Control for performance.
|
18
20
|
config.public_file_server.enabled = true
|
19
21
|
config.public_file_server.headers = {
|
20
|
-
|
22
|
+
"Cache-Control" => "public, max-age=#{1.hour.to_i}"
|
21
23
|
}
|
22
24
|
|
23
25
|
# Show full error reports and disable caching.
|
@@ -31,9 +33,6 @@ Rails.application.configure do
|
|
31
33
|
# Disable request forgery protection in test environment.
|
32
34
|
config.action_controller.allow_forgery_protection = false
|
33
35
|
|
34
|
-
# Store uploaded files on the local file system in a temporary directory.
|
35
|
-
config.active_storage.service = :test
|
36
|
-
|
37
36
|
config.action_mailer.perform_caching = false
|
38
37
|
|
39
38
|
# Tell Action Mailer not to deliver emails to the real world.
|
@@ -44,6 +43,15 @@ Rails.application.configure do
|
|
44
43
|
# Print deprecation notices to the stderr.
|
45
44
|
config.active_support.deprecation = :stderr
|
46
45
|
|
46
|
+
# Raise exceptions for disallowed deprecations.
|
47
|
+
config.active_support.disallowed_deprecation = :raise
|
48
|
+
|
49
|
+
# Tell Active Support which deprecation messages to disallow.
|
50
|
+
config.active_support.disallowed_deprecation_warnings = []
|
51
|
+
|
47
52
|
# Raises error for missing translations.
|
48
|
-
# config.
|
53
|
+
# config.i18n.raise_on_missing_translations = true
|
54
|
+
|
55
|
+
# Annotate rendered view with file names.
|
56
|
+
# config.action_view.annotate_rendered_view_with_filenames = true
|
49
57
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# Be sure to restart your server when you modify this file.
|
2
2
|
|
3
3
|
# Version of your assets, change this if you want to expire all your assets.
|
4
|
-
Rails.application.config.assets.version =
|
4
|
+
Rails.application.config.assets.version = "1.0"
|
5
5
|
|
6
6
|
# Add additional assets to the asset load path.
|
7
7
|
# Rails.application.config.assets.paths << Emoji.images_path
|
@@ -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
|
-
#
|
5
|
-
# https://
|
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.
|
8
|
-
#
|
9
|
-
#
|
10
|
-
#
|
11
|
-
#
|
12
|
-
#
|
13
|
-
#
|
14
|
-
|
15
|
-
#
|
16
|
-
#
|
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
|
4
|
-
|
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,
|
8
|
-
# inflect.singular /^(ox)en/i,
|
9
|
-
# inflect.irregular
|
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
|
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
|
7
|
+
# I18n.t "hello"
|
8
8
|
#
|
9
9
|
# In views, this is aliased to just `t`:
|
10
10
|
#
|
11
|
-
# <%= t(
|
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
|
-
#
|
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,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
|