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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a7d9a35282d73a5a27e03c4e01b2d2fb0ae445ee
4
- data.tar.gz: ed46c8a8ceb60369ea706e231d3fc95dbd4387b0
3
+ metadata.gz: 19fe0b07bdf3cb6df24ba24295d999cb07cb0c9e
4
+ data.tar.gz: 1db0d91506ad7d447cca361debf5b765d5a66f2b
5
5
  SHA512:
6
- metadata.gz: a6616a1bf4de0f6987cdd77c753d62b86fe02621efee5d16cf5319de19759eb639d2b273c9c39cb6c447f68fec6ab09190062fa28fe6751252234b1a112159e7
7
- data.tar.gz: 6b4401758735ce5d242016afcffb7f3dc0ef44467b93803ea667fa7822e0de246dffa4bc8a60dc33452de9f3a673d610712e5acaf3acf893333e1c06ac66a915
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
@@ -13,4 +13,8 @@ describe Environment do
13
13
  it "should have a valid user name" do
14
14
  expect(Environment.user.length).to be > 0
15
15
  end
16
+
17
+ it "should have a valid dev_root" do
18
+ expect(File.exists?(Environment.dev_root)).to eq(true)
19
+ end
16
20
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dev_environment
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lou Parslow