update_repo 0.3.0 → 0.3.1
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 +4 -4
- data/.reek +6 -0
- data/Rakefile +1 -2
- data/exe/update_repo +0 -1
- data/lib/update_repo.rb +11 -4
- data/lib/update_repo/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a080f8609ce70eb45fff70594285629a1cfb0b5f
|
4
|
+
data.tar.gz: 96ad0f42a220b62a3c80b0f959c0cb74d1e75dac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b11a82b7ac40c2d5f34076305aac53b86b705e6871c14d54c6b5e3f38383b4f6f0556620e8db4ae475164c59209c66950bf524af4d53a0a6be644703e8249e94
|
7
|
+
data.tar.gz: 731d8e699a24980854c41ab45c88623499985e53b5f7e210cfd01973f2412d7b6ba75e3582ab5d1e46ac35c30844f81b31a28f03191b6ca88f396337537a0f1e
|
data/.reek
ADDED
data/Rakefile
CHANGED
data/exe/update_repo
CHANGED
data/lib/update_repo.rb
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
require 'update_repo/version'
|
2
2
|
require 'yaml'
|
3
3
|
require 'colorize'
|
4
|
-
require 'update_repo/version'
|
5
4
|
require 'confoog'
|
6
5
|
|
7
6
|
# Overall module with classes performing the functionality
|
@@ -20,8 +19,10 @@ module UpdateRepo
|
|
20
19
|
# Class constructor. No parameters required.
|
21
20
|
# @return [void]
|
22
21
|
def initialize
|
23
|
-
# @counter - this will be
|
22
|
+
# @counter - this will be incremented with each repo updated.
|
24
23
|
@counter = 0
|
24
|
+
# @skip_counter - will count all repos deliberately skipped
|
25
|
+
@skip_counter = 0
|
25
26
|
# @ start_time - will be used to get elapsed time
|
26
27
|
@start_time = 0
|
27
28
|
# @config - Class. Reads the configuration from a file in YAML format and
|
@@ -87,8 +88,9 @@ module UpdateRepo
|
|
87
88
|
# @return [void]
|
88
89
|
def footer
|
89
90
|
duration = Time.now - @start_time
|
90
|
-
print "\nUpdates completed
|
91
|
-
|
91
|
+
print "\nUpdates completed : ", @counter.to_s.yellow, ' repositories '
|
92
|
+
print "processed (and #{@skip_counter} skipped)" unless @skip_counter == 0
|
93
|
+
print ' in ', show_time(duration)
|
92
94
|
end
|
93
95
|
|
94
96
|
def list_locations
|
@@ -102,6 +104,7 @@ module UpdateRepo
|
|
102
104
|
Dir.chdir(dirpath) do
|
103
105
|
repo_url = `git config remote.origin.url`.chomp
|
104
106
|
print "* Skipping #{dirpath}".yellow, " (#{repo_url})\n"
|
107
|
+
@skip_counter += 1
|
105
108
|
end
|
106
109
|
end
|
107
110
|
|
@@ -122,5 +125,9 @@ module UpdateRepo
|
|
122
125
|
def notdot?(dir)
|
123
126
|
(dir != '.' && dir != '..')
|
124
127
|
end
|
128
|
+
|
129
|
+
def show_time(duration)
|
130
|
+
"#{Time.at(duration).utc.strftime('%H:%M:%S')}\n\n".cyan
|
131
|
+
end
|
125
132
|
end
|
126
133
|
end
|
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.3.
|
4
|
+
version: 0.3.1
|
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-03-
|
11
|
+
date: 2016-03-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -230,6 +230,7 @@ extra_rdoc_files: []
|
|
230
230
|
files:
|
231
231
|
- ".gitignore"
|
232
232
|
- ".pullreview.yml"
|
233
|
+
- ".reek"
|
233
234
|
- ".rspec"
|
234
235
|
- ".travis.yml"
|
235
236
|
- Gemfile
|