* Add support for `git@` and HTTP basic auth
This adds support for the following:
```
inspec exec git@github.com:private/example_profile
inspec exec https://username:token@github.com/private/example_profile
inspec exec https://username:password@webserver/private/example_profile
```
This also uses the Git fetcher when the URL ends in `.git`. Example:
```
git config credential.helper cache
git ls-remote https://github.com/private/example_profile.git
inspec exec https://github.com/private/example_profile.git
```
Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
* Add documentation for `inspec exec` usage
Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
* Add tests for Git fetcher and `inspec exec`
Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
* Add `opts` to branch of Git fetcher resolve logic
Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
* Modify Git example comments
Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
* Force `parse_uri` to attempt a parse
Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
* Fixing #3563; freebsd is not a substring of 'bsd'
* Actually, this is better.
* Change coditional for FreeBSD from a string match to a call to os.bsd?
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
* Allow add_test to accept negation
This will allow for negated tests to be generated with add_tests.
* Fix rubocop violation
* Add optional options hash
Signed-off-by: Rachel Rice <rrice@chef.io>
Methods like…
* `count()` return `Integer` values
* `boolean()` return `TrueClass`/`FalseClass` values
* `concat()` return `String` values
…but threw exceptions because those types weren't supported.
This adds support to the `xml` resource, and adds tests to verify some of those examples.
Signed-off-by: Mark Hughes <greenantdotcom@users.noreply.github.com>
* Failing functional test for RSpec should deprecation
* Configure RSpec to allow .should calls
* Remove cruft from test files where we needed to filter deprecation warning
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
* Fixes (some) ruby warnings related to functional tests
* Removes unneeded `Dir.tmpdir` from test
Signed-off-by: David Alexander <opensource@thelonelyghost.com>
This prevents errors on systems without `ENV['HOME']` (e.g. Habitat
services) by allowing the specification of the location of `.inspec` via
`ENV['INSPEC_CONFIG_DIR']`.
Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
* ✓ adds additional checks for vendored profiles
This PR adds additional checks to verify if:
- inspec.yml and inspec.lock dependencies are out-of-sync
- complains about a missing lock file if we have dependencies defined
* skip if legacy profile path is used
* Fix unit tests.
* Force static sha256 for lock files and protect from unnamed depends.
* Add vendor profiles for checks. Windows downloads with different sha256.
* Adding inspec init profile for GCP.
* Adding final newline, thanks rubocop.
* Ensure README headings are at the same level.
* Move OS-specific default profile to new location
* Enforce os-platform restriction on default profile template
* Use profile templates in subdirs.
* Updates to address PR feedback after rebasing from #3491.
* Alter test setup to properly use YAML
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>