git_tools 0.3.1 → 0.3.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: c99bd8d872a939d6ef245e120c08dd8f735f3965
4
- data.tar.gz: 1e04ce6953a4f27c3a165d715d0ddfbd36111191
3
+ metadata.gz: 559e0661bd71f674ea66ed8e42f586b498e70cc9
4
+ data.tar.gz: 16aace169bb88aa04d24039738e8763b9bb35563
5
5
  SHA512:
6
- metadata.gz: 9762a509b0448aa5ed7205a564602451f628d353dc280dd3358fb70879daa4345d36214b6c12d58b6e0a48232feac9cfa7f7a4b3534cbd8822b2a27b51846f51
7
- data.tar.gz: ca015ee59daad5f78697844558aa1e6cd4654e8cd4e4a179dc7a46d75894a77ff2de7f60ab7f67b8703ffbd3433ec0bbe19340fc042f90517deccd8afd9b48ce
6
+ metadata.gz: a73fbf197ccfe8fd873fc8569eca0ae4c5fc9e7510096d65e14297858f4f6271e37165674b669a20175c38fe1b01223679c7539d5a1978822ed461bd008ec700
7
+ data.tar.gz: 611e03f9f3a58dc5fd6d9897b0b32617c6f36a01349d8652c0544d59f5ad7f13dd36ebd42621c97a5648d5c7273f1dd919c5190df12a376ee6dcc4c441ef7189
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.1
1
+ 0.3.2
@@ -67,14 +67,19 @@ module GitTools
67
67
  puts "Merged branch threshold is #{@@age_threshold_for_deleting_remote_branches_in_master/Time::SECONDS_IN_DAY} days." if $VERBOSE
68
68
  puts "Unmerged branch threshold is #{@@age_threshold_for_deleting_any_unmerged_branches/Time::SECONDS_IN_DAY} days." if $VERBOSE
69
69
 
70
- git_remote_prune
71
70
  end
72
71
 
73
72
  def local?
74
73
  @remote.nil?
75
74
  end
76
75
 
76
+ def remote?
77
+ !local?
78
+ end
79
+
77
80
  def run!
81
+ git_remote_prune
82
+
78
83
  puts "Skipping prompts" if $VERBOSE && ActionExecutor.skip_prompted
79
84
  (@branches - protected_branches - [master_branch] ).each do |branch|
80
85
  branch = Branch.new(branch, remote)
@@ -106,12 +111,15 @@ module GitTools
106
111
  git_remote_prune
107
112
  rescue StandardError => e
108
113
  puts e.message
114
+ puts e.backtrace if $DEBUG
109
115
  end
110
116
 
111
117
  private
112
118
 
113
119
  def git_remote_prune
114
- `git remote prune #{remote}` unless local?
120
+ if remote?
121
+ `git remote prune #{remote}`
122
+ end
115
123
  end
116
124
 
117
125
  def label_for_remote
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git_tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Birkir A. Barkarson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-14 00:00:00.000000000 Z
11
+ date: 2014-05-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: docopt