mirror of
https://github.com/publiclab/mapknitter.git
synced 2025-12-05 16:00:00 +01:00
* update application.rb * try to complete migration * fixed gemfile.lock * updated to Ruby 2.7.3 * more ruby 2.7.3 updates for dockerfiles * dockerfiles to 2.7.6 * remove local map exporting and gdal * more gdal removal * libappindicator3-7 \ * fixed libindicator3-7 * update for Debian 10 - libayatana-appindicator * all ruby 2.7.6 now * libayatana-appindicator in dockerfiles * remove system test deps for dev dockerfile
73 lines
3.3 KiB
Ruby
73 lines
3.3 KiB
Ruby
require_relative 'boot'
|
|
require 'rails/all'
|
|
|
|
# Require the gems listed in Gemfile, including any gems
|
|
# you've limited to :test, :development, or :production.
|
|
Bundler.require(*Rails.groups)
|
|
|
|
module Mapknitter
|
|
class Application < Rails::Application
|
|
# Settings in config/environments/* take precedence over those specified here.
|
|
# Application configuration should go into files in config/initializers
|
|
# -- all .rb files in that directory are automatically loaded.
|
|
|
|
# Custom directories with classes and modules you want to be autoloadable.
|
|
# config.autoload_paths += %W(#{config.root}/extras)
|
|
config.autoload_paths += %W(#{config.root}/lib/)
|
|
config.autoload_paths += Dir["#{config.root}/lib/**/"]
|
|
|
|
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
|
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
|
# config.time_zone = 'Central Time (US & Canada)'
|
|
|
|
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
|
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
|
# config.i18n.default_locale = :de
|
|
|
|
# Configure the default encoding used in templates for Ruby 1.9.
|
|
config.encoding = "utf-8"
|
|
|
|
# Initialize configuration defaults for originally generated Rails version.
|
|
config.load_defaults 5.2
|
|
|
|
# Configure sensitive parameters which will be filtered from the log file.
|
|
config.filter_parameters += [:password]
|
|
|
|
# Enable escaping HTML in JSON.
|
|
config.active_support.escape_html_entities_in_json = true
|
|
|
|
# Enforce whitelist mode for mass assignment.
|
|
# This will create an empty whitelist of attributes available for mass-assignment for all models
|
|
# in your app. As such, your models will need to explicitly whitelist or blacklist accessible
|
|
# parameters by using an attr_accessible or attr_protected declaration.
|
|
# config.active_record.whitelist_attributes = true
|
|
|
|
# Enable the asset pipeline
|
|
config.assets.enabled = true
|
|
|
|
config.action_dispatch.default_headers['X-Frame-Options'] = "ALLOW-FROM https://publiclab.org"
|
|
config.action_dispatch.default_headers['Access-Control-Allow-Origin'] = 'https://publiclab.org'
|
|
config.action_dispatch.default_headers['Access-Control-Request-Method'] = 'GET'
|
|
|
|
# Version of your assets, change this if you want to expire all your assets
|
|
config.assets.paths << Rails.root.join("public","lib")
|
|
|
|
Sentry.init do |config|
|
|
config.environment = ENV["COMPOSE_PROJECT_NAME"] || ENV["RAILS_ENV"] || %w(production)
|
|
config.enabled_environments = %w[production, mapknitter_stable, mapknitter_unstable]
|
|
config.breadcrumbs_logger = [:sentry_logger, :http_logger]
|
|
# To activate performance monitoring, set one of these options.
|
|
# We recommend adjusting the value in production:
|
|
config.traces_sample_rate = 0.5
|
|
# use Rails' parameter filter to sanitize the event payload:
|
|
# for Rails 6+:
|
|
# filter = ActiveSupport::ParameterFilter.new(Rails.application.config.filter_parameters)
|
|
# for Rails 5:
|
|
filter = ActionDispatch::Http::ParameterFilter.new(Rails.application.config.filter_parameters)
|
|
config.before_send = lambda do |event, hint|
|
|
filter.filter(event.to_hash)
|
|
end
|
|
end
|
|
end
|
|
end
|