summaryrefslogtreecommitdiff
path: root/spec/unit/key_spec.rb
Commit message (Collapse)AuthorAgeFilesLines
* auto-fixing some easy copschefstyle/fixesLamont Granquist2016-02-031-1/+1
| | | | | | | | | | | | | 3 Performance/CaseWhenSplat: Place when conditions with a splat at the end of the when branches. 1 Style/ElseAlignment: Align else with if. 1 Style/EvenOdd: Replace with Fixnum#even?. 1 Style/MethodDefParentheses: Use def with parentheses when there are parameters. 3 Style/PercentQLiterals: Do not use %Q unless interpolation is needed. Use %q. 3 Style/SpaceAfterColon: Space missing after colon. 2 Style/SpaceAfterMethodName: Do not put a space between a method name and the opening parenthesis. 2 Style/Tab: Tab detected. 1 Style/TrailingUnderscoreVariable: Do not use trailing _s in parallel assignment. 1 Style/UnneededCapitalW: Do not use %W unless interpolation is needed. If not, use %w.
* 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"
* Autofixing Style/PercentLiteralDelimeterslcg/percentliteraldelimetersLamont Granquist2016-01-181-5/+5
| | | | | | 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-141-3/+3
| | | | | | | 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-4/+4
| | | | chefstyle -a fixed 1044 occurrances
* Convert all uses of Chef::REST to Chef::ServerAPItm/no_more_restThom May2016-01-111-14/+14
| | | | | | | In the process, stop auto-expanding JSON in the HTTP client, and let individual classes control that themselves. Fixes #2737, Fixes #3518
* Fixed a bug where create_key would conflict with public_key in hash returned ↵tylercloke2015-04-301-0/+22
| | | | from server on update.
* Changes Chef::Key update to allow updating the name of a key.tylercloke2015-04-301-1/+14
|
* Implemented `knife user key create` and `knife client key create`.tylercloke2015-04-281-4/+4
| | | | Implemented using a common service class that contains most of the actual functionality outside of parsing and inheriting Chef::Knife.
* Fixed bug in Chef::Key where create failed to return the full key.tylercloke2015-04-281-10/+32
| | | | | | | Code assumed POST to keys endpoint returned the key body like other parts of the API. Now, it simply generated the new key returned by create from the original key plus the private_key returned by the API if any. Specs also updated.
* Implemented the Key object corrosponding to key rotation API endpoint.tc/chef_key_objecttylercloke2015-04-201-0/+577