mgit 0.4.4 → 0.4.5

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: 0dfe68603ee914a9494b127c7f0c8a98633761c8
4
- data.tar.gz: 57fdc98db3ca9786a403e3e7232019550aea9987
3
+ metadata.gz: 06e1ae3652e0ef938b2ab3718e16138819fa7cef
4
+ data.tar.gz: 0de46a8745d26340c709fa541cd285b4495bf2e4
5
5
  SHA512:
6
- metadata.gz: be374ec58e4585ee035cc539d72bc67964ce65bb9df5aabc6bc0dcdbc1b82dc1b3c0ad5799537a0e8517180bb1b69697cd40ef972d0efd5eebd49e8750cd0ee3
7
- data.tar.gz: cac6c01aad691150654f783a5a9e9d00839d2d5f8276bce9d83f8b118b033d9ad0a92d9cb0cd2e9553eb1d49ffb4012078acbe1f144057b421ce88e1bb98ef36
6
+ metadata.gz: ad59a05c35345e75306e78a086a2ae2543236ae58c3b88e2286c846ba636b7824cc15d6a3a321553ec1d1170d06899b80fc618cd62f64f31f9d42ff5c3b228ed
7
+ data.tar.gz: 4e1286094835753887f271eaed10589875dd391b064b4362adf6dc7724e41e5840a2f4485de0f9f6e871654ca8acbb059b666d9870b2bf2c0cdc4ed454f0c8a8
@@ -41,7 +41,9 @@ module MGit
41
41
 
42
42
  def decorate_divergence_flags(divergence)
43
43
  divergence.map do |d|
44
- "#{d.first[0].to_s.capitalize} of #{d.first[1][:branch]} by #{d.first[1][:by]}".blue
44
+ d.map do |k, v|
45
+ "#{k.to_s.capitalize} of #{v[:branch]} by #{v[:by]}".blue
46
+ end
45
47
  end
46
48
  end
47
49
  end
@@ -79,7 +79,7 @@ module MGit
79
79
  when '??'
80
80
  flags << :untracked
81
81
  when '##'
82
- if /## ([\w,\/]+)\.\.\.([\w,\/]+) \[(\w+) (\d+)\]/ =~ s
82
+ if /## [\w,\/]+\.\.\.[\w,\/]+ \[.+\]/ =~ s
83
83
  flags << :diverged
84
84
  elsif /## HEAD \(no branch\)/ =~ s
85
85
  flags << :detached
@@ -93,7 +93,9 @@ module MGit
93
93
  divergence = []
94
94
  status_lines do |s|
95
95
  if s.split[0] == '##'
96
- if(m = /## ([\w,\/]+)\.\.\.([\w,\/]+) \[(\w+) (\d+)\]/.match(s))
96
+ if(m = /## ([\w,\/]+)\.\.\.([\w,\/]+) \[ahead (\d+), behind (\d+)\]/.match(s))
97
+ divergence << { :ahead => { :branch => m[2], :by => m[3] }, :behind => { :branch => m[2], :by => m[4] } }
98
+ elsif(m = /## ([\w,\/]+)\.\.\.([\w,\/]+) \[(\w+) (\d+)\]/.match(s))
97
99
  if m[3] =~ /behind/
98
100
  divergence << { :behind => { :branch => m[2], :by => m[4] } }
99
101
  else
data/lib/mgit/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module MGit
2
- VERSION = '0.4.4'
2
+ VERSION = '0.4.5'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mgit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.4
4
+ version: 0.4.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - FlavourSys Technology GmbH
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-23 00:00:00.000000000 Z
11
+ date: 2014-04-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colorize