eve-rails 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (102) hide show
  1. checksums.yaml +7 -0
  2. data/.better-html.yml +1 -0
  3. data/.editorconfig +9 -0
  4. data/.erb-lint.yml +31 -0
  5. data/.eslintignore +4 -0
  6. data/.eslintrc.js +17 -0
  7. data/.husky/pre-commit +9 -0
  8. data/.mdlrc +2 -0
  9. data/.node-version +1 -0
  10. data/.prettier.config.js +3 -0
  11. data/.prettierignore +5 -0
  12. data/.rspec +3 -0
  13. data/.rubocop.yml +48 -0
  14. data/.ruby-version +1 -0
  15. data/.tool-versions +1 -0
  16. data/.vscode/settings.json +23 -0
  17. data/.yardext.rb +18 -0
  18. data/.yardopts +18 -0
  19. data/CHANGELOG.md +7 -0
  20. data/CODE_OF_CONDUCT.md +84 -0
  21. data/CONTRIBUTING.md +1 -0
  22. data/Gemfile +59 -0
  23. data/Gemfile.lock +467 -0
  24. data/LICENSE.txt +21 -0
  25. data/Procfile.dev +3 -0
  26. data/README.md +23 -0
  27. data/Rakefile +5 -0
  28. data/SECURITY.md +1 -0
  29. data/app/controllers/eve/rails/application_controller.rb +8 -0
  30. data/app/helpers/eve/rails/application_helper.rb +9 -0
  31. data/config/i18n-tasks.yml +156 -0
  32. data/config/initializers/inflections.rb +10 -0
  33. data/config/locales/en.yml +2 -0
  34. data/demo/app/assets/config/manifest.js +2 -0
  35. data/demo/app/assets/images/.keep +0 -0
  36. data/demo/app/assets/stylesheets/application.tailwind.css +3 -0
  37. data/demo/app/channels/application_cable/channel.rb +6 -0
  38. data/demo/app/channels/application_cable/connection.rb +6 -0
  39. data/demo/app/controllers/application_controller.rb +4 -0
  40. data/demo/app/controllers/concerns/.keep +0 -0
  41. data/demo/app/helpers/application_helper.rb +4 -0
  42. data/demo/app/javascript/application.js +3 -0
  43. data/demo/app/javascript/controllers/application.js +9 -0
  44. data/demo/app/javascript/controllers/hello_controller.js +7 -0
  45. data/demo/app/javascript/controllers/index.js +8 -0
  46. data/demo/app/jobs/application_job.rb +9 -0
  47. data/demo/app/mailers/application_mailer.rb +6 -0
  48. data/demo/app/models/application_record.rb +5 -0
  49. data/demo/app/models/concerns/.keep +0 -0
  50. data/demo/app/views/layouts/application.html.erb +16 -0
  51. data/demo/app/views/layouts/mailer.html.erb +13 -0
  52. data/demo/app/views/layouts/mailer.text.erb +1 -0
  53. data/demo/config/application.rb +24 -0
  54. data/demo/config/boot.rb +6 -0
  55. data/demo/config/cable.yml +11 -0
  56. data/demo/config/database.yml +24 -0
  57. data/demo/config/environment.rb +7 -0
  58. data/demo/config/environments/development.rb +72 -0
  59. data/demo/config/environments/production.rb +95 -0
  60. data/demo/config/environments/test.rb +62 -0
  61. data/demo/config/initializers/assets.rb +14 -0
  62. data/demo/config/initializers/content_security_policy.rb +26 -0
  63. data/demo/config/initializers/filter_parameter_logging.rb +10 -0
  64. data/demo/config/initializers/inflections.rb +17 -0
  65. data/demo/config/initializers/permissions_policy.rb +12 -0
  66. data/demo/config/locales/en.yml +33 -0
  67. data/demo/config/puma.rb +45 -0
  68. data/demo/config/routes.rb +8 -0
  69. data/demo/config/storage.yml +33 -0
  70. data/demo/config.ru +8 -0
  71. data/demo/db/schema.rb +17 -0
  72. data/demo/db/seeds.rb +8 -0
  73. data/demo/lib/assets/.keep +0 -0
  74. data/demo/lib/tasks/.keep +0 -0
  75. data/demo/log/.keep +0 -0
  76. data/demo/public/404.html +69 -0
  77. data/demo/public/422.html +69 -0
  78. data/demo/public/500.html +68 -0
  79. data/demo/public/apple-touch-icon-precomposed.png +0 -0
  80. data/demo/public/apple-touch-icon.png +0 -0
  81. data/demo/public/favicon.ico +0 -0
  82. data/demo/public/robots.txt +1 -0
  83. data/demo/storage/.keep +0 -0
  84. data/demo/tmp/.keep +0 -0
  85. data/demo/tmp/pids/.keep +0 -0
  86. data/demo/vendor/.keep +0 -0
  87. data/lib/eve/rails/config.rb +9 -0
  88. data/lib/eve/rails/engine.rb +17 -0
  89. data/lib/eve/rails/errors.rb +7 -0
  90. data/lib/eve/rails/tasks/setup.rake +6 -0
  91. data/lib/eve/rails/version.rb +7 -0
  92. data/lib/eve/rails.rb +12 -0
  93. data/lib/eve-rails.rb +3 -0
  94. data/lib/ext/database_cleaner/active_record/base.rb +13 -0
  95. data/lib/generators/eve/rails/install_generator.rb +11 -0
  96. data/lib/generators/eve/rails/templates/.keep +0 -0
  97. data/lib/tasks/docs.rake +6 -0
  98. data/lib/tasks/gem.rake +3 -0
  99. data/package.json +47 -0
  100. data/tailwind.config.js +12 -0
  101. data/yarn.lock +1653 -0
  102. metadata +206 -0
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ ActiveSupport::Inflector.inflections(:en) do |inflect|
4
+ inflect.acronym 'API'
5
+ inflect.acronym 'EFT'
6
+ inflect.acronym 'ESI'
7
+ inflect.acronym 'EVE'
8
+ inflect.acronym 'SDE'
9
+ inflect.acronym 'SSO'
10
+ end
@@ -0,0 +1,2 @@
1
+ ---
2
+ en:
@@ -0,0 +1,2 @@
1
+ //= link_tree ../images
2
+ //= link_tree ../builds
File without changes
@@ -0,0 +1,3 @@
1
+ @tailwind base;
2
+ @tailwind components;
3
+ @tailwind utilities;
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ApplicationCable
4
+ class Channel < ActionCable::Channel::Base
5
+ end
6
+ end
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ApplicationCable
4
+ class Connection < ActionCable::Connection::Base
5
+ end
6
+ end
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ class ApplicationController < ActionController::Base
4
+ end
File without changes
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ApplicationHelper
4
+ end
@@ -0,0 +1,3 @@
1
+ // Entry point for the build script in your package.json
2
+ import "@hotwired/turbo-rails";
3
+ import "./controllers";
@@ -0,0 +1,9 @@
1
+ import { Application } from "@hotwired/stimulus";
2
+
3
+ const application = Application.start();
4
+
5
+ // Configure Stimulus development experience
6
+ application.debug = false;
7
+ window.Stimulus = application;
8
+
9
+ export { application };
@@ -0,0 +1,7 @@
1
+ import { Controller } from "@hotwired/stimulus";
2
+
3
+ export default class extends Controller {
4
+ connect() {
5
+ this.element.textContent = "Hello World!";
6
+ }
7
+ }
@@ -0,0 +1,8 @@
1
+ // This file is auto-generated by ./bin/rails stimulus:manifest:update
2
+ // Run that command whenever you add a new controller or create them with
3
+ // ./bin/rails generate stimulus controllerName
4
+
5
+ import { application } from "./application";
6
+
7
+ import HelloController from "./hello_controller";
8
+ application.register("hello", HelloController);
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ class ApplicationJob < ActiveJob::Base
4
+ # Automatically retry jobs that encountered a deadlock
5
+ # retry_on ActiveRecord::Deadlocked
6
+
7
+ # Most jobs are safe to ignore if the underlying records are no longer available
8
+ # discard_on ActiveJob::DeserializationError
9
+ end
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ class ApplicationMailer < ActionMailer::Base
4
+ default from: 'from@example.com'
5
+ layout 'mailer'
6
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ class ApplicationRecord < ActiveRecord::Base
4
+ primary_abstract_class
5
+ end
File without changes
@@ -0,0 +1,16 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>Dummy</title>
5
+ <meta name="viewport" content="width=device-width,initial-scale=1">
6
+ <%= csrf_meta_tags %>
7
+ <%= csp_meta_tag %>
8
+
9
+ <%= stylesheet_link_tag 'application', 'data-turbo-track': 'reload' %>
10
+ <%= javascript_include_tag 'application', 'data-turbo-track': 'reload', defer: true %>
11
+ </head>
12
+
13
+ <body>
14
+ <%= yield %>
15
+ </body>
16
+ </html>
@@ -0,0 +1,13 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
5
+ <style>
6
+ /* Email styles need to be inline */
7
+ </style>
8
+ </head>
9
+
10
+ <body>
11
+ <%= yield %>
12
+ </body>
13
+ </html>
@@ -0,0 +1 @@
1
+ <%= yield %>
@@ -0,0 +1,24 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'boot'
4
+
5
+ require 'rails/all'
6
+
7
+ # Require the gems listed in Gemfile, including any gems
8
+ # you've limited to :test, :development, or :production.
9
+ Bundler.require(*Rails.groups)
10
+
11
+ module Dummy
12
+ class Application < Rails::Application
13
+ # Initialize configuration defaults for originally generated Rails version.
14
+ config.load_defaults 7.0
15
+
16
+ # Configuration for the application, engines, and railties goes here.
17
+ #
18
+ # These settings can be overridden in specific environments using the files
19
+ # in config/environments, which are processed later.
20
+ #
21
+ # config.time_zone = "Central Time (US & Canada)"
22
+ # config.eager_load_paths << Rails.root.join("extras")
23
+ end
24
+ end
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __dir__)
4
+
5
+ require 'bundler/setup' # Set up gems listed in the Gemfile.
6
+ require 'bootsnap/setup' # Speed up boot time by caching expensive operations.
@@ -0,0 +1,11 @@
1
+ development:
2
+ adapter: redis
3
+ url: redis://localhost:6379/1
4
+
5
+ test:
6
+ adapter: test
7
+
8
+ production:
9
+ adapter: redis
10
+ url: <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %>
11
+ channel_prefix: dummy_production
@@ -0,0 +1,24 @@
1
+ default: &default
2
+ adapter: postgresql
3
+ encoding: unicode
4
+ pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
5
+
6
+ development:
7
+ <<: *default
8
+ database: eve_rails_development
9
+ username: postgres
10
+ password: postgres
11
+ host: localhost
12
+ port: 5432
13
+
14
+ test:
15
+ <<: *default
16
+ database: eve_rails_test
17
+ username: postgres
18
+ password: postgres
19
+ host: localhost
20
+ port: 5432
21
+
22
+ production:
23
+ <<: *default
24
+ url: <%= ENV['DATABASE_URL'] %>
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Load the Rails application.
4
+ require_relative 'application'
5
+
6
+ # Initialize the Rails application.
7
+ Rails.application.initialize!
@@ -0,0 +1,72 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'active_support/core_ext/integer/time'
4
+
5
+ Rails.application.configure do
6
+ # Settings specified here will take precedence over those in config/application.rb.
7
+
8
+ # In the development environment your application's code is reloaded any time
9
+ # it changes. This slows down response time but is perfect for development
10
+ # since you don't have to restart the web server when you make code changes.
11
+ config.cache_classes = false
12
+
13
+ # Do not eager load code on boot.
14
+ config.eager_load = false
15
+
16
+ # Show full error reports.
17
+ config.consider_all_requests_local = true
18
+
19
+ # Enable server timing
20
+ config.server_timing = true
21
+
22
+ # Enable/disable caching. By default caching is disabled.
23
+ # Run rails dev:cache to toggle caching.
24
+ if Rails.root.join('tmp/caching-dev.txt').exist?
25
+ config.action_controller.perform_caching = true
26
+ config.action_controller.enable_fragment_cache_logging = true
27
+
28
+ config.cache_store = :memory_store
29
+ config.public_file_server.headers = {
30
+ 'Cache-Control' => "public, max-age=#{2.days.to_i}"
31
+ }
32
+ else
33
+ config.action_controller.perform_caching = false
34
+
35
+ config.cache_store = :null_store
36
+ end
37
+
38
+ # Store uploaded files on the local file system (see config/storage.yml for options).
39
+ config.active_storage.service = :local
40
+
41
+ # Don't care if the mailer can't send.
42
+ config.action_mailer.raise_delivery_errors = false
43
+
44
+ config.action_mailer.perform_caching = false
45
+
46
+ # Print deprecation notices to the Rails logger.
47
+ config.active_support.deprecation = :log
48
+
49
+ # Raise exceptions for disallowed deprecations.
50
+ config.active_support.disallowed_deprecation = :raise
51
+
52
+ # Tell Active Support which deprecation messages to disallow.
53
+ config.active_support.disallowed_deprecation_warnings = []
54
+
55
+ # Raise an error on page load if there are pending migrations.
56
+ config.active_record.migration_error = :page_load
57
+
58
+ # Highlight code that triggered database queries in logs.
59
+ config.active_record.verbose_query_logs = true
60
+
61
+ # Suppress logger output for asset requests.
62
+ config.assets.quiet = true
63
+
64
+ # Raises error for missing translations.
65
+ # config.i18n.raise_on_missing_translations = true
66
+
67
+ # Annotate rendered view with file names.
68
+ # config.action_view.annotate_rendered_view_with_filenames = true
69
+
70
+ # Uncomment if you wish to allow Action Cable access from any origin.
71
+ # config.action_cable.disable_request_forgery_protection = true
72
+ end
@@ -0,0 +1,95 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'active_support/core_ext/integer/time'
4
+
5
+ Rails.application.configure do
6
+ # Settings specified here will take precedence over those in config/application.rb.
7
+
8
+ # Code is not reloaded between requests.
9
+ config.cache_classes = true
10
+
11
+ # Eager load code on boot. This eager loads most of Rails and
12
+ # your application in memory, allowing both threaded web servers
13
+ # and those relying on copy on write to perform better.
14
+ # Rake tasks automatically ignore this option for performance.
15
+ config.eager_load = true
16
+
17
+ # Full error reports are disabled and caching is turned on.
18
+ config.consider_all_requests_local = false
19
+ config.action_controller.perform_caching = true
20
+
21
+ # Ensures that a master key has been made available in either ENV["RAILS_MASTER_KEY"]
22
+ # or in config/master.key. This key is used to decrypt credentials (and other encrypted files).
23
+ # config.require_master_key = true
24
+
25
+ # Disable serving static files from the `/public` folder by default since
26
+ # Apache or NGINX already handles this.
27
+ config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
28
+
29
+ # Compress CSS using a preprocessor.
30
+ # config.assets.css_compressor = :sass
31
+
32
+ # Do not fallback to assets pipeline if a precompiled asset is missed.
33
+ config.assets.compile = false
34
+
35
+ # Enable serving of images, stylesheets, and JavaScripts from an asset server.
36
+ # config.asset_host = "http://assets.example.com"
37
+
38
+ # Specifies the header that your server uses for sending files.
39
+ # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for Apache
40
+ # config.action_dispatch.x_sendfile_header = "X-Accel-Redirect" # for NGINX
41
+
42
+ # Store uploaded files on the local file system (see config/storage.yml for options).
43
+ config.active_storage.service = :local
44
+
45
+ # Mount Action Cable outside main process or domain.
46
+ # config.action_cable.mount_path = nil
47
+ # config.action_cable.url = "wss://example.com/cable"
48
+ # config.action_cable.allowed_request_origins = [ "http://example.com", /http:\/\/example.*/ ]
49
+
50
+ # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
51
+ # config.force_ssl = true
52
+
53
+ # Include generic and useful information about system operation, but avoid logging too much
54
+ # information to avoid inadvertent exposure of personally identifiable information (PII).
55
+ config.log_level = :info
56
+
57
+ # Prepend all log lines with the following tags.
58
+ config.log_tags = [:request_id]
59
+
60
+ # Use a different cache store in production.
61
+ # config.cache_store = :mem_cache_store
62
+
63
+ # Use a real queuing backend for Active Job (and separate queues per environment).
64
+ # config.active_job.queue_adapter = :resque
65
+ # config.active_job.queue_name_prefix = "dummy_production"
66
+
67
+ config.action_mailer.perform_caching = false
68
+
69
+ # Ignore bad email addresses and do not raise email delivery errors.
70
+ # Set this to true and configure the email server for immediate delivery to raise delivery errors.
71
+ # config.action_mailer.raise_delivery_errors = false
72
+
73
+ # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
74
+ # the I18n.default_locale when a translation cannot be found).
75
+ config.i18n.fallbacks = true
76
+
77
+ # Don't log any deprecations.
78
+ config.active_support.report_deprecations = false
79
+
80
+ # Use default logging formatter so that PID and timestamp are not suppressed.
81
+ config.log_formatter = Logger::Formatter.new
82
+
83
+ # Use a different logger for distributed setups.
84
+ # require "syslog/logger"
85
+ # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new "app-name")
86
+
87
+ if ENV['RAILS_LOG_TO_STDOUT'].present?
88
+ logger = ActiveSupport::Logger.new($stdout)
89
+ logger.formatter = config.log_formatter
90
+ config.logger = ActiveSupport::TaggedLogging.new(logger)
91
+ end
92
+
93
+ # Do not dump schema after migrations.
94
+ config.active_record.dump_schema_after_migration = false
95
+ end
@@ -0,0 +1,62 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'active_support/core_ext/integer/time'
4
+
5
+ # The test environment is used exclusively to run your application's
6
+ # test suite. You never need to work with it otherwise. Remember that
7
+ # your test database is "scratch space" for the test suite and is wiped
8
+ # and recreated between test runs. Don't rely on the data there!
9
+
10
+ Rails.application.configure do
11
+ # Settings specified here will take precedence over those in config/application.rb.
12
+
13
+ # Turn false under Spring and add config.action_view.cache_template_loading = true.
14
+ config.cache_classes = true
15
+
16
+ # Eager loading loads your whole application. When running a single test locally,
17
+ # this probably isn't necessary. It's a good idea to do in a continuous integration
18
+ # system, or in some way before deploying your code.
19
+ config.eager_load = ENV['CI'].present?
20
+
21
+ # Configure public file server for tests with Cache-Control for performance.
22
+ config.public_file_server.enabled = true
23
+ config.public_file_server.headers = {
24
+ 'Cache-Control' => "public, max-age=#{1.hour.to_i}"
25
+ }
26
+
27
+ # Show full error reports and disable caching.
28
+ config.consider_all_requests_local = true
29
+ config.action_controller.perform_caching = false
30
+ config.cache_store = :null_store
31
+
32
+ # Raise exceptions instead of rendering exception templates.
33
+ config.action_dispatch.show_exceptions = false
34
+
35
+ # Disable request forgery protection in test environment.
36
+ config.action_controller.allow_forgery_protection = false
37
+
38
+ # Store uploaded files on the local file system in a temporary directory.
39
+ config.active_storage.service = :test
40
+
41
+ config.action_mailer.perform_caching = false
42
+
43
+ # Tell Action Mailer not to deliver emails to the real world.
44
+ # The :test delivery method accumulates sent emails in the
45
+ # ActionMailer::Base.deliveries array.
46
+ config.action_mailer.delivery_method = :test
47
+
48
+ # Print deprecation notices to the stderr.
49
+ config.active_support.deprecation = :stderr
50
+
51
+ # Raise exceptions for disallowed deprecations.
52
+ config.active_support.disallowed_deprecation = :raise
53
+
54
+ # Tell Active Support which deprecation messages to disallow.
55
+ config.active_support.disallowed_deprecation_warnings = []
56
+
57
+ # Raises error for missing translations.
58
+ # config.i18n.raise_on_missing_translations = true
59
+
60
+ # Annotate rendered view with file names.
61
+ # config.action_view.annotate_rendered_view_with_filenames = true
62
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Be sure to restart your server when you modify this file.
4
+
5
+ # Version of your assets, change this if you want to expire all your assets.
6
+ Rails.application.config.assets.version = '1.0'
7
+
8
+ # Add additional assets to the asset load path.
9
+ # Rails.application.config.assets.paths << Emoji.images_path
10
+
11
+ # Precompile additional assets.
12
+ # application.js, application.css, and all non-JS/CSS in the app/assets
13
+ # folder are already added.
14
+ # Rails.application.config.assets.precompile += %w( admin.js admin.css )
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+ # Be sure to restart your server when you modify this file.
3
+
4
+ # Define an application-wide content security policy.
5
+ # See the Securing Rails Applications Guide for more information:
6
+ # https://guides.rubyonrails.org/security.html#content-security-policy-header
7
+
8
+ # Rails.application.configure do
9
+ # config.content_security_policy do |policy|
10
+ # policy.default_src :self, :https
11
+ # policy.font_src :self, :https, :data
12
+ # policy.img_src :self, :https, :data
13
+ # policy.object_src :none
14
+ # policy.script_src :self, :https
15
+ # policy.style_src :self, :https
16
+ # # Specify URI for violation reports
17
+ # # policy.report_uri "/csp-violation-report-endpoint"
18
+ # end
19
+ #
20
+ # # Generate session nonces for permitted importmap and inline scripts
21
+ # config.content_security_policy_nonce_generator = ->(request) { request.session.id.to_s }
22
+ # config.content_security_policy_nonce_directives = %w(script-src)
23
+ #
24
+ # # Report violations without enforcing the policy.
25
+ # # config.content_security_policy_report_only = true
26
+ # end
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Be sure to restart your server when you modify this file.
4
+
5
+ # Configure parameters to be filtered from the log file. Use this to limit dissemination of
6
+ # sensitive information. See the ActiveSupport::ParameterFilter documentation for supported
7
+ # notations and behaviors.
8
+ Rails.application.config.filter_parameters += %i[
9
+ passw secret token _key crypt salt certificate otp ssn
10
+ ]
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+ # Be sure to restart your server when you modify this file.
3
+
4
+ # Add new inflection rules using the following format. Inflections
5
+ # are locale specific, and you may define rules for as many different
6
+ # locales as you wish. All of these examples are active by default:
7
+ # ActiveSupport::Inflector.inflections(:en) do |inflect|
8
+ # inflect.plural /^(ox)$/i, "\\1en"
9
+ # inflect.singular /^(ox)en/i, "\\1"
10
+ # inflect.irregular "person", "people"
11
+ # inflect.uncountable %w( fish sheep )
12
+ # end
13
+
14
+ # These inflection rules are supported but not enabled by default:
15
+ # ActiveSupport::Inflector.inflections(:en) do |inflect|
16
+ # inflect.acronym "RESTful"
17
+ # end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+ # Define an application-wide HTTP permissions policy. For further
3
+ # information see https://developers.google.com/web/updates/2018/06/feature-policy
4
+ #
5
+ # Rails.application.config.permissions_policy do |f|
6
+ # f.camera :none
7
+ # f.gyroscope :none
8
+ # f.microphone :none
9
+ # f.usb :none
10
+ # f.fullscreen :self
11
+ # f.payment :self, "https://secure.example.com"
12
+ # end
@@ -0,0 +1,33 @@
1
+ # Files in the config/locales directory are used for internationalization
2
+ # and are automatically loaded by Rails. If you want to use locales other
3
+ # than English, add the necessary files in this directory.
4
+ #
5
+ # To use the locales, use `I18n.t`:
6
+ #
7
+ # I18n.t "hello"
8
+ #
9
+ # In views, this is aliased to just `t`:
10
+ #
11
+ # <%= t("hello") %>
12
+ #
13
+ # To use a different locale, set it with `I18n.locale`:
14
+ #
15
+ # I18n.locale = :es
16
+ #
17
+ # This would use the information in config/locales/es.yml.
18
+ #
19
+ # The following keys must be escaped otherwise they will not be retrieved by
20
+ # the default I18n backend:
21
+ #
22
+ # true, false, on, off, yes, no
23
+ #
24
+ # Instead, surround them with single quotes.
25
+ #
26
+ # en:
27
+ # "true": "foo"
28
+ #
29
+ # To learn more, please read the Rails Internationalization guide
30
+ # available at https://guides.rubyonrails.org/i18n.html.
31
+
32
+ en:
33
+ hello: "Hello world"
@@ -0,0 +1,45 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Puma can serve each request in a thread from an internal thread pool.
4
+ # The `threads` method setting takes two numbers: a minimum and maximum.
5
+ # Any libraries that use thread pools should be configured to match
6
+ # the maximum value specified for Puma. Default is set to 5 threads for minimum
7
+ # and maximum; this matches the default thread size of Active Record.
8
+ #
9
+ max_threads_count = ENV.fetch('RAILS_MAX_THREADS', 5)
10
+ min_threads_count = ENV.fetch('RAILS_MIN_THREADS') { max_threads_count }
11
+ threads min_threads_count, max_threads_count
12
+
13
+ # Specifies the `worker_timeout` threshold that Puma will use to wait before
14
+ # terminating a worker in development environments.
15
+ #
16
+ worker_timeout 3600 if ENV.fetch('RAILS_ENV', 'development') == 'development'
17
+
18
+ # Specifies the `port` that Puma will listen on to receive requests; default is 3000.
19
+ #
20
+ port ENV.fetch('PORT', 3000)
21
+
22
+ # Specifies the `environment` that Puma will run in.
23
+ #
24
+ environment ENV.fetch('RAILS_ENV', 'development')
25
+
26
+ # Specifies the `pidfile` that Puma will use.
27
+ pidfile ENV.fetch('PIDFILE', 'tmp/pids/server.pid')
28
+
29
+ # Specifies the number of `workers` to boot in clustered mode.
30
+ # Workers are forked web server processes. If using threads and workers together
31
+ # the concurrency of the application would be max `threads` * `workers`.
32
+ # Workers do not work on JRuby or Windows (both of which do not support
33
+ # processes).
34
+ #
35
+ # workers ENV.fetch("WEB_CONCURRENCY") { 2 }
36
+
37
+ # Use the `preload_app!` method when specifying a `workers` number.
38
+ # This directive tells Puma to first boot the application and load code
39
+ # before forking the application. This takes advantage of Copy On Write
40
+ # process behavior so workers use less memory.
41
+ #
42
+ # preload_app!
43
+
44
+ # Allow puma to be restarted by `bin/rails restart` command.
45
+ plugin :tmp_restart
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ Rails.application.routes.draw do
4
+ # Define your application routes per the DSL in https://guides.rubyonrails.org/routing.html
5
+
6
+ # Defines the root path route ("/")
7
+ # root "articles#index"
8
+ end