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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/project_basepath.rb +11 -0
  3. metadata +6 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7f8d29750c6b5ee33230f1e854ba71197032ffee
4
- data.tar.gz: cfe7b7ec46b186251c1251c311ae579ede3e6e5d
3
+ metadata.gz: 5cc6f8a772d5b1c8adfcde99f3f6f0cc466ba50f
4
+ data.tar.gz: 9f3a40d443c5850dc8b75b059a93b6c322bfd9fa
5
5
  SHA512:
6
- metadata.gz: 3b574af2a060992095ebea161d442246940f864ed0aadbddf3b1e8daa6f52beb83993bace1bc55c2fe28e875b65d6c1dbe38a5e6b64ca2a9d12fc052ae10acee
7
- data.tar.gz: 7e7f1b9d22d57150a9424ded38bd10aff5d2a6877644d5a39430c9486030dc495c13b4821ed810a16aad65bd66bb2cc9c38a8693feb5e20bfaa2804444c7321a
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.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
- - Andreas Leipelt
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: andreas.leipelt@ptn.advantest.com
14
+ email: snadgoud@de.alten.com
15
15
  executables: []
16
16
  extensions: []
17
17
  extra_rdoc_files: []
18
- files: []
19
- homepage:
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: