dev_environment 0.0.6 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/environment.rb +9 -0
- data/spec/environment_spec.rb +4 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 19fe0b07bdf3cb6df24ba24295d999cb07cb0c9e
|
4
|
+
data.tar.gz: 1db0d91506ad7d447cca361debf5b765d5a66f2b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 011f00acf061bf92eacea6c163d0b677777860a4638e93cd80ad519577fab06539b83dcc1776299cd38bd997bccf19899e8fd789e12318c3064e1d793f7cf97e
|
7
|
+
data.tar.gz: caee5092ae4e27648055c4b54a57fc3a0cc397615ee033fc3522f6d129b3e8cb9af7310a96aa37920b02aa3e951017d256d60965d3631e3d4290636a8659446b
|
data/lib/environment.rb
CHANGED
@@ -30,4 +30,13 @@ class Environment < Hash
|
|
30
30
|
return ENV['USER'] if !ENV['USER'].nil? #on Unix
|
31
31
|
ENV['USERNAME']
|
32
32
|
end
|
33
|
+
|
34
|
+
def self.dev_root
|
35
|
+
["DEV_HOME","DEV_ROOT"].each {|v|
|
36
|
+
return ENV[v].gsub('\\','/') unless ENV[v].nil?
|
37
|
+
}
|
38
|
+
dir=home
|
39
|
+
#dir=ENV["DEV_ROOT"].gsub('\\','/') unless ENV["DEV_ROOT"].nil?
|
40
|
+
return dir
|
41
|
+
end
|
33
42
|
end
|
data/spec/environment_spec.rb
CHANGED