project_basepath 0.0.1 → 0.0.2
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/project_basepath.rb +11 -0
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5cc6f8a772d5b1c8adfcde99f3f6f0cc466ba50f
|
4
|
+
data.tar.gz: 9f3a40d443c5850dc8b75b059a93b6c322bfd9fa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ddd24bd3c47010ab082e97816652070fb8315588d873e405b3806eb48fda7eebca73d4e709cb4fc633a7132b076ea7fd90c5732b20843810bd46a776e29c3fe1
|
7
|
+
data.tar.gz: 0927c8985dd18933a2e725e88b54cf2bcf767560520ee4831aa2c660859cf1e9c7b1d3b48fd599b739fbc56c82be4daa99ee489bcf6825f4c51827e997948433
|
@@ -0,0 +1,11 @@
|
|
1
|
+
require 'pathname'
|
2
|
+
|
3
|
+
module Project
|
4
|
+
def self.basepath(trigger)
|
5
|
+
pn = Pathname.new(File.expand_path(File.expand_path(File.expand_path(File.dirname(__FILE__))))).cleanpath
|
6
|
+
pn.ascend { |p|
|
7
|
+
return p.to_s if File.exists?(p.to_s + '/' + trigger)
|
8
|
+
}
|
9
|
+
return nil
|
10
|
+
end
|
11
|
+
end
|
metadata
CHANGED
@@ -1,22 +1,23 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: project_basepath
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
7
|
+
- Advantest
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
date: 2013-08-15 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Simple function to find the root of a project tree
|
14
|
-
email:
|
14
|
+
email: snadgoud@de.alten.com
|
15
15
|
executables: []
|
16
16
|
extensions: []
|
17
17
|
extra_rdoc_files: []
|
18
|
-
files:
|
19
|
-
|
18
|
+
files:
|
19
|
+
- lib/project_basepath.rb
|
20
|
+
homepage: http://rubygems.org/gems/project_basepath
|
20
21
|
licenses:
|
21
22
|
- BSD
|
22
23
|
metadata: {}
|
@@ -41,4 +42,3 @@ signing_key:
|
|
41
42
|
specification_version: 4
|
42
43
|
summary: ''
|
43
44
|
test_files: []
|
44
|
-
has_rdoc:
|