TicGit-ng 1.0.2.8 → 1.0.2.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -14,15 +14,23 @@ module TicGitNG
14
14
  end
15
15
 
16
16
  def execute
17
- if options.repo and options.no_push
18
- tic.sync_tickets(options.repo, false)
19
- elsif options.repo
20
- tic.sync_tickets(options.repo)
21
- elsif options.no_push
22
- tic.sync_tickets('origin', false)
23
- else
24
- tic.sync_tickets()
25
- end
17
+ begin
18
+ if options.repo and options.no_push
19
+ tic.sync_tickets(options.repo, false)
20
+ elsif options.repo
21
+ tic.sync_tickets(options.repo)
22
+ elsif options.no_push
23
+ tic.sync_tickets('origin', false)
24
+ else
25
+ tic.sync_tickets()
26
+ end
27
+ rescue Git::GitExecuteError => e
28
+ if e.message[/does not appear to be a git repository/]
29
+ repo= e.message.split("\n")[0][/^[^:]+/][/"\w+"/].gsub('"','')
30
+ puts "Could not sync because git returned the following error:\n#{e.message.split("\n")[0][/[^:]+$/].strip}"
31
+ exit
32
+ end
33
+ end
26
34
  end
27
35
  end
28
36
  end
@@ -1,3 +1,3 @@
1
1
  module TicGitNG
2
- VERSION = '1.0.2.8'
2
+ VERSION = '1.0.2.9'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: TicGit-ng
3
3
  version: !ruby/object:Gem::Version
4
- hash: 71
4
+ hash: 69
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
9
  - 2
10
- - 8
11
- version: 1.0.2.8
10
+ - 9
11
+ version: 1.0.2.9
12
12
  platform: ruby
13
13
  authors:
14
14
  - Scott Chacon
@@ -17,7 +17,7 @@ autorequire:
17
17
  bindir: bin
18
18
  cert_chain: []
19
19
 
20
- date: 2011-07-12 00:00:00 -04:00
20
+ date: 2011-07-14 00:00:00 -04:00
21
21
  default_executable:
22
22
  dependencies:
23
23
  - !ruby/object:Gem::Dependency