summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* refactor to use the config flag because the initalizer is awfullcg/fix-loggerLamont Granquist2017-02-283-19/+22
| | | | | | | | | | 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>
* add some comments to the codeLamont Granquist2017-02-272-0/+6
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix ohai logger problems.Lamont Granquist2017-02-273-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* bump ohai version to 13.0.0 for chef-13 developmentLamont Granquist2017-02-231-2/+2
| | | | | | | 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>
* Merge pull request #951 from chef/http_helperTim Smith2017-02-105-62/+62
|\ | | | | Move duplicate http logic into a helper
| * Move duplicate http logic into a helperhttp_helperTim Smith2017-02-035-62/+62
| | | | | | | | | | | | 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>
* | Merge pull request #954 from chef/lcg/chefstyleLamont Granquist2017-02-0921-54/+62
|\ \ | | | | | | autofixing new chefstyle issues
| * | autofixing new chefstyle issueslcg/chefstyleLamont Granquist2017-02-0921-54/+62
|/ / | | | | | | | | | | prep for chefstyle 0.5.0 release to not break master Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | Merge pull request #947 from chef/require_configThom May2017-01-271-0/+1
|\ \ | |/ |/| Config is used in system so require it there.
| * Config is used in system so require it there.require_configTim Smith2017-01-261-0/+1
| | | | | | | | | | | | 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>
* | Merge pull request #949 from chef/dead_codeThom May2017-01-263-11/+0
|\ \ | | | | | | Remove a bit of dead code
| * | Remove a bit of dead codedead_codeTim Smith2017-01-253-11/+0
| | | | | | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* | | Merge pull request #950 from chef/more_minor_specThom May2017-01-261-7/+0
|\ \ \ | |/ / |/| | Remove rescue loading plist in the specs as this is a dep
| * | Remove rescue loading plist in the specs as this is a depmore_minor_specTim Smith2017-01-251-7/+0
|/ / | | | | | | | | | | 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>
* | Merge pull request #948 from chef/minor_spec_cleanupThom May2017-01-25152-181/+247
|\ \ | |/ |/| Minor spec file cleanup
| * Minor spec file cleanupminor_spec_cleanupTim Smith2017-01-24152-181/+247
|/ | | | | | | | | | | | | - 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>
* Merge pull request #946 from chef/fix_travisTim Smith2017-01-243-6/+8
|\ | | | | Update travis/appveyer preinstall to resolve rainbow failures
| * Update travis/appveyer preinstallsTim Smith2017-01-243-6/+8
|/ | | | | | Update Rubygems, fully uninstall bundler, install the latest bundler. Signed-off-by: Tim Smith <tsmith@chef.io>
* Merge pull request #939 from chef/deprecate_old_configTim Smith2017-01-245-271/+2
|\ | | | | Remove deprecated config logic
| * Remove testing of old config logicdeprecate_old_configTim Smith2017-01-083-183/+0
| | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * Remove deprecated config logicTim Smith2017-01-082-88/+2
| | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* | Merge pull request #933 from chef/commandTim Smith2017-01-242-386/+1
|\ \ | | | | | | Remove the deprecated run_command and popen4 methods
| * | Remove the deprecated run_command and popen4 methodscommandTim Smith2016-12-202-386/+1
| | | | | | | | | | | | | | | | | | This is very much legacy and has long since been replaced by shell_out Signed-off-by: Tim Smith <tsmith@chef.io>
* | | Merge pull request #918 from ↵Tim Smith2017-01-242-2/+10
|\ \ \ | | | | | | | | | | | | | | | | chef/COOL-626/tduffield/use-cpu-name-for-model-name-windows Use name for Windows CPU model_name
| * | | Use name for Windows CPU model_nameCOOL-626/tduffield/use-cpu-name-for-model-name-windowsTom Duffield2016-12-022-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the "name" value for the model_name, and move description to the description field. Signed-off-by: Tom Duffield <tom@chef.io>
* | | | Merge pull request #930 from chef/sigarTim Smith2017-01-2413-675/+16
|\ \ \ \ | | | | | | | | | | Remove usage of the Sigar gem
| * | | | Remove usage of the Sigar gemsigarTim Smith2016-12-2013-675/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | Merge pull request #938 from chef/ruby22Tim Smith2017-01-244-4/+2
|\ \ \ \ \ | | | | | | | | | | | | Require Ruby 2.2+
| * | | | | Require Ruby 2.2+ruby22Tim Smith2017-01-134-4/+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>
* | | | | Merge pull request #945 from chef/8.23v8.23.0ohai-8Tim Smith2017-01-243-2/+33
|\ \ \ \ \ | | | | | | | | | | | | Release 8.23.0
| * | | | | Release 8.23.0Tim Smith2017-01-243-2/+33
|/ / / / / | | | | | | | | | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* | | | | Release 8.22.1Tom Duffield2017-01-231-1/+1
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Tom Duffield <tom@chef.io>
* | | | | Merge pull request #944 from chef/pr/9418.22.1Tim Smith2017-01-233-310/+419
|\ \ \ \ \ | | | | | | | | | | | | C Plugin: Expand GCC data & only shellout to gcc if Xcode is installed on macOS
| * | | | | Only look for xlc on AIX and rename collect_cc to collect_sunproTim Smith2017-01-232-40/+52
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * | | | | Update release notes and chefstyle fixespr/941Tim Smith2017-01-232-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * | | | | Rework the specs to be platform specificTim Smith2017-01-202-263/+290
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | | Fix gcc data collectionTim Smith2017-01-201-36/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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" } },
| * | | | | Update GCC sample outputTim Smith2017-01-202-18/+23
| | | | | |
| * | | | | Don't check CC on DarwinTim Smith2017-01-201-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | | | Remove extra windows check for glibcTim Smith2017-01-201-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We’re only collecting this data on Windows now so don’t bother checking if we’re on Windows again
| * | | | | Consistent loggingTim Smith2017-01-201-4/+3
| | | | | |
| * | | | | Further split out platforms in the C pluginTim Smith2017-01-201-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cl / devenv are windows only so avoid checking those on *nix HP UX things should only get checked on HPUX
| * | | | | add colons back to debug logErik Gomez2017-01-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Erik Gomez <e@eriknicolasgomez.com>
| * | | | | move functions to topErik Gomez2017-01-201-25/+27
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Erik Gomez <e@eriknicolasgomez.com>
| * | | | | fixed ChefstyleErik Gomez2017-01-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Erik Gomez <e@eriknicolasgomez.com>
| * | | | | refactor c.rb based on PR feedbackErik Gomez2017-01-201-60/+71
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Erik Gomez <e@eriknicolasgomez.com>
| * | | | | fix gcc and cc for darwin (no cli tools installed)Erik Gomez2017-01-201-21/+58
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | Merge branch 'tm/fix_app_logging'Tim Smith2017-01-203-5/+2
|\ \ \ \ \ | |/ / / / |/| | | |
| * | | | Only explicitly initialize a logger when neededtm/fix_app_loggingThom May2017-01-203-5/+2
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | updating cloud plugin to populate azure private_ip as it's currently nilohai13Richard Shade2017-01-042-0/+7
| | | | | | | | | | | | | | | | Signed-off-by: Richard Shade <rshade@rightscale.com>