Commit graph

6428 commits

Author SHA1 Message Date
Bryan McLellan
241c1e7dfd Update the omnibus build license to the Chef EULA
The resulting distribuions are licensed under the Chef EULA.

Signed-off-by: Bryan McLellan <btm@loftninjas.org>
2019-05-08 11:12:45 -04:00
Miah Johnson
5a0913e3f6 Add missing tests for DataSeries#enabled? #disable
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-05-08 00:44:51 -07:00
Miah Johnson
d000f20f34 Update Collector#reset to clear telemetry_toggled_off
Updated the name of #reset -> #reset! as we are modifying state of a
singeton.

Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-05-08 00:36:45 -07:00
Miah Johnson
871b0e9a38 Ensure telemetry can be disabled
The #disable_telemetry method now toggles @telemetry_toggle_off.
The @telemetry_toggle_off is defaulted to false

The #telemetry_enabled? method now checks @telemetry_toggle_off
and we generally check the configuration. We do not flip
@telemetry_toggle_off based on the content of the configuration.

Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-05-08 00:30:24 -07:00
Miah Johnson
640d122327 Update Inspec::Config.mock in collector global methods
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-05-07 22:37:43 -07:00
Miah Johnson
046d4567ae rubocop
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-05-07 19:10:42 -07:00
Miah Johnson
0b9833dd96 condense true/false enabled tests
Because of the way the test system loads I cannot guarantee that
`Inspec::Config.cached` won't be nil. I have to always pass in a mock
config object with our setting.
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-05-07 19:06:38 -07:00
Miah Johnson
ea0643cc14 Handle load_config better
private method to minimize external interface
default enabled to false if unable to find setting in configuration
add reader for config

Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-05-07 19:04:51 -07:00
Miah Johnson
6881c210ad Gather all telemetry options and return them
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-05-07 19:03:30 -07:00
Miah Johnson
3695094218 cli -> --enable-telemetry and default to false
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-05-07 18:55:11 -07:00
Miah Johnson
659b4b373a Remove # encoding: utf8 magic comments
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-05-07 16:06:23 -07:00
Clinton Wolfe
609ca3d194
Bump website from 3.0 to 4. (#4022)
Bump website from 3.0 to 4.
2019-05-07 16:23:31 -04:00
mjingle
c2b6104ea5
Update www/source/index.html.slim
Co-Authored-By: zenspider <ryand-github@zenspider.com>
2019-05-07 12:17:05 -07:00
mjingle
a327323b65
Update www/source/index.html.slim
Co-Authored-By: zenspider <ryand-github@zenspider.com>
2019-05-07 12:16:31 -07:00
Chef Expeditor
663d80f6ed
Update CHANGELOG.md with details from pull request #4007
Obvious fix; these changes are the result of automation not creative thinking.
2019-05-07 19:01:21 +00:00
Clinton Wolfe
80b847ae83
Improve testing on inputs that do not have values (#4007)
Improve testing on inputs that do not have values
2019-05-07 15:01:09 -04:00
Chef Expeditor
1d3bd603aa
Bump version to 4.4.0 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2019-05-06 19:58:27 +00:00
Clinton Wolfe
ec91ac9ee0
Rename 'attribute' DSL method to 'input' (#4008)
Rename 'attribute' DSL method to 'input'
2019-05-06 15:58:09 -04:00
Clinton Wolfe
ad3a9f7807 Allow setting location when format is JSON, but default to STDERR
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-05-06 14:58:10 -04:00
Clinton Wolfe
329eee3782 Make inspec check respect logging destination
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-05-06 14:58:10 -04:00
Clinton Wolfe
ce16120b18 Failing functional test for running inspec check with a deprecation
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-05-06 14:58:10 -04:00
Artem Sidorenko
96353a708a First step to get inspec names changeable
for community distributions

Signed-off-by: Artem Sidorenko <artem.sidorenko@t-systems.com>
2019-05-06 18:40:35 +02:00
Miah Johnson
c9ae6a9d20 Add a missing doc
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-05-03 16:28:01 -07:00
Miah Johnson
b51ad8acb8 When telemetry is disabled Inspec.record_telemetry_data doesn't record
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-05-03 16:13:45 -07:00
Miah Johnson
ac2d782266 Pass in mock config object to tests and validate telemetry_enabled?
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-05-03 16:07:24 -07:00
Miah Johnson
f1b1b3eccf Ensure the collector is aware of the config class
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-05-03 16:06:25 -07:00
Miah Johnson
f7c667654a Configure expeditor to delete the branch after it is merged.
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-05-03 15:35:31 -07:00
Ryan Davis
476c6878b3 Modernize use of Minitest.
+ Turn off verbosity in Rakefile by default. Use `rake V=1` to turn back on.
+ MiniTest -> Minitest everywhere.
+ MiniTest::Unit::TestCase -> Minitest::Test everywhere.
+ Updated minitest doco urls to official and up-to-date site.
+ Normalize requires. Only needs "minitest/autorun" and "minitest/pride".

Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-05-03 15:01:57 -07:00
Ryan Davis
1a2429bcf8 Bump website from 3.0 to 4.
Specifically using "4" so we don't have to bump on every minor
release.

I mish-mashed the bullet points from 2 different sources. It is
probably wrong or confusing and I'd like extra scrutiny there.

I don't remember slim AT ALL and probably got some stuff wrong.

Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-05-03 14:38:06 -07:00
Chef Expeditor
04ad6351d8
Bump version to 4.3.5 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2019-05-03 17:52:04 +00:00
Clinton Wolfe
6fded953d6
Add inspec-*-bin to the plugin filter list (#4018)
Add inspec-*-bin to the plugin filter list
2019-05-03 13:51:45 -04:00
Miah Johnson
122246bcc4 load our configuration and set telemetry status
Allow overriding config object

Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-05-02 20:14:15 -07:00
Miah Johnson
78f7f000f5 Allow enabling or disabling telemetry from the cli
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-05-02 20:13:37 -07:00
Miah Johnson
b0ee14a204 Expose configuration for telemetry as method
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-05-02 20:12:53 -07:00
Clinton Wolfe
1d201ee56c Add inspec-*-bin to the plugin filter list
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-05-01 23:33:29 -04:00
Chef Expeditor
1bba904dad
Bump version to 4.3.4 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2019-05-01 19:00:55 +00:00
Miah Johnson
063a7d82e7
Merge pull request #4004 from inspec/mj/4003
Update resource registry_key documentation example
2019-05-01 12:00:36 -07:00
Chef Expeditor
9a15388431
Bump version to 4.3.3 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2019-05-01 18:24:53 +00:00
Miah Johnson
a5180126f1
Merge pull request #4014 from inspec/mj/readmeUpdate1
Update software names in readme
2019-05-01 11:24:38 -07:00
Mary Jinglewski
f196aa4985 Update software names in readme
Signed-off-by: Mary Jinglewski <mjinglewski@chef.io>
2019-05-01 14:14:59 -04:00
Clinton Wolfe
3bfc0cec68 Add input() DSL method, could use some DRY up
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-04-30 23:56:17 -04:00
Clinton Wolfe
e280990e76 Test fixtures and failing functional tests for DSL
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-04-30 23:54:29 -04:00
Clinton Wolfe
f54abf9719 How was value: ever working?
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-04-30 23:28:23 -04:00
Clinton Wolfe
4773023ef5 Add functional test to verify no-halt for undeclared inputs
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-04-30 22:51:56 -04:00
Clinton Wolfe
c4aa4314af Test fixture to exercise undeclared inputs
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-04-30 22:45:18 -04:00
Miah Johnson
5c00a44d71 Update resource registry_key documentation example
ref: https://github.com/inspec/inspec/issues/4003

Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-04-30 17:04:12 -07:00
Chef Expeditor
b4ae6cb342
Executed '.expeditor/update_dockerfile.sh'
Obvious fix; these changes are the result of automation not creative thinking.
2019-04-30 01:39:48 +00:00
Chef Expeditor
a6feb2f32c
Bump version to 4.3.2 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2019-04-30 00:43:30 +00:00
Clinton Wolfe
b5373dafd2
Update to Ruby 2.6.2 and Rubygems 3.0.3 (#3994)
Update to Ruby 2.6.2 and Rubygems 3.0.3
2019-04-29 20:43:16 -04:00
Tim Smith
45eadb69df Use File instead of IO
Signed-off-by: Tim Smith <tsmith@chef.io>
2019-04-29 17:09:48 -07:00