fontana_client_support 0.7.1 → 0.7.2

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: 32de00430365d7865f4ae1d9358c4465767bcd86
4
- data.tar.gz: 5872211dd0a0ca9743e1478155053b28cf6fbe1c
3
+ metadata.gz: 15e1aa491f241c88c91e639d7949ca10fb0f28a6
4
+ data.tar.gz: 2dfd77efd5874b539404c6c26e22d794bd22e4fe
5
5
  SHA512:
6
- metadata.gz: a6a0ecca172127313f4cf511ecdea9870e15d1720d20090a72ce555188e160176170637b8f9677a55ef9e4a7780c92e532f41976b28d9ae4a399aab1df7c30ef
7
- data.tar.gz: 361fe52894855f7296d3e7c815505ccf081b9febf3a14e62a965c0cf5cb9ab4d9434d53e49c4f55f1aa318b27965bd9aad3e6a646bdc385620e1f9a8d2bcadfd
6
+ metadata.gz: 50a8a27c2731eee668faad8b87d9347a9ab922190c58441f008c37ec1ff9d92a6714de480d267746cab64db30c88b60bcc6243fa057924d6cc28f9b22b0c91ae
7
+ data.tar.gz: 987660b4ac6d7c63d8309b7f0c349fda9f1a8af0bad977134f26c26f84ba6d33da53c1830f88dbbd864905c2d7337bb2da4c934158623831c45ce1b7e03c4d10
@@ -17,17 +17,20 @@ module FontanaClientSupport
17
17
 
18
18
  def current_branch_name
19
19
  unless @current_branch_name
20
- work = `git log --decorate -1 --branches`.scan(/^commit\s[0-9a-f]+\s\((.+)\)/).
21
- flatten.first.split(/,/).map(&:strip).reject{|s| s =~ /HEAD\Z/}
22
- r = work.select{|s| s =~ /origin\//}.first
23
- r ||= work.first
24
- @current_branch_name = r.sub(/\Aorigin\//, '')
20
+ @current_branch_name = `git status`.scan(/On branch\s*(.+)\s*$/).flatten.first
21
+ unless @current_branch_name
22
+ work = `git log --decorate -1`.scan(/^commit\s[0-9a-f]+\s\((.+)\)/).
23
+ flatten.first.split(/,/).map(&:strip).reject{|s| s =~ /HEAD\Z/}
24
+ r = work.select{|s| s =~ /origin\//}.first
25
+ r ||= work.first
26
+ @current_branch_name = r.sub(/\Aorigin\//, '')
27
+ end
25
28
  end
26
29
  @current_branch_name
27
30
  rescue => e
28
31
  puts "[#{e.class}] #{e.message}"
29
32
  puts "Dir.pwd: #{Dir.pwd}"
30
- puts "git log --decorate -1\n" << `git log --decorate -1`
33
+ puts "git status\n" << `git status`
31
34
  raise e
32
35
  end
33
36
 
@@ -1,3 +1,3 @@
1
1
  module FontanaClientSupport
2
- VERSION = "0.7.1"
2
+ VERSION = "0.7.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fontana_client_support
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.1
4
+ version: 0.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - akima
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-09-12 00:00:00.000000000 Z
11
+ date: 2013-09-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler