greased-rails 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/greased/rails/engine.rb +34 -33
- data/lib/greased/rails/version.rb +1 -1
- metadata +1 -1
data/lib/greased/rails/engine.rb
CHANGED
@@ -26,31 +26,30 @@ module Greased
|
|
26
26
|
|
27
27
|
options = Applicator.rails_options.merge(:app => application)
|
28
28
|
applicator = Applicator.new(options)
|
29
|
+
variables = applicator.variables(options).except("RACK_ENV", "RAILS_ENV")
|
29
30
|
|
30
|
-
|
31
|
-
|
32
|
-
# Don't mess with the environment
|
33
|
-
next if ["RACK_ENV", "RAILS_ENV"].include?(key.to_s.upcase)
|
34
|
-
|
31
|
+
variables.each do |key, value|
|
35
32
|
ENV[key.to_s] = value.to_s
|
36
33
|
end
|
37
34
|
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
35
|
+
if ::Rails.env.development?
|
36
|
+
puts ""
|
37
|
+
puts "############################## GREASED ##############################"
|
38
|
+
puts "# #"
|
39
|
+
puts "# ... loading application settings ... #"
|
40
|
+
puts "# #"
|
41
|
+
puts "#####################################################################"
|
42
|
+
puts ""
|
43
|
+
|
44
|
+
applicator.list_env.map.collect do |var|
|
45
|
+
puts " #{var}"
|
46
|
+
end
|
47
|
+
|
48
|
+
puts ""
|
49
|
+
puts "#####################################################################"
|
50
|
+
puts ""
|
48
51
|
end
|
49
52
|
|
50
|
-
puts ""
|
51
|
-
puts "#####################################################################"
|
52
|
-
puts ""
|
53
|
-
|
54
53
|
end
|
55
54
|
|
56
55
|
# config.before_configuration {|app| puts "BEFORE CONFIGURATION"}
|
@@ -84,22 +83,24 @@ module Greased
|
|
84
83
|
|
85
84
|
applicator.settings.apply!
|
86
85
|
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
86
|
+
if ::Rails.env.development?
|
87
|
+
puts ""
|
88
|
+
puts "############################## GREASED ##############################"
|
89
|
+
puts "# #"
|
90
|
+
puts "# ... loading application settings ... #"
|
91
|
+
puts "# #"
|
92
|
+
puts "#####################################################################"
|
93
|
+
puts ""
|
94
|
+
|
95
|
+
applicator.settings.list.map(&:strip).map{|setting| setting.split("\n")}.flatten.each do |line|
|
96
|
+
puts " #{line}"
|
97
|
+
end
|
98
|
+
|
99
|
+
puts ""
|
100
|
+
puts "#####################################################################"
|
101
|
+
puts ""
|
97
102
|
end
|
98
103
|
|
99
|
-
puts ""
|
100
|
-
puts "#####################################################################"
|
101
|
-
puts ""
|
102
|
-
|
103
104
|
end
|
104
105
|
end
|
105
106
|
end
|