Welcome to mirror list, hosted at ThFree Co, Russian Federation.

override_rails_constants.rb « scripts - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 1b255dd00117405fc1d6793d20432477aae75547 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# rubocop:disable Naming/FileName
# frozen_string_literal: true

require 'active_support/environment_inquirer'

module Rails # rubocop:disable Gitlab/NamespacedClass
  extend self

  def env
    @env ||= ActiveSupport::EnvironmentInquirer.new(
      ENV["RAILS_ENV"].presence || ENV["RACK_ENV"].presence || "test"
    )
  end

  def root
    Pathname.new(File.expand_path('..', __dir__))
  end
end

# rubocop:enable Naming/FileName