update_repo 0.8.1 → 0.8.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: b68ac5a08795af79e528b813aa2e74fe628a816f
4
- data.tar.gz: 5efdbb27dc053c02f4bfb76dcfd2f353b7f3b290
3
+ metadata.gz: bc3f29affb360bc461efe93b1d164e7ef7813fde
4
+ data.tar.gz: 061f998c505667dbd68b590d02964ba3fbddb629
5
5
  SHA512:
6
- metadata.gz: 47348f246c0c6e179da7e689f2fb1b35ffacf3e0da72b2b798c1536815fce3d50d6f2859565ecd9bec06bfb9aba7a20a9f1839c08dcf10d5ca28c389b13ccce2
7
- data.tar.gz: ddc661515526cbc5414deb1de0f8bb5f6eaea8057c6efba573b743a5e94c95231cefdf64efc8288a8285f188c60a4d87a17d1726dd974578432ac1b1e6da08aa
6
+ metadata.gz: 553c44b86f68898dea104f8076c0315d5fba1a02399be13d931518bfbf4083dba0b8724173de6a1c939121e9c0d2e999a737a64d65e9e1a248f6e96f0407cca3
7
+ data.tar.gz: 212c861b4d1ccf9183763ca0da23fd437f8403deec6ff122b11ac1d928d22328c7c75f942cff577b1a1aa95080799e7b90315b97987a9aebb626f754b8583070
data/README.md CHANGED
@@ -99,10 +99,6 @@ Options:
99
99
  Add functionality, not in any specific order :
100
100
 
101
101
  - Either add an option 'variants' or similar to allow non-standard git pull commands (eg Ubuntu kernel), or update the 'exceptions' option to do same.
102
- - Improve the stats / info at end-of-job :
103
- * errors or connection problems `[IN PROGRESS]`
104
- * List the skipped / failed repos. Later make this dependant on 'verbose' status.
105
- * _more..._
106
102
  - Add command line options to override configuration, and even specify an alternate config file. Any options so specified will have precedence over settings specified in the configuration file. `[IN PROGRESS]`
107
103
  - Add command line options for verbose or quiet, with same options in config file.
108
104
  - Add ability to specify a new directory (containing Git repos) to search from the command line, and optionally save this to the standard configuration.
@@ -120,7 +116,7 @@ Internal Changes and refactoring :
120
116
  - Error checking and reporting for the git processes `[IN PROGRESS]`
121
117
  - Improve error-checking and recovery while parsing the configuration file
122
118
  * Ignore and report invalid or missing directories
123
- * Add more failure cases, not all git errors fail with "fatal:"
119
+ * Add more failure cases, there may be more git errors than "fatal:" or "error:"
124
120
  - Retry for connection issues etc (config setting).
125
121
 
126
122
  [confoog]: http://confoog.seapagan.net
@@ -1,4 +1,4 @@
1
1
  module UpdateRepo
2
2
  # constant, current version of this Gem
3
- VERSION = '0.8.1'.freeze
3
+ VERSION = '0.8.2'.freeze
4
4
  end
data/lib/update_repo.rb CHANGED
@@ -156,7 +156,8 @@ module UpdateRepo
156
156
  print_log "\n\n!! Note : The following repositories ",
157
157
  'FAILED'.red.underline, ' during this run :'
158
158
  @metrics[:failed_list].each do |failed|
159
- print_log "\n [", 'x'.red, "] #{failed}"
159
+ print_log "\n [", 'x'.red, "] #{failed[:loc]}"
160
+ print_log "\n -> ", "\"#{failed[:line].chomp}\"".red
160
161
  end
161
162
  end
162
163
 
@@ -166,10 +167,8 @@ module UpdateRepo
166
167
  def list_exceptions
167
168
  exceptions = config['exceptions']
168
169
  return unless exceptions
169
- # if exceptions
170
170
  print_log "\nExclusions:".underline, ' ',
171
171
  exceptions.join(', ').yellow, "\n"
172
- # end
173
172
  end
174
173
 
175
174
  # Print a list of all top-level directories that will be searched and any
@@ -204,7 +203,6 @@ module UpdateRepo
204
203
  # update_repo('/Repo/linux/stable')
205
204
  def update_repo(dirname)
206
205
  Dir.chdir(dirname.chomp!('/')) do
207
- # repo_url = `git config remote.origin.url`.chomp
208
206
  do_update
209
207
  @metrics[:processed] += 1
210
208
  end
@@ -237,8 +235,8 @@ module UpdateRepo
237
235
  if key == :err && line =~ /^fatal:|^error:/
238
236
  print_log ' ', line.red
239
237
  @metrics[:failed] += 1
240
- fullpath = Dir.pwd.red
241
- @metrics[:failed_list].push("#{fullpath} (#{repo_url})")
238
+ err_loc = Dir.pwd + " (#{repo_url})"
239
+ @metrics[:failed_list].push(loc: err_loc, line: line)
242
240
  else
243
241
  print_log ' ', line.cyan
244
242
  @metrics[:updated] += 1 if line =~ %r{^From\s(?:https?|git)://}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: update_repo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.1
4
+ version: 0.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Grant Ramsay
@@ -314,4 +314,3 @@ signing_key:
314
314
  specification_version: 4
315
315
  summary: A Simple Gem to keep multiple locally-cloned Git Repositories up to date
316
316
  test_files: []
317
- has_rdoc: