| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
ruby doesn't like optional hashes combined with optional named
parameters -- because hashes and kwargs get magically converted
and ruby gets confused.
plus fixed/added specs
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
| |
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
i believe this gets the logic correct in that we want to configure the
logger when we're coming from the command line but want to skip it when
we're coming from chef or from other APIs that directly construct an
Ohai::System object.
i suspect this is what thom was trying to do by moving the
Ohai::Log.init call into the Ohai::Application class (which avoids it
being called entirely when Chef creates its Ohai::System object) here:
https://github.com/chef/ohai/pull/942/files
but that change broke the behavior where we were also supposed to skip
the rest of the configure_logging method in Ohai::System when run under
chef client.
I tried going down the route of having the Ohai::Application class
construct the Ohai::System object and then having it be the
responsibility of that caller to do configure_logging work. However,
I suspect that the initializer in Ohai::System does way too much and
that the purpose of configuring the logger where it is, is that it
must be initialized in the middle of object creation before it goes on
and creates the Loader, the Runner, creates Hints and removes constants.
So, I went the route of threading a flag through the initializer so that
Ohai::System can know if its coming from the cli or not and behave
appropriately.
There's also quite a mess with the Ohai::Log class being passed around
to the workstation loader, and it initializes itself at class loading
time and Chef::Application will inject state into Ohai::Log. I think
the eager initialization at class loading time is to not lose early
messages when run from the cli, but it means the Ohai::Log object is always
initialized, so that isn't useful for determining if we have come from the
cli or not.
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
|
|
|
| |
this probably should have been done on master earlier since
breaking changes already went into ohai master
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|\
| |
| | |
Move duplicate http logic into a helper
|
| |
| |
| |
| |
| |
| | |
We probably want to use this in a few other places, but we certainly want to encourage people to use this in their plugins vs. reinventing the wheel.
Signed-off-by: Tim Smith <tsmith@chef.io>
|
|\ \
| | |
| | | |
autofixing new chefstyle issues
|
|/ /
| |
| |
| |
| |
| | |
prep for chefstyle 0.5.0 release to not break master
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|\ \
| |/
|/| |
Config is used in system so require it there.
|
| |
| |
| |
| |
| |
| | |
COOL team found this when using ohai/system directly. It worked in 8.X, but not post deprecation of the old config logic.
Signed-off-by: Tim Smith <tsmith@chef.io>
|
|\ \
| | |
| | | |
Remove a bit of dead code
|
| | |
| | |
| | |
| | | |
Signed-off-by: Tim Smith <tsmith@chef.io>
|
|\ \ \
| |/ /
|/| | |
Remove rescue loading plist in the specs as this is a dep
|
|/ /
| |
| |
| |
| |
| | |
There’s no need for this and we’re not doing this in the dozen other places we load deps.
Signed-off-by: Tim Smith <tsmith@chef.io>
|
|\ \
| |/
|/| |
Minor spec file cleanup
|
|/
|
|
|
|
|
|
|
|
|
|
|
| |
- Use require_relative in all the specs vs. expanding on the current file
path.
- Add missing license headers
- Don't silently swallow ipaddr_extensions not being installed. Make it
a development dep instead
- Remove a rescue on ipaddress as we only do this in one place and it's
a required gem
- Make the Openstack plugin spec setup the same way as every other spec
Signed-off-by: Tim Smith <tsmith@chef.io>
|
|\
| |
| | |
Update travis/appveyer preinstall to resolve rainbow failures
|
|/
|
|
|
|
| |
Update Rubygems, fully uninstall bundler, install the latest bundler.
Signed-off-by: Tim Smith <tsmith@chef.io>
|
|\
| |
| | |
Remove deprecated config logic
|
| |
| |
| |
| | |
Signed-off-by: Tim Smith <tsmith@chef.io>
|
| |
| |
| |
| | |
Signed-off-by: Tim Smith <tsmith@chef.io>
|
|\ \
| | |
| | | |
Remove the deprecated run_command and popen4 methods
|
| | |
| | |
| | |
| | |
| | |
| | | |
This is very much legacy and has long since been replaced by shell_out
Signed-off-by: Tim Smith <tsmith@chef.io>
|
|\ \ \
| | | |
| | | |
| | | |
| | | | |
chef/COOL-626/tduffield/use-cpu-name-for-model-name-windows
Use name for Windows CPU model_name
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Use the "name" value for the model_name, and move description to the
description field.
Signed-off-by: Tom Duffield <tom@chef.io>
|
|\ \ \ \
| | | | |
| | | | | |
Remove usage of the Sigar gem
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Sigar was a really cool idea, but it’s a dead project now. The data is questionable at best and not getting any better as time goes on. We should figure out how to support these platforms vs. hoping that Sigar is doing the right thing. This does remove a lot of support for HP-UX, but I seriously doubt it worked to begin with. We should do that right sometime.
Signed-off-by: Tim Smith <tsmith@chef.io>
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Require Ruby 2.2+
|
| | |_|_|/
| |/| | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
chef/chef already requires Ruby 2.2. We've removed support for Ruby 2.1
in our other projects and community tooling.
Signed-off-by: Tim Smith <tsmith@chef.io>
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Release 8.23.0
|
|/ / / / /
| | | | |
| | | | |
| | | | | |
Signed-off-by: Tim Smith <tsmith@chef.io>
|
| | | | |
| | | | |
| | | | |
| | | | | |
Signed-off-by: Tom Duffield <tom@chef.io>
|
|\ \ \ \ \
| | | | | |
| | | | | | |
C Plugin: Expand GCC data & only shellout to gcc if Xcode is installed on macOS
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Signed-off-by: Tim Smith <tsmith@chef.io>
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Signed-off-by: Tim Smith <tsmith@chef.io>
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Add specs for checking that xcode exists on darwin
Remove the odd double glibc mess
Don't do ruby logic in the expects. That defeats the entire purpose of
the specs if we're doing the same faulty logic. Just include the
expected string
Signed-off-by: Tim Smith <tsmith@chef.io>
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
None of the values were being populated with the refactoring. Also gcc
hadn’t been collecting anything for a while. This gives us real data
for gcc:
"c": {
"gcc": {
"configured_with":
"--prefix=/Applications/Xcode.app/Contents/Developer/usr
--with-gxx-include-dir=/usr/include/c++/4.2.1",
"description": "Apple LLVM version 8.0.0 (clang-800.0.42.1)",
"version": "8.0.0",
"target": "x86_64-apple-darwin16.3.0",
"thread_model": "posix"
}
},
|
| | | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
CC is clang on Darwin and the output is different so this just fails
every time. We *should* add clang checks at some point though.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
We’re only collecting this data on Windows now so don’t bother checking
if we’re on Windows again
|
| | | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
cl / devenv are windows only so avoid checking those on *nix
HP UX things should only get checked on HPUX
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Signed-off-by: Erik Gomez <e@eriknicolasgomez.com>
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Signed-off-by: Erik Gomez <e@eriknicolasgomez.com>
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Signed-off-by: Erik Gomez <e@eriknicolasgomez.com>
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Signed-off-by: Erik Gomez <e@eriknicolasgomez.com>
|
|/ / / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
If darwin is found:
1. shell out to /usr/bin/xcode-select -p
2a. If it returns an exit code other than 0, assume xcode command line tools are not installed and do not run these commands.
2b. If it returns an exit code of 0, run the commands.
Signed-off-by: Erik Gomez <e@eriknicolasgomez.com>
|
|\ \ \ \ \
| |/ / / /
|/| | | | |
|
|/ / / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
When we're running Ohai as a standalone application, we need to fire up
the logger with our desired location, but when we're run from inside
Chef, we're passed the client's loggers.
Signed-off-by: Thom May <thom@chef.io>
|
| | | |
| | | |
| | | |
| | | | |
Signed-off-by: Richard Shade <rshade@rightscale.com>
|