summaryrefslogtreecommitdiff
path: root/lib/chef/api_client.rb
Commit message (Collapse)AuthorAgeFilesLines
* autofixing whitespace copsLamont Granquist2016-02-051-11/+11
| | | | | | | | | | | | | | | | | | | | | | 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"
* Replace all Opscode copyrights with Chef Software.Noah Kantrowitz2016-02-021-1/+1
| | | 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-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-1/+2
|
* Use double quotes by defaultThom May2016-01-141-9/+9
| | | | | | | 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-6/+6
| | | | chefstyle -a fixed 1044 occurrances
* Set Chef::ApiClient to use API V0.tylercloke2015-07-061-2/+3
|
* Move ApiClient V1 supported code to Chef::ApiClientV1 and restore ↵tylercloke2015-07-061-130/+31
| | | | | | | | Chef::ApiClient. For backwards compatibility. ApiClientV1 will replace ApiClient when Chef 13 is released. Updated client_*.rb knife commands to use ApiClientV1.
* Better API version error handling helper code.tylercloke2015-06-051-3/+5
| | | | Renamed Chef::Mixin::ApiVersionRequestHandling.handle_version_http_exception -> server_client_api_version_intersection and made it do much more useful / sane things. See comments for details.
* Backwards compatible support for OSC 11 in knife user commands.tylercloke2015-06-051-13/+10
| | | | All knife user commands can detect when they have failed for OSC 11 reasons and forward the request to backwards compatible knife osc_user commands.
* Use Chef::ServerAPI to create versioned API requests in Chef::(User|Client).tylercloke2015-06-051-4/+3
|
* Reregister V0 support for Chef::Client.tylercloke2015-06-051-12/+27
|
* Fixed bug where boolean fields would not be populated in Chef::User/ApiClient.tylercloke2015-06-051-4/+4
|
* Chef::ApiClient.update supports V1.tylercloke2015-06-051-8/+32
|
* API V1 support for client creation.tylercloke2015-06-051-10/+77
|
* server can send back false hereLamont Granquist2015-02-111-1/+1
| | | | | | Chef::ApiClient::Registration#update gets back a response from the Chef Server with false here and when we try to deserialize it from json it will throw a validation error if we don't patch this.
* Avoid 'class << self'-style class methods in Chef::ApiClientSteven Danna2015-02-091-14/+15
|
* Add ApiClient#from_hash and ApiClient#from_jsonSteven Danna2015-02-091-8/+15
| | | | | | | ApiClient#json_create confusingly takes a hash rather than a JSON string. We need to preserve json_create for backwards compatibility. from_hash is the same as json_create. from_json takes an actual string of JSON.
* remove JSON gem usageLamont Granquist2014-08-111-1/+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/+1
| | | | This reverts commit adbb0fa85cc45b93ba91dc3019094b312cafb35c.
* remove #to_json MonkeypatchingLamont Granquist2014-08-091-1/+1
|
* Delegate ApiClient.load to ApiClient.json_createJames Casey2014-02-181-3/+1
| | | | | This means the validator/public_key/admin fields of the ApiClient object now get set properly
* Make ApiClient aware of validator propertyChristopher Maier2013-10-041-5/+20
| | | | This makes it possible to create new validator clients using knife.
* [CHEF-3689] remove extra flags to Client#savedanielsdeleo2012-12-181-10/+4
|
* [CHEF-3689] Extract registration to a classdanielsdeleo2012-12-181-5/+0
|
* [CHEF-3689] refactor REST API client instantiationdanielsdeleo2012-12-181-12/+24
|
* [CHEF-3662] ApiClient includes private key in JSON if presentdanielsdeleo2012-12-121-3/+4
| | | | | | | | After discussing with Adam and Seth F, there's no reason not to put the private key in the serialized representation if we have it. We ought to carefully review for behavior changes on the server side before backporting to 10.x
* [CHEF-3662] knife client reregister uses ApiClient#reregisterdanielsdeleo2012-12-121-0/+5
|
* [CHEF-3662] ApiClient can set a private key from JSONdanielsdeleo2012-12-121-0/+1
| | | | | | | | Without this change it's not possible to fix CHEF-3662 on the client without modifying Chef::REST to ignore json_class. Previously the behavior was explicitly defined to be the opposite, but the reasoning behind this decision wasn't documented; I suspect it may have been for server-side behavior that's no longer necessary.
* [CHEF-3662] ApiClient can reregister itselfdanielsdeleo2012-12-061-1/+17
|
* [OC-3564] move core Chef to the repo root \o/ \m/Seth Chisamore2012-10-301-0/+181
The opscode/chef repository now only contains the core Chef library code used by chef-client, knife and chef-solo!