summaryrefslogtreecommitdiff
path: root/lib/chef/node.rb
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* Revert "remove #to_json Monkeytpatching"Lamont Granquist2014-08-091-1/+2
| | | | This reverts commit adbb0fa85cc45b93ba91dc3019094b312cafb35c.
* remove #to_json MonkeypatchingLamont Granquist2014-08-091-2/+1
|
* Change attribute whitelist filter syntax to match OhaiClaire McQuin2014-05-151-15/+4
|
* add whitelist config options for attributes saved by the nodeClaire McQuin2014-05-151-3/+30
|
* Fixed environment chop -> chomp issue which truncated single character ↵Joe Richards2014-03-281-1/+1
| | | | environment names to empty strings
* Merge remote-tracking branch 'origin/master' into save-right-run-listThom May2014-03-041-1/+16
|\ | | | | | | | | Conflicts: lib/chef/client.rb
| * Add permanent run list modification option to Chef::Clientdanielsdeleo2014-02-201-1/+1
| |
| * CHEF-4777: fix for fully qualifying recipesLamont Granquist2014-01-161-2/+3
| | | | | | | | | | | | this makes it so that the recipes in the attribute will be fully qualified, and will avoid the problem of both "cookbook" and "cookbook::default" showing up.
| * CHEF-4777: add include_recipes to recipes node attrLamont Granquist2013-11-141-0/+6
| |
| * Moved Chef::Recipe#tag into the Chef::Node objectPaul Mooring2013-10-041-0/+8
| |
* | add run_list setterThom May2014-03-041-1/+10
| |
* | CHEF-4443 - Always save the correct run listThom May2013-08-121-4/+14
|/ | | | | As per Dan's suggestions, use a primary run_list and an override, and take care to ensure that the correct one is used to save the node.
* [CHEF-3683] Chef::Node objects should be sortable.Steven Danna2013-04-011-0/+4
| | | | | | This commit adds a simple <=> method which will allow for Chef::Node objects to be ordered based on their name. The primary use case is sorting arrays of nodes for use in templates.
* the set_unless state is bleeding from call to call...Lamont Granquist2013-01-291-0/+5
|
* remove cruft code.danielsdeleo2013-01-231-2/+0
| | | | In all of github there is not a single cookbook using this.
* [CHEF-3724] correctly query the recipes attribute in Node#recipe?danielsdeleo2012-12-261-1/+1
| | | | | Also, coerce node[:recipes] to an Array so that Node#recipe? will work correctly when the recipes attribute has not been set.