summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Fix issue where DSL is not emitted if state_properties happens before propertyjk/state_attrsJohn Keiser2015-07-151-2/+3
| | | | | | | | | If you call state_properties :x, and there is no property :x yet, it assumes you are working with a custom getter/setter like "def x". This is fine, but when you say "property :x", it won't override that (and will treat the property as if the getter/setter were already defined instead of creating a new one).
* Allow cookbooks_dir to use chef_rest instead of rest for now.tylercloke2015-07-062-10/+2
|
* Remove all the stupid json magic from Chef::ApiClientV1.tylercloke2015-07-064-34/+20
|
* Fix automated object generation from HTTP layer in ApiClient.tylercloke2015-07-061-0/+5
|
* Set Chef::ApiClient to use API V0.tylercloke2015-07-061-2/+3
|
* Cleanup.tylercloke2015-07-062-1/+2
|
* Move ApiClient V1 supported code to Chef::ApiClientV1 and restore ↵tylercloke2015-07-0610-145/+388
| | | | | | | | Chef::ApiClient. For backwards compatibility. ApiClientV1 will replace ApiClient when Chef 13 is released. Updated client_*.rb knife commands to use ApiClientV1.
* Default Chef::ChefFS::...::ChefServerRootDir.rest to use API V0 and ↵tylercloke2015-07-062-3/+11
| | | | | | | | deprecated chef_rest. Unfortunately, chef_rest was using the now outdated Chef::HTTP so I could not default it to API V0. It was also being used anywhere except Chef::ChefFS::FileSystem::CookbooksDir, which can just as easially use rest instead of chef_rest as they provide the same interface. That update has been made.
* Remove _rest from http methods.tylercloke2015-07-061-6/+6
|
* Move Chef::OscUser back to Chef::User namespace and new user code to ↵tylercloke2015-07-0615-413/+417
| | | | | | Chef::UserV1. Also, have Chef::User (formally Chef::OscUser) use API V0 to make requests.
* Deprecate passing more than 1 argument to create a resourcejk/3634John Keiser2015-07-061-4/+6
|
* Don't accept multiple parameters in recipe DSL (just name)John Keiser2015-07-061-4/+4
|
* Memoize enabled_handlers so it is not recomputedjk/separate-priority-mapJohn Keiser2015-07-064-3/+39
|
* Re-separate priority map and DSL handler map so that provides has veto power ↵John Keiser2015-07-0630-143/+190
| | | | over priority
* Move property type derivation from "property_type" to "property"John Keiser2015-07-032-68/+38
| | | | to keep property_type simple
* Add Property.create and Resource.property_type for type system overridingJohn Keiser2015-07-033-56/+129
|
* Bring set_or_return behavior back in line with what it used to beJohn Keiser2015-07-032-14/+24
|
* Only stick non-frozen values to the resourceJohn Keiser2015-07-031-4/+12
|
* Code review commentsJohn Keiser2015-07-031-6/+24
|
* Make required name attributes workJohn Keiser2015-07-036-178/+882
|
* Make required name attributes workjk/required_name_attributeJohn Keiser2015-07-021-2/+2
|
* Merge pull request #3623 from chef/jdm/simplify-lwrp1Jay Mundrawala2015-07-012-48/+15
|\ | | | | Simplify LWRP Deprecations Proposal 1
| * Simplify Chef::Resource::MyLWRP deprecationJay Mundrawala2015-06-301-49/+4
| | | | | | | | | | | | | | Our logic for creating the deprecation class was too complicated and had a lot of edge cases. Simplifying here to only deprecate when `:treat_deprecation_warnings_as_errors` is set. This means that warnings will no longer be printed, however this is a lot less risky.
| * Revert "Merge pull request #3603 from chef/jdm/lwrp-base"Jay Mundrawala2015-06-302-49/+61
| | | | | | | | | | This reverts commit 27d8675ec1c80f1eb7ec57f7b6c854441bb395ee, reversing changes made to 3501ba4020dc21377bc999e57e25eadb315ec783.
* | Merge pull request #3591 from DeWaRs1206/masterThom May2015-07-011-1/+1
|\ \ | | | | | | Use Mixlib::Shellout instead of Chef::Mixin::Command
| * | fix typoDeWaRs12062015-06-291-1/+0
| | |
| * | fix solo_spec according previous changeEmmanuel Iturbide2015-06-291-2/+2
| | |
| * | Use Mixlib::Shellout instead of Chef::Mixin::CommandDeWaRs12062015-06-251-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using C:\Users\Administrator>chef-solo -i 30 -s 5 -c C:/monsoon/solo.rb -j http://foo-bar/get-run -r http://foo-bar.com/cookbooks.tar.gz failled with error : [2015-06-25T15:01:52+02:00] DEBUG: ---- End output of tar zxvf C:/chef/recipes.t gz -C C:/chef ---- C:/opscode/chef/embedded/apps/chef/lib/chef/mixin/command.rb:140:in `block in ou tput_of_command': undefined method `exitstatus' for nil:NilClass (NoMethodError) from C:/opscode/chef/embedded/apps/chef/lib/chef/mixin/command.rb:122:in `chdir' from C:/opscode/chef/embedded/apps/chef/lib/chef/mixin/command.rb:122:in `output_of_command' from C:/opscode/chef/embedded/apps/chef/lib/chef/mixin/command.rb:101:in `run_command_and_return_stdout_stderr' from C:/opscode/chef/embedded/apps/chef/lib/chef/mixin/command.rb:79:in `run_command' from C:/opscode/chef/embedded/apps/chef/lib/chef/application/solo.rb:217 :in `reconfigure' from C:/opscode/chef/embedded/apps/chef/lib/chef/application.rb:58:in `r un' from C:/opscode/chef/embedded/apps/chef/bin/chef-solo:25:in `<top (requi red)>' from C:/opscode/chef/bin/chef-solo:63:in `load' from C:/opscode/chef/bin/chef-solo:63:in `<main>' using Mixlib::ShellOut instead of Chef::Mixin::Command solved the issue
* | | Update comment about how action could be a non-array. [ci skip]Noah Kantrowitz2015-06-301-1/+3
| | |
* | | Merge pull request #3612 from chef/mcquin/chef-config/workstation-config-loaderClaire McQuin2015-06-302-159/+7
|\ \ \ | |_|/ |/| | Move WorkstationConfigLoader into chef-config
| * | Move workstation_config_loader into chef-configmcquin/chef-config/workstation-config-loaderClaire McQuin2015-06-292-159/+7
| | |
* | | Make provider resolution tests less invasive (don't actually instantiate the ↵jk/call_provides_when_resolvingJohn Keiser2015-06-302-10/+6
| | | | | | | | | | | | provider)
* | | Code review commentsJohn Keiser2015-06-303-8/+6
| | |
* | | Make ProviderResolver tests work, fix resources to resolve correctly as well ↵John Keiser2015-06-309-23/+23
| | | | | | | | | | | | as providers
* | | Optimize logic on class initialize so it doesn't fall into theJohn Keiser2015-06-305-55/+80
| | | | | | | | | | | | | | | | | | "look at all classes to see if they provide the DSL" else clause when you're just setting resource_name (which happens on every class). Perf fix for tests.
* | | Fix broken specsJohn Keiser2015-06-301-17/+16
| | |
* | | Rename NoProviderAvailable to ProviderNotFound, add aliasJohn Keiser2015-06-303-6/+5
| | |
* | | Call provides? when resolving, reduce number of calls to provides?John Keiser2015-06-305-76/+70
| | | | | | | | | | | | in Provider
* | | Don't mutate recipe name string in versioned_recipe_listdanielsdeleo2015-06-301-5/+6
| | | | | | | | | | | | fixes #3618
* | | Use windows paths without case-sensitivity.ksubrama/path_spaceKartik Null Cating-Subramanian2015-06-304-80/+126
| | | | | | | | | | | | | | | | | | Fixes #1684 Add tests for path manipulation in chef-fs. Clean up the handling of paths in chef-fs.
* | | Use const_set instead of evaljdm/lwrp-baseJay Mundrawala2015-06-301-1/+1
| | |
* | | Get tests passingJay Mundrawala2015-06-301-0/+15
| | |
* | | Fix ability to monkey match LWRP through Chef::Resource::MyLwrpJay Mundrawala2015-06-302-61/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Repro ===== The following cookbook would repro the issue cookbooks/lwrptest/resources/my_lwrp.rb --------------------------------------- ```ruby ``` cookbooks/lwrptest/providers/my_lwrp.rb --------------------------------------- ```ruby ``` cookbooks/lwrptest/recipes/default.rb ------------------------------------- ```ruby module Something def something puts 'something here' end end ::Chef::Resource::LwrptestMyLwrp.send(:include, Something) lwrptest_my_lwrp 'blah' do something end ``` Why it does not work ==================== Running this in 12.4.0 produces the error ``` NoMethodError ------------- undefined method `something' for LWRP resource lwrptest_my_lwrp from cookbook lwrptest ``` The problem is that LWRP usage through `Chef::Resource::MyLwrp` and `Chef::Provider::MyLwrp` is depreacted. In order to participate in the deprecation, `Chef::Resource::MyLwrp` is a subclass of the actual `MyLwrp` class with `initialize` overriden to do a Chef::Log.deprecation. In the example above, the intention is to add a method to the resource so that it can be used from the dsl. The reason this does not work is because including the method on `Chef::Resource::MyLwrp` adds the method to the subclass, and the resource that is looked up when running the recipe is the actual resource.
* | | Make resource-based guard interpreters cope with arrays.Noah Kantrowitz2015-06-291-1/+2
| | | | | | | | | Ping @adamedx for confirmation.
* | | Be paranoid about potential weird overrides of default_action.Noah Kantrowitz2015-06-291-1/+1
| | | | | | | | | Always compare them as arrays, just in case.
* | | Handle setting default action with the same coercion logic as action.Noah Kantrowitz2015-06-291-9/+4
| | | | | | | | | | | | This coerces default_action(:one) so action() == [:one]. Also update doctoring to match behavior.
* | | Get tests passingJay Mundrawala2015-06-291-1/+1
| | |
* | | Make sure the default case gives an array too.Noah Kantrowitz2015-06-291-1/+1
| | |
* | | Rework Resource#action to match the 12.3 API.Noah Kantrowitz2015-06-291-8/+6
|/ / | | | | | | | | | | | | This means it always coerces to an Array. Also ensures that Resource#action= goes through the same validation. Fixes #3604.
* | The wording seemed odd.jjasghar/needed_theJJ Asghar2015-06-261-1/+1
| | | | | | | | Added the word "the" and it now reads much better.