summaryrefslogtreecommitdiff
path: root/lib/chef/resource_collection
Commit message (Collapse)AuthorAgeFilesLines
* Resolve indentation warnings from ChefstyleTim Smith2020-12-041-1/+1
| | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* Roll back a few chefstyle fixesTim Smith2020-12-011-1/+1
| | | | | | These came with one of the newer releases of Rubocop Signed-off-by: Tim Smith <tsmith@chef.io>
* Chefstyle fixes for RuboCop 1.4.xTim Smith2020-11-251-1/+1
| | | | | | There are some new spaces changes in RuboCop 1.4.2 Signed-off-by: Tim Smith <tsmith@chef.io>
* Collapse more duplicate branchesTim Smith2020-11-061-5/+1
| | | | | | Simplify more case statements Signed-off-by: Tim Smith <tsmith@chef.io>
* Resolve Style/RedundantAssignment warningsrubocop_Style_RedundantAssignmentTim Smith2020-08-051-2/+1
| | | | | | Avoid assigning when we don't need to Signed-off-by: Tim Smith <tsmith@chef.io>
* Remove copyright dateslcg/remove-copyright-datesLamont Granquist2020-04-133-3/+3
| | | | | | | | Legally incredibly dubious, particularly since we don't follow it strictly as policy, and we have git history instead, which does it right. This is just a waste of time and a cargo cult. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Style/ClassCheckLamont Granquist2019-07-052-2/+2
| | | | | | convert kind_of? to is_a? Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Style/EmptyLiteralLamont Granquist2019-07-053-6/+6
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix bugs from Style/SymbolArray autocorrect copLamont Granquist2019-07-021-1/+1
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Style/MethodCallWithoutArgsParenthesesLamont Granquist2019-07-023-3/+3
| | | | | | | | zero args methods don't get parens. this certainly reads better than the inverse. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Style/SymbolArrayLamont Granquist2019-07-021-1/+1
| | | | | | start enforcing using %i{} instead of arrays of symbols Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix Layout/EmptyLineAfterGuardClauseLamont Granquist2019-07-024-0/+8
| | | | | | | i like this one, gives visual priority to returns or raises that are buried in the middle of things. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix Layout/AlignArgumentslcg/new-chefstyleLamont Granquist2019-07-021-2/+2
| | | | | | | | | | | | | | this is using: Layout/AlignArguments: Enabled: true EnforcedStyle: with_fixed_indentation the default style can use really excessive whitespace. on starting lines which are already long, it fully indents across to where the arguments start and then begins the line there. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* This hits the ones that are most frequently required.lcg/require-idempotencyLamont Granquist2019-05-201-1/+1
| | | | | | | | | Stops the kernel from scanning through all the activated gems every time in order to resolve names into pathnames. See rubygems/rubygems#2762 Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Convert require to require_relativeLamont Granquist2019-05-083-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>
* Extract Action Collection from Data CollectorLamont Granquist2019-03-111-1/+1
| | | | | | See the PR for details on this change. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* changes for rubocop engine upgrades.lcg/rubocop-upgradesLamont Granquist2019-01-151-3/+3
| | | | | | | this is the result of changes to rules we already previously had enabled. 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>
* Chef-13: fix notifying array resourcesLamont Granquist2017-03-311-17/+29
| | | | | | | | this also deprecates the multi-resource notification syntax where `foo[a,b]` would attempt to notify both `foo[a]` and `foo[b]` because that is hella ambiguous. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* make nameless properties opt-inLamont Granquist2017-03-301-2/+2
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Chef-13: Support nameless resources and remove deprecated multi-arg resourcesLamont Granquist2017-03-301-5/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes nameless resources work in the DSL: ```ruby apt_update ``` It does it by giving it an empty-string name of "" It also drops support for multi-arg resources, that has been deprecated for some time: ```ruby some_resource "foo", "bar", "baz" ``` Note that multipackage package resources do not use multiple args, but a single argument which is an arry: ```ruby package [ "lsof", "strace", "tcpdump" ] ``` So this change does not affect that usage. Multi-arg has been deprecated for some time now and its not clear that it was ever used by anyone. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Kill JSON auto inflate with firetm/remove_json_autoinflateThom May2017-03-143-1/+22
| | | | Signed-off-by: Thom May <thom@chef.io>
* fix specs: RedundantReturn, RedundantSelf, RedundantBeginLamont Granquist2017-02-132-5/+5
| | | | | | department of redundancy department Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* autofixing Style/WhileUntilModifier copLamont Granquist2016-08-161-3/+1
|
* add better resource manipulation APILamont Granquist2016-04-152-11/+24
| | | | | deprecates chef_rewind functionality completely and adds a few more features
* add some @yield docsLamont Granquist2016-03-041-0/+1
| | | | added some FIXMEs because trying to sort out types for random undocumented code was making me completely aggro
* remove unused block argumentslcg/chefstyle-perfLamont Granquist2016-02-231-1/+1
|
* convert MultilineOperationIndentation style to "indented"Lamont Granquist2016-02-121-1/+1
| | | | this looks nicer.
* pull rubocop 0.37.2 into chefstyleLamont Granquist2016-02-121-1/+1
| | | | | this is from the same ruleset that we had, but the new code catches more conditions.
* autofixing whitespace copsLamont Granquist2016-02-053-6/+6
| | | | | | | | | | | | | | | | | | | | | | 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-023-3/+3
| | | 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-024-4/+4
| | | 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"
* Use double quotes by defaultThom May2016-01-143-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.
* autocorrecting Style/TrailingCommalcg/trailing_commaLamont Granquist2016-01-131-1/+1
| | | | chefstyle -a fixed 1044 occurrances
* First pass at fixing broken notificationstyler-ball2014-12-161-8/+8
| | | | | | Fixing some code I changed unecessarily Removing TODOs which are not necessary
* Delegate Array methods rather than hardcoding into the ResourceList class.sersut/resource-list-specsSerdar Sutay2014-10-211-20/+9
|
* Add pending specs for resource list.Serdar Sutay2014-10-201-1/+0
|
* 1) No longer allowing multiple args passed to ResourceCollection#<< 2) ↵tyler-ball2014-10-171-12/+0
| | | | removing ResourceCollection#insert_at
* Cleaning up based on review commentstyler-ball2014-10-171-1/+3
|
* Added some documentation and cleaned up unecessary TODOs. Added first round ↵tyler-ball2014-10-163-13/+24
| | | | of specs for the new classes.
* Moving resource_set and resource_list so they are hidden from consumers more ↵tyler-ball2014-10-162-0/+269
| | | | since we don't want to change the resource_collection API yet
* Refactoring ResourceCollection interface to be backwards compatiable, all ↵tyler-ball2014-10-161-6/+13
| | | | specs continue to pass, removing ResourceSet and ResourceList from consumer knowledge
* Finishing all code changes to split resource collection into 2 data containerstyler-ball2014-10-161-0/+53
|
* Normalize whitespace on all filesSeth Vargo2013-09-261-22/+22
|
* [OC-3564] move core Chef to the repo root \o/ \m/Seth Chisamore2012-10-301-0/+124
The opscode/chef repository now only contains the core Chef library code used by chef-client, knife and chef-solo!