Инициалиазация репозитория

This commit is contained in:
ada
2025-11-11 08:24:49 +03:00
commit 39f93667fe
114 changed files with 5137 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
# Be sure to restart your server when you modify this file.
# Version of your assets, change this if you want to expire all your assets.
Rails.application.config.assets.version = "1.0"
Rails.application.config.assets.paths << Rails.root.join("vendor", "stylesheets")
# Add additional assets to the asset load path.
# Rails.application.config.assets.paths << Emoji.images_path
# Precompile additional assets.
# application.js, application.css, and all non-JS/CSS in the app/assets
# folder are already added.
# Rails.application.config.assets.precompile += %w( admin.js admin.css )
Rails.application.config.assets.precompile += %w[inputmask.js jquery_ujs.js jquery.min.js jquery.inputmask.bundle.min.js jquery-ui.js
jquery-ui.css slimselect.min.js toastr.js]
@@ -0,0 +1,25 @@
# Be sure to restart your server when you modify this file.
# Define an application-wide content security policy.
# See the Securing Rails Applications Guide for more information:
# https://guides.rubyonrails.org/security.html#content-security-policy-header
# Rails.application.configure do
# config.content_security_policy do |policy|
# policy.default_src :self, :https
# policy.font_src :self, :https, :data
# policy.img_src :self, :https, :data
# policy.object_src :none
# policy.script_src :self, :https
# policy.style_src :self, :https
# # Specify URI for violation reports
# # policy.report_uri "/csp-violation-report-endpoint"
# end
#
# # Generate session nonces for permitted importmap and inline scripts
# config.content_security_policy_nonce_generator = ->(request) { request.session.id.to_s }
# config.content_security_policy_nonce_directives = %w(script-src)
#
# # Report violations without enforcing the policy.
# # config.content_security_policy_report_only = true
# end
+20
View File
@@ -0,0 +1,20 @@
ActionView::Base.field_error_proc = Proc.new do |html_tag, instance_tag|
fragment = Nokogiri::HTML.fragment(html_tag)
field = fragment.at('input,select,textarea')
html = if field
error_message = instance_tag.error_message.join(', ')
field['class'] = "#{field['class']}"
html = <<-HTML
<div class="field_with_errors">
#{fragment.to_s}
<p class="error-message">#{error_message.upcase_first}</p>
</div>
HTML
html
else
html_tag
end
html.html_safe
end
+20
View File
@@ -0,0 +1,20 @@
Airbrake.configure do |config|
config.error_host = '' # host
config.project_id = 1 # required, but any positive integer works
config.project_key = '' # KEY
config.performance_stats = false
config.root_directory = Rails.root
config.logger = Airbrake::Rails.logger
config.remote_config = false
config.environment = Rails.env
config.ignore_environments = %w(test development)
end
Airbrake.add_filter do |notice|
notice.ignore! if notice[:errors].any? do |error|
error[:type] == 'SignalException'
end
end
@@ -0,0 +1,8 @@
# Be sure to restart your server when you modify this file.
# Configure parameters to be filtered from the log file. Use this to limit dissemination of
# sensitive information. See the ActiveSupport::ParameterFilter documentation for supported
# notations and behaviors.
Rails.application.config.filter_parameters += [
:passw, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn
]
+16
View File
@@ -0,0 +1,16 @@
# Be sure to restart your server when you modify this file.
# Add new inflection rules using the following format. Inflections
# are locale specific, and you may define rules for as many different
# locales as you wish. All of these examples are active by default:
# ActiveSupport::Inflector.inflections(:en) do |inflect|
# inflect.plural /^(ox)$/i, "\\1en"
# inflect.singular /^(ox)en/i, "\\1"
# inflect.irregular "person", "people"
# inflect.uncountable %w( fish sheep )
# end
# These inflection rules are supported but not enabled by default:
# ActiveSupport::Inflector.inflections(:en) do |inflect|
# inflect.acronym "RESTful"
# end
+11
View File
@@ -0,0 +1,11 @@
# Define an application-wide HTTP permissions policy. For further
# information see https://developers.google.com/web/updates/2018/06/feature-policy
#
# Rails.application.config.permissions_policy do |f|
# f.camera :none
# f.gyroscope :none
# f.microphone :none
# f.usb :none
# f.fullscreen :self
# f.payment :self, "https://secure.example.com"
# end
+2
View File
@@ -0,0 +1,2 @@
require "rack-cas/session_store/rails/active_record"
Rails.application.config.session_store ActionDispatch::Session::RackCasActiveRecordStore