debian-mirror-gitlab/metrics_server/override_rails_constants.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

21 lines
398 B
Ruby
Raw Permalink Normal View History

2022-01-26 12:08:38 +05:30
# rubocop:disable Naming/FileName
# frozen_string_literal: true
require 'active_support/environment_inquirer'
module Rails
extend self
def env
@env ||= ActiveSupport::EnvironmentInquirer.new(
ENV["RAILS_ENV"].presence || ENV["RACK_ENV"].presence || "development"
)
end
def root
Pathname.new(File.expand_path('..', __dir__))
end
end
# rubocop:enable Naming/FileName