gitvers 0.0.12 → 0.0.13

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d8271eb4a91920228c15093c0d8f7572ede218cc
4
- data.tar.gz: c210475d25f0764a0e7fedc4582e4e2ce9a41ae3
3
+ metadata.gz: 44bf054e60011e1929bff58edad3db900e2ad026
4
+ data.tar.gz: f37543a43344a6ca41c39baeb9d8f54f9f73eea9
5
5
  SHA512:
6
- metadata.gz: 8a75a5ff932a3fb0363f77d82990c182e5c4aa23e7c9e528dd0c7503031cce96252a1a9bd31a50031e5a6f2a65b28208a71eb029ae34e5b6038b8b7fae62d16a
7
- data.tar.gz: 42ba1999800a66b9bc30aac4a970f633fae2cb293b0b4c4072a5ead8227ed4c989a3df4a29989be6f217b03ef6b8774c4f150d890209743180eb0323f22ab693
6
+ metadata.gz: 3edee606480d87c07372b1fd944891c74fca921c660bc1c91a6de9a9ee7ddd2e05b53dff737975e5736fb94774a339d85825737ad41660d9ad82f305c48cb8cc
7
+ data.tar.gz: 0c775b080e44dda95bbaadcf7784c8ecde2adf1bd8be6ab16a64caf658bed10575c93fd4e439280f86568b8b0551036fe53f5402f053fa471873d84f6ca09638
@@ -13,9 +13,14 @@ module Gitvers
13
13
  while path != '/'
14
14
  git_dir = File.join(path, "/.git")
15
15
  head_file = File.join(path, "/HEAD")
16
+ if File.exist?(git_dir)
17
+ @git_dir = git_dir
18
+ break
19
+ elsif File.exists?(head_file)
20
+ @git_dir = path
21
+ break
22
+ end
16
23
  path = File.expand_path(File.join(path, '..'))
17
- next unless File.exist?(git_dir) || File.exists?(head_file)
18
- @git_dir = git_dir
19
24
  end
20
25
  @git_dir or raise "Invalid git repository #{@path}"
21
26
  end
@@ -1,3 +1,3 @@
1
1
  module Gitvers
2
- VERSION = "0.0.12"
2
+ VERSION = "0.0.13"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitvers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.12
4
+ version: 0.0.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nicolas Goy