| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
Legally incredibly dubious, particularly since we don't follow it
strictly as policy, and we have git history instead, which does it right.
This is just a waste of time and a cargo cult.
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
| |
Signed-off-by: Tim Smith <tsmith@chef.io>
|
|
|
|
|
|
| |
Add these to universal so that existing users can use chef-vault data bags without the need for the cookbook. This allows us to deprecate that cookbook entirely.
Signed-off-by: Tim Smith <tsmith@chef.io>
|
|
|
|
|
|
| |
When we migrated to hugo the URLs changed a bit. Nothing ends in .html and we moved all the resources into their own dir.
Signed-off-by: Tim Smith <tsmith@chef.io>
|
|
|
|
|
|
| |
Within Chef this is only used in the windows_feature_powershell resource which I've cleaned up.
Signed-off-by: Tim Smith <tsmith@chef.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This lets us avoid using declare_resource in old style core resources.
As everything gets converted over to custom resources this is going away
anyway.
We haven't seen any issues from using the recipe DSL in custom resources
in core.
Clearly this is potentially breaking since any references to
Chef::DSL::Core need to be changed to Chef::DSL::Recipe (although I'm
not sure who would have done that other than maybe us somewhere, I had
a note in there that nobody should probably touch the Core DSL).
This greatly simplifies the major DSLs down to two:
Recipe DSL - things that only make sense in a context where there is a resource_collection
Universal DSL - things that apply everywhere
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
|
|
| |
The new Rubocop detects more unnecessary returns. This fixes these ahead of time so we can roll out the new Rubocop engine without breaking builds later.
Signed-off-by: Tim Smith <tsmith@chef.io>
|
|
|
|
|
|
|
|
| |
The code examples inconsistently refer to `/x/y.txy` as well as `x/y.txt`, it seems that the latter is intended.
Obvious fix.
Signed-off-by: Michel Alexandre Salim <michel@fb.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is the implementation of [RFC-087](https://github.com/chef-boneyard/chef-rfc/blob/master/rfc087-distro-sugar-helpers.md)
although some of the specifics have been iterated on and changed.
The documentation will be in the [README.md](https://github.com/chef/chef/tree/master/chef-utils/README.md) once this is merged.
While this PR mostly moves chef-sugar utilities into core-chef via this chef-utils gem, the scope of the chef-utils gem
should be considered larger than just that. As an example this PR moves the Mash class into this gem for reuse in ohai
as well.
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
|
|
| |
convert kind_of? to is_a?
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
| |
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
|
|
|
| |
i like this one, gives visual priority to returns or raises that are
buried in the middle of things.
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
|
|
|
|
| |
- integrates target-mode fully with shell_out
- removes the train_or_shellout mixin
- apt_package is now fully supported in target-mode
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
| |
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The train_or_shell mixin should mixin its dependent mixins and
require them, which removes the need to do that in the calling classes.
Include TrainOrShell correctly in the Universal DSL.
Few more code tweaks ("protected" is largely worthless in ruby and was
always being misused here).
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
| |
Signed-off-by: Bryan McLellan <btm@chef.io>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
|
|
|
| |
somehow this was missed in #4942 which makes this DSL much less
useful as a target.
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
|
|
|
| |
this is the result of changes to rules we already previously had
enabled.
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
| |
Signed-off-by: Kapil Chouhan <kapil.chouhan@msystechnologies.com>
|
|
|
|
|
|
| |
Remove the lazy loading of chef provisioning resources
Signed-off-by: Tim Smith <tsmith@chef.io>
|
|
|
|
|
|
|
| |
We've been warning on this one for YEARS and we have a Foodcritic rule
for it as well, which has been around since before I was at Chef.
Signed-off-by: Tim Smith <tsmith@chef.io>
|
|
|
|
| |
Signed-off-by: Tim Smith <tsmith@chef.io>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Custom resource actions were picking this up via delegation to
the wrapping resource, and that wiring was removed in 14, so that
API then got dropped accidentally. This should fix that back
up. It also consistently injects the resource APIs into resources
and providers both now (and consistently across core resources
and custom resources).
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
| |
Signed-off-by: Thom May <thom@chef.io>
|
|
|
|
|
|
| |
some cops got a little stricter.
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|\
| |
| |
| | |
Signed-off-by: <>
|
| |
| |
| |
| |
| |
| | |
Windows 2003 is fully end of life at this point and hasn't been supported by Chef for quite a while. EXTENDED support for Windows 2003 ended July 14, 2015. We avoid a good number of WMI queries by removing this support entirely.
Signed-off-by: Tim Smith <tsmith@chef.io>
|
|/
|
|
| |
Signed-off-by: Stuart Preston <stuart@chef.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
This forces everyone to starting using new_resource.property_name
instead of just property_name.
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
|
|
|
|
| |
this also deprecates the multi-resource notification syntax where
`foo[a,b]` would attempt to notify both `foo[a]` and `foo[b]` because
that is hella ambiguous.
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
| |
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This makes nameless resources work in the DSL:
```ruby
apt_update
```
It does it by giving it an empty-string name of ""
It also drops support for multi-arg resources, that has been deprecated
for some time:
```ruby
some_resource "foo", "bar", "baz"
```
Note that multipackage package resources do not use multiple args, but a
single argument which is an arry:
```ruby
package [ "lsof", "strace", "tcpdump" ]
```
So this change does not affect that usage. Multi-arg has been
deprecated for some time now and its not clear that it was ever used by
anyone.
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
we did actually have tests around creating actions with spaces and
hyphens in their names. we had fallback code for properties, but it
was broken and threw a "private method define_resource called" and then
it created a closure and didn't have the `name` in the binding so it
called itself and blew up the stack.
this change walks that back. it does prove that we still support
UTF-8 in property names, actions and DSL names, which i'd argue is
more than enough.
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
| |
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Likely nobody cares about this change, I added it and then a
release or two later introduced the better edit_resource style
of API.
I also changed "created_at" to be a proper named parameter, instead
of a positional parameter, which is a breaking change in an API that
has been around for quite some time -- makes the API consistent since
I added it as a named parameter to the new APIs when I wrote them.
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
|
|
| |
department of redundancy department
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
|
|
| |
Trivial change to ensure node.docker? returns either true or false.
Signed-off-by: Andrew Brown <andrew.j.brown@gmail.com>
|
|
|
|
|
|
|
|
| |
This adds URLs to each class of deprecation, and correctly prints and
formats them for maximum user efficiency. We also provide the URL to the
data collector for Visibility to ingest.
Signed-off-by: Thom May <thom@chef.io>
|
|
|
|
|
|
| |
I think this happened when we merged the Opscode and Chef copyrights
Signed-off-by: Tim Smith <tsmith@chef.io>
|
|
|
|
|
|
| |
introduce run_context.root_run_context that avoids global state
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
| |
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
|
|
|
|
|
|
| |
helps with scoping issues, best practice would be to always use
the |new_resource| argument to the block when using edit_resource
inside of resources
https://github.com/chef/chef/issues/5438
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
|
|
|
|
| |
fixing this would either be hella ugly or would change the API
just prevent more of this leaking into the codebase
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|