lib/wd_sinatra/app_loader.rb
def set_env
      if !Object.const_defined?(:RACK_ENV)
        ENV['RACK_ENV'] ||= ENV['RAILS_ENV'] || 'development'
        Object.const_set(:RACK_ENV, ENV['RACK_ENV'])
      end
      puts "Running in #{RACK_ENV} mode" if RACK_ENV == 'development'
    end
def set_env
      if !Object.const_defined?(:RACK_ENV)
        ENV['RACK_ENV'] ||= ENV['RAILS_ENV'] || 'development'
        Object.const_set(:RACK_ENV, ENV['RACK_ENV'])
      end
      puts "Running in #{RACK_ENV} mode" if RACK_ENV == 'development'
    end
def set_env if ! Object . const_defined? ( :RACK_ENV ) ENV [ 'RACK_ENV' ] ||= ENV [ 'RAILS_ENV' ] || 'development' Object . const_set ( :RACK_ENV , ENV [ 'RACK_ENV' ] ) end puts "Running in #{RACK_ENV} mode" if RACK_ENV == 'development' end
PRIVATE
 Sets the environment (RACK_ENV) based on some env variables.
PRIVATE Sets the environment ( RACK_ENV ) based on some env variables .