onceover 3.17.1 → 3.17.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -0
- data/lib/onceover/controlrepo.rb +29 -33
- data/onceover.gemspec +2 -2
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2dca2d14bc7059827f3bcbe11eb8c0c00c43be5c37c45ac9fb3533562dab4e7b
|
4
|
+
data.tar.gz: d45c009adb4edae1b828fee5a0b51552c02bfc4dc7eefcb5b09a1832e8509170
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 13b3969909f9966f78663ba0568f96b557ef769c1a13a0d999d15d50a057ffa3584570b2c6e3c31b79aa09980c8088b62dc4ec665b073b60157243beb11d55cb
|
7
|
+
data.tar.gz: 3209f3771d3db26c9ba8f40a06225ac29b452fc012c08e9dfa6ea60cb485ad173448eb9d3aa491f0ed76d5ccdb068ffde61583a1a7fbe232fe352d5cd4874960
|
data/README.md
CHANGED
data/lib/onceover/controlrepo.rb
CHANGED
@@ -206,7 +206,7 @@ class Onceover
|
|
206
206
|
end
|
207
207
|
|
208
208
|
def print_puppetfile_table
|
209
|
-
require '
|
209
|
+
require 'terminal-table'
|
210
210
|
require 'versionomy'
|
211
211
|
require 'colored'
|
212
212
|
require 'r10k/puppetfile'
|
@@ -221,48 +221,44 @@ class Onceover
|
|
221
221
|
threads = []
|
222
222
|
puppetfile.modules.each do |mod|
|
223
223
|
threads << Thread.new do
|
224
|
-
|
224
|
+
row = []
|
225
225
|
logger.debug "Loading data for #{mod.full_name}"
|
226
|
-
|
226
|
+
row << mod.full_name
|
227
227
|
if mod.is_a?(R10K::Module::Forge)
|
228
|
-
|
229
|
-
|
230
|
-
|
228
|
+
row << mod.expected_version
|
229
|
+
row << mod.v3_module.current_release.version
|
230
|
+
|
231
|
+
current = Versionomy.parse(mod.expected_version)
|
232
|
+
latest = Versionomy.parse(mod.v3_module.current_release.version)
|
233
|
+
row << if current.major < latest.major
|
234
|
+
"Major".red
|
235
|
+
elsif current.minor < latest.minor
|
236
|
+
"Minor".yellow
|
237
|
+
elsif current.tiny < latest.tiny
|
238
|
+
"Tiny".green
|
239
|
+
else
|
240
|
+
"No".green
|
241
|
+
end
|
242
|
+
|
243
|
+
row << mod.v3_module.endorsement
|
231
244
|
superseded_by = mod.v3_module.superseded_by
|
232
|
-
|
233
|
-
current = Versionomy.parse(return_hash[:current_version])
|
234
|
-
latest = Versionomy.parse(return_hash[:latest_version])
|
235
|
-
if current.major < latest.major
|
236
|
-
return_hash[:out_of_date] = "Major".red
|
237
|
-
elsif current.minor < latest.minor
|
238
|
-
return_hash[:out_of_date] = "Minor".yellow
|
239
|
-
elsif current.tiny < latest.tiny
|
240
|
-
return_hash[:out_of_date] = "Tiny".green
|
241
|
-
else
|
242
|
-
return_hash[:out_of_date] = "No".green
|
243
|
-
end
|
245
|
+
row << (superseded_by.nil? ? '' : superseded_by[:slug])
|
244
246
|
else
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
247
|
+
row << "N/A"
|
248
|
+
row << "N/A"
|
249
|
+
row << "N/A"
|
250
|
+
row << "N/A"
|
251
|
+
row << "N/A"
|
250
252
|
end
|
251
|
-
output_array <<
|
253
|
+
output_array << row
|
252
254
|
end
|
253
255
|
end
|
254
256
|
|
255
257
|
threads.map(&:join)
|
256
258
|
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
{:current_version => {:display_name => "Current Version"}},
|
261
|
-
{:latest_version => {:display_name => "Latest Version"}},
|
262
|
-
{:out_of_date => {:display_name => "Out of Date?"}},
|
263
|
-
{:endorsement => {:display_name => "Endorsement"}},
|
264
|
-
{:superseded_by => {:display_name => "Superseded by"}}
|
265
|
-
)
|
259
|
+
output_array.sort_by! { |line| line[0] }
|
260
|
+
|
261
|
+
puts Terminal::Table.new(headings: ["Full Name", "Current Version", "Latest Version", "Out of Date?", "Endorsement", "Superseded by"], rows: output_array)
|
266
262
|
end
|
267
263
|
|
268
264
|
def update_puppetfile
|
data/onceover.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift File.expand_path("../lib", __FILE__)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |s|
|
6
6
|
s.name = "onceover"
|
7
|
-
s.version = "3.17.
|
7
|
+
s.version = "3.17.2"
|
8
8
|
s.authors = ["Dylan Ratcliffe"]
|
9
9
|
s.email = ["dylan.ratcliffe@puppet.com"]
|
10
10
|
s.homepage = "https://github.com/dylanratcliffe/onceover"
|
@@ -34,7 +34,7 @@ Gem::Specification.new do |s|
|
|
34
34
|
s.add_runtime_dependency 'rspec', '>= 3.0.0'
|
35
35
|
s.add_runtime_dependency 'rspec-puppet', ">= 2.4.0"
|
36
36
|
s.add_runtime_dependency 'rspec_junit_formatter', '>= 0.2.0'
|
37
|
-
s.add_runtime_dependency '
|
37
|
+
s.add_runtime_dependency 'terminal-table', '>= 1.8.0'
|
38
38
|
s.add_runtime_dependency 'versionomy', '>= 0.5.0'
|
39
39
|
|
40
40
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: onceover
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.17.
|
4
|
+
version: 3.17.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dylan Ratcliffe
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-07-
|
11
|
+
date: 2020-07-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: backticks
|
@@ -235,19 +235,19 @@ dependencies:
|
|
235
235
|
- !ruby/object:Gem::Version
|
236
236
|
version: 0.2.0
|
237
237
|
- !ruby/object:Gem::Dependency
|
238
|
-
name:
|
238
|
+
name: terminal-table
|
239
239
|
requirement: !ruby/object:Gem::Requirement
|
240
240
|
requirements:
|
241
241
|
- - ">="
|
242
242
|
- !ruby/object:Gem::Version
|
243
|
-
version: 1.
|
243
|
+
version: 1.8.0
|
244
244
|
type: :runtime
|
245
245
|
prerelease: false
|
246
246
|
version_requirements: !ruby/object:Gem::Requirement
|
247
247
|
requirements:
|
248
248
|
- - ">="
|
249
249
|
- !ruby/object:Gem::Version
|
250
|
-
version: 1.
|
250
|
+
version: 1.8.0
|
251
251
|
- !ruby/object:Gem::Dependency
|
252
252
|
name: versionomy
|
253
253
|
requirement: !ruby/object:Gem::Requirement
|