simp-rake-helpers 5.11.1 → 5.11.2

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: 842c7c807e886d28ecc77134d1737609a2bdf1086684437a7f9963ec925cc39c
4
- data.tar.gz: feeb1ee8af97de4ad45ed94d845d6767f91a905b98c5f3923528196a4c966d18
3
+ metadata.gz: 120ba7852eb7531d190da1c922c9eccd42bd98ff9f3506ed9d6f0bdb2cd36e96
4
+ data.tar.gz: 310f8cc891fe4bc07a35699b3d7e735d2222888fd96964b1fed7143e70be35b6
5
5
  SHA512:
6
- metadata.gz: 2ab96c058e9375634c96e5ef949f30880657397efc9b5ed5a49acbd6e575452d568468aa8a6410597a495a2c31a8fc692c3ba049aec11099c398875f184e5399
7
- data.tar.gz: 82f08cfae6782f618c682f24c1bc699ea28300d34620d7cce68ab017e795399f577d5d46984098a9553e972f620fab8b60a1027b06ac3e0a95ba0a6c1708daf1
6
+ metadata.gz: c55a930c618700c3daa341ba4d32fd815ce28c11582cb033be23f313248394de762915d8c9eb4e320c0758f8d25eef200cf00eebbc222755f46ba048d804df8f
7
+ data.tar.gz: 01bb7784afab0d0074c0ec46bb0ea68b56c62f28310e6e0b504fb6e2b614707a84ffb6fe084e48384ac639a4cdefa12e462dbd4a3fd0ae65c3eb8d3277745be2
@@ -1,3 +1,6 @@
1
+ ### 5.11.2 / 2020-04-08
2
+ * Version information should not be required on dependencies in metadata.json
3
+
1
4
  ### 5.11.1 / 2020-04-07
2
5
  * Puppet module RPM logic handles `-rc0` suffix in `metadata.json`
3
6
 
@@ -15,28 +15,29 @@ module Simp::Rake::Build::RpmDeps
15
15
  # raises SIMPRpmDepVersionException if the dependency version
16
16
  # string cannot be parsed
17
17
  def self.get_version_requires(pkg, dep_version)
18
+ return ["Requires: #{pkg}"] if dep_version.nil?
19
+ return ["Requires: #{pkg} = #{$1}"] if dep_version =~ /^\s*(\d+\.\d+\.\d+)\s*$/
20
+
18
21
  requires = []
19
- if dep_version =~ /^\s*(\d+\.\d+\.\d+)\s*$/
20
- requires << "Requires: #{pkg} = #{$1}"
21
- else
22
- if dep_version.include?('x')
23
- dep_parts = dep_version.split('.')
24
-
25
- if dep_parts.count == 3
26
- dep_version = ">= #{dep_parts[0]}.#{dep_parts[1]}.0 < #{dep_parts[0].to_i + 1}.0.0"
27
- else
28
- dep_version = ">= #{dep_parts[0]}.0.0 < #{dep_parts[0].to_i + 1}.0.0"
29
- end
30
- end
31
22
 
32
- # metadata.json is a LOT more forgiving than the RPM spec file
33
- if dep_version =~ /^\s*(?:(?:([<>]=?)\s*(\d+\.\d+\.\d+))\s*(?:(<)\s*(\d+\.\d+\.\d+))?)\s*$/
34
- requires << "Requires: #{pkg} #{$1} #{$2}"
35
- requires << "Requires: #{pkg} #{$3} #{$4}" if $3
23
+ if dep_version.include?('x')
24
+ dep_parts = dep_version.split('.')
25
+
26
+ if dep_parts.count == 3
27
+ dep_version = ">= #{dep_parts[0]}.#{dep_parts[1]}.0 < #{dep_parts[0].to_i + 1}.0.0"
36
28
  else
37
- raise SIMPRpmDepVersionException.new
29
+ dep_version = ">= #{dep_parts[0]}.0.0 < #{dep_parts[0].to_i + 1}.0.0"
38
30
  end
39
31
  end
32
+
33
+ # metadata.json is a LOT more forgiving than the RPM spec file
34
+ if dep_version =~ /^\s*(?:(?:([<>]=?)\s*(\d+\.\d+\.\d+))\s*(?:(<)\s*(\d+\.\d+\.\d+))?)\s*$/
35
+ requires << "Requires: #{pkg} #{$1} #{$2}"
36
+ requires << "Requires: #{pkg} #{$3} #{$4}" if $3
37
+ else
38
+ raise SIMPRpmDepVersionException.new
39
+ end
40
+
40
41
  requires
41
42
  end
42
43
 
@@ -2,5 +2,5 @@ module Simp; end
2
2
  module Simp::Rake; end
3
3
 
4
4
  class Simp::Rake::Helpers
5
- VERSION = '5.11.1'
5
+ VERSION = '5.11.2'
6
6
  end
@@ -16,7 +16,8 @@ describe 'Simp::Rake::Build::RpmDeps#get_version_requires' do
16
16
  "5.x" => ['Requires: pupmod-foo-bar >= 5.0.0',
17
17
  'Requires: pupmod-foo-bar < 6.0.0'],
18
18
  "6.4.x" => ['Requires: pupmod-foo-bar >= 6.4.0',
19
- 'Requires: pupmod-foo-bar < 7.0.0']
19
+ 'Requires: pupmod-foo-bar < 7.0.0'],
20
+ nil => ['Requires: pupmod-foo-bar']
20
21
  }.each do |input, output|
21
22
  it do
22
23
  expect(Simp::Rake::Build::RpmDeps::get_version_requires(pkg, input)).to eq output
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simp-rake-helpers
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.11.1
4
+ version: 5.11.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Tessmer
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-04-08 00:00:00.000000000 Z
12
+ date: 2020-04-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: simp-beaker-helpers