Package not found. Please check the package name and try again.
fontana_client_support 0.7.1 → 0.7.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/fontana_client_support.rb +9 -6
- data/lib/fontana_client_support/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 15e1aa491f241c88c91e639d7949ca10fb0f28a6
|
|
4
|
+
data.tar.gz: 2dfd77efd5874b539404c6c26e22d794bd22e4fe
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
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
|
|
33
|
+
puts "git status\n" << `git status`
|
|
31
34
|
raise e
|
|
32
35
|
end
|
|
33
36
|
|
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.
|
|
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-
|
|
11
|
+
date: 2013-09-17 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|