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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ea5b6e02f412859fd3016b0a96551f9dee113b59
4
- data.tar.gz: cf62ffcdc1ae9cc7d59ef280ffdb81bd1cb3996b
3
+ metadata.gz: a080f8609ce70eb45fff70594285629a1cfb0b5f
4
+ data.tar.gz: 96ad0f42a220b62a3c80b0f959c0cb74d1e75dac
5
5
  SHA512:
6
- metadata.gz: f9451f2add48a93bfa1b7214df62286d4d1d9f73560aefc69a576d130d2820a79f1f04f7931a31523dfcfabd5b17c11e20ed46c3342ba2084b43442d6b719b40
7
- data.tar.gz: 108bad544e5cc9344be67a5fcebd31642783a30c12e17744b5fe52accd0a6f2f1ab70afead2cce3808c54b8c0e30053fa0bc81fbb8753e7f57dd1e057c43e038
6
+ metadata.gz: b11a82b7ac40c2d5f34076305aac53b86b705e6871c14d54c6b5e3f38383b4f6f0556620e8db4ae475164c59209c66950bf524af4d53a0a6be644703e8249e94
7
+ data.tar.gz: 731d8e699a24980854c41ab45c88623499985e53b5f7e210cfd01973f2412d7b6ba75e3582ab5d1e46ac35c30844f81b31a28f03191b6ca88f396337537a0f1e
data/.reek ADDED
@@ -0,0 +1,6 @@
1
+ ---
2
+ TooManyStatements:
3
+ max_statements: 10
4
+
5
+ UtilityFunction:
6
+ public_methods_only: true
data/Rakefile CHANGED
@@ -27,5 +27,4 @@ else
27
27
  end
28
28
  end
29
29
 
30
- # task default: [:rubocop, :inch, :reek, :spec, :build]
31
- task default: [:rubocop, :inch, :spec, :build] # leave the others off for now.
30
+ task default: [:rubocop, :inch, :reek, :spec, :build]
data/exe/update_repo CHANGED
@@ -1,5 +1,4 @@
1
1
  #!/usr/bin/env ruby
2
-
3
2
  require 'update_repo'
4
3
 
5
4
  # create a new instance of the class...
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 ioncremented with each repo updated.
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 - #{@counter} repositories processed in ",
91
- "#{Time.at(duration).utc.strftime('%H:%M:%S')}\n\n".cyan
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
@@ -1,4 +1,4 @@
1
1
  module UpdateRepo
2
2
  # constant, current version of this Gem
3
- VERSION = '0.3.0'.freeze
3
+ VERSION = '0.3.1'.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.3.0
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-05 00:00:00.000000000 Z
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