update_repo 0.9.1 → 0.9.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/update_repo/cmd_config.rb +1 -0
- data/lib/update_repo/logger.rb +7 -6
- data/lib/update_repo/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3926de9bbf9ba13b8bebedaede82c6e90fccb4b7
|
4
|
+
data.tar.gz: e942798a0c3515517b299f8c06699ac4b347fe84
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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'
|
data/lib/update_repo/logger.rb
CHANGED
@@ -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
|
data/lib/update_repo/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2016-11-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|