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.
@@ -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
- applicator.variables(options).each do |key, value|
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
- puts ""
39
- puts "############################## GREASED ##############################"
40
- puts "# #"
41
- puts "# ... loading application settings ... #"
42
- puts "# #"
43
- puts "#####################################################################"
44
- puts ""
45
-
46
- applicator.list_env.map.collect do |var|
47
- puts " #{var}"
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
- 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}"
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
@@ -1,5 +1,5 @@
1
1
  module Greased
2
2
  module Rails
3
- VERSION = "0.0.3"
3
+ VERSION = "0.0.4"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: greased-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: