lib/envlogic/env.rb in envlogic-1.0.0 vs lib/envlogic/env.rb in envlogic-1.0.1

- old
+ new

@@ -1,15 +1,16 @@ +# frozen_string_literal: true # Main module module Envlogic # Env module to get and set environment class Env < ActiveSupport::StringInquirer using StringRefinements # What environment key should be used by default - FALLBACK_ENV_KEY = 'RACK_ENV' + FALLBACK_ENV_KEY = 'RACK_ENV'.freeze # What default environment should be asumed when there's nothing else - FALLBACK_ENV = 'development' + FALLBACK_ENV = 'development'.freeze # @param klass [Class, Module] class/module for which we want to build a Envlogic::Env object # @return [Envlogic::Env] envlogic env object] # @example # Envlogic::Env.new(User) @@ -35,10 +36,11 @@ # @return [String] name of the directory in which this application is # @note Will return only the last part, so if the dir is /home/apps/my_app it will # only return the 'my_app' part def app_dir_name - Pathname.new(ENV['BUNDLE_GEMFILE']) + Pathname + .new(ENV['BUNDLE_GEMFILE']) .dirname .basename .to_s end end