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 +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/simp/rake/build/rpmdeps.rb +18 -17
- data/lib/simp/rake/helpers/version.rb +1 -1
- data/spec/lib/simp/rake/build/rpmdeps_spec.rb +2 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 120ba7852eb7531d190da1c922c9eccd42bd98ff9f3506ed9d6f0bdb2cd36e96
|
4
|
+
data.tar.gz: 310f8cc891fe4bc07a35699b3d7e735d2222888fd96964b1fed7143e70be35b6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c55a930c618700c3daa341ba4d32fd815ce28c11582cb033be23f313248394de762915d8c9eb4e320c0758f8d25eef200cf00eebbc222755f46ba048d804df8f
|
7
|
+
data.tar.gz: 01bb7784afab0d0074c0ec46bb0ea68b56c62f28310e6e0b504fb6e2b614707a84ffb6fe084e48384ac639a4cdefa12e462dbd4a3fd0ae65c3eb8d3277745be2
|
data/CHANGELOG.md
CHANGED
@@ -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
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
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
|
-
|
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
|
|
@@ -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.
|
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-
|
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
|