serverspec 2.42.1 → 2.42.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/serverspec/type/file.rb +7 -1
- data/lib/serverspec/version.rb +1 -1
- data/serverspec.gemspec +7 -2
- data/spec/type/base/file_spec.rb +5 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c156dac47ae252c7876fed18522aa9c196b049c7
|
4
|
+
data.tar.gz: b9e362ca6c5007250f147561f5aec4cbfd76885b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 302deda1271e22b0fc451bf7200c4dd8c6bc13626ecafefce5e324ce5c2186c1cefde07d89291def7ec876bb57b08718677eff32c57782f4f0296567faefae77
|
7
|
+
data.tar.gz: 9016eced88bd4a9302460c2dbe319f156f48b9b744db8d0542f4e7a89b5def248d48dc34633af84b29e6adb404d628cfce476558e3b6ecc6b7eb4ee8c1a14d92
|
data/lib/serverspec/type/file.rb
CHANGED
@@ -121,7 +121,13 @@ module Serverspec::Type
|
|
121
121
|
end
|
122
122
|
|
123
123
|
def content_as_yaml
|
124
|
-
|
124
|
+
if @content_as_yaml.nil?
|
125
|
+
@content_as_yaml = if YAML.respond_to?(:unsafe_load)
|
126
|
+
YAML.unsafe_load(content)
|
127
|
+
else
|
128
|
+
YAML.load(content)
|
129
|
+
end
|
130
|
+
end
|
125
131
|
@content_as_yaml
|
126
132
|
end
|
127
133
|
|
data/lib/serverspec/version.rb
CHANGED
data/serverspec.gemspec
CHANGED
@@ -22,6 +22,11 @@ Gem::Specification.new do |spec|
|
|
22
22
|
spec.add_runtime_dependency "rspec-its"
|
23
23
|
spec.add_runtime_dependency "multi_json"
|
24
24
|
spec.add_runtime_dependency "specinfra", "~> 2.72"
|
25
|
-
|
26
|
-
|
25
|
+
|
26
|
+
if RUBY_VERSION < "1.9"
|
27
|
+
spec.add_development_dependency "json", "~> 1.8"
|
28
|
+
spec.add_development_dependency "rake", "~> 10.1.1"
|
29
|
+
else
|
30
|
+
spec.add_development_dependency "rake"
|
31
|
+
end
|
27
32
|
end
|
data/spec/type/base/file_spec.rb
CHANGED
@@ -369,18 +369,22 @@ describe file('example.yml') do
|
|
369
369
|
let(:stdout) {<<EOF
|
370
370
|
---
|
371
371
|
yaml:
|
372
|
-
title: 'this is a yaml'
|
372
|
+
title: &anchor 'this is a yaml'
|
373
373
|
array:
|
374
374
|
-
|
375
375
|
title: 'array 1'
|
376
376
|
-
|
377
377
|
title: 'array 2'
|
378
|
+
date: 2023-02-03
|
379
|
+
Reuse anchor: *anchor
|
378
380
|
EOF
|
379
381
|
}
|
380
382
|
|
381
383
|
its(:content_as_yaml) { should include('yaml') }
|
382
384
|
its(:content_as_yaml) { should include('yaml' => include('title' => 'this is a yaml')) }
|
383
385
|
its(:content_as_yaml) { should include('yaml' => include('array' => include('title' => 'array 2'))) }
|
386
|
+
its(:content_as_yaml) { should include('yaml' => include('date' => Date.new(2023, 2, 3))) }
|
387
|
+
its(:content_as_yaml) { should include('yaml' => include('Reuse anchor' => 'this is a yaml')) }
|
384
388
|
end
|
385
389
|
|
386
390
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: serverspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.42.
|
4
|
+
version: 2.42.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gosuke Miyashita
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-02-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -70,16 +70,16 @@ dependencies:
|
|
70
70
|
name: rake
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- - "
|
73
|
+
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
75
|
+
version: '0'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- - "
|
80
|
+
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
82
|
+
version: '0'
|
83
83
|
description: RSpec tests for your servers configured by Puppet, Chef, Itamae or anything
|
84
84
|
else
|
85
85
|
email:
|