rspec-puppet-facts 1.7.0 → 1.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -0
- data/CHANGELOG.md +3 -0
- data/README.md +6 -5
- data/lib/rspec-puppet-facts.rb +3 -3
- data/lib/rspec-puppet-facts/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e501268fb551da91bff54951aee4dc884f117a4b
|
4
|
+
data.tar.gz: cabe7a413415661d69ab685a614e7c6bfbe50729
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3cca12e796f02836127490f652cf3ca9a461878e7ea1d18ac94e84986ec3575bb1b60ae4d02144eeaa824ab3300251d31e1f4ff00dfd177d8d2c5d709e0bf71c
|
7
|
+
data.tar.gz: e7ae8569cc4d2715effe03add802b420fe52c3f76b7c94bdbb72d8c83e4d1160ab559d7ce99dac4c39d933a8b9478047a07155cf86e907904205cd9e17cb95f2
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -241,7 +241,7 @@ end
|
|
241
241
|
Append some facts:
|
242
242
|
------------------
|
243
243
|
|
244
|
-
|
244
|
+
You can locally override facts in your spec:
|
245
245
|
|
246
246
|
```ruby
|
247
247
|
require 'spec_helper'
|
@@ -263,11 +263,12 @@ describe 'myclass' do
|
|
263
263
|
end
|
264
264
|
```
|
265
265
|
|
266
|
-
|
266
|
+
You can also globally set facts in `spec/spec_helper.rb`
|
267
|
+
|
267
268
|
* Simple:
|
268
269
|
|
269
270
|
```ruby
|
270
|
-
add_custom_fact
|
271
|
+
add_custom_fact :concat_basedir, '/doesnotexist'
|
271
272
|
```
|
272
273
|
|
273
274
|
* Confine to an OS:
|
@@ -284,7 +285,7 @@ end
|
|
284
285
|
* Call a proc to get a value:
|
285
286
|
|
286
287
|
```ruby
|
287
|
-
add_custom_fact :root_home, ->(_os,facts) { "/tmp/#{facts['hostname']}"
|
288
|
+
add_custom_fact :root_home, ->(_os,facts) { "/tmp/#{facts['hostname']}" }
|
288
289
|
```
|
289
290
|
|
290
291
|
Usage
|
@@ -296,7 +297,7 @@ Add this in your Gemfile:
|
|
296
297
|
gem 'rspec-puppet-facts', :require => false
|
297
298
|
```
|
298
299
|
|
299
|
-
Add this is your spec/spec_helper.rb
|
300
|
+
Add this is your `spec/spec_helper.rb`:
|
300
301
|
|
301
302
|
```ruby
|
302
303
|
require 'rspec-puppet-facts'
|
data/lib/rspec-puppet-facts.rb
CHANGED
@@ -36,11 +36,11 @@ module RspecPuppetFacts
|
|
36
36
|
os_sup['operatingsystemrelease'].map do |operatingsystemmajrelease|
|
37
37
|
opts[:hardwaremodels].each do |hardwaremodel|
|
38
38
|
|
39
|
-
if os_sup['operatingsystem'] =~ /BSD/
|
39
|
+
if os_sup['operatingsystem'] =~ /BSD/i
|
40
40
|
hardwaremodel = 'amd64'
|
41
|
-
elsif os_sup['operatingsystem'] =~ /Solaris/
|
41
|
+
elsif os_sup['operatingsystem'] =~ /Solaris/i
|
42
42
|
hardwaremodel = 'i86pc'
|
43
|
-
elsif os_sup['operatingsystem'] =~ /
|
43
|
+
elsif os_sup['operatingsystem'] =~ /Windows/i
|
44
44
|
hardwaremodel = 'x64'
|
45
45
|
end
|
46
46
|
|
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.7.
|
4
|
+
version: 1.7.1
|
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:
|
11
|
+
date: 2017-01-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mime-types
|
@@ -192,7 +192,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
192
192
|
version: '0'
|
193
193
|
requirements: []
|
194
194
|
rubyforge_project:
|
195
|
-
rubygems_version: 2.5.
|
195
|
+
rubygems_version: 2.5.2
|
196
196
|
signing_key:
|
197
197
|
specification_version: 4
|
198
198
|
summary: Standard facts fixtures for Puppet
|