cfme-versions 5.12.1 → 11.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 49ebdb7fd9114624ec3dc65a74f840dc6251884bb976ab39cbad74260a21dcda
4
- data.tar.gz: 29996f7ef413bc51f17db509a600ac41e243f23c1b18ad83fc163eee386edd76
3
+ metadata.gz: 9e78f5101d511ac357b2bf9ea2086340e10ac5214d5c1b74fd9925d06a52d8c8
4
+ data.tar.gz: 2bd6f145f32408f22e8bff579fb41386203d4e79975ea95829d52554f3c67f24
5
5
  SHA512:
6
- metadata.gz: 1d8fb1cf32ac89b591d95126613a6a3de39b62189d829d5f395f817fa469136d874a4bb71e1f3c2e31c8796bd57ec026179bcf3e2968e4b18e6d5970aa5e2d46
7
- data.tar.gz: 1408bdb42a91d9e8c68c81d3d011704b90f5b96aa4d272fe776d4cf71355ae5dd0992355f0bd2b753a239a204f28dd5f2f72a9a16fb7668d476f64190afd9a7d
6
+ metadata.gz: 1f747ed4c1efc47018a6961a0f9f89d14ad05d4d6cdc5639715ddfb0b161d5482f3748bf7d1de89396b417b6932735e7e039fbc1fd2f2599503b6118d8845009
7
+ data.tar.gz: f5524f6304940d05e9f40b2cb87575d41bb4f83b35cc3c5432e9436b69e46cd6868794a3cc9cda3954bffdd4652d5c6c86a9d4cc971b8c90f798db4660265d2d
data/README.md CHANGED
@@ -1,28 +1,26 @@
1
1
  `CFME::Versions`
2
2
  ================
3
3
 
4
- Command line utility and library for viewing versions across CloudForms (CF),
5
- CloudForms Management Engine (CFME), and ManageIQ (MIQ).
6
-
7
- ```console
8
- $ cfme-versions
9
- +----------------+------------------------------+------------+-------+-------+------------+
10
- | MANAGEIQ | CLOUDFORMS MANAGEMENT ENGINE | CLOUDFORMS | RUBY | RAILS | POSTGRESQL |
11
- +----------------+------------------------------+------------+-------+-------+------------+
12
- | | 5.1.z | 2.0 | | | |
13
- | | 5.2.z | 3.0 | | | |
14
- | Anand | 5.3.z | 3.1 | | | |
15
- | Botvinnik | 5.4.z | 3.2 | | | |
16
- | Capablanca | 5.5.z | 4.0 | 2.2.z | 4.2.z | 9.4.z |
17
- | Darga | 5.6.z | 4.1 | 2.2.z | 5.0.z | 9.4.z |
18
- | Euwe | 5.7.z | 4.2 | 2.3.z | 5.0.z | 9.5.z |
19
- | Fine | 5.8.z | 4.5 | 2.3.z | 5.0.z | 9.5.z |
20
- | Gaprindashvili | 5.9.z | 4.6 | 2.3.z | 5.0.z | 9.5.z |
21
- | Hammer | 5.10.z | 4.7 | 2.4.z | 5.0.z | 9.5.z |
22
- | Ivanchuk | 5.11.z | 5.0 | 2.5.z | 5.1.z | 10.y |
23
- | Jansa | 5.12.z | 5.1 | 2.5.z | 5.2.z | 10.y |
24
- +----------------+------------------------------+------------+-------+-------+------------+
25
- ```
4
+ Command line utility and library for viewing versions across ManageIQ,
5
+ CloudForms Management Engine (CFME), CloudForms, and IBM CloudPak for Multicloud
6
+ Management (CP4MCM)
7
+
8
+
9
+ | ManageIQ | | CFME | CloudForms | CP4MCM | Ruby | Rails | PostgreSQL |
10
+ | -------------- | ------ | ------ | ---------- | ------- | ----- | ----- | ---------- |
11
+ | | | 5.1.z | 2.0 | | | | |
12
+ | | | 5.2.z | 3.0 | | | | |
13
+ | Anand | 1.y.z | 5.3.z | 3.1 | | | | |
14
+ | Botvinnik | 2.y.z | 5.4.z | 3.2 | | | | |
15
+ | Capablanca | 3.y.z | 5.5.z | 4.0 | | 2.2.z | 4.2.z | 9.4.z |
16
+ | Darga | 4.y.z | 5.6.z | 4.1 | | 2.2.z | 5.0.z | 9.4.z |
17
+ | Euwe | 5.y.z | 5.7.z | 4.2 | | 2.3.z | 5.0.z | 9.5.z |
18
+ | Fine | 6.y.z | 5.8.z | 4.5 | | 2.3.z | 5.0.z | 9.5.z |
19
+ | Gaprindashvili | 7.y.z | 5.9.z | 4.6 | | 2.3.z | 5.0.z | 9.5.z |
20
+ | Hammer | 8.y.z | 5.10.z | 4.7 | | 2.4.z | 5.0.z | 9.5.z |
21
+ | Ivanchuk | 9.y.z | 5.11.z | 5.0 | 1.2,1.3 | 2.5.z | 5.1.z | 10.y |
22
+ | Jansa | 10.y.z | | | 2.0 | 2.5.z | 5.2.z | 10.y |
23
+ | Kasparov | 11.y.z | | | | 2.6.z | 5.2.z | 10.y |
26
24
 
27
25
  Requirements
28
26
  ------------
@@ -53,12 +51,12 @@ Versioning
53
51
  ----------
54
52
 
55
53
  Ideally we will keep the version of this gem in-sync with the version of the
56
- most recent `y-stream` (minor) version release of CFME. However, in the case
57
- of bug fixes, patch versions might be included.
54
+ most recent numeric version of ManageIQ. However, in the case of bug fixes,
55
+ patch versions might be included.
58
56
 
59
- In the cases where this is need, just add to the `CFME::Versions.version`
60
- method a `+ ".1"` to the end of the method to bump the version, and update
61
- tests as needed.
57
+ In the cases where a patch is needed, just update the `CFME::Versions.version`
58
+ to set the version directly. When a new version is released, reset it back to 0
59
+ for consistency.
62
60
 
63
61
 
64
62
  Usage
@@ -94,6 +92,7 @@ CFME::Versions.last
94
92
  # miq_release="Jansa",
95
93
  # cfme_release="5.12.z",
96
94
  # cloud_forms_release="5.1",
95
+ # cp4mcm_release="2.0",
97
96
  # ruby="2.5.z",
98
97
  # rails="5.2.z",
99
98
  # postgresql="10.y">
@@ -7,8 +7,10 @@ Gem::Specification.new do |spec|
7
7
  spec.version = CFME::Versions.version
8
8
  spec.authors = ["ManageIQ Authors"]
9
9
 
10
- spec.summary = "Commandline utility and library for viewing versions across CF, CFME, and MIQ"
11
- spec.description = "Commandline utility and library for viewing versions across CF, CFME, and MIQ"
10
+ spec.summary = "Command line utility and library for viewing versions across ManageIQ, "
11
+ "CloudForms Management Engine (CFME), CloudForms, and IBM CloudPak for Multicloud "
12
+ "Management (CP4MCM)"
13
+ spec.description = spec.summary
12
14
  spec.homepage = "https://github.com/RedHatCloudForms/cfme-versions"
13
15
  spec.license = "Apache-2.0"
14
16
 
@@ -1,24 +1,6 @@
1
1
  #!/usr/bin/env ruby --disable-gems
2
2
  #
3
- # When run as a program, prints the following table
4
- #
5
- # $ cfme-versions.rb
6
- # +----------------+------------------------------+------------+-------+-------+------------+
7
- # | MANAGEIQ | CLOUDFORMS MANAGEMENT ENGINE | CLOUDFORMS | RUBY | RAILS | POSTGRESQL |
8
- # +----------------+------------------------------+------------+-------+-------+------------+
9
- # | | 5.1.z | 2.0 | | | |
10
- # | | 5.2.z | 3.0 | | | |
11
- # | Anand | 5.3.z | 3.1 | | | |
12
- # | Botvinnik | 5.4.z | 3.2 | | | |
13
- # | Capablanca | 5.5.z | 4.0 | 2.2.z | 4.2.z | 9.4.z |
14
- # | Darga | 5.6.z | 4.1 | 2.2.z | 5.0.z | 9.4.z |
15
- # | Euwe | 5.7.z | 4.1 | 2.3.z | 5.0.z | 9.5.z |
16
- # | Fine | 5.8.z | 4.5 | 2.3.z | 5.0.z | 9.5.z |
17
- # | Gaprindashvili | 5.9.z | 4.6 | 2.3.z | 5.0.z | 9.5.z |
18
- # | Hammer | 5.10.z | 4.7 | 2.4.z | 5.0.z | 9.5.z |
19
- # | Ivanchuk | 5.11.z | 5.0 | 2.5.z | 5.1.z | 10.y |
20
- # | Jansa | 5.12.z | 5.1 | 2.5.z | 5.2.z | 10.y |
21
- # +----------------+------------------------------+------------+-------+-------+------------+
3
+ # When run as a program, prints a table of the current information.
22
4
  #
23
5
  # Otherwise, it can be required in a ruby script or rake task and manipulated as needed:
24
6
  #
@@ -36,39 +18,37 @@
36
18
  # #=> #<struct CFME::Version miq_release="Jansa", cfme_release="5.12.z", cloud_forms_release="5.1", ruby="2.5.z", rails="5.2.z", postgresql="10.y">
37
19
  #
38
20
  module CFME
39
- Version = Struct.new(:miq_release, :cfme_release, :cloud_forms_release, :ruby, :rails, :postgresql)
21
+ Version = Struct.new(:miq_release, :miq_semver, :cfme_release, :cloud_forms_release, :cp4mcm_release, :ruby, :rails, :postgresql)
40
22
 
41
23
  class Versions
42
24
  extend Enumerable
43
25
 
44
26
  FIELDS = [
45
- "MANAGEIQ", "CLOUDFORMS MANAGEMENT ENGINE", "CLOUDFORMS", "RUBY", "RAILS", "POSTGRESQL"
27
+ "ManageIQ", "", "CFME", "CloudForms", "CP4MCM", "Ruby", "Rails", "PostgreSQL"
46
28
  ].freeze
47
29
  VERSIONS = [
48
- %w[ N/A 5.1.z 2.0 N/A N/A N/A ],
49
- %w[ N/A 5.2.z 3.0 N/A N/A N/A ],
50
- %w[ Anand 5.3.z 3.1 N/A N/A N/A ],
51
- %w[ Botvinnik 5.4.z 3.2 N/A N/A N/A ],
52
- %w[ Capablanca 5.5.z 4.0 2.2.z 4.2.z 9.4.z ],
53
- %w[ Darga 5.6.z 4.1 2.2.z 5.0.z 9.4.z ],
54
- %w[ Euwe 5.7.z 4.2 2.3.z 5.0.z 9.5.z ],
55
- %w[ Fine 5.8.z 4.5 2.3.z 5.0.z 9.5.z ],
56
- %w[ Gaprindashvili 5.9.z 4.6 2.3.z 5.0.z 9.5.z ],
57
- %w[ Hammer 5.10.z 4.7 2.4.z 5.0.z 9.5.z ],
58
- %w[ Ivanchuk 5.11.z 5.0 2.5.z 5.1.z 10.y ],
59
- %w[ Jansa 5.12.z 5.1 2.5.z 5.2.z 10.y ]
30
+ %w[ N/A N/A 5.1.z 2.0 N/A N/A N/A N/A ],
31
+ %w[ N/A N/A 5.2.z 3.0 N/A N/A N/A N/A ],
32
+ %w[ Anand 1.y.z 5.3.z 3.1 N/A N/A N/A N/A ],
33
+ %w[ Botvinnik 2.y.z 5.4.z 3.2 N/A N/A N/A N/A ],
34
+ %w[ Capablanca 3.y.z 5.5.z 4.0 N/A 2.2.z 4.2.z 9.4.z ],
35
+ %w[ Darga 4.y.z 5.6.z 4.1 N/A 2.2.z 5.0.z 9.4.z ],
36
+ %w[ Euwe 5.y.z 5.7.z 4.2 N/A 2.3.z 5.0.z 9.5.z ],
37
+ %w[ Fine 6.y.z 5.8.z 4.5 N/A 2.3.z 5.0.z 9.5.z ],
38
+ %w[ Gaprindashvili 7.y.z 5.9.z 4.6 N/A 2.3.z 5.0.z 9.5.z ],
39
+ %w[ Hammer 8.y.z 5.10.z 4.7 N/A 2.4.z 5.0.z 9.5.z ],
40
+ %w[ Ivanchuk 9.y.z 5.11.z 5.0 1.2,1.3 2.5.z 5.1.z 10.y ],
41
+ %w[ Jansa 10.y.z N/A N/A 2.0 2.5.z 5.2.z 10.y ],
42
+ %w[ Kasparov 11.y.z N/A N/A N/A 2.6.z 5.2.z 10.y ]
60
43
  ].freeze
61
44
 
62
45
  class << self
63
- attr_accessor :markdown
64
-
65
46
  def run(argv = ARGV)
66
47
  until argv.empty?
67
48
  arg = argv.shift
68
49
 
69
50
  # The `return` statements are there for specs
70
51
  case arg
71
- when "--markdown" then self.markdown = true
72
52
  when "--version" then return print_version
73
53
  when "--help" then return print_help
74
54
  end
@@ -91,7 +71,8 @@ module CFME
91
71
 
92
72
  # Version of this gem/tool
93
73
  def version
94
- versions.last.cfme_release.split(".").select { |val| val =~ /^\d+$/ }.join('.') + ".1"
74
+ numbers = versions.last.miq_semver.split(".").select { |val| val =~ /^\d+$/ } + %w[0 0 0]
75
+ numbers.first(3).join(".")
95
76
  end
96
77
 
97
78
  def versions
@@ -103,12 +84,11 @@ module CFME
103
84
  end
104
85
 
105
86
  def print_help
106
- puts <<-HELP.gsub(/^ {10}/, '')
87
+ puts <<~HELP
107
88
  usage: cfme-versions [OPTION]...
108
89
 
109
90
  Options:
110
91
 
111
- --markdown Print table in markdown format
112
92
  --version Prints the version number and exits
113
93
  --help This help
114
94
 
@@ -118,16 +98,14 @@ module CFME
118
98
 
119
99
  def print_table
120
100
  # Print Header
121
- puts spacer unless markdown
122
101
  puts printable_row(FIELDS)
123
- puts spacer
102
+ puts printable_row(spacings.map { |size| "-" * size })
124
103
 
125
104
  # Print version data
126
105
  raw_data.each do |version|
127
106
  version_data = version.map { |column| column == "N/A" ? "" : column } # remove N/A values
128
107
  puts printable_row(version_data)
129
108
  end
130
- puts spacer unless markdown
131
109
  end
132
110
 
133
111
  def print_version
@@ -153,12 +131,6 @@ module CFME
153
131
  end
154
132
  @spacings
155
133
  end
156
-
157
- # Spacer around header and end of raw_data when printing the table
158
- def spacer
159
- separator = markdown ? "|" : "+"
160
- @spacer ||= "#{separator}#{spacings.map { |size| "-" * size + "--" }.join(separator)}#{separator}"
161
- end
162
134
  end
163
135
  end
164
136
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cfme-versions
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.12.1
4
+ version: 11.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ManageIQ Authors
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-09-20 00:00:00.000000000 Z
11
+ date: 2020-08-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -52,9 +52,8 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '5.0'
55
- description: Commandline utility and library for viewing versions across CF, CFME,
56
- and MIQ
57
- email:
55
+ description: Command line utility and library for viewing versions across ManageIQ,
56
+ email:
58
57
  executables:
59
58
  - cfme-versions
60
59
  extensions: []
@@ -69,7 +68,7 @@ homepage: https://github.com/RedHatCloudForms/cfme-versions
69
68
  licenses:
70
69
  - Apache-2.0
71
70
  metadata: {}
72
- post_install_message:
71
+ post_install_message:
73
72
  rdoc_options: []
74
73
  require_paths:
75
74
  - lib
@@ -84,9 +83,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
84
83
  - !ruby/object:Gem::Version
85
84
  version: '0'
86
85
  requirements: []
87
- rubygems_version: 3.0.6
88
- signing_key:
86
+ rubygems_version: 3.1.2
87
+ signing_key:
89
88
  specification_version: 4
90
- summary: Commandline utility and library for viewing versions across CF, CFME, and
91
- MIQ
89
+ summary: Command line utility and library for viewing versions across ManageIQ,
92
90
  test_files: []