Commit graph

18 commits

Author SHA1 Message Date
Dominik Richter
2db8d83d56 support intra-libraries file referencing + loading
solves https://github.com/chef/inspec/issues/779
2016-06-03 22:54:35 +02:00
Dominik Richter
a809097d12 simplify full_id generation 2016-05-06 13:14:40 +02:00
Dominik Richter
c55fb0b587 prevent only_ifs from getting overwritten 2016-04-06 10:46:36 +02:00
Dominik Richter
a72fee6623 add only_if for controls 2016-04-06 10:46:36 +02:00
Dominik Richter
c73afd4c1c overhault rule/control internals
instead of keeping them as flat variables, prefix all internals with `__` to create consistency. Also add accessors on the class-level to expose these values in all rules. This way we keep all variable-names in one location and get some safety on access.
2016-04-06 10:46:36 +02:00
Dominik Richter
598e8be07f don't remove controls with only_if
instead mark them as skipped, but don't just remove them.

This also introduced a number of tests around only_if on the global level
2016-04-06 10:15:53 +02:00
Alex Pop
3c3d711dfd bugfix: fix rare inspec shell missing all resources
In some instances, when running inspec shell, you dont get any resources inside of it. i.e. `inspec shell` and then `os` will lead to

```ruby
NameError: undefined local variable or method `os' for
from (pry):1:in `add_content'
```

This is because of instance_eval loading withing the given source/line
information and not attaching to the profile context which actually has
all the resources. Fix it by making sure that inspec shell always
attaches to the profile context with resources by providing nil for
source and line information.
2016-03-24 20:37:46 +01:00
Dominik Richter
ccf2694940 bugfix: inheritance of local profiles 2016-03-08 14:59:14 +01:00
Dominik Richter
e9ffc85b53 test for empty global describe block 2016-02-25 14:30:27 +01:00
Dominik Richter
3ae50adae9 feature: conditional OR via describe.one
```
describe.one do
  describe command("uname -r").stdout do
    it { should_not match /x86_64/ }
  end
  describe test_sth_for_x64_processors do
    ...
  end
end
```
2016-02-25 14:30:23 +01:00
Dominik Richter
7473dea1f2 ignore auto-generated controls during verify check 2015-12-23 11:11:49 +01:00
Dominik Richter
d9ded1d38d test for multiple computed calls to flat describe 2015-11-19 14:28:37 +01:00
Dominik Richter
3afd0d556d fix typos
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-11-19 14:17:18 +01:00
Dominik Richter
b58a4b3f43 rename vulcanosec -> inspec 2015-10-26 12:34:15 +01:00
Dominik Richter
20dae26925 split methods for processing rules and checks after loading 2015-10-19 09:49:40 +02:00
Dominik Richter
d66f874e1c feature: support expect keyword in rules 2015-10-18 19:14:22 +02:00
Dominik Richter
f2e955eb37 test: add tests for rule.describe 2015-10-18 19:11:56 +02:00
Dominik Richter
b38adfc6b2 test: add profile context tests 2015-10-18 19:11:56 +02:00