update_repo 0.9.1 → 0.9.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6783e0c8c887cd196fea92efa147a7d258f9ad1a
4
- data.tar.gz: 7f89ca19fc25897a196e4fe3bcc6a286a6f7c01c
3
+ metadata.gz: 3926de9bbf9ba13b8bebedaede82c6e90fccb4b7
4
+ data.tar.gz: e942798a0c3515517b299f8c06699ac4b347fe84
5
5
  SHA512:
6
- metadata.gz: dec5a5aa2174265b867e33721f0270055e9a39054e1bc164201c061ad8051415c5d1e4baf8a0ec9dfd4af0198f154fa8f758a1b9e6b35be737737419d6580803
7
- data.tar.gz: ada430198bdf7ca638dab031ee2d138c35a5e1a3c16427c0af79ff6af1ce66c68cfdfeb3f5db6f970f779578e77fdf77148d41b46d82e4522a378d259a895142
6
+ metadata.gz: 4866838796629cffeaa336039303abb5b7588254e7f8038b2d323203f667ccd0b4d648c15bc24faf8f51838b66b147635b784f7cfcae660468d4eeabe68b7506
7
+ data.tar.gz: 88c0782ce18314e1320c68b287daddcdbfd9d89bd45e755473642f7e9f03baf0b17345333da63e2e52405bce95a304171e7bc232c9373416cb6cb93503433ec1
@@ -106,6 +106,7 @@ EOS
106
106
  # opt :import, "Import a previous dump of directories and Git repository URL's,\n(created using --dump) then proceed to clone them locally.", default: false
107
107
  opt :log, "Create a logfile of all program output to './update_repo.log'. Any older logs will be overwritten.", default: false
108
108
  opt :timestamp, 'Timestamp the logfile instead of overwriting. Does nothing unless the --log option is also specified.', default: false
109
+ # opt :log_local, 'Create the logfile in the current directory instead of in the users home directory', default: false, short: 'o'
109
110
  opt :dump_remote, 'Create a dump to screen or log, listing all the git remote URLS found in the specified directories.', default: false, short: 'r'
110
111
  opt :dump_tree, 'Create a dump to screen or log, listing all subdirectories found below the specified locations in tree format.', default: false, short: 'u'
111
112
  opt :verbose, 'Display each repository and the git output to screen', default: false, short: 'V'
@@ -18,6 +18,10 @@ module UpdateRepo
18
18
  def initialize(enabled, timestamp, verbose, quiet)
19
19
  @settings = { enabled: enabled, timestamp: timestamp, verbose: verbose,
20
20
  quiet: quiet }
21
+ @legend = { failed: { char: 'x', color: 'red' },
22
+ updated: { char: '^', color: 'green' },
23
+ unchanged: { char: '.', color: 'white' },
24
+ skipped: { char: 's', color: 'yellow' } }
21
25
  # don't prepare a logfile unless it's been requested.
22
26
  return unless @settings[:enabled]
23
27
  # generate a filename depending on 'timestamp' setting.
@@ -25,10 +29,6 @@ module UpdateRepo
25
29
  # open the logfile and set sync mode.
26
30
  @logfile = File.open(filename, 'w')
27
31
  @logfile.sync = true
28
- @legend = { failed: { char: 'x', color: 'red' },
29
- updated: { char: '^', color: 'green' },
30
- unchanged: { char: '.', color: 'white' },
31
- skipped: { char: 's', color: 'yellow' } }
32
32
  end
33
33
 
34
34
  # generate a filename for the log, with or without a timestamp
@@ -36,10 +36,11 @@ module UpdateRepo
36
36
  # @return [string] Filename for the logfile.
37
37
  def generate_filename
38
38
  if @settings[:timestamp]
39
- 'updaterepo-' + Time.new.strftime('%y%m%d-%H%M%S') + '.log'
39
+ name = 'updaterepo-' + Time.new.strftime('%y%m%d-%H%M%S') + '.log'
40
40
  else
41
- 'updaterepo.log'
41
+ name = 'updaterepo.log'
42
42
  end
43
+ File.expand_path(File.join('~/', name))
43
44
  end
44
45
 
45
46
  # this function will simply pass the given string to 'print', and also
@@ -1,4 +1,4 @@
1
1
  module UpdateRepo
2
2
  # constant, current version of this Gem
3
- VERSION = '0.9.1'.freeze
3
+ VERSION = '0.9.2'.freeze
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: update_repo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1
4
+ version: 0.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Grant Ramsay
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-11-09 00:00:00.000000000 Z
11
+ date: 2016-11-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler