public
Description: A Ruby web application framework
Homepage: http://www.mackframework.com
Clone URL: git://github.com/markbates/mack.git
Click here to lend your support to: mack and make a donation at www.pledgie.com !
removed ENV["_mack_env"] and ENV["_mack_root"]
dsutedja (author)
Wed Jul 09 07:18:07 -0700 2008
commit  50091e8eb5097a625f1200b08154caf59f534c04
tree    0094fdcfe7f1679b10602d3c549703836d70fb87
parent  8e1fb9ff51782d0f970b194b19516de575ca9ce2
...
9
10
11
 
 
12
13
14
...
9
10
11
12
13
14
15
16
0
@@ -9,6 +9,8 @@
0
 * INCOMPATIBILITY NOTICE: Test::Unit::TestCase is no longer the default testing framework, RSpec is. If you wish to use
0
   Test::Unit::TestCase add the following config parameter to your config/app_config/default.yml file:
0
   mack::testing_framework: test_case
0
+* INCOMPATIBILITY NOTICE: ENV["_mack_env"] and ENV["_mack_root"] are no longer supported, please use ENV["MACK_ENV"] and ENV["MACK_ROOT"], or just Mack.env and Mack.root
0
+
0
 * thin.ru and thin.yml are no longer needed, you may delete them.
0
 * RSpec assertions are now automatically added.
0
 * moved test_extensions to testing and added the module Testing to the files in it.
...
2
3
4
5
 
6
7
8
9
10
 
11
12
13
...
2
3
4
 
5
6
7
8
9
 
10
11
12
13
0
@@ -2,12 +2,12 @@ module Mack
0
   
0
   # Returns the root of the current Mack application
0
   def self.root
0
- ((ENV["_mack_root"] ||= ENV["MACK_ROOT"]) || FileUtils.pwd)
0
+ ENV["MACK_ROOT"] ||= FileUtils.pwd
0
   end
0
   
0
   # Returns the environment of the current Mack application
0
   def self.env
0
- ((ENV["_mack_env"] ||= ENV["MACK_ENV"]) || "development")
0
+ ENV["MACK_ENV"] ||= "development"
0
   end
0
   
0
   # All configuration for the Mack subsystem happens here. Each of the default environments,
...
4
5
6
7
8
9
10
 
 
11
12
13
 
14
15
16
...
4
5
6
 
 
 
 
7
8
9
10
 
11
12
13
14
0
@@ -4,13 +4,11 @@ require 'spec'
0
 
0
 require 'rake'
0
 require 'fileutils'
0
-ENV["_mack_env"] = "test"
0
-ENV["MACK_ENV"] = ENV["_mack_env"]
0
-ENV["_mack_root"] = File.join(File.dirname(__FILE__), "fake_application")
0
-ENV["MACK_ROOT"] = ENV["_mack_root"]
0
+ENV["MACK_ENV"] = "test"
0
+ENV["MACK_ROOT"] = File.join(File.dirname(__FILE__), "fake_application")
0
 
0
 if $genosaurus_output_directory.nil?
0
- $genosaurus_output_directory = ENV["_mack_root"]
0
+ $genosaurus_output_directory = ENV["MACK_ROOT"]
0
   puts "$genosaurus_output_directory: #{$genosaurus_output_directory}"
0
 end
0
 
...
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
...
28
29
30
31
32
33
34
35
36
37
...
6
7
8
 
9
10
11
12
13
 
14
15
 
16
17
18
...
25
26
27
 
28
29
 
30
31
32
0
@@ -6,16 +6,13 @@ describe Mack do
0
   describe "root" do
0
     
0
     it "should return the path to the application's root" do
0
- Mack.root.should == ENV["_mack_root"]
0
       Mack.root.should == ENV["MACK_ROOT"]
0
     end
0
     
0
     it "should return pwd if a root isn't set" do
0
       r = Mack.root
0
- ENV["_mack_root"] = nil
0
       ENV["MACK_ROOT"] = nil
0
       Mack.root.should == FileUtils.pwd
0
- ENV["_mack_root"] = r
0
       ENV["MACK_ROOT"] = r
0
     end
0
     
0
@@ -28,10 +25,8 @@ describe Mack do
0
     end
0
     
0
     it "should return 'development' if env isn't set" do
0
- ENV["_mack_env"] = nil
0
       ENV["MACK_ENV"] = nil
0
       Mack.env.should == "development"
0
- ENV["_mack_env"] = "test"
0
       ENV["MACK_ENV"] = "test"
0
     end
0
     

Comments

    No one has commented yet.