summaryrefslogtreecommitdiff
path: root/lib/chef/dsl/recipe.rb
Commit message (Collapse)AuthorAgeFilesLines
* Convert require to require_relativeLamont Granquist2019-05-081-8/+8
| | | | | | | This gives a speed boost since rubygems does not have to scan through every gem in the gemset in order to find the file. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Chef-15 DSL changeslcg/chef-15-dsl-changesLamont Granquist2019-05-031-7/+1
| | | | | | | | Move the data_query, powershell and registry_helper DSLs up to universal. Move the `tagged?` helper into data_query for organizational purposes. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* WIP: Remove audit mode from chef-clientTim Smith2019-03-111-2/+0
| | | | | | | | This just gives us a line count to the change and perhaps a starting point for when we do this in Chef 15 Signed-off-by: Tim Smith <tsmith@chef.io> Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Remove previously deprecated mixins and Chef::DSL::Recipe::FullDSLchef14_deprecationsTim Smith2018-01-011-12/+2
| | | | | | | | | | | | We wired these up previously with deprecations. They've been deprecated for a long time and are pretty rarely used on the Supermarket. Additionally we have Foodcritic rules to detect their usage: FC102: Deprecated Chef::DSL::Recipe::FullDSL class used FC100: Deprecated Chef::Mixin::Language mixin used FC099: Deprecated Chef::Mixin::LanguageIncludeRecipe mixin used FC098: Deprecated Chef::Mixin::RecipeDefinitionDSLCore mixin used FC097: Deprecated Chef::Mixin::LanguageIncludeAttribute mixin used Signed-off-by: Tim Smith <tsmith@chef.io>
* Chef-13: remove method_missing from the DSLLamont Granquist2017-03-211-4/+1
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Fix a few bad copyrightsTim Smith2016-10-201-1/+1
| | | | | | I think this happened when we merged the Opscode and Chef copyrights Signed-off-by: Tim Smith <tsmith@chef.io>
* update for feedback from stevenLamont Granquist2016-05-171-0/+1
|
* create 'universal' DSLLamont Granquist2016-05-161-9/+14
| | | | this is for DSL methods that get mixed in everywhere.
* rearrange dsl mixinslcg/dsl-rearrangementLamont Granquist2016-03-181-63/+15
| | | | | | | | | | | | | | | | | | | | | | | - creates Chef::DSL::MethodMissing which will be nuked in Chef 13 - creates Chef::DSL::Core which is the mixins into core providers - adds build_resource/define_resource to core providers The intent here is to create Chef::DSL::Core which is intended to become the DSL minus method_missing and things that are only intended for recipes. Right now I've only added build_resource/declare_resource to core providers. We should probably push more into the "Core" DSL so that core providers could do things like use the search API. I would have moved everything other than resources and definitions over but the audit mode stuff is really only appropriate for recipes and not provider code and probably should not be moved over. We should probably have an intermediate mixin which is the "Custom Provider" DSL that has Resources and Definitions mixed into it, but which does not mix in the audit stuff that should only go into the Recipe DSL. There may also be a "Resources DSL" which has mixins for use with not_if/only_if and I'm unclear if that should be the "Core DSL" or another fourth mixin of DSL files.
* rub some YARD on deprecation commentLamont Granquist2016-03-171-1/+1
|
* deprecate Chef::DSL::Recipe::FullDSLlcg/deprecate-fulldslLamont Granquist2016-03-161-18/+16
| | | | | | | | this module was created out of a bit of excessive paranoia instead of simply adding mixins that we always use with Chef::DSL::Recipe directly to Chef::DSL::Recipe. lets try and YAGNI this class and just add it directly. these modules are already injected into everyone's recipes and providers, so I can't imagine a huge amount of backcompat breaks.
* lazy module inclusion into DSL moduleslcg/use-and-lazy-module-includeLamont Granquist2016-03-151-2/+7
| | | | | | Chef::DSL::Recipe::FullDSL.send(:include, MyModule) will now patch all its descendants that it has been included into (works the way actual inheritance works now).
* 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"
* Autofixing Style/PercentLiteralDelimeterslcg/percentliteraldelimetersLamont Granquist2016-01-181-2/+2
| | | | | | 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-15/+15
| | | | | | | 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.
* extract declare_resource to a mixin and extend APILamont Granquist2015-12-011-73/+3
| | | | | | | - extract to its own mixin so it can be included without method_missing and the rest of the resources DSL - add ability to inject different run_context - add ability to create_if_missing into the resource_collection
* Rename log.deprecation to log_deprecationJohn Keiser2015-09-011-2/+2
|
* Pass deprecations through formatter instead of logsJohn Keiser2015-09-011-3/+2
|
* Add current_value_does_not_exist! API, pretty up the outputJohn Keiser2015-07-311-2/+4
|
* Rename Chef::DSL::Recipe::Everything -> FullDSLJohn Keiser2015-06-231-1/+1
|
* Create the `action :name do ... end` syntax for ResourceJohn Keiser2015-06-231-2/+20
|
* Make resource_for_short_name look up the canonical resourcejk/automatic-automatic-nameJohn Keiser2015-06-081-1/+1
|
* Move method_missing to the bottomJohn Keiser2015-06-021-46/+43
|
* Make resource deprecation warnings once-only; fix recipe DSL tests back upJohn Keiser2015-06-021-0/+1
|
* Narrow resolvers to only look at parts of the map we supportJohn Keiser2015-06-021-11/+0
|
* include powershell_out in DSL placesLamont Granquist2015-05-291-0/+2
|
* warn -> deprecationJohn Keiser2015-05-131-5/+5
|
* Deprecate automatic method_missing and Chef::Resource lookupJohn Keiser2015-05-131-35/+50
| | | | | - Declare all resource DSL as methods on Chef::DSL::Resources - Declare all definition DSL as methods on Chef::DSL::Definitions
* Missing require - causes missing Constant when files are loaded in ↵tyler-ball2015-02-251-0/+1
| | | | unexpected order
* Add comments, fix faulty ||=John Keiser2015-02-171-0/+38
|
* Skip 3694 warnings on trivial resource cloningLamont Granquist2015-01-121-31/+11
| | | | | | | Turns the 3694 warning into a debug message if the prior resource is identical to the current resource. Suggestion for opscode/chef-rfc#76 This also moves resource building out to its own class.
* First pass at fixing broken notificationstyler-ball2014-12-161-1/+2
| | | | | | Fixing some code I changed unecessarily Removing TODOs which are not necessary
* Chef-12 RC Provider ResolverLamont Granquist2014-10-241-1/+0
| | | | | makes resource and provider class resolution more dynamic. begins deprecation of Chef::Platform static mapping.
* Merge pull request #2216 from opscode/tball/bsd_package_nameTyler Ball2014-10-171-16/+2
|\ | | | | Notify a resource by the `resource[name]` key it was written as
| * Cleaning up based on review commentstyler-ball2014-10-171-1/+1
| |
| * Refactoring ResourceCollection interface to be backwards compatiable, all ↵tyler-ball2014-10-161-2/+1
| | | | | | | | specs continue to pass, removing ResourceSet and ResourceList from consumer knowledge
| * first attempt at refactoring ResourceCollection into two objectstyler-ball2014-10-161-16/+3
| |
* | return whatever the definition returnsLamont Granquist2014-10-161-5/+1
|/ | | | | | | this can allow method chaining so that if you call a definition to create a resource, and the definition takes the time to return the resource as its retval, then you can hang a .not_if off of the definition (or .only_if/.notifies/.subscribes/etc)
* Changed exception to ResourceNotFound and printed the passed block nameNolan Davidson2014-09-111-1/+2
|
* Added exec method to Recipe, addressing Issue 1689Nolan Davidson2014-09-111-0/+4
|
* Make sure freebsd_package is captured with the resource name it's declared ↵Serdar Sutay2014-08-131-0/+14
| | | | with in resource collection.
* add shell_out mixins to recipe DSLLamont Granquist2014-07-281-0/+1
|
* Make it possible to include Chef::Provider / Chef::ResourceJohn Keiser2014-04-241-1/+4
| | | | without circular dependencies or missing deps
* Remove default implementation of Recipe DSL interfacedanielsdeleo2014-02-191-14/+0
| | | | | Depending on the inheritance tree, the default implementations could incorrectly be preferred to the real ones.
* Move method call to resource.load_prior_resource to fix CHEF-5052 resource ↵Jon Cowie2014-02-191-2/+3
| | | | merge issues
* Localize rescues in Recipe method_missing DSLdanielsdeleo2014-02-071-5/+7
|
* Better specify what happens for NoMethodErrors in the DSLdanielsdeleo2014-02-031-2/+23
|
* Expose resource creation via more static methodsdanielsdeleo2014-02-031-38/+98
|
* [CHEF-3783] Make deprecated constants availabledanielsdeleo2013-01-231-1/+4
| | | | | | * Make deprecated constants in Chef::Mixin available by loading the relevant files from the chef/dsl files that replace them. * Add deprecation warnings via const_missing hook.