Skip to content

Commit e677760

Browse files
committed
Merge branch 'master' of https://github.com/dblock/jammit
2 parents 21b1854 + bf6afc5 commit e677760

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

lib/jammit.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ module Jammit
2525
COMPRESSORS = [:yui, :closure, :uglifier]
2626

2727
DEFAULT_COMPRESSOR = :yui
28+
29+
RAILS_ENV = (defined?(Rails) ? Rails.env : ENV['RAILS_ENV'] || "development")
2830

2931
# Extension matchers for JavaScript and JST, which need to be disambiguated.
3032
JS_EXTENSION = /\.js\Z/
@@ -68,8 +70,7 @@ def self.load_configuration(config_path, soft=false)
6870
conf = YAML.load(ERB.new(File.read(config_path)).result)
6971

7072
# Optionally overwrite configuration based on the environment.
71-
rails_env = defined?(Rails) ? Rails.env : RAILS_ENV
72-
conf.merge! conf.delete rails_env if conf.has_key? rails_env
73+
conf.merge! conf.delete RAILS_ENV if conf.has_key? RAILS_ENV
7374

7475
@config_path = config_path
7576
@configuration = symbolize_keys(conf)

0 commit comments

Comments
 (0)