summaryrefslogtreecommitdiff
path: root/spec/unit/cookbook/metadata_spec.rb
Commit message (Collapse)AuthorAgeFilesLines
* fix Style/PreferredHashMethodsLamont Granquist2018-07-021-2/+2
| | | | | | | absolutely hard requirement on the fixes that went into chef-config 2.2.11, so the floor of that gem is bumped up. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix Layout/LeadingCommentSpaceLamont Granquist2018-07-021-2/+2
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix Style/HashSyntaxLamont Granquist2018-07-021-77/+77
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* mechanical conversion of most debug log statements to traceThom May2018-03-261-1/+1
| | | | Signed-off-by: Thom May <thom@chef.io>
* 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>
* 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-041-1/+4
| | | | | | | | | 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>
* fix Performance/SortWithBlock copLamont Granquist2016-12-061-3/+3
| | | | 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>
* 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
| |
* | 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-051-33/+30
| | | | | | | | | | | | | | | | | | | | | | 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"
* 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"
* Use double quotes by defaultThom May2016-01-141-22/+22
| | | | | | | 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
* 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
|
* extend metadata to include chef_version and ohai_versionLamont Granquist2015-10-261-1/+71
|
* add privacy flagJosh Black2015-08-181-3/+23
|
* suppress cookbook self-dependencies and warnlcg/warn-cb-self-depLamont Granquist2015-05-151-0/+15
| | | | | | | | | | | | | | | | | | | | cookbooks with self-deps: name 'foo' depends 'foo' are useless and can waste cycles in the depsolver (particularly in the non-solution case), and likely limit the possible choices of depsolvers that we could pick at some point to replace gecode. filtering out the self-dep here will prevent the chef server depsolver from seeing the self-dep and needing to do the work to strip it. also warn the user so that they can remove the self-dep. in the future this will be a hard error. foodcritic also has a rule about removing these.
* typo fixes - https://github.com/vlajos/misspell_fixerVeres Lajos2014-11-081-1/+1
|
* Update to RSpec 3.Claire McQuin2014-10-291-148/+148
|
* Merge pull request #1914 from gofullstack/supermarket_attributes_metadataSerdar Sutay2014-10-101-4/+37
|\ | | | | Add supermarket_attributes to Metadata
| * Use individual URL attributes in metadataBrett Chalupa2014-08-261-20/+36
| | | | | | | | | | | | Instead of having an arbitrary Hash/Mash of supermarket_attributes, use two explicit URL attributes at the top level of the metadata: the source_url and issues_url.
| * Add supermarket_attributes to MetadataBrett and Tristan2014-08-251-0/+17
| | | | | | | | | | | | | | Allow the metadata.rb in a cookbook to specify arbitrary attributes for use from Supermarket. The usecase for this right now would be setting the issues and source URLs for that Cookbook instead of specifying them in the Supermarket UI.
* | Trying to eradicate all traces of the JSON gem from Cheftyler-ball2014-10-071-2/+6
|/
* Add validation to Metadatadanielsdeleo2014-08-121-0/+32
| | | | exposes #valid? and #errors methods to check validity.
* Remove cookbook as argument to Metadata's constructordanielsdeleo2014-08-121-37/+49
| | | | | | | | | | | | | | | Now that a cookbook's name must be specified in the metadata, metadata is always created before the cookbook version object, so it should not accept a CookbookVersion in the constructor. The remaining arguments to the constructor are also removed. A survey of this codebase and a search of GitHub shows that these arguments were never used anywhere, and they were quite odd. Additionally, the default license field is set to "all rights reserved", which is a safe value. The filler values of maintainer and maintainer_email have been removed, and now default to nil. This will make it easier to validate that the user has set these values.
* Convert metadata specs (mostly) to let bindingsdanielsdeleo2014-08-121-129/+127
|
* Fix ruby warning in metadata unit testdanielsdeleo2014-08-121-2/+0
|
* Merge pull request #848 from onddo/CHEF-4298Claire McQuin2014-06-091-0/+24
|\ | | | | [CHEF-4298] dependencies in metadata.rb require a space
| * [CHEF-4298] Tests: reverted some modifications related with 3 part versions, ↵Xabier de Zuazo2014-05-251-11/+33
| | | | | | | | added some #normalize_version_constraint tests
| * [CHEF-4298] "trasnformation" typo in testsXabier de Zuazo2013-07-101-1/+1
| |
| * [CHEF-4298] tests improved to test version transformation on dependenciesXabier de Zuazo2013-07-031-9/+10
| |
| * [CHEF-4298] some tests fixedXabier de Zuazo2013-07-031-3/+3
| |
| * [CHEF-4298] some tests added for "dependencies in metadata.rb require a space"Xabier de Zuazo2013-06-231-0/+1
| |
* | update tests and add new tests for limiting attribute typesSteve Rude2014-02-041-1/+45
| |