2025-08-19 17:03:57 +01:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
2013-06-05 16:27:56 +02:00
|
|
|
#-- copyright
|
2020-01-15 11:31:26 +01:00
|
|
|
# OpenProject is an open source project management software.
|
2024-07-30 13:42:36 +02:00
|
|
|
# Copyright (C) the OpenProject GmbH
|
2013-06-05 16:27:56 +02:00
|
|
|
#
|
|
|
|
|
# This program is free software; you can redistribute it and/or
|
|
|
|
|
# modify it under the terms of the GNU General Public License version 3.
|
|
|
|
|
#
|
2013-09-16 17:59:31 +02:00
|
|
|
# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
|
2021-01-13 17:47:45 +01:00
|
|
|
# Copyright (C) 2006-2013 Jean-Philippe Lang
|
2013-09-16 17:59:31 +02:00
|
|
|
# Copyright (C) 2010-2013 the ChiliProject Team
|
|
|
|
|
#
|
|
|
|
|
# This program is free software; you can redistribute it and/or
|
|
|
|
|
# modify it under the terms of the GNU General Public License
|
|
|
|
|
# as published by the Free Software Foundation; either version 2
|
|
|
|
|
# of the License, or (at your option) any later version.
|
|
|
|
|
#
|
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
|
#
|
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
|
# along with this program; if not, write to the Free Software
|
|
|
|
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
|
#
|
2021-09-02 21:49:06 +02:00
|
|
|
# See COPYRIGHT and LICENSE files for more details.
|
2013-06-05 16:27:56 +02:00
|
|
|
#++
|
|
|
|
|
|
2021-02-11 16:02:18 +01:00
|
|
|
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
|
2006-06-28 18:11:03 +00:00
|
|
|
|
2017-06-14 11:37:37 +02:00
|
|
|
# Load any local boot extras that is kept out of source control
|
|
|
|
|
# (e.g., silencing of deprecations)
|
2022-01-24 13:25:19 +01:00
|
|
|
if File.exist?(File.join(File.dirname(__FILE__), "additional_boot.rb"))
|
2017-06-14 11:37:37 +02:00
|
|
|
instance_eval File.read(File.join(File.dirname(__FILE__), "additional_boot.rb"))
|
|
|
|
|
end
|
|
|
|
|
|
2015-09-13 14:11:43 +02:00
|
|
|
require "bundler/setup" # Set up gems listed in the Gemfile.
|
2017-08-09 11:19:46 +02:00
|
|
|
|
2024-01-04 17:01:17 +01:00
|
|
|
env = ENV.fetch("RAILS_ENV", nil)
|
2020-09-02 08:14:30 +02:00
|
|
|
# Disable deprecation warnings early on (before loading gems), which behaves as RUBYOPT="-w0"
|
2022-01-11 09:40:32 +01:00
|
|
|
# to disable the Ruby warnings in production.
|
2020-09-02 08:14:30 +02:00
|
|
|
# Set OPENPROJECT_PROD_DEPRECATIONS=true if you want to see them for debugging purposes
|
|
|
|
|
if env == "production" && ENV["OPENPROJECT_PROD_DEPRECATIONS"] != "true"
|
|
|
|
|
require "structured_warnings"
|
|
|
|
|
Warning[:deprecated] = false
|
|
|
|
|
StructuredWarnings::BuiltInWarning.disable
|
|
|
|
|
StructuredWarnings::DeprecationWarning.disable
|
|
|
|
|
end
|