2021-12-02 22:14:42 -05:00
|
|
|
# rubocop:disable Naming/FileName
|
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
require 'active_support/environment_inquirer'
|
|
|
|
|
2021-12-03 07:10:23 -05:00
|
|
|
module Rails
|
2021-12-02 22:14:42 -05:00
|
|
|
extend self
|
|
|
|
|
|
|
|
def env
|
|
|
|
@env ||= ActiveSupport::EnvironmentInquirer.new(
|
2021-12-03 07:10:23 -05:00
|
|
|
ENV["RAILS_ENV"].presence || ENV["RACK_ENV"].presence || "development"
|
2021-12-02 22:14:42 -05:00
|
|
|
)
|
|
|
|
end
|
|
|
|
|
|
|
|
def root
|
|
|
|
Pathname.new(File.expand_path('..', __dir__))
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
# rubocop:enable Naming/FileName
|