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
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
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
Miah Johnson
bb92546bf2
Merge pull request #4037 from inspec/ap/improve-postgres-resource
...
Make the postgres resource more defensive
2019-05-15 10:55:41 -07:00
Chef Expeditor
73d6b6953f
Bump version to 4.4.16 by Chef Expeditor
...
Obvious fix; these changes are the result of automation not creative thinking.
2019-05-15 17:05:18 +00:00
Chef Expeditor
7381a6902f
Bump version to 4.4.15 by Chef Expeditor
...
Obvious fix; these changes are the result of automation not creative thinking.
2019-05-15 08:39:16 +00:00
Ryan Davis
f5d35494d9
Pulling requires out of often called methods.
...
While debugging this hairy situation, I had hooked require to try to
figure out sequencing. These requires were called thousands upon
thousands of times, creating a lot of noise and having no benefit
other than a possible savings of a few millisecond on an already slow
startup.
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-05-14 23:25:28 -07:00
Ryan Davis
6adf1d2560
Remove all byebug requires in code.
...
Please don't leave debugging remnants in the code.
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-05-14 23:24:14 -07:00
Chef Expeditor
e2426bf6b6
Bump version to 4.4.14 by Chef Expeditor
...
Obvious fix; these changes are the result of automation not creative thinking.
2019-05-10 22:17:53 +00:00
Aaron Lippold
8a20c63c05
Removed unneeded 'supports: windows'
...
Microsoft now support `sqlcmd` on all platforms so we can support
all platforms as runners. Without this I cannot run mssql profiles from
osx or linux runners.
https://docs.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server?view=sql-server-2017#os-x-1011-el-capitan-and-macos-1012-sierra
Signed-off-by: Aaron Lippold <lippold@gmail.com>
2019-05-09 17:02:16 -04:00
Miah Johnson
f7575cca00
Remove more magic comments
...
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-05-09 13:24:25 -07:00
Chef Expeditor
9cbd7c395f
Bump version to 4.4.13 by Chef Expeditor
...
Obvious fix; these changes are the result of automation not creative thinking.
2019-05-09 17:56:53 +00:00
Alex Pop
1f32d92f78
updates based on PR feedback
...
Signed-off-by: Alex Pop <alexpop@users.noreply.github.com>
2019-05-09 09:14:03 +01:00
Alex Pop
902920f0fa
Make the postgres resource more defensive
...
Signed-off-by: Alex Pop <alexpop@users.noreply.github.com>
2019-05-09 08:43:31 +01:00
Chef Expeditor
5d6bb7753f
Bump version to 4.4.12 by Chef Expeditor
...
Obvious fix; these changes are the result of automation not creative thinking.
2019-05-09 06:49:40 +00:00
Miah Johnson
bf28482350
Merge pull request #4043 from inspec/ap/no-resource-capitalize
...
Wrap resources in backticks and remove resource name capitalizing
2019-05-08 23:49:25 -07:00