rspec-puppet-facts 1.0.2 → 1.0.3
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/rspec-puppet-facts.rb +7 -0
- data/lib/rspec-puppet-facts/version.rb +1 -1
- data/spec/rspec_puppet_facts_spec.rb +28 -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: 16156aa3661f6efcc8f8e387c384cfe69a26c6e6
|
4
|
+
data.tar.gz: 3f528ed8784285b71824f58c6276ad9b1b9cd320
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d1e441e9c62e29b70f9fd2e7643f7f083486f03eb0a609dbf200404c5222d277a95f8c2107ada539a6f8e75f08e37e78e0306bc8687eeb47c1b76d0e419b687b
|
7
|
+
data.tar.gz: 3a7fb656a9a32d36c0dbf930c1d9e5e12117b55a182d4d2893b88bb6408c94e87179a4c9c1796dde1ad060d53c7976f5b72791d390b02565446a355e6babc3e8
|
data/CHANGELOG.md
CHANGED
data/lib/rspec-puppet-facts.rb
CHANGED
@@ -13,6 +13,13 @@ module RspecPuppetFacts
|
|
13
13
|
if os_sup['operatingsystemrelease']
|
14
14
|
os_sup['operatingsystemrelease'].map do |operatingsystemmajrelease|
|
15
15
|
opts[:hardwaremodels].each do |hardwaremodel|
|
16
|
+
|
17
|
+
if os_sup['operatingsystem'] =~ /FreeBSD/
|
18
|
+
hardwaremodel = 'amd64'
|
19
|
+
elsif os_sup['operatingsystem'] =~ /Solaris/
|
20
|
+
hardwaremodel = 'i86pc'
|
21
|
+
end
|
22
|
+
|
16
23
|
filter << {
|
17
24
|
:operatingsystem => os_sup['operatingsystem'],
|
18
25
|
:operatingsystemrelease => "/^#{operatingsystemmajrelease.split(" ")[0]}/",
|
@@ -95,6 +95,34 @@ describe 'RspecPuppetFacts' do
|
|
95
95
|
end
|
96
96
|
end
|
97
97
|
|
98
|
+
context 'When testing FreeBSD 10' do
|
99
|
+
subject {
|
100
|
+
on_supported_os(
|
101
|
+
{
|
102
|
+
:supported_os => [
|
103
|
+
{
|
104
|
+
"operatingsystem" => "FreeBSD",
|
105
|
+
"operatingsystemrelease" => [
|
106
|
+
"10",
|
107
|
+
],
|
108
|
+
},
|
109
|
+
],
|
110
|
+
}
|
111
|
+
)
|
112
|
+
}
|
113
|
+
it 'should return a hash' do
|
114
|
+
expect(subject.class).to eq Hash
|
115
|
+
end
|
116
|
+
it 'should have 1 elements' do
|
117
|
+
expect(subject.size).to eq 1
|
118
|
+
end
|
119
|
+
it 'should return supported OS' do
|
120
|
+
expect(subject.keys.sort).to eq [
|
121
|
+
'freebsd-10-amd64',
|
122
|
+
]
|
123
|
+
end
|
124
|
+
end
|
125
|
+
|
98
126
|
context 'When operatingsystemrelease has space' do
|
99
127
|
subject {
|
100
128
|
on_supported_os(
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rspec-puppet-facts
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mickaël Canévet
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-09-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mime-types
|