update_repo 0.11.2 → 0.11.3

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
  SHA256:
3
- metadata.gz: 3d52f198ecd9c3624d16416efed9270afefc58f79820c8bc0320d92241919509
4
- data.tar.gz: f6feef0a732978252381d6de19364d48856b1fc83cec95c7c26fee281d629fc9
3
+ metadata.gz: c8b73e93f02a1cc7f2a7d865edd56c0bb68c4e19831f344608b57c7570000186
4
+ data.tar.gz: b3ee513cb47ef5cd632011b310cccc654aba10358bca4e05fca8f00889d84ac7
5
5
  SHA512:
6
- metadata.gz: 6c98d22a19e12804fce958ccc3e5020fba387a9c10ca23cd060d70c831b6feb8d60bfc878dcdf1791fca0c9c124d7db54bbd48ff0fbdeb5778a67850df408f3b
7
- data.tar.gz: 227e28965948a8e9d8aba9f8bbf56d62d85498832f0f2da6b0f32df5785d520ba648aa52ed73a950208c478670e534d6df6251087e66def5eb9eff593ff995b6
6
+ metadata.gz: d7d99b3a1c22bf3ffa3895802cb1704a94b4bbe587b659c35905c8131a7a1eff37e63a7e9d405e45eea15f43ee4991b174dc126ddacab670dd787423d38a4d47
7
+ data.tar.gz: d0f49b8758cebea20b063f27112780d51908645d65b1b0357c3e35a1ddfc4fa67b8b78f8c877f4f2e3d1df5aa8d88968dfefecbf4b08adab25ce57f7e350c32a
data/.gitignore CHANGED
@@ -14,3 +14,4 @@
14
14
  *.sublime*
15
15
  node_modules
16
16
  .vagrant
17
+ .vscode
@@ -1,14 +1,15 @@
1
1
  require: rubocop-performance
2
2
 
3
3
  AllCops:
4
+ NewCops: enable
4
5
  DisplayCopNames: true
5
6
  DisplayStyleGuide: true
6
7
  ExtraDetails: true
7
8
  Exclude:
8
- - 'web/node_modules/**/*'
9
- - 'Vagrantfile'
10
- - 'update_repo.gemspec'
11
- - 'bin/**/*'
9
+ - "web/node_modules/**/*"
10
+ - "Vagrantfile"
11
+ - "update_repo.gemspec"
12
+ - "bin/**/*"
12
13
 
13
14
  Style/SymbolArray:
14
15
  Enabled: false
@@ -16,4 +17,4 @@ Style/SymbolArray:
16
17
  Metrics/BlockLength:
17
18
  Enabled: true
18
19
  Exclude:
19
- - spec/**/*
20
+ - spec/**/*
@@ -1,11 +1,11 @@
1
1
  language: ruby
2
2
 
3
3
  rvm:
4
- - 2.3.8
5
- - 2.4.6
6
- - 2.5.5
7
- - 2.6.3
4
+ - 2.4.10
5
+ - 2.5.8
6
+ - 2.6.6
7
+ - 2.7.2
8
8
 
9
9
  before_install:
10
10
  - gem update --system
11
- - gem install bundler -v 1.17.1
11
+ - gem install bundler -v 2.2.2
data/Rakefile CHANGED
@@ -6,36 +6,23 @@ require 'inch/rake'
6
6
 
7
7
  RSpec::Core::RakeTask.new(:spec)
8
8
 
9
- # rubocop is not compatible with Ruby < 2.0
10
- if RUBY_VERSION >= '2.0'
11
- require 'rubocop/rake_task'
12
- RuboCop::RakeTask.new do |task|
13
- # task.options << 'lib' << 'exe'
14
- task.requires << 'rubocop-performance'
15
- task.fail_on_error = false
16
- end
17
- else
18
- task :rubocop do
19
- # Empty task
20
- end
9
+ # rubocop
10
+ require 'rubocop/rake_task'
11
+ RuboCop::RakeTask.new do |task|
12
+ task.requires << 'rubocop-performance'
13
+ task.fail_on_error = false
21
14
  end
22
15
 
23
16
  Inch::Rake::Suggest.new do |suggest|
24
17
  suggest.args << '--pedantic'
25
18
  end
26
19
 
27
- # reek is not compatible with Ruby < 2.1
28
- if RUBY_VERSION >= '2.1'
29
- require 'reek/rake/task'
30
- Reek::Rake::Task.new do |t|
31
- t.fail_on_error = false
32
- t.verbose = true
33
- t.reek_opts = '-U'
34
- end
35
- else
36
- task :reek do
37
- # Empty task
38
- end
20
+ # reek
21
+ require 'reek/rake/task'
22
+ Reek::Rake::Task.new do |t|
23
+ t.fail_on_error = false
24
+ t.verbose = true
25
+ t.reek_opts = '-U'
39
26
  end
40
27
 
41
28
  task default: [:rubocop, :reek, :spec, :inch, :build]
@@ -46,14 +46,14 @@ module UpdateRepo
46
46
  checkgit
47
47
  # print out our header unless we are dumping / importing ...
48
48
  @cons.show_header unless dumping?
49
- if !@cmd[:show_errors]
49
+ if @cmd[:show_errors]
50
+ @cons.show_last_errors
51
+ else
50
52
  config['location'].each do |loc|
51
53
  @cmd[:dump_tree] ? dump_tree(File.join(loc)) : recurse_dir(loc)
52
54
  end
53
55
  # print out an informative footer unless dump / import ...
54
56
  @cons.show_footer unless dumping?
55
- else
56
- @cons.show_last_errors
57
57
  end
58
58
  end
59
59
 
@@ -88,7 +88,6 @@ module UpdateRepo
88
88
  # a Git repository then update it (or as directed by command line)
89
89
  # @param dirname [string] Contains the directory to search for Git repos.]
90
90
  # @return [void]
91
- # rubocop:disable LineLength
92
91
  def recurse_dir(dirname)
93
92
  walk_tree(dirname).each do |repo|
94
93
  if dumping?
@@ -98,7 +97,6 @@ module UpdateRepo
98
97
  end
99
98
  end
100
99
  end
101
- # rubocop:enable LineLength
102
100
 
103
101
  # walk the specified tree, return an array of hashes holding valid repos
104
102
  # @param dirname [string] Directory to use as the base of the search
@@ -57,7 +57,7 @@ module UpdateRepo
57
57
  # @return [various] Returns the true value of the comamnd symbol
58
58
  # ignore the :reek:NilCheck for this function
59
59
  def true_cmd(command)
60
- cmd_given = @conf['cmd'][(command.to_s + '_given').to_sym]
60
+ cmd_given = @conf['cmd']["#{command}_given".to_sym]
61
61
  cmd_line = @conf['cmd'][command.to_sym]
62
62
 
63
63
  if cmd_given
@@ -72,7 +72,6 @@ module UpdateRepo
72
72
  end
73
73
  end
74
74
 
75
- # rubocop:disable Layout/LineLength
76
75
  # make sure the parameter combinations are valid, terminating otherwise.
77
76
  # @param [none]
78
77
  # @return [void]
@@ -82,7 +81,6 @@ module UpdateRepo
82
81
  Optimist.die 'You cannot use --dump AND --import'.red if true_cmd(:import)
83
82
  Optimist.die 'You cannot use --dump AND --dump-remote'.red if true_cmd(:dump_remote)
84
83
  end
85
- # rubocop:enable Layout/LineLength
86
84
 
87
85
  private
88
86
 
@@ -133,11 +133,11 @@ module UpdateRepo
133
133
  # @return [void]
134
134
  def show_last_errors
135
135
  @metrics.load_errors(@cmd.getconfig)
136
- if !@metrics[:failed_list].empty?
137
- puts 'Showing ' + 'ERRORS'.red.underline + ' from last full run :'
138
- list_failures
136
+ if @metrics[:failed_list].empty?
137
+ puts "There are#{' No Errors'.green} from last full run.\n\n"
139
138
  else
140
- puts 'There are' + ' No Errors'.green + " from last full run.\n\n"
139
+ puts "Showing #{'ERRORS'.red.underline} from last full run :"
140
+ list_failures
141
141
  end
142
142
  end
143
143
  end
@@ -79,7 +79,7 @@ module UpdateRepo
79
79
  unchanged: '^Already up-to-date.' }
80
80
 
81
81
  detect_strings.each do |status, regex|
82
- @status[status] = true if line.chomp =~ /#{regex}/
82
+ @status[status] = true if /#{regex}/.match?(line.chomp)
83
83
  end
84
84
 
85
85
  print_line(line, @status)
@@ -23,7 +23,7 @@ module Helpers
23
23
  private
24
24
 
25
25
  def gitdir?(dirpath)
26
- gitpath = dirpath + '/.git'
26
+ gitpath = "#{dirpath}/.git"
27
27
  File.exist?(gitpath) && File.directory?(gitpath)
28
28
  end
29
29
 
@@ -36,7 +36,7 @@ module UpdateRepo
36
36
  def generate_filename
37
37
  # add a timestamp if requested
38
38
  name = if @cmd[:timestamp]
39
- 'updaterepo-' + Time.new.strftime('%y%m%d-%H%M%S') + '.log'
39
+ "updaterepo-#{Time.new.strftime('%y%m%d-%H%M%S')}.log"
40
40
  else
41
41
  'updaterepo.log'
42
42
  end
@@ -54,14 +54,14 @@ module UpdateRepo
54
54
  # @return [void]
55
55
  def output(*string)
56
56
  # nothing to screen if we want to be --quiet
57
- unless @cmd[:quiet]
57
+ if !@cmd[:quiet] && (@cmd[:verbose] || !repo_text?)
58
58
  # log header and footer to screen regardless
59
- print(*string) if @cmd[:verbose] || !repo_text?
59
+ print(*string)
60
60
  end
61
61
  # log to file if that has been enabled
62
62
  return unless @cmd[:log]
63
63
 
64
- @logfile.write(string.join('').gsub(/\e\[(\d+)(;\d+)*m/, ''))
64
+ @logfile.write(string.join.gsub(/\e\[(\d+)(;\d+)*m/, ''))
65
65
  end
66
66
 
67
67
  # function repostat - outputs a coloured char depending on the status hash,
@@ -42,7 +42,7 @@ module UpdateRepo
42
42
  def save_errors(config)
43
43
  # get the location of the config file, we'll use the same dir
44
44
  # and base name
45
- path = config.config_path + '.errors'
45
+ path = "#{config.config_path}.errors"
46
46
  if @metrics[:failed_list].empty?
47
47
  # delete any existing file if we have no errors
48
48
  File.delete(path) if File.exist?(path)
@@ -56,7 +56,7 @@ module UpdateRepo
56
56
  # @param config [instance] of Config class
57
57
  # @return [void]
58
58
  def load_errors(config)
59
- path = config.config_path + '.errors'
59
+ path = "#{config.config_path}.errors"
60
60
  @metrics[:failed_list] = YAML.load_file(path) if File.exist?(path)
61
61
  end
62
62
  end
@@ -2,5 +2,5 @@
2
2
 
3
3
  module UpdateRepo
4
4
  # constant, current version of this Gem
5
- VERSION = '0.11.2'
5
+ VERSION = '0.11.3'
6
6
  end
@@ -9,7 +9,7 @@ require 'update_repo/version'
9
9
  Gem::Specification.new do |spec|
10
10
  spec.name = 'update_repo'
11
11
  spec.version = UpdateRepo::VERSION
12
- spec.required_ruby_version = '>= 1.9.3'
12
+ spec.required_ruby_version = '>= 2.4.0'
13
13
  spec.authors = ['Grant Ramsay']
14
14
  spec.email = ['seapagan@gmail.com']
15
15
 
@@ -23,31 +23,21 @@ Gem::Specification.new do |spec|
23
23
  spec.require_paths = ['lib']
24
24
 
25
25
  spec.add_development_dependency 'bundler'
26
- spec.add_development_dependency 'rake', '~> 12.3'
27
- spec.add_development_dependency 'rspec', '~> 3.0'
26
+ spec.add_development_dependency 'rake'
27
+ spec.add_development_dependency 'rspec'
28
28
  spec.add_development_dependency 'pry'
29
29
  spec.add_development_dependency 'fakefs'
30
30
  spec.add_development_dependency 'coveralls'
31
31
  spec.add_development_dependency 'inch'
32
- spec.add_development_dependency 'simplecov', '~> 0.12'
32
+ spec.add_development_dependency 'simplecov'
33
33
  spec.add_development_dependency 'pullreview-coverage'
34
34
  spec.add_development_dependency 'should_not'
35
35
  spec.add_development_dependency 'wwtd'
36
+ spec.add_development_dependency 'reek'
37
+ spec.add_development_dependency 'rubocop'
38
+ spec.add_development_dependency 'rubocop-performance'
36
39
 
37
- # The below dependencies require at least Ruby 2 for the latest versions.
38
- # Below this we fix to the last working versions to keep Ruby 1.9.3 compat or
39
- # we ignore completely - Reek and Rubocop working in the latest versions is
40
- # enough since the code base is common.
41
- spec.add_development_dependency 'reek' if RUBY_VERSION >= '2.1'
42
- spec.add_development_dependency 'rubocop' if RUBY_VERSION >= '2.0'
43
- spec.add_development_dependency 'rubocop-performance' if RUBY_VERSION >= '2.0'
44
-
45
- if RUBY_VERSION < '2.0'
46
- spec.add_development_dependency 'json', '= 1.8.3'
47
- spec.add_development_dependency 'tins', '= 1.6.0'
48
- spec.add_dependency 'term-ansicolor', '= 1.3.2'
49
- end
50
-
40
+ # prooduction dependencies
51
41
  spec.add_dependency 'colorize'
52
42
  spec.add_dependency 'confoog'
53
43
  spec.add_dependency 'optimist'
@@ -24,7 +24,7 @@
24
24
  "devDependencies": {
25
25
  "@fortawesome/fontawesome-free": "^5.12.0",
26
26
  "ansi-colors": "^4.1.1",
27
- "bootstrap": "^4.4.1",
27
+ "bootstrap": "^4.5.3",
28
28
  "browser-sync": "^2.26.7",
29
29
  "fancy-log": "^1.3.3",
30
30
  "gulp": "^4.0.2",
@@ -43,10 +43,10 @@
43
43
  "gulp-noop": "^1.0.0",
44
44
  "gulp-rename": "^2.0.0",
45
45
  "gulp-sass": "^4.0.2",
46
- "jquery": "^3.4.1",
46
+ "jquery": ">=3.5.0",
47
47
  "merge-stream": "^2.0.0",
48
- "mustache": "^3.2.0",
48
+ "mustache": "^4.1.0",
49
49
  "popper.js": "^1.16.0",
50
- "prismjs": "^1.17.1"
50
+ "prismjs": "^1.22.0"
51
51
  }
52
52
  }
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.11.2
4
+ version: 0.11.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Grant Ramsay
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-01-01 00:00:00.000000000 Z
11
+ date: 2020-12-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -28,30 +28,30 @@ dependencies:
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '12.3'
33
+ version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: '12.3'
40
+ version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: '3.0'
47
+ version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: '3.0'
54
+ version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: pry
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -112,16 +112,16 @@ dependencies:
112
112
  name: simplecov
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - "~>"
115
+ - - ">="
116
116
  - !ruby/object:Gem::Version
117
- version: '0.12'
117
+ version: '0'
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - "~>"
122
+ - - ">="
123
123
  - !ruby/object:Gem::Version
124
- version: '0.12'
124
+ version: '0'
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: pullreview-coverage
127
127
  requirement: !ruby/object:Gem::Requirement
@@ -262,7 +262,7 @@ dependencies:
262
262
  - - ">="
263
263
  - !ruby/object:Gem::Version
264
264
  version: '0'
265
- description:
265
+ description:
266
266
  email:
267
267
  - seapagan@gmail.com
268
268
  executables:
@@ -343,7 +343,7 @@ homepage: http://updaterepo.seapagan.net
343
343
  licenses:
344
344
  - MIT
345
345
  metadata: {}
346
- post_install_message:
346
+ post_install_message:
347
347
  rdoc_options: []
348
348
  require_paths:
349
349
  - lib
@@ -351,15 +351,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
351
351
  requirements:
352
352
  - - ">="
353
353
  - !ruby/object:Gem::Version
354
- version: 1.9.3
354
+ version: 2.4.0
355
355
  required_rubygems_version: !ruby/object:Gem::Requirement
356
356
  requirements:
357
357
  - - ">="
358
358
  - !ruby/object:Gem::Version
359
359
  version: '0'
360
360
  requirements: []
361
- rubygems_version: 3.0.6
362
- signing_key:
361
+ rubygems_version: 3.2.2
362
+ signing_key:
363
363
  specification_version: 4
364
364
  summary: A Simple Gem to keep multiple locally-cloned Git Repositories up to date
365
365
  test_files: []