ruby2html 1.5.3 → 1.5.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (82) hide show
  1. checksums.yaml +4 -4
  2. data/lib/gem/ruby2html/rails_components/form_with.rb +1 -1
  3. data/lib/gem/ruby2html/railtie.rb +14 -10
  4. data/lib/gem/ruby2html/render.rb +5 -13
  5. data/lib/gem/ruby2html/version.rb +1 -1
  6. data/ruby2html.gemspec +33 -0
  7. metadata +3 -77
  8. data/.dockerignore +0 -48
  9. data/.rspec +0 -2
  10. data/.rubocop.yml +0 -16
  11. data/.ruby-version +0 -1
  12. data/Dockerfile +0 -71
  13. data/README.md +0 -318
  14. data/Rakefile +0 -8
  15. data/app/assets/config/manifest.js +0 -2
  16. data/app/assets/images/.keep +0 -0
  17. data/app/assets/stylesheets/application.css +0 -15
  18. data/app/channels/application_cable/channel.rb +0 -6
  19. data/app/channels/application_cable/connection.rb +0 -6
  20. data/app/components/application_component.rb +0 -5
  21. data/app/components/first_component.html.rb +0 -11
  22. data/app/components/first_component.rb +0 -19
  23. data/app/components/second_component.rb +0 -12
  24. data/app/components/third_component/third_component.html.rb +0 -6
  25. data/app/components/third_component.rb +0 -7
  26. data/app/controllers/application_controller.rb +0 -7
  27. data/app/controllers/benchmark_controller.rb +0 -48
  28. data/app/controllers/concerns/.keep +0 -0
  29. data/app/controllers/home_controller.rb +0 -16
  30. data/app/helpers/application_helper.rb +0 -4
  31. data/app/jobs/application_job.rb +0 -9
  32. data/app/mailers/application_mailer.rb +0 -6
  33. data/app/models/application_record.rb +0 -5
  34. data/app/models/concerns/.keep +0 -0
  35. data/app/views/benchmark/normal_html.html.erb +0 -31
  36. data/app/views/benchmark/ruby_2html.html.rb +0 -33
  37. data/app/views/home/form.html.rb +0 -14
  38. data/app/views/home/index.html.erb +0 -43
  39. data/app/views/home/rb_files.html.rb +0 -18
  40. data/app/views/layouts/application.html.erb +0 -21
  41. data/app/views/layouts/mailer.html.erb +0 -13
  42. data/app/views/layouts/mailer.text.erb +0 -1
  43. data/app/views/pwa/manifest.json.erb +0 -22
  44. data/app/views/pwa/service-worker.js +0 -26
  45. data/app/views/shared/_footer.html.rb +0 -3
  46. data/app/views/shared/_navbar.html.erb +0 -1
  47. data/config/application.rb +0 -45
  48. data/config/boot.rb +0 -6
  49. data/config/cable.yml +0 -10
  50. data/config/credentials.yml.enc +0 -1
  51. data/config/database.yml +0 -32
  52. data/config/environment.rb +0 -7
  53. data/config/environments/development.rb +0 -85
  54. data/config/environments/production.rb +0 -104
  55. data/config/environments/test.rb +0 -69
  56. data/config/initializers/assets.rb +0 -14
  57. data/config/initializers/content_security_policy.rb +0 -27
  58. data/config/initializers/filter_parameter_logging.rb +0 -10
  59. data/config/initializers/inflections.rb +0 -18
  60. data/config/initializers/permissions_policy.rb +0 -15
  61. data/config/locales/en.yml +0 -31
  62. data/config/puma.rb +0 -56
  63. data/config/routes.rb +0 -23
  64. data/config/storage.yml +0 -34
  65. data/config.ru +0 -8
  66. data/db/seeds.rb +0 -11
  67. data/lefthook.yml +0 -8
  68. data/lib/assets/.keep +0 -0
  69. data/lib/tasks/.keep +0 -0
  70. data/log/.keep +0 -0
  71. data/public/404.html +0 -67
  72. data/public/406-unsupported-browser.html +0 -66
  73. data/public/422.html +0 -67
  74. data/public/500.html +0 -66
  75. data/public/icon.png +0 -0
  76. data/public/icon.svg +0 -3
  77. data/public/robots.txt +0 -1
  78. data/storage/.keep +0 -0
  79. data/tmp/.keep +0 -0
  80. data/tmp/pids/.keep +0 -0
  81. data/tmp/storage/.keep +0 -0
  82. data/vendor/.keep +0 -0
@@ -1,18 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- h1 'RbFiles'
4
- h1 'ok'
5
- h1 'okddwadwa'
6
-
7
- div @value
8
-
9
- form_with url: '/test' do |f|
10
- f.text_field :name, placeholder: 'Name'
11
- f.submit 'Submit'
12
- end
13
-
14
- link_to 'Home', root_url
15
- render partial: 'shared/navbar'
16
- render partial: 'shared/footer'
17
-
18
- div @value
@@ -1,21 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title><%= content_for(:title) || "Ruby2html" %></title>
5
- <meta name="viewport" content="width=device-width,initial-scale=1">
6
- <meta name="apple-mobile-web-app-capable" content="yes">
7
- <%= csrf_meta_tags %>
8
- <%= csp_meta_tag %>
9
-
10
- <%= yield :head %>
11
-
12
- <link rel="icon" href="/icon.png" type="image/png">
13
- <link rel="icon" href="/icon.svg" type="image/svg+xml">
14
- <link rel="apple-touch-icon" href="/icon.png">
15
- <%= stylesheet_link_tag "application" %>
16
- </head>
17
-
18
- <body>
19
- <%= yield %>
20
- </body>
21
- </html>
@@ -1,13 +0,0 @@
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>
@@ -1 +0,0 @@
1
- <%= yield %>
@@ -1,22 +0,0 @@
1
- {
2
- "name": "Ruby2html",
3
- "icons": [
4
- {
5
- "src": "/icon.png",
6
- "type": "image/png",
7
- "sizes": "512x512"
8
- },
9
- {
10
- "src": "/icon.png",
11
- "type": "image/png",
12
- "sizes": "512x512",
13
- "purpose": "maskable"
14
- }
15
- ],
16
- "start_url": "/",
17
- "display": "standalone",
18
- "scope": "/",
19
- "description": "Ruby2html.",
20
- "theme_color": "red",
21
- "background_color": "red"
22
- }
@@ -1,26 +0,0 @@
1
- // Add a service worker for processing Web Push notifications:
2
- //
3
- // self.addEventListener("push", async (event) => {
4
- // const { title, options } = await event.data.json()
5
- // event.waitUntil(self.registration.showNotification(title, options))
6
- // })
7
- //
8
- // self.addEventListener("notificationclick", function(event) {
9
- // event.notification.close()
10
- // event.waitUntil(
11
- // clients.matchAll({ type: "window" }).then((clientList) => {
12
- // for (let i = 0; i < clientList.length; i++) {
13
- // let client = clientList[i]
14
- // let clientPath = (new URL(client.url)).pathname
15
- //
16
- // if (clientPath == event.notification.data.path && "focus" in client) {
17
- // return client.focus()
18
- // }
19
- // }
20
- //
21
- // if (clients.openWindow) {
22
- // return clients.openWindow(event.notification.data.path)
23
- // }
24
- // })
25
- // )
26
- // })
@@ -1,3 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- h1 'footer'
@@ -1 +0,0 @@
1
- <h1>Navbar</h1>
@@ -1,45 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative 'boot'
4
-
5
- require 'rails'
6
- # Pick the frameworks you want:
7
- require 'active_model/railtie'
8
- require 'active_job/railtie'
9
- require 'active_record/railtie'
10
- require 'active_storage/engine'
11
- require 'action_controller/railtie'
12
- require 'action_mailer/railtie'
13
- require 'action_mailbox/engine'
14
- require 'action_text/engine'
15
- require 'action_view/railtie'
16
- require 'action_cable/engine'
17
- # require "rails/test_unit/railtie"
18
-
19
- # Require the gems listed in Gemfile, including any gems
20
- # you've limited to :test, :development, or :production.
21
- Bundler.require(*Rails.groups)
22
- require_relative '../lib/gem/ruby2html'
23
-
24
- module Ruby2html
25
- class Application < Rails::Application
26
- # Initialize configuration defaults for originally generated Rails version.
27
- config.load_defaults 7.2
28
-
29
- # Please, add to the `ignore` list any other `lib` subdirectories that do
30
- # not contain `.rb` files, or that should not be reloaded or eager loaded.
31
- # Common ones are `templates`, `generators`, or `middleware`, for example.
32
- config.autoload_lib(ignore: %w[gem assets tasks])
33
-
34
- # Configuration for the application, engines, and railties goes here.
35
- #
36
- # These settings can be overridden in specific environments using the files
37
- # in config/environments, which are processed later.
38
- #
39
- # config.time_zone = "Central Time (US & Canada)"
40
- # config.eager_load_paths << Rails.root.join("extras")
41
-
42
- # Don't generate system test files.
43
- config.generators.system_tests = nil
44
- end
45
- end
data/config/boot.rb DELETED
@@ -1,6 +0,0 @@
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.
data/config/cable.yml DELETED
@@ -1,10 +0,0 @@
1
- development:
2
- adapter: async
3
-
4
- test:
5
- adapter: test
6
-
7
- production:
8
- adapter: redis
9
- url: <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %>
10
- channel_prefix: ruby2html_production
@@ -1 +0,0 @@
1
- syxIQNjKjMQTCYgIrZXzklAmWupRucx5oAblyiO1h4pPn+S9KZSUmxjnZ1ntCzFRMDGgbeIAUI5WoEsnKk6uRhX1DTULIOuW4ODNbxRWkWf5WOBXF7zxu9v1b0jcfsBO8mYHRoFxulDbxhsOIS8opAH1pzhLAB65uV8w3BPuG9547t/CHvarEzipOceugWaVjK1cF4lqkB72xWz5IQ1zxJmX+pSEj36jFfhSK5bbUlnC2h/TDBYc9tEz7GZPYnHw+xrGnhayz+6pLUBmHFwwnfQjZE9VYEm4Y0vLZLjveSmvV6LX+4QsX/r6wD0gWxDdG0jarO6i7u18Vg8aLcSQRII5bTjEdyn4NuF6E61HUhkuaSBNb9hcGCX7eGOlYziZHrOZdNg8lxIrjc2gauGz0M3bWUkJ--l6VJIq9MkwuXzeWl--MuF7LY4aYyUOZwMPsBdsBQ==
data/config/database.yml DELETED
@@ -1,32 +0,0 @@
1
- # SQLite. Versions 3.8.0 and up are supported.
2
- # gem install sqlite3
3
- #
4
- # Ensure the SQLite 3 gem is defined in your Gemfile
5
- # gem "sqlite3"
6
- #
7
- default: &default
8
- adapter: sqlite3
9
- pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
10
- timeout: 5000
11
-
12
- development:
13
- <<: *default
14
- database: storage/development.sqlite3
15
-
16
- # Warning: The database defined as "test" will be erased and
17
- # re-generated from your development database when you run "rake".
18
- # Do not set this db to the same as development or production.
19
- test:
20
- <<: *default
21
- database: storage/test.sqlite3
22
-
23
-
24
- # SQLite3 write its data on the local filesystem, as such it requires
25
- # persistent disks. If you are deploying to a managed service, you should
26
- # make sure it provides disk persistence, as many don't.
27
- #
28
- # Similarly, if you deploy your application as a Docker container, you must
29
- # ensure the database is located in a persisted volume.
30
- production:
31
- <<: *default
32
- # database: path/to/persistent/storage/production.sqlite3
@@ -1,7 +0,0 @@
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!
@@ -1,85 +0,0 @@
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.enable_reloading = true
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 = { 'Cache-Control' => "public, max-age=#{2.days.to_i}" }
30
- else
31
- config.action_controller.perform_caching = false
32
-
33
- config.cache_store = :null_store
34
- end
35
-
36
- # Store uploaded files on the local file system (see config/storage.yml for options).
37
- config.active_storage.service = :local
38
-
39
- # Don't care if the mailer can't send.
40
- config.action_mailer.raise_delivery_errors = false
41
-
42
- # Disable caching for Action Mailer templates even if Action Controller
43
- # caching is enabled.
44
- config.action_mailer.perform_caching = false
45
-
46
- config.action_mailer.default_url_options = { host: 'localhost', port: 3000 }
47
-
48
- # Print deprecation notices to the Rails logger.
49
- config.active_support.deprecation = :log
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
- # Raise an error on page load if there are pending migrations.
58
- config.active_record.migration_error = :page_load
59
-
60
- # Highlight code that triggered database queries in logs.
61
- config.active_record.verbose_query_logs = true
62
-
63
- # Highlight code that enqueued background job in logs.
64
- config.active_job.verbose_enqueue_logs = true
65
-
66
- # Suppress logger output for asset requests.
67
- config.assets.quiet = true
68
-
69
- # Raises error for missing translations.
70
- # config.i18n.raise_on_missing_translations = true
71
-
72
- # Annotate rendered view with file names.
73
- config.action_view.annotate_rendered_view_with_filenames = true
74
-
75
- # Uncomment if you wish to allow Action Cable access from any origin.
76
- # config.action_cable.disable_request_forgery_protection = true
77
-
78
- # Raise error when a before_action's only/except options reference missing actions.
79
- config.action_controller.raise_on_missing_callback_actions = true
80
-
81
- # Apply autocorrection by RuboCop to files generated by `bin/rails generate`.
82
- # config.generators.apply_rubocop_autocorrect_after_generate!
83
-
84
- config.middleware.use Ruby2html::HtmlBeautifierMiddleware
85
- end
@@ -1,104 +0,0 @@
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.enable_reloading = false
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 ENV["RAILS_MASTER_KEY"], config/master.key, or an environment
22
- # key such as config/credentials/production.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 `public/`, relying on NGINX/Apache to do so instead.
26
- # config.public_file_server.enabled = false
27
-
28
- # Compress CSS using a preprocessor.
29
- # config.assets.css_compressor = :sass
30
-
31
- # Do not fall back to assets pipeline if a precompiled asset is missed.
32
- config.assets.compile = false
33
-
34
- # Enable serving of images, stylesheets, and JavaScripts from an asset server.
35
- # config.asset_host = "http://assets.example.com"
36
-
37
- # Specifies the header that your server uses for sending files.
38
- # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for Apache
39
- # config.action_dispatch.x_sendfile_header = "X-Accel-Redirect" # for NGINX
40
-
41
- # Store uploaded files on the local file system (see config/storage.yml for options).
42
- config.active_storage.service = :local
43
-
44
- # Mount Action Cable outside main process or domain.
45
- # config.action_cable.mount_path = nil
46
- # config.action_cable.url = "wss://example.com/cable"
47
- # config.action_cable.allowed_request_origins = [ "http://example.com", /http:\/\/example.*/ ]
48
-
49
- # Assume all access to the app is happening through a SSL-terminating reverse proxy.
50
- # Can be used together with config.force_ssl for Strict-Transport-Security and secure cookies.
51
- # config.assume_ssl = true
52
-
53
- # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
54
- config.force_ssl = true
55
-
56
- # Skip http-to-https redirect for the default health check endpoint.
57
- # config.ssl_options = { redirect: { exclude: ->(request) { request.path == "/up" } } }
58
-
59
- # Log to STDOUT by default
60
- config.logger = ActiveSupport::Logger.new(STDOUT)
61
- .tap { |logger| logger.formatter = ::Logger::Formatter.new }
62
- .then { |logger| ActiveSupport::TaggedLogging.new(logger) }
63
-
64
- # Prepend all log lines with the following tags.
65
- config.log_tags = [ :request_id ]
66
-
67
- # "info" includes generic and useful information about system operation, but avoids logging too much
68
- # information to avoid inadvertent exposure of personally identifiable information (PII). If you
69
- # want to log everything, set the level to "debug".
70
- config.log_level = ENV.fetch('RAILS_LOG_LEVEL', 'info')
71
-
72
- # Use a different cache store in production.
73
- # config.cache_store = :mem_cache_store
74
-
75
- # Use a real queuing backend for Active Job (and separate queues per environment).
76
- # config.active_job.queue_adapter = :resque
77
- # config.active_job.queue_name_prefix = "ruby2html_production"
78
-
79
- # Disable caching for Action Mailer templates even if Action Controller
80
- # caching is enabled.
81
- config.action_mailer.perform_caching = false
82
-
83
- # Ignore bad email addresses and do not raise email delivery errors.
84
- # Set this to true and configure the email server for immediate delivery to raise delivery errors.
85
- # config.action_mailer.raise_delivery_errors = false
86
-
87
- # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
88
- # the I18n.default_locale when a translation cannot be found).
89
- config.i18n.fallbacks = true
90
-
91
- # Don't log any deprecations.
92
- config.active_support.report_deprecations = false
93
-
94
- # Do not dump schema after migrations.
95
- config.active_record.dump_schema_after_migration = false
96
-
97
- # Enable DNS rebinding protection and other `Host` header attacks.
98
- # config.hosts = [
99
- # "example.com", # Allow requests from example.com
100
- # /.*\.example\.com/ # Allow requests from subdomains like `www.example.com`
101
- # ]
102
- # Skip DNS rebinding protection for the default health check endpoint.
103
- # config.host_authorization = { exclude: ->(request) { request.path == "/up" } }
104
- end
@@ -1,69 +0,0 @@
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
- # While tests run files are not watched, reloading is not necessary.
14
- config.enable_reloading = false
15
-
16
- # Eager loading loads your entire application. When running a single test locally,
17
- # this is usually not necessary, and can slow down your test suite. However, it's
18
- # recommended that you enable it in continuous integration systems to ensure eager
19
- # loading is working properly before deploying your code.
20
- config.eager_load = ENV['CI'].present?
21
-
22
- # Configure public file server for tests with Cache-Control for performance.
23
- config.public_file_server.headers = { 'Cache-Control' => "public, max-age=#{1.hour.to_i}" }
24
-
25
- # Show full error reports and disable caching.
26
- config.consider_all_requests_local = true
27
- config.action_controller.perform_caching = false
28
- config.cache_store = :null_store
29
-
30
- # Render exception templates for rescuable exceptions and raise for other exceptions.
31
- config.action_dispatch.show_exceptions = :rescuable
32
-
33
- # Disable request forgery protection in test environment.
34
- config.action_controller.allow_forgery_protection = false
35
-
36
- # Store uploaded files on the local file system in a temporary directory.
37
- config.active_storage.service = :test
38
-
39
- # Disable caching for Action Mailer templates even if Action Controller
40
- # caching is enabled.
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
- # Unlike controllers, the mailer instance doesn't have any context about the
49
- # incoming request so you'll need to provide the :host parameter yourself.
50
- config.action_mailer.default_url_options = { host: 'www.example.com' }
51
-
52
- # Print deprecation notices to the stderr.
53
- config.active_support.deprecation = :stderr
54
-
55
- # Raise exceptions for disallowed deprecations.
56
- config.active_support.disallowed_deprecation = :raise
57
-
58
- # Tell Active Support which deprecation messages to disallow.
59
- config.active_support.disallowed_deprecation_warnings = []
60
-
61
- # Raises error for missing translations.
62
- # config.i18n.raise_on_missing_translations = true
63
-
64
- # Annotate rendered view with file names.
65
- # config.action_view.annotate_rendered_view_with_filenames = true
66
-
67
- # Raise error when a before_action's only/except options reference missing actions.
68
- config.action_controller.raise_on_missing_callback_actions = true
69
- end
@@ -1,14 +0,0 @@
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 )
@@ -1,27 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # Be sure to restart your server when you modify this file.
4
-
5
- # Define an application-wide content security policy.
6
- # See the Securing Rails Applications Guide for more information:
7
- # https://guides.rubyonrails.org/security.html#content-security-policy-header
8
-
9
- # Rails.application.configure do
10
- # config.content_security_policy do |policy|
11
- # policy.default_src :self, :https
12
- # policy.font_src :self, :https, :data
13
- # policy.img_src :self, :https, :data
14
- # policy.object_src :none
15
- # policy.script_src :self, :https
16
- # policy.style_src :self, :https
17
- # # Specify URI for violation reports
18
- # # policy.report_uri "/csp-violation-report-endpoint"
19
- # end
20
- #
21
- # # Generate session nonces for permitted importmap, inline scripts, and inline styles.
22
- # config.content_security_policy_nonce_generator = ->(request) { request.session.id.to_s }
23
- # config.content_security_policy_nonce_directives = %w(script-src style-src)
24
- #
25
- # # Report violations without enforcing the policy.
26
- # # config.content_security_policy_report_only = true
27
- # end
@@ -1,10 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # Be sure to restart your server when you modify this file.
4
-
5
- # Configure parameters to be partially matched (e.g. passw matches password) and filtered from the log file.
6
- # Use this to limit dissemination of sensitive information.
7
- # See the ActiveSupport::ParameterFilter documentation for supported notations and behaviors.
8
- Rails.application.config.filter_parameters += [
9
- :passw, :email, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn
10
- ]
@@ -1,18 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # Be sure to restart your server when you modify this file.
4
-
5
- # Add new inflection rules using the following format. Inflections
6
- # are locale specific, and you may define rules for as many different
7
- # locales as you wish. All of these examples are active by default:
8
- # ActiveSupport::Inflector.inflections(:en) do |inflect|
9
- # inflect.plural /^(ox)$/i, "\\1en"
10
- # inflect.singular /^(ox)en/i, "\\1"
11
- # inflect.irregular "person", "people"
12
- # inflect.uncountable %w( fish sheep )
13
- # end
14
-
15
- # These inflection rules are supported but not enabled by default:
16
- # ActiveSupport::Inflector.inflections(:en) do |inflect|
17
- # inflect.acronym "RESTful"
18
- # end
@@ -1,15 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # Be sure to restart your server when you modify this file.
4
-
5
- # Define an application-wide HTTP permissions policy. For further
6
- # information see: https://developers.google.com/web/updates/2018/06/feature-policy
7
-
8
- # Rails.application.config.permissions_policy do |policy|
9
- # policy.camera :none
10
- # policy.gyroscope :none
11
- # policy.microphone :none
12
- # policy.usb :none
13
- # policy.fullscreen :self
14
- # policy.payment :self, "https://secure.example.com"
15
- # end
@@ -1,31 +0,0 @@
1
- # Files in the config/locales directory are used for internationalization and
2
- # are automatically loaded by Rails. If you want to use locales other than
3
- # English, add the necessary files in this directory.
4
- #
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
- # To learn more about the API, please read the Rails Internationalization guide
20
- # at https://guides.rubyonrails.org/i18n.html.
21
- #
22
- # Be aware that YAML interprets the following case-insensitive strings as
23
- # booleans: `true`, `false`, `on`, `off`, `yes`, `no`. Therefore, these strings
24
- # must be quoted to be interpreted as strings. For example:
25
- #
26
- # en:
27
- # "yes": yup
28
- # enabled: "ON"
29
-
30
- en:
31
- hello: "Hello world"
data/config/puma.rb DELETED
@@ -1,56 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # This configuration file will be evaluated by Puma. The top-level methods that
4
- # are invoked here are part of Puma's configuration DSL. For more information
5
- # about methods provided by the DSL, see https://puma.io/puma/Puma/DSL.html.
6
-
7
- # Puma starts a configurable number of processes (workers) and each process
8
- # serves each request in a thread from an internal thread pool.
9
- #
10
- # The ideal number of threads per worker depends both on how much time the
11
- # application spends waiting for IO operations and on how much you wish to
12
- # to prioritize throughput over latency.
13
- #
14
- # As a rule of thumb, increasing the number of threads will increase how much
15
- # traffic a given process can handle (throughput), but due to CRuby's
16
- # Global VM Lock (GVL) it has diminishing returns and will degrade the
17
- # response time (latency) of the application.
18
- #
19
- # The default is set to 3 threads as it's deemed a decent compromise between
20
- # throughput and latency for the average Rails application.
21
- #
22
- # Any libraries that use a connection pool or another resource pool should
23
- # be configured to provide at least as many connections as the number of
24
- # threads. This includes Active Record's `pool` parameter in `database.yml`.
25
- threads_count = ENV.fetch('RAILS_MAX_THREADS', 3)
26
- threads threads_count, threads_count
27
-
28
- # Specifies the `environment` that Puma will run in.
29
- rails_env = ENV.fetch('RAILS_ENV', 'development')
30
- environment rails_env
31
-
32
- case rails_env
33
- when 'production'
34
- # If you are running more than 1 thread per process, the workers count
35
- # should be equal to the number of processors (CPU cores) in production.
36
- #
37
- # Automatically detect the number of available processors in production.
38
- require 'concurrent-ruby'
39
- workers_count = Integer(ENV.fetch('WEB_CONCURRENCY') { Concurrent.available_processor_count })
40
- workers workers_count if workers_count > 1
41
-
42
- preload_app!
43
- when 'development'
44
- # Specifies a very generous `worker_timeout` so that the worker
45
- # isn't killed by Puma when suspended by a debugger.
46
- worker_timeout 3600
47
- end
48
-
49
- # Specifies the `port` that Puma will listen on to receive requests; default is 3000.
50
- port ENV.fetch('PORT', 3000)
51
-
52
- # Allow puma to be restarted by `bin/rails restart` command.
53
- plugin :tmp_restart
54
-
55
- # Only use a pidfile when requested
56
- pidfile ENV['PIDFILE'] if ENV['PIDFILE']