globals 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/globals.rb +2 -1
- metadata +1 -1
data/lib/globals.rb
CHANGED
@@ -3,8 +3,9 @@ require 'rails'
|
|
3
3
|
|
4
4
|
class Globals
|
5
5
|
def self.read(globals_file, env=Rails.env)
|
6
|
-
|
6
|
+
raise "#{global_file} does not exist." unless File.exists? globals_file
|
7
7
|
|
8
|
+
env = env.to_s
|
8
9
|
yaml = YAML.load ERB.new(File.read globals_file).result
|
9
10
|
if yaml && yaml.include?(env)
|
10
11
|
new(yaml[env], env)
|