summaryrefslogtreecommitdiff
path: root/spec/unit/cookbook
Commit message (Collapse)AuthorAgeFilesLines
* consistent formattingTor Magnus Rakvåg2017-09-281-1/+3
| | | | Signed-off-by: Tor Magnus Rakvåg <tm@intility.no>
* only warn about skipping sync onceTor Magnus Rakvåg2017-09-281-0/+28
| | | | Signed-off-by: Tor Magnus Rakvåg <tm@intility.no>
* chef server rejects metadata with nil maintainerLamont Granquist2017-07-201-3/+3
| | | | | | | | | chef server returns a 400. we could prune nil values out of the JSON but then it'd be difficult to specify a "null" JSON value if we really needed one. seems better to follow the pattern of using empty string here (which i tested against Hosted and works). Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* lazily load cookbook_files and templatestm/even_lazierThom May2017-04-251-4/+5
| | | | | | Fixes: #6051 Signed-off-by: Thom May <thom@chef.io>
* Feed rubocop some moreThom May2017-04-112-31/+12
| | | | Signed-off-by: Thom May <thom@chef.io>
* Test CookbookManifest v0 and v2Thom May2017-04-112-0/+222
| | | | Signed-off-by: Thom May <thom@chef.io>
* add better specs around modifying gem sourcesLamont Granquist2017-04-041-0/+15
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Merge branch 'master' into template-lazyNoah Kantrowitz2017-04-044-142/+76
|\ | | | | | | Signed-off-by: Noah Kantrowitz <noah@coderanger.net>
| * RFC 85: Remove unused metadataThom May2017-04-041-107/+25
| | | | | | | | Signed-off-by: Thom May <thom@chef.io>
| * RFC 67: Remove cookbook segmentsThom May2017-04-044-35/+51
| | | | | | | | | | | | | | | | | | This implements RFC 67, which removes cookbook segments, and moves to a single list of all the files contained in a cookbook. This allows us to move forward with better audit modes and also proper shipping of ohai plugins. Signed-off-by: Thom May <thom@chef.io>
* | Trololol my change bled into another test.Noah Kantrowitz2017-04-041-0/+1
|/ | | | Signed-off-by: Noah Kantrowitz <noah@coderanger.net>
* Add unit test for gem installerMaxime Brugidou2017-03-281-0/+70
| | | | | Change-Id: Ibf4a53b9f687882f84932433cc3d45e084e3a29e Signed-off-by: Maxime Brugidou <m.brugidou@criteo.com>
* Merge pull request #5704 from ceneo/knife-upload-too-short-control-escapeThom May2017-02-011-2/+8
|\ | | | | Core: Ensure paths are correctly escaped when syntax checking
| * switch to using regexp escapeThom May2017-02-011-2/+8
| | | | | | | | | | | | And add test that fails with original code Signed-off-by: Thom May <thom@chef.io>
* | favor metadata.json over metadata.rbLamont Granquist2017-01-241-0/+9
|/ | | | | | | make sure that if we have a metadata.rb that is not valid to read that we never parse that and use compiled metadata.json instead. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix Performance/SortWithBlock copLamont Granquist2016-12-061-3/+3
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* add a spec for the fix to #5089Lamont Granquist2016-10-051-0/+15
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* drop warn all the way down to debuglcg/ignore-unknown-metdata-rb-fieldsLamont Granquist2016-09-211-1/+1
| | | | | | | we expect this to be forward compat, so that all this turns into is a nag message to upgrade which is probably better just not to display Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* ignore unknown metadata fields in metadata.rbLamont Granquist2016-09-211-0/+19
| | | | | | | | | | | | | | | if we're just using chef-zero there's no metadata.json file so chef-client doesn't do json parsing (which ignores unknown metadata fields already) but parses metadata.json which explodes. i believe since TK goes through berks it renders the rb to json before copying to the virt so we don't see this in TK or in running chef-client from a real server. this only affects the chef-client -z or chef-zolo mode of operation (and probably legacy chef-solo) Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix Style/BlockDelimiters, Style/MultilineBlockLayout and 0.42.0 engine upgradeLamont Granquist2016-08-171-98/+98
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* specs and lazying net-http client buildingLamont Granquist2016-08-111-0/+7
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Ensure that solo specific code is run at the proper timeThom May2016-05-161-1/+1
| | | | | | ie, only when we're in OG mode and not in local mode. Signed-off-by: Thom May <thom@chef.io>
* Too much log output and unnecessary warnings! Suppress that shit.Kartik Null Cating-Subramanian2016-04-251-1/+1
|
* Merge pull request #4663 from chef/lcg/better-chef-rspec-constraintsLamont Granquist2016-03-041-2/+2
|\ | | | | better chef+ruby rspec constraints
| * better chef+ruby rspec constraintsLamont Granquist2016-03-031-2/+2
| | | | | | | | | | | | | | | | lets us use Gem::Dependency constraints directly as rspec constraints for matching Chef::Version and RUBY_VERSION. copies some magic sauce from bundler that does something similar
* | Merge pull request #4478 from chef/lcg/rfc-060-gem-metadataLamont Granquist2016-03-031-1/+29
|\ \ | |/ |/| RFC-060 gem metadata MVP
| * add some metadata specs around 'gem' methodLamont Granquist2016-02-091-0/+27
| |
| * fix broken specsLamont Granquist2016-02-091-1/+2
| |
* | Filter out directory paths from all_files when loadinglist-unignored-filesdanielsdeleo2016-02-261-0/+8
| |
* | Rename all_unignored_files -> all_filesdanielsdeleo2016-02-261-1/+1
| |
* | List all the unignored files when loading a cookbookdanielsdeleo2016-02-261-0/+4
| |
* | Add test file to fixture cookbookdanielsdeleo2016-02-261-2/+4
| |
* | flip multiline function arguments aroundlcg/rubocop-0.37.2Lamont Granquist2016-02-191-1/+1
| | | | | | | | no enforced trailing comma on arguments...
* | deal with 0.37.2 renamed copsLamont Granquist2016-02-182-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-9/+9
| |
* | auto fixing some rubocopsLamont Granquist2016-02-091-9/+9
|/ | | | | | | | | Style/NegatedWhile Style/ParenthesesAroundCondition Style/WhileUntilDo Style/WordArray Performance/ReverseEach Style/ColonMethodCall
* autofixing whitespace copsLamont Granquist2016-02-055-45/+40
| | | | | | | | | | | | | | | | | | | | | | 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-025-6/+6
| | | 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-022-2/+2
| | | 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-025-5/+5
| | | 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"
* Autofixing Style/PercentLiteralDelimeterslcg/percentliteraldelimetersLamont Granquist2016-01-183-6/+6
| | | | | | See chef/chefstyle#11 for analysis and discussion. We select '{}' since audit of our source code shows that is the most common, and that used to be the dominant learning paradigm (e.g. in ruby 1.9 pickaxe book.
* Use double quotes by defaultThom May2016-01-146-65/+65
| | | | | | | 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-13/+13
| | | | chefstyle -a fixed 1044 occurrances
* Merge pull request #4381 from chef/lcg/useless-to-sLamont Granquist2016-01-121-5/+5
|\ | | | | chefstyle: fix Lint/StringConversionInInterpolation
| * chefstyle: fix Lint/StringConversionInInterpolationLamont Granquist2016-01-121-5/+5
| | | | | | | | useless use of `"#{foo.to_s}"`
* | fix some lint copsLamont Granquist2016-01-121-2/+2
|/ | | | | | | | | fixes the following offenses: 46 Lint/EndAlignment 21 Lint/BlockAlignment 3 Lint/SpaceBeforeFirstArg 1 Lint/DefEndAlignment
* Convert all uses of Chef::REST to Chef::ServerAPItm/no_more_restThom May2016-01-112-23/+22
| | | | | | | In the process, stop auto-expanding JSON in the HTTP client, and let individual classes control that themselves. Fixes #2737, Fixes #3518
* add YARD docsLamont Granquist2015-10-261-1/+1
|
* fix some busted specsLamont Granquist2015-10-261-1/+1
|
* improve error message, add more testsLamont Granquist2015-10-261-1/+51
|