serverspec 2.25.0 → 2.26.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b1f873fb5b21dddc593ba1c5351f3f84c7580efa
|
4
|
+
data.tar.gz: 61265de50e9471e57d1c14299937454f02892a21
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d8a069060fc429ac5739f347934d6da85885e169fc1089a61399630c67ac477b6d29c40f41c0cb363a41c983152b7ab471fa06c5ea19318e2137a4fb90837554
|
7
|
+
data.tar.gz: 205516008ec4c9f87f564ef140872f623a0812a8e69ee8bc25e0a21619b90640c119c67fdee4ae6c674baf347ab6d5300609122aeb066aa374271cc625bd208e
|
data/lib/serverspec/type/base.rb
CHANGED
data/lib/serverspec/type/file.rb
CHANGED
@@ -117,6 +117,10 @@ module Serverspec::Type
|
|
117
117
|
@runner.check_file_has_version(@name, version)
|
118
118
|
end
|
119
119
|
|
120
|
+
def link_target
|
121
|
+
@runner.get_file_link_target(@name).stdout.strip
|
122
|
+
end
|
123
|
+
|
120
124
|
def mtime
|
121
125
|
d = @runner.get_file_mtime(@name).stdout.strip
|
122
126
|
DateTime.strptime(d, '%s').new_offset(DateTime.now.offset)
|
@@ -1,7 +1,9 @@
|
|
1
1
|
module Serverspec::Type
|
2
2
|
class PhpConfig < Base
|
3
3
|
def value
|
4
|
-
|
4
|
+
extra = '';
|
5
|
+
extra = extra + "-c #{@options[:ini]}" if @options.has_key?(:ini)
|
6
|
+
ret = @runner.run_command("php #{extra} -r 'echo get_cfg_var( \"#{@name}\" );'")
|
5
7
|
val = ret.stdout
|
6
8
|
val = val.to_i if val.match(/^\d+$/)
|
7
9
|
val
|
data/lib/serverspec/version.rb
CHANGED
data/spec/type/base/file_spec.rb
CHANGED
@@ -337,6 +337,11 @@ EOF
|
|
337
337
|
its(:content) { should match /root:x:0:0/ }
|
338
338
|
end
|
339
339
|
|
340
|
+
describe file('/etc/pam.d/system-auth') do
|
341
|
+
let(:stdout) { "/etc/pam.dsystem-auth-ac\r\n" }
|
342
|
+
its(:link_target) { should eq '/etc/pam.dsystem-auth-ac' }
|
343
|
+
end
|
344
|
+
|
340
345
|
describe file('/etc/passwd') do
|
341
346
|
let(:stdout) { Time.now.to_i.to_s }
|
342
347
|
its(:mtime) { should > DateTime.now - 1 }
|
@@ -31,3 +31,7 @@ describe php_config('mbstring.http_output_conv_mimetypes') do
|
|
31
31
|
let(:stdout) { 'application' }
|
32
32
|
its(:value) { should_not match /html/ }
|
33
33
|
end
|
34
|
+
describe php_config('default_mimetype', :ini => '/etc/php5/php.ini') do
|
35
|
+
let(:stdout) { 'text/html' }
|
36
|
+
its(:value) { should eq 'text/html' }
|
37
|
+
end
|
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.
|
4
|
+
version: 2.26.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gosuke Miyashita
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-12-
|
11
|
+
date: 2015-12-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|