mgit 0.2.3 → 0.2.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- N2VlZTI0YjIxOTNhMWM0NTFkZWMwMmU1OGMxODNjN2NlN2FmZjdmYQ==
4
+ Y2QzMjEzYWZkYmUyZTU2NzIzNjg1MzliYjc1MTRlZjRiNmUyYTQ4MQ==
5
5
  data.tar.gz: !binary |-
6
- NTE0NjY5M2QzY2FiZjRlYWZmZDUzMzZkOGNjNmQzMmIzZWFjMDc5Mw==
6
+ Y2Y5YTRhNjgzYmM0NmZlYTYyNWNkMTUyYWI5MjkwZTJhZjZjMzhiZQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- N2FhNzc1YTIzZmZlY2Y0YWRmZTU3M2U5M2JmMDlhODMyNzZjMmY3OWFhOTU0
10
- ZDg1OGU3MWNjM2U4ZTFiYjNkMDAzNzdmZjc3NWYxOWY0ZDkwMWNmZjY4NDFj
11
- YjVlNDQzOThjY2QyZWM2OTc2MGYzYzlkNGUwMTgyOGFlNGY5OWI=
9
+ MWVlZjAyZjQ3YjQ2MjdkMmE2ZmJmMmJkMGI0MWNkYzM1Y2RjMGVlZmIyNTIw
10
+ MTJiYjcxYTg1YjgzZjE1MzUyYTk3MzIxOWUyZjQ1NzczNWVkMGFhZTkxNGIz
11
+ YTU1YzBmMWRiZjRjOWQ2ZTBjNGFmZGRiNWJhMjU0YmUwYTExMGE=
12
12
  data.tar.gz: !binary |-
13
- NzNkNDlkOTU0YzA0OTQxM2ViMmRjNWNkNGZjMGIyYWJkYTUyZWI0ZDRmMzFj
14
- MjZmYTYzZTcwOTFjY2M2Y2I1NzI5NzU3MGYzOWI2Y2FhZmFhYmRhMzQyNGY2
15
- MzdlMzgzM2RlNmVlMzg5ZThlZGEyMTVhOTk5MGFiMTc0ZjNkZmE=
13
+ MWQ5YTZhMDVhZjNhMmViZmU1N2FkYjAwNTJiZjgzNDQ2YmNhMDBhMzI2ZWJk
14
+ MjZhNTY0YTg5MDdhNjMyZDI1ODkwYjk0NGMzYzZkOTFkODZjY2VjYzYwMjEx
15
+ YmU4NTk0NDNiZjJhOTI4MjMwMThjODQ0ZDllODdlZGVmNDQ3ODM=
@@ -4,8 +4,8 @@ module MGit
4
4
  class StatusCommand < Command
5
5
  def execute(args)
6
6
  t = []
7
- Registry.chdir_each { |repo| t << [repo.name, flags(repo).to_a.join(', ')] }
8
- ptable t, :columns => [24, nil]
7
+ Registry.chdir_each { |repo| t << [repo.name, repo.current_branch, flags(repo).to_a.join(', ')] }
8
+ ptable t, :columns => [24, nil, nil]
9
9
  end
10
10
 
11
11
  def arity
data/lib/mgit/output.rb CHANGED
@@ -37,7 +37,11 @@ module MGit
37
37
  end
38
38
 
39
39
  table.map do |row|
40
- row.map.with_index { |cell, i| justify(cell, cw[i]) }.join(' | ')
40
+ row.map.with_index do |cell, i|
41
+ # Only justify the column if it is not the last one.
42
+ # This avoids too many line breaks.
43
+ i < (columns - 1) ? justify(cell, cw[i]) : cell
44
+ end.join(' | ')
41
45
  end.join("\n")
42
46
  end
43
47
 
data/lib/mgit/registry.rb CHANGED
@@ -3,7 +3,7 @@ require 'yaml'
3
3
  module MGit
4
4
  module Registry
5
5
  def self.all
6
- self.load.map { |name, path| Repository.new(name, path) }
6
+ self.load.map { |name, path| Repository.new(name, path) }.sort_by(&:path)
7
7
  end
8
8
 
9
9
  def self.each(&block)
@@ -10,7 +10,10 @@ module MGit
10
10
  end
11
11
 
12
12
  def current_branch
13
- in_repo { `git rev-parse --abbrev-ref HEAD` }
13
+ in_repo {
14
+ b = `git rev-parse --abbrev-ref HEAD 2>&1`.strip
15
+ $?.exitstatus == 0 ? b : 'HEAD'
16
+ }
14
17
  end
15
18
 
16
19
  def remote_tracking_branches
data/lib/mgit/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module MGit
2
- VERSION = '0.2.3'
2
+ VERSION = '0.2.4'
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.2.3
4
+ version: 0.2.4
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: 2013-11-11 00:00:00.000000000 Z
11
+ date: 2013-11-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colorize
@@ -52,6 +52,20 @@ dependencies:
52
52
  - - ! '>='
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rspec
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ! '>='
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
55
69
  description: M[eta]Git let's you manage multiple git repositories simultaneously
56
70
  email: technology@flavoursys.com
57
71
  executables: