Ryan Davis
adaf2bc364
Removed aws resource requiring from test/helper and inspec/resource.
...
This speeds up parallel unit test runs from a very consistent 2:49 to
a very consistent 1:53, or a 33% reduction.
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-05-29 17:58:02 -07:00
Chef Expeditor
15c770183f
Bump version to 4.4.59 by Chef Expeditor
...
Obvious fix; these changes are the result of automation not creative thinking.
2019-05-29 23:52:19 +00:00
Ryan Davis
fcb65b2ffb
Fixed Inspec::Dist on habitat CLI.
...
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-05-29 16:22:28 -07:00
Chef Expeditor
1fc518c588
Bump version to 4.4.58 by Chef Expeditor
...
Obvious fix; these changes are the result of automation not creative thinking.
2019-05-29 02:24:01 +00:00
Chef Expeditor
9007dbb540
Bump version to 4.4.57 by Chef Expeditor
...
Obvious fix; these changes are the result of automation not creative thinking.
2019-05-28 21:17:53 +00:00
Miah Johnson
365810a622
Merge pull request #4136 from artem-forks/debranding-plugin-manager-cli
...
Dist branding for some of plugins
2019-05-28 14:17:36 -07:00
Chef Expeditor
2d528f5899
Bump version to 4.4.56 by Chef Expeditor
...
Obvious fix; these changes are the result of automation not creative thinking.
2019-05-28 20:06:10 +00:00
Miah Johnson
6c19e81a06
Remove authors tags from source files.
...
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-05-28 12:47:39 -07:00
Artem Sidorenko
eee2199960
Dist branding for plugins/inspec-compliance
...
Signed-off-by: Artem Sidorenko <artem.sidorenko@t-systems.com>
2019-05-28 21:00:56 +02:00
Artem Sidorenko
e468c592ca
Dist branding for plugins/inspec-habitat
...
Signed-off-by: Artem Sidorenko <artem.sidorenko@t-systems.com>
2019-05-28 21:00:56 +02:00
Artem Sidorenko
4c0260aedd
Dist branding for plugins/inspec-artifact
...
Signed-off-by: Artem Sidorenko <artem.sidorenko@t-systems.com>
2019-05-28 21:00:49 +02:00
Artem Sidorenko
5a2bf961f8
Dist branding for plugins/inspec-plugin-manager-cli
...
Signed-off-by: Artem Sidorenko <artem.sidorenko@t-systems.com>
2019-05-28 21:00:36 +02:00
Chef Expeditor
85f2dcccb8
Bump version to 4.4.55 by Chef Expeditor
...
Obvious fix; these changes are the result of automation not creative thinking.
2019-05-28 18:44:58 +00:00
Clinton Wolfe
c8f0de05af
inspec check: Send log to STDERR when running with --format json ( #4001 )
...
inspec check: Send log to STDERR when running with --format json
2019-05-28 14:44:44 -04:00
Chef Expeditor
54a75f7d62
Bump version to 4.4.54 by Chef Expeditor
...
Obvious fix; these changes are the result of automation not creative thinking.
2019-05-28 18:35:11 +00:00
Miah Johnson
2215bb0570
Update all require
s pointing to util/
...
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-05-28 11:30:16 -07:00
Miah Johnson
86e638ee20
Move lib/utils -> lib/inspec/utils
...
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-05-28 11:29:16 -07:00
Chef Expeditor
ea959d32ba
Bump version to 4.4.53 by Chef Expeditor
...
Obvious fix; these changes are the result of automation not creative thinking.
2019-05-28 18:12:59 +00:00
Chef Expeditor
1065d3ff1d
Bump version to 4.4.52 by Chef Expeditor
...
Obvious fix; these changes are the result of automation not creative thinking.
2019-05-28 18:08:38 +00:00
Chef Expeditor
333b2a4f7a
Bump version to 4.4.51 by Chef Expeditor
...
Obvious fix; these changes are the result of automation not creative thinking.
2019-05-28 18:01:36 +00:00
Chef Expeditor
96e36c423b
Bump version to 4.4.50 by Chef Expeditor
...
Obvious fix; these changes are the result of automation not creative thinking.
2019-05-28 17:58:43 +00:00
Ryan Davis
f36a7c8061
No tabs.
...
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-05-25 03:40:36 -07:00
Chef Expeditor
06e517ba07
Bump version to 4.4.49 by Chef Expeditor
...
Obvious fix; these changes are the result of automation not creative thinking.
2019-05-22 19:35:42 +00:00
Chef Expeditor
c72d8bc2aa
Bump version to 4.4.48 by Chef Expeditor
...
Obvious fix; these changes are the result of automation not creative thinking.
2019-05-21 23:50:36 +00:00
Chef Expeditor
b1191f1b65
Bump version to 4.4.47 by Chef Expeditor
...
Obvious fix; these changes are the result of automation not creative thinking.
2019-05-21 19:45:35 +00:00
Miah Johnson
fb0993e0f2
Merge pull request #4089 from mirskiy/github_url_regex_bug
...
Fix github url regex. Add period for repo
2019-05-21 12:45:18 -07:00
Chef Expeditor
869103dccf
Bump version to 4.4.46 by Chef Expeditor
...
Obvious fix; these changes are the result of automation not creative thinking.
2019-05-21 02:52:43 +00:00
Miah Johnson
83bc512f3e
Merge pull request #4104 from inspec/mj/aws
...
Ensure AwsResourceMixin returns a resource name in deprecation message
2019-05-20 19:52:27 -07:00
Chef Expeditor
f20cc5508a
Bump version to 4.4.45 by Chef Expeditor
...
Obvious fix; these changes are the result of automation not creative thinking.
2019-05-20 20:10:45 +00:00
Miah Johnson
27ee7a1a63
Merge pull request #4107 from inspec/zenspider/telemetry_requires
...
Minor require cleanup for telemetry.
2019-05-20 13:10:30 -07:00
Ryan Davis
9c6965b2ed
Minor require cleanup for telemetry.
...
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-05-20 13:09:38 -07:00
Chef Expeditor
2ce931f6d5
Bump version to 4.4.44 by Chef Expeditor
...
Obvious fix; these changes are the result of automation not creative thinking.
2019-05-20 20:09:32 +00:00
Chef Expeditor
f71e7febf9
Bump version to 4.4.43 by Chef Expeditor
...
Obvious fix; these changes are the result of automation not creative thinking.
2019-05-20 20:08:51 +00:00
Miah Johnson
2df6dc2ea8
Merge pull request #4100 from inspec/zenspider/fix-missing-requires
...
Fixed missing requires.
2019-05-20 13:08:46 -07:00
Chef Expeditor
106bc6cdda
Bump version to 4.4.42 by Chef Expeditor
...
Obvious fix; these changes are the result of automation not creative thinking.
2019-05-20 20:08:10 +00:00
Miah Johnson
d1358df59f
Merge pull request #4115 from inspec/zenspider/clean_method_call_pattern
...
Stop using method(...).call(...)
2019-05-20 13:07:43 -07:00
Chef Expeditor
c1e022bd3c
Bump version to 4.4.41 by Chef Expeditor
...
Obvious fix; these changes are the result of automation not creative thinking.
2019-05-20 20:07:21 +00:00
Miah Johnson
36029da0a3
Merge pull request #4116 from inspec/zenspider/clean_more_requires
...
Clean more requires
2019-05-20 13:07:04 -07:00
Chef Expeditor
4cd62d3d30
Bump version to 4.4.40 by Chef Expeditor
...
Obvious fix; these changes are the result of automation not creative thinking.
2019-05-20 20:04:49 +00:00
Miah Johnson
1fe48f2e7b
Merge pull request #4113 from inspec/zenspider/use_math_for_perms
...
Just use math.
2019-05-20 13:04:24 -07:00
Chef Expeditor
499e99f2ba
Bump version to 4.4.39 by Chef Expeditor
...
Obvious fix; these changes are the result of automation not creative thinking.
2019-05-20 20:03:36 +00:00
Ryan Davis
e1061f41f2
Clean more requires
...
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-05-20 13:01:18 -07:00
Chef Expeditor
461991a1a3
Bump version to 4.4.38 by Chef Expeditor
...
Obvious fix; these changes are the result of automation not creative thinking.
2019-05-20 19:58:42 +00:00
Chef Expeditor
01dee92ca2
Bump version to 4.4.37 by Chef Expeditor
...
Obvious fix; these changes are the result of automation not creative thinking.
2019-05-20 19:57:23 +00:00
Miah Johnson
69151ced56
Merge pull request #4119 from inspec/mj/missing_requires
...
Fix missing requires in toml, postgres_conf resources
2019-05-20 12:56:59 -07:00
Chef Expeditor
da57262892
Bump version to 4.4.36 by Chef Expeditor
...
Obvious fix; these changes are the result of automation not creative thinking.
2019-05-20 19:56:40 +00:00
Miah Johnson
b6c86bfad8
Merge pull request #4118 from inspec/mj/rtjson
...
json was required twice.
2019-05-20 12:56:27 -07:00
Miah Johnson
94f14bae20
Fix missing requires in toml, postgres_conf resources
...
toml was missing json
postgres_conf was missing object_traversal
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-05-19 11:31:59 -07:00
Miah Johnson
e514fbff90
json was required twice.
...
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-05-19 11:02:02 -07:00
Ryan Davis
7e5c27410e
This is one place where rubocop and I strongly disagree.
...
Using self.something makes it more clear. Sometimes that is necessary.
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-05-18 21:04:27 -07:00
Ryan Davis
22a3ee5855
Fixed missing requires.
...
Telemetry tests were hitting inspec/config via a different route and
inspec/config uses forwardable w/o requiring.
lib/plugins/inspec-compliance/test/unit/api_test.rb had a test that
had never run before and required webmock.
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-05-18 21:02:13 -07:00
Chef Expeditor
7fb177a691
Bump version to 4.4.35 by Chef Expeditor
...
Obvious fix; these changes are the result of automation not creative thinking.
2019-05-19 01:08:41 +00:00
Ryan Davis
03a1fba565
Stop using method(...).call(...)
...
Use send. It's **vastly** faster:
```
Comparison:
send: 6364383.9 i/s
method+call: 2530347.8 i/s - 2.52x slower
```
Also removed a bunch of unnecessary to_sym's. Ruby doesn't care.
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-05-18 16:53:33 -07:00
Ryan Davis
fe82931b39
Just use math.
...
I don't know what the reasoning is behind the rjust & the format
call... String converting between octal to binary in order to get an
integer? Instead, this converts from an octal string and uses
straight-forward binary manipulation and logic.
Please avoid `cond ? false : true` like constructs. Use `!cond` instead.
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-05-18 15:50:01 -07:00
Chef Expeditor
d665efc8c8
Bump version to 4.4.34 by Chef Expeditor
...
Obvious fix; these changes are the result of automation not creative thinking.
2019-05-18 22:44:42 +00:00
Ryan Davis
62890e4809
This needed to be a flat_map because :profiles was an array.
...
Entirely on me. Pushing this through to rectify my mistake in review.
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-05-18 15:16:09 -07:00
Chef Expeditor
f1654c02d2
Bump version to 4.4.33 by Chef Expeditor
...
Obvious fix; these changes are the result of automation not creative thinking.
2019-05-18 22:01:01 +00:00
Ryan Davis
8ea1889001
Merge pull request #4079 from inspec/mj/cli_warn
...
Fix @unique_controls uninitialized warning
2019-05-18 15:00:47 -07:00
Chef Expeditor
87db267ef1
Bump version to 4.4.32 by Chef Expeditor
...
Obvious fix; these changes are the result of automation not creative thinking.
2019-05-18 21:29:49 +00:00
Ryan Davis
9b7c292d4c
Use IO globals instead of IO constants.
...
Helps testing and lots of other things if we only use $stdout/$stderr.
STDOUT/STDERR should only be used to restore the globals.
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-05-18 12:48:18 -07:00
Dan Mirsky
1e20e2998e
Fix github tree url regex. Add period for repo
...
Signed-off-by: Dan Mirsky <mirskiy@gmail.com>
2019-05-18 10:50:39 -07:00
Miah Johnson
a3c55ea49f
We didn't need a Set!
...
Update this based on feedback from @zenspider
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-05-18 00:00:59 -07:00
Miah Johnson
2181b9a76b
Ensure AwsResourceMixin returns a resource name
...
`@__resource_name` may be nil, so return our resource name via
`self.class.to_s`. This isn't perfect, is there something better to use
here?
.[2019-05-17T20:14:37-07:00] WARN: DEPRECATION: AWS resources shipped with core InSpec are being to moved to a resource pack for faster iteration. Please update your profiles to depend on git@github.com:inspec/inspec-aws.git . Resource 'AwsElbs'
AwsElbs? This is the `aws_elbs` resource, this is not user-friendly. :(
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-05-17 20:15:21 -07:00
Chef Expeditor
a0f9487f9d
Bump version to 4.4.31 by Chef Expeditor
...
Obvious fix; these changes are the result of automation not creative thinking.
2019-05-18 00:55:15 +00:00
Miah Johnson
3db8d93fe5
Use #key? rather than #has_key? in profile_name ternary
...
lib/inspec/profile_context.rb:28:29: C: [Corrected] Style/PreferredHashMethods: Use Hash#key? instead of Hash#has_key?.
@profile_name = @conf.has_key?('profile') ? @conf['profile'].profile_name : @profile_id
^^^^^^^^
355 files inspected, 1 offense detected, 1 offense corrected
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-05-17 16:39:14 -07:00
Chef Expeditor
40ef08183b
Bump version to 4.4.30 by Chef Expeditor
...
Obvious fix; these changes are the result of automation not creative thinking.
2019-05-17 22:21:51 +00:00
Miah Johnson
ee899d694f
Merge pull request #4081 from inspec/mj/profile_context
...
Fix @profile_name not initialized
2019-05-17 15:21:38 -07:00
Chef Expeditor
b51608e629
Bump version to 4.4.29 by Chef Expeditor
...
Obvious fix; these changes are the result of automation not creative thinking.
2019-05-17 22:20:59 +00:00
Miah Johnson
0e896221e5
Merge pull request #4083 from inspec/mj/circular-telemetry
...
Fix circular require in telemetry
2019-05-17 15:20:43 -07:00
Chef Expeditor
a4f039adff
Bump version to 4.4.28 by Chef Expeditor
...
Obvious fix; these changes are the result of automation not creative thinking.
2019-05-17 21:38:26 +00:00
Ryan Davis
9b0d8edfb4
Fixed another bad test interaction.
...
This time between:
+ PluginManagerCliDefinitionTests#(?:test_plugin_registered
+ PluginLoaderTests#test_load_mock_plugin_by_gem
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-05-17 02:26:07 -07:00
Ryan Davis
3ba7aecffb
Skips the one test that hits rspec directly and causes mocha to blow out afterwards
...
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-05-17 02:26:07 -07:00
Ryan Davis
ec9121dafe
Cleanup long lines for readability / debugging.
...
Also asked a couple q's in TODO lines.
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-05-17 02:26:07 -07:00
Ryan Davis
8ec76e666e
Fixed assignment to RUBY_VERSION.
...
Lost in a sea of deprecation warnings.
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-05-17 02:26:07 -07:00
Ryan Davis
a53d118b3f
Punting on 2 tests in inspec-plugin-manager-cli.
...
These two tests make assumptions that are not valid when bundler is
not being used.
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-05-17 02:26:07 -07:00
Ryan Davis
e16657883a
Fixed referenced urls so we can find the cited code again.
...
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-05-17 02:26:06 -07:00
Ryan Davis
7935d5553d
Fix how we're running inspec to include local lib dir.
...
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-05-17 02:26:06 -07:00
Ryan Davis
e7348f4d72
Add minitest/hell and parallelize_me! to the plugin tests.
...
We already do this in test/helper.rb so we might as well do it here.
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-05-17 02:26:06 -07:00
Ryan Davis
0c9644c1c2
Use RbConfig::CONFIG instead of Gem.ruby_version for plugin_gem_path
...
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-05-17 02:26:06 -07:00
Ryan Davis
6235c3f658
Fixed missing requires
...
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-05-17 02:26:06 -07:00
Ryan Davis
cdf95cd160
Fixed 3 failures in cmp matcher.
...
+ float? comparison can raise a TypeError
+ octal? comparison was allowing non-octal values (which cast to 0)
+ symbol comparison was casting to a string, but then doing an == check instead of casecmp.
The latter seems optional, but consistent with the intent of cmp.
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-05-17 02:26:06 -07:00
Ryan Davis
bc249a78cb
Changed cmp matcher to use send.
...
obj.method(name).call(*args) == obj.send(name, *args)
```
Calculating -------------------------------------
method+call 2.561M (± 2.2%) i/s - 12.816M in 5.006835s
send 6.299M (± 2.4%) i/s - 31.501M in 5.004045s
Comparison:
send: 6299002.5 i/s
method+call: 2560909.2 i/s - 2.46x slower
```
There aren't any direct tests for this? But I forcefully failed 2
functionals and then verified they passed after my change.
Not sure how (or if) to write tests against rspec matchers in a
meaningful way, even tho all I really want to test is a plain ole
method in it. I'll poke to see if it is possible / practical.
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-05-17 02:26:06 -07:00
Ryan Davis
427d59f13f
Fixes loading of Telemetry::DataSeries (and neighbors) in isolation.
...
Fixes telemetry tests when run individually.
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-05-17 02:26:06 -07:00
Chef Expeditor
e251ebf22b
Bump version to 4.4.27 by Chef Expeditor
...
Obvious fix; these changes are the result of automation not creative thinking.
2019-05-16 23:57:46 +00:00
Lynn Frank
4511ac6aaf
Updates the init plugin desc to show proper usage
...
Obvious fix.
2019-05-16 16:43:05 -05:00
Chef Expeditor
506cb5a6a2
Bump version to 4.4.26 by Chef Expeditor
...
Obvious fix; these changes are the result of automation not creative thinking.
2019-05-16 18:45:27 +00:00
Miah Johnson
6a60f6137f
Don't require telemetry/global_methods to prevent circular require
...
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-05-16 00:45:58 -07:00
Miah Johnson
75f071ae48
require telemetry/global_methods
...
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-05-16 00:45:24 -07:00
Miah Johnson
d70172f96e
Fix @profile_name not initialized
...
I believe that if `@conf['profile']` doesn't exist @profile_name may not
be initialized.
```
inspec-master/lib/inspec/profile_context.rb:35: warning: instance variable @profile_name not initialized
```
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-05-16 00:22:27 -07:00
Miah Johnson
083c6c0bae
Fix @unique_controls uninitialized warning
...
memoize @unique_controls to a Set if nil and
check that its empty? to continue and add controls
/home/miah/projects/github/inspec-master/lib/inspec/reporters/cli.rb:169: warning: instance variable @unique_controls not initialized
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-05-15 17:29:37 -07:00
Chef Expeditor
67929db658
Bump version to 4.4.25 by Chef Expeditor
...
Obvious fix; these changes are the result of automation not creative thinking.
2019-05-15 23:50:31 +00:00
Chef Expeditor
39dd4128d0
Bump version to 4.4.24 by Chef Expeditor
...
Obvious fix; these changes are the result of automation not creative thinking.
2019-05-15 22:55:39 +00:00
Chef Expeditor
77f0efd1e8
Bump version to 4.4.23 by Chef Expeditor
...
Obvious fix; these changes are the result of automation not creative thinking.
2019-05-15 22:40:48 +00:00
Chef Expeditor
043790dcb3
Bump version to 4.4.22 by Chef Expeditor
...
Obvious fix; these changes are the result of automation not creative thinking.
2019-05-15 22:40:03 +00:00
Chef Expeditor
e470937ee3
Bump version to 4.4.21 by Chef Expeditor
...
Obvious fix; these changes are the result of automation not creative thinking.
2019-05-15 21:43:57 +00:00
Chef Expeditor
060e00e6e2
Bump version to 4.4.20 by Chef Expeditor
...
Obvious fix; these changes are the result of automation not creative thinking.
2019-05-15 20:44:39 +00:00
Chef Expeditor
07082f2473
Bump version to 4.4.19 by Chef Expeditor
...
Obvious fix; these changes are the result of automation not creative thinking.
2019-05-15 20:36:53 +00:00
Chef Expeditor
2b54b0bede
Bump version to 4.4.18 by Chef Expeditor
...
Obvious fix; these changes are the result of automation not creative thinking.
2019-05-15 19:31:33 +00:00
Miah Johnson
947e7ddad9
Merge pull request #4052 from aaronlippold/al/mssql-session-fix
...
Removed unneeded 'supports: windows'
2019-05-15 12:31:18 -07:00
Chef Expeditor
11f5c311d2
Bump version to 4.4.17 by Chef Expeditor
...
Obvious fix; these changes are the result of automation not creative thinking.
2019-05-15 17:55:57 +00:00