module RfFooter module Environment def stage return development_stage if stage_via_env == "development" stage_via_env end private def development_stage return "development" if user_via_bash.empty? "development - #{user_via_bash}" end def user_via_bash @user_via_bash ||= `whoami` end def stage_via_env @stage_via_env ||= ENV["RF_ENV"] || ENV["RACK_ENV"] || ENV["RAILS_ENV"] || ENV["RORY_ENV"] # ordered by accuracy end end end