summaryrefslogtreecommitdiff
path: root/lib/chef/environment.rb
Commit message (Collapse)AuthorAgeFilesLines
* Convert require to require_relativeLamont Granquist2019-05-081-6/+6
| | | | | | | This gives a speed boost since rubygems does not have to scan through every gem in the gemset in order to find the file. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* changes for rubocop engine upgrades.lcg/rubocop-upgradesLamont Granquist2019-01-151-1/+1
| | | | | | | this is the result of changes to rules we already previously had enabled. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* change HTTPServerException to HTTPClientException for ruby 2.6Lamont Granquist2019-01-031-1/+1
| | | | | | includes backcompat for 2.5 Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* replace some instances of to_hash with to_hlcg/to-h-cleanupLamont Granquist2018-09-261-2/+4
| | | | | | | | | | | to_hash on a lot of these objects should go away, but even eliminating all our calls to to_hash on these objects internally is difficult. (e.g. converting the knife ui code to call #to_h means we wind up calling nil#to_h which "helpfully" becomes '{}' which is hilarious and i don't know why someone thought that was a good idea). Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix Style/MutableConstantLamont Granquist2018-07-021-1/+1
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix Style/HashSyntaxLamont Granquist2018-07-021-9/+9
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* prepping for rubocop 0.52.1lcg/rubocop-0.52.1Lamont Granquist2018-01-171-4/+2
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Kill JSON auto inflate with firetm/remove_json_autoinflateThom May2017-03-141-5/+0
| | | | Signed-off-by: Thom May <thom@chef.io>
* fix specs: RedundantReturn, RedundantSelf, RedundantBeginLamont Granquist2017-02-131-11/+9
| | | | | | department of redundancy department Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix Style/SelfAssignmentLamont Granquist2016-12-061-1/+1
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Structure deprecations with additional metadatatm/deprecation_with_urlThom May2016-11-161-1/+1
| | | | | | | | This adds URLs to each class of deprecation, and correctly prints and formats them for maximum user efficiency. We also provide the URL to the data collector for Visibility to ingest. Signed-off-by: Thom May <thom@chef.io>
* Ensure that solo specific code is run at the proper timeThom May2016-05-161-2/+2
| | | | | | ie, only when we're in OG mode and not in local mode. Signed-off-by: Thom May <thom@chef.io>
* flip multiline function arguments aroundlcg/rubocop-0.37.2Lamont Granquist2016-02-191-6/+6
| | | | no enforced trailing comma on arguments...
* deal with 0.37.2 renamed copsLamont Granquist2016-02-181-5/+5
| | | | | | | | | | | | | | | 252 Style/TrailingCommaInLiteral 84 Style/TrailingCommaInArguments 15 Style/SpaceAroundKeyword -- 351 Total We already dealt with SpaceAroundKeyword under its old name SpaceBeforeModifierKeyword, it looks like it got stricter about spaces after keywords. TrailingComma also got split, and it looks like the TrailingCommaInArguments behavior is new?
* pull rubocop 0.37.2 into chefstyleLamont Granquist2016-02-121-2/+2
| | | | | this is from the same ruleset that we had, but the new code catches more conditions.
* auto fixing some rubocopsLamont Granquist2016-02-091-1/+1
| | | | | | | | | Style/NegatedWhile Style/ParenthesesAroundCondition Style/WhileUntilDo Style/WordArray Performance/ReverseEach Style/ColonMethodCall
* autofixing whitespace copsLamont Granquist2016-02-051-7/+7
| | | | | | | | | | | | | | | | | | | | | | 4174 Style/SpaceInsideHashLiteralBraces 1860 Style/SpaceAroundOperators 1336 Style/SpaceInsideBlockBraces 1292 Style/AlignHash 997 Style/SpaceAfterComma 860 Style/SpaceAroundEqualsInParameterDefault 310 Style/EmptyLines 294 Style/IndentationConsistency 267 Style/TrailingWhitespace 238 Style/ExtraSpacing 212 Style/SpaceBeforeBlockBraces 166 Style/MultilineOperationIndentation 144 Style/TrailingBlankLines 120 Style/EmptyLineBetweenDefs 101 Style/IndentationWidth 82 Style/SpaceAroundBlockParameters 40 Style/EmptyLinesAroundMethodBody 29 Style/EmptyLinesAroundAccessModifier 1 Style/RescueEnsureAlignment
* Update all auth email address from opscode.com and getchef.com to chef.io.Noah Kantrowitz2016-02-021-2/+2
| | | Generated via git ls-files | xargs perl -pi -e "s/(Author.*?<[^@]+@)(?:opscode\\.com|getchef\\.com)(>)/\\1chef.io\\2/gi"
* Replace all Opscode copyrights with Chef Software.Noah Kantrowitz2016-02-021-1/+1
| | | Created via git ls-files | xargs perl -pi -e "s/(Copyright.*?), Opscode(,)? Inc(\.)?/\\1, Chef Software Inc./gi"
* Copyright year update for 2016 and massive cleanup.Noah Kantrowitz2016-02-021-1/+1
| | | Generated via git ls-files | xargs perl -pi -e "s/[Cc]opyright (?:\([Cc]\) )?((?\!$(date +%Y))\\d{4})(-\\d{4})?([, ][ \d]+)*(,|(?= ))/Copyright \\1-$(date +%Y),/g"
* add deprecation warningsThom May2016-01-181-1/+3
|
* Use double quotes by defaultThom May2016-01-141-8/+8
| | | | | | | This is an entirely mechanically generated (chefstyle -a) change, to go along with chef/chefstyle#5 . We should pick something and use it consistently, and my opinion is that double quotes are the appropriate thing.
* Merge pull request #4398 from chef/lcg/trailing_commaThom May2016-01-141-7/+7
|\ | | | | autocorrecting Style/TrailingComma
| * autocorrecting Style/TrailingCommalcg/trailing_commaLamont Granquist2016-01-131-7/+7
| | | | | | | | chefstyle -a fixed 1044 occurrances
* | inflate an environment after loading itThom May2016-01-131-1/+1
|/ | | | this was missed in the great REST fire.
* Convert all uses of Chef::REST to Chef::ServerAPItm/no_more_restThom May2016-01-111-9/+14
| | | | | | | In the process, stop auto-expanding JSON in the HTTP client, and let individual classes control that themselves. Fixes #2737, Fixes #3518
* allow dep injecting chef_server_rest into objectsLamont Granquist2015-02-111-2/+5
|
* remove JSON gem usageLamont Granquist2014-08-111-3/+1
| | | | | | | | | should fully convert to using ffi-yajl there are still issues with JSON gem monkeypatching interacting with chef-zero and the spec tests so we keep the requires here for the json gem and the ffi_yajl/json_gem here. when ohai and chef-zero are fixed, we an just require ffi_yajl.
* Revert "remove #to_json Monkeytpatching"Lamont Granquist2014-08-091-1/+3
| | | | This reverts commit adbb0fa85cc45b93ba91dc3019094b312cafb35c.
* remove #to_json MonkeypatchingLamont Granquist2014-08-091-3/+1
|
* Raising an exception for chef-solo environment constraints.Nick Stielau2013-05-301-2/+7
|
* Adding support for environments when running under chef-solo.Nick Stielau2013-05-301-1/+27
| | | | | This commit refactors and rebases Kyle Goodwin's original work for CHEF-3356, as per Bryan McLellan's 12/17 comments.
* [CHEF-3919] Removed Chef::Version::Cookbook code and replaced by a ↵Xabier de Zuazo2013-04-111-2/+2
| | | | Chef::Version::Platform class, reverting Chef::Version class changes
* [CHEF-3919] cookbook version specific code factored out from Chef::Version, ↵Xabier de Zuazo2013-04-111-2/+2
| | | | new classes created: Chef::Version::Cookbook and Chef::VersionConstraint::Cookbook
* [OC-3564] move core Chef to the repo root \o/ \m/Seth Chisamore2012-10-301-0/+287
The opscode/chef repository now only contains the core Chef library code used by chef-client, knife and chef-solo!