-
Notifications
You must be signed in to change notification settings - Fork 1
/
rules.raku
35 lines (19 loc) · 882 Bytes
/
rules.raku
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
directory-exists "{%*ENV<HOME>}";
file-exists "{%*ENV<HOME>}/.bashrc";
bash "echo hello > /tmp/bird.tmp";
bash "echo bird >> /tmp/bird.tmp";
file-has-line "/tmp/bird.tmp", "hello", "bird";
file-has-permission "documentation/dsl.md", %( read-all => True );
file-has-permission "bin/bird", %( execute-all => True, read-all => True );
bash "chmod a+r /tmp/bird.tmp";
bash "chmod a+w /tmp/bird.tmp";
file-has-permission "/tmp/bird.tmp", %( write-all => True, read-all => True );
command-has-stdout "echo hello; echo bird", "hello", "bird";
command-exit-code "raku --version", 0;
package-installed "nano";
pip3-package-installed "PyYAML";
file-has-permission "rules.raku", %( read-all => True );
package-installed "nano";
bash "echo username=admin > /tmp/creds.txt; echo password=123 >> /tmp/creds.txt;";
file-data-not-empty "/tmp/creds.txt",
"username=", "password=";