serverspec-extra-types 0.4.5 → 0.4.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 13915609f2ac72c2b26730ca0aa8d9758c4082c3552a28413230953fa486c560
4
- data.tar.gz: 4541bb5af5c5fdb65c8a46592e8c563a5c4f61c00584f43c2358ce665e346310
3
+ metadata.gz: 2577c03b1dc2888ae78a9fe968754f33b5b69e5cf5f7232bc62a51b64919ece8
4
+ data.tar.gz: f221aef4e11e3562f25c01faeed0210a7788f5c596a0e5c17bb3883d3b856ee6
5
5
  SHA512:
6
- metadata.gz: 59acd08fc5d4eb16244b65474882a3a94a1e5c7ee626d9f353e3cdcf8189496e58590adaa6dee240cfec59fc951121b2ab151b7220e3407850ee6d0dd39a7a01
7
- data.tar.gz: d31d5150fc84ea9c8c80dbe1c08bf986a78710c80507e8f482b7df3fd1a9f9e563ad3386c9fc24ab546769c8747e7dd7393653ad7311f2bd3b5aaa6f7951b819
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 be_allowed_run_anything }
1126
- # Without password
1127
- it { should be_allowed_run_anything.without_a_password }
1128
- #As a particular user
1129
- it { should be_allowed_run_anything.as('someotheruser') }
1130
- #As a particular user with out a password
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
@@ -18,7 +18,7 @@ RSpec::Matchers.define :be_allowed_to_run_anything do
18
18
  if @user
19
19
  actual.allowed_to_run_command?('ALL', @user, @checkpw)
20
20
  else
21
- actual.allowed_to_run_command?('ALL', @checkpw)
21
+ actual.allowed_to_run_command?('ALL', false, @checkpw)
22
22
  end
23
23
  end
24
24
 
@@ -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
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ServerspecExtraTypes
4
- VERSION = '0.4.5'
4
+ VERSION = '0.4.6'
5
5
  end
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.5
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-06-25 00:00:00.000000000 Z
11
+ date: 2019-07-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler