summaryrefslogtreecommitdiff
path: root/lib/chef/node.rb
Commit message (Collapse)AuthorAgeFilesLines
* Chef-14 Breaking: remove node.set and node.set_unlesslcg/remove-node-setLamont Granquist2018-01-221-5/+0
| | | | | | been deprecated since late-12. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* prepping for rubocop 0.52.1lcg/rubocop-0.52.1Lamont Granquist2018-01-171-4/+3
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* RFC 59: Load Ohai pluginstm/ohai_plugins_2Thom May2017-04-051-0/+4
| | | | | | This adds a new phase in the compilation of the run context. Signed-off-by: Thom May <thom@chef.io>
* Kill JSON auto inflate with firetm/remove_json_autoinflateThom May2017-03-141-6/+0
| | | | Signed-off-by: Thom May <thom@chef.io>
* Add the ability to blacklist attributesRobert Mullins2017-03-081-0/+8
| | | | Signed-off-by: Robert Mullins <rmullins@secureworks.com>
* remove policyfile fallback API for old Chef ServersLamont Granquist2017-02-281-6/+1
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix specs: RedundantReturn, RedundantSelf, RedundantBeginLamont Granquist2017-02-131-8/+8
| | | | | | department of redundancy department Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix Style/NonNilCheckLamont Granquist2016-12-061-1/+1
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Structure deprecations with additional metadatatm/deprecation_with_urlThom May2016-11-161-2/+2
| | | | | | | | 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>
* add attribute_changed hook to event handlersLamont Granquist2016-10-281-1/+1
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* remove breadcrumb stateLamont Granquist2016-10-251-4/+0
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fixes Style/OpMethod copLamont Granquist2016-08-161-2/+2
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Attributes v1.1 changeslcg/attributes-v1.1Lamont Granquist2016-06-271-32/+13
| | | | | | | | | | | - fixes *_unless behavior and set_unless_value_present hack from Chef 12 - simplifies rm_* code - introduces functional read/write/unlink/exist? API - deprecates method_missing access to attributes for Chef 13 - deprecates set/set_unless aliases for Chef 14 - removes MultiMash mess that I wrote for Chef 13 https://github.com/chef/chef/pull/5029 for more details
* create 'universal' DSLLamont Granquist2016-05-161-2/+2
| | | | this is for DSL methods that get mixed in everywhere.
* flip multiline function arguments aroundlcg/rubocop-0.37.2Lamont Granquist2016-02-191-3/+3
| | | | no enforced trailing comma on arguments...
* deal with 0.37.2 renamed copsLamont Granquist2016-02-181-2/+2
| | | | | | | | | | | | | | | 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?
* autofixing auto-inserted delimiterslcg/chefstyle-batchLamont Granquist2016-02-091-1/+1
|
* 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-16/+16
| | | | | | | | | | | | | | | | | | | | | | 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-4/+4
| | | Generated via git ls-files | xargs perl -pi -e "s/(Author.*?<[^@]+@)(?:opscode\\.com|getchef\\.com)(>)/\\1chef.io\\2/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-0/+1
|
* Use double quotes by defaultThom May2016-01-141-20/+20
| | | | | | | 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.
* autocorrecting Style/TrailingCommalcg/trailing_commaLamont Granquist2016-01-131-2/+2
| | | | chefstyle -a fixed 1044 occurrances
* Merge pull request #4355 from kisoku/fix_json_createThom May2016-01-121-1/+1
|\ | | | | don't blow up when json object has no recipes
| * don't blow up when json object has no recipesMathieu Sauve-Frankel2016-01-081-1/+1
| | | | | | | | fixes loading brand new node objects from json
* | chefstyle: fix Lint/StringConversionInInterpolationLamont Granquist2016-01-121-1/+1
| | | | | | | | useless use of `"#{foo.to_s}"`
* | Convert all uses of Chef::REST to Chef::ServerAPItm/no_more_restThom May2016-01-111-14/+20
|/ | | | | | | In the process, stop auto-expanding JSON in the HTTP client, and let individual classes control that themselves. Fixes #2737, Fixes #3518
* really always return an Arraylcg/fix-tags-and-set-unlessLamont Granquist2015-12-141-2/+1
|
* tags always an array; fix set_unlessLamont Granquist2015-12-141-2/+2
| | | | | | | previously if the node had a { normal: { tags: nil } } that we read since the key existed (but was nil) we would not initialize with an array. replacing the code with a call to node.set_unless revealed that set_unless was similarly buggy. fixed both issues by fixing set_unless.
* Merge pull request #4064 from josb/masterThom May2015-11-121-4/+4
|\ | | | | Use the initializer to avoid NoMethodError on nil.include?
| * Use the initializer to avoid NoMethodError on nil.include?Jos Backus2015-10-161-4/+4
| | | | | | | | Rename the argument so as to not collide with the tags method.
* | Define == for node objectsDavid Bresson2015-10-241-0/+8
| |
* | Use why-run vs. why_run or whyrunTim Smith2015-10-181-1/+1
|/
* Ensure that our list of recipes is backwards compattm/duplicate_recipesThom May2015-09-291-1/+1
| | | | | | | | | Prior to chef 12.2 we included unexpanded 'cookbook' names for default recipes. In 12.2, we moved to expanded ('cookbook::default') names, which broke some searches. However, some of our users have now moved to searching for expanded, so we need to cater for both. Fixes #3767
* Populate node policyfile attrs from JSONdanielsdeleo2015-09-171-0/+4
|
* Add policyfile attrs to node create/savedanielsdeleo2015-09-171-2/+35
|
* Add policyfile attrs to node JSON when presentdanielsdeleo2015-09-171-0/+8
|
* Add policy_name and policy_group attrs to Node classdanielsdeleo2015-09-171-0/+49
|
* Set chef_environment in attributes JSONClaire McQuin2015-07-141-0/+19
|
* rename consume_cookbook_collectionLamont Granquist2015-05-181-1/+1
|
* add/fix node attributesLamont Granquist2015-05-181-1/+12
| | | | | | * fix node[:recipes] * add node[:expanded_run_list] * add node[:cookbooks]
* add a spec test + linebreaksLamont Granquist2015-05-041-1/+9
|
* use validate_utf8=false option to json encoder for nodeLamont Granquist2015-05-041-1/+1
| | | | | | | with validation off any bad utf8 data will not cause the ffi-yajl encoder to raise. with ffi-yajl >= 2.2.0 the bad data will be scrubbed to produce valid JSON to POST/PUT to the server.
* Change inspect to string to be more human-readable.cmluciano2015-03-111-1/+1
| | | | Should close [Issue 2863](https://github.com/chef/chef/issues/2863)
* allow dep injecting chef_server_rest into objectsLamont Granquist2015-02-111-2/+5
|
* add partial deep merge cacheLamont Granquist2014-11-211-11/+12
|
* chef-12 attribute changesLamont Granquist2014-11-081-14/+2
| | | | | | - adding rm, rm_default, rm_normal, rm_override APIs - adding default!, normal! and override! APIs - changing force_default! and force_override! APIs
* Empty run_list should result in empty array when using node.to_hash.Ivan Larionov2014-10-181-2/+2
|
* remove JSON gem usageLamont Granquist2014-08-111-2/+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.