serverspec-extra-types 0.4.5 → 0.4.6
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2577c03b1dc2888ae78a9fe968754f33b5b69e5cf5f7232bc62a51b64919ece8
|
4
|
+
data.tar.gz: f221aef4e11e3562f25c01faeed0210a7788f5c596a0e5c17bb3883d3b856ee6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: be104eb846a5e8f16fe5ba884684fea367bc16bd1a6d7cb31931b984965ef7e705366f2a53349a6b88c7a917b43ce93007adc7cb8996eeca7cf2e40b23a5896e
|
7
|
+
data.tar.gz: b19fc4d4a97db02cb2f00979efe707ba99714d363b5822075da04911dec26a0f0c2f90b249891d30d38eb529daa08bb6692cff1fcad320148d6b7ecb0e2e93ad
|
data/README.md
CHANGED
@@ -1122,19 +1122,15 @@ end
|
|
1122
1122
|
Ensures the user can run a command
|
1123
1123
|
```ruby
|
1124
1124
|
describe sudo_user('someuser') do
|
1125
|
-
it { should
|
1126
|
-
|
1127
|
-
it { should
|
1128
|
-
|
1129
|
-
it { should
|
1130
|
-
|
1131
|
-
it { should be_allowed_run_anything.as('someotheruser').without_a_password }
|
1132
|
-
#As any user
|
1133
|
-
it { should be_allowed_run_anything.as_anybody }
|
1134
|
-
#As Any user without a password
|
1135
|
-
it { should be_allowed_run_anything.as_anybody.without_password }
|
1125
|
+
it { should be_allowed_to_run_command('/usr/bin/cat /var/log/messages') }
|
1126
|
+
it { should be_allowed_to_run_command('/usr/bin/cat /var/log/messages').as('user6') }
|
1127
|
+
it { should be_allowed_to_run_command('/usr/bin/cat /var/log/messages').as('user6').without_password }
|
1128
|
+
it { should be_allowed_to_run_command('/usr/bin/cat /var/log/secure').without_password }
|
1129
|
+
it { should be_allowed_to_run_command('/usr/bin/cat /tmp/logs').as_anybody }
|
1130
|
+
it { should be_allowed_to_run_command('/usr/bin/cat /tmp/logs').as_anybody.without_password }
|
1136
1131
|
end
|
1137
1132
|
```
|
1133
|
+
|
1138
1134
|
##### be_allowed_to_run_anything
|
1139
1135
|
Ensures the user can run a anything
|
1140
1136
|
```ruby
|
@@ -19,7 +19,7 @@ RSpec::Matchers.define :be_allowed_to_run_command do |command|
|
|
19
19
|
elsif @anybody
|
20
20
|
(actual.allowed_to_run_command?(command, 'ALL', @checkpw) || actual.allowed_to_run_command?(command, 'ALL:ALL', @checkpw))
|
21
21
|
else
|
22
|
-
actual.allowed_to_run_command?(command, @checkpw)
|
22
|
+
actual.allowed_to_run_command?(command, false, @checkpw)
|
23
23
|
end
|
24
24
|
end
|
25
25
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: serverspec-extra-types
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Wardrobe
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-07-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|