vanagon 0.15.1 → 0.15.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/vanagon/platform.rb +2 -2
- data/spec/lib/vanagon/platform_spec.rb +39 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 755316cb7aea9e8938ce656195e60c0beef28034
|
4
|
+
data.tar.gz: f96398616823b0fe9eb36180d57d24f1410959c6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3404fbcefa191a182489b9e5465eb12c2c1dfb98267f2704958a6e5d9c5ea5035c30d97d3845da9cb778ff16616decd1579b74a8cf70f3990fed59d3f219f27c
|
7
|
+
data.tar.gz: df9fea809a77f2bb1ae83c3d7a64c65984010702d5ca49b8c0a111f888103323d0de6ac3d7a6424da57d94119f942a25e852988fcf82da6f2a8d9131617339a2
|
data/lib/vanagon/platform.rb
CHANGED
@@ -319,14 +319,14 @@ class Vanagon
|
|
319
319
|
# @return [true, false] true if it is a redhat variety or uses rpm
|
320
320
|
# under the hood, false otherwise
|
321
321
|
def is_rpm?
|
322
|
-
return !!@name.match(/^(aix|cisco-wrlinux|el|eos|fedora|sles)-.*$/)
|
322
|
+
return !!@name.match(/^(aix|cisco-wrlinux|el|eos|fedora|sles|redhat)-.*$/)
|
323
323
|
end
|
324
324
|
|
325
325
|
# Utility matcher to determine is the platform is an enterprise linux variety
|
326
326
|
#
|
327
327
|
# @return [true, false] true if it is a enterprise linux variety, false otherwise
|
328
328
|
def is_el?
|
329
|
-
return !!@name.match(/^el-.*$/)
|
329
|
+
return !!@name.match(/^(el|redhat)-.*$/)
|
330
330
|
end
|
331
331
|
|
332
332
|
# Utility matcher to determine is the platform is a sles variety
|
@@ -14,6 +14,8 @@ describe "Vanagon::Platform" do
|
|
14
14
|
:source_output_dir => "deb/lucid/",
|
15
15
|
:source_output_dir_with_target => "deb/lucid/thing",
|
16
16
|
:source_output_dir_empty_string => "deb/lucid/",
|
17
|
+
:is_rpm => false,
|
18
|
+
:is_el => false,
|
17
19
|
:block => %Q[
|
18
20
|
platform "debian-6-i386" do |plat|
|
19
21
|
plat.codename "lucid"
|
@@ -30,8 +32,25 @@ describe "Vanagon::Platform" do
|
|
30
32
|
:source_output_dir => "el/5/products/SRPMS",
|
31
33
|
:source_output_dir_with_target => "el/5/thing/SRPMS",
|
32
34
|
:source_output_dir_empty_string => "el/5/SRPMS",
|
35
|
+
:is_rpm => true,
|
36
|
+
:is_el => true,
|
33
37
|
:block => %Q[ platform "el-5-i386" do |plat| end ],
|
34
38
|
},
|
39
|
+
{
|
40
|
+
:name => "redhat-7-x86_64",
|
41
|
+
:os_name => "redhat",
|
42
|
+
:os_version => "7",
|
43
|
+
:architecture => "x86_64",
|
44
|
+
:output_dir => "redhat/7/products/x86_64",
|
45
|
+
:output_dir_with_target => "redhat/7/thing/x86_64",
|
46
|
+
:output_dir_empty_string => "redhat/7/x86_64",
|
47
|
+
:source_output_dir => "redhat/7/products/SRPMS",
|
48
|
+
:source_output_dir_with_target => "redhat/7/thing/SRPMS",
|
49
|
+
:source_output_dir_empty_string => "redhat/7/SRPMS",
|
50
|
+
:is_rpm => true,
|
51
|
+
:is_el => true,
|
52
|
+
:block => %Q[ platform "redhat-7-x86_64" do |plat| end ],
|
53
|
+
},
|
35
54
|
{
|
36
55
|
:name => "debian-6-i386",
|
37
56
|
:os_name => "debian",
|
@@ -44,6 +63,8 @@ describe "Vanagon::Platform" do
|
|
44
63
|
:source_output_dir => "updated/sources",
|
45
64
|
:source_output_dir_with_target => "updated/sources",
|
46
65
|
:source_output_dir_empty_string => "updated/sources",
|
66
|
+
:is_rpm => false,
|
67
|
+
:is_el => false,
|
47
68
|
:block => %Q[
|
48
69
|
platform "debian-6-i386" do |plat|
|
49
70
|
plat.codename "lucid"
|
@@ -133,4 +154,22 @@ describe "Vanagon::Platform" do
|
|
133
154
|
end
|
134
155
|
end
|
135
156
|
end
|
157
|
+
|
158
|
+
describe "#is_rpm?" do
|
159
|
+
it "returns true if this is an rpm platform" do
|
160
|
+
platforms.each do |plat|
|
161
|
+
cur_plat = Vanagon::Platform.new(plat[:name])
|
162
|
+
expect(cur_plat.is_rpm?).to eq(plat[:is_rpm])
|
163
|
+
end
|
164
|
+
end
|
165
|
+
end
|
166
|
+
|
167
|
+
describe "#is_el?" do
|
168
|
+
it "returns true if this is an el platform" do
|
169
|
+
platforms.each do |plat|
|
170
|
+
cur_plat = Vanagon::Platform.new(plat[:name])
|
171
|
+
expect(cur_plat.is_el?).to eq(plat[:is_el])
|
172
|
+
end
|
173
|
+
end
|
174
|
+
end
|
136
175
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vanagon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.15.
|
4
|
+
version: 0.15.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Puppet Labs
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-01-
|
11
|
+
date: 2018-01-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: git
|