<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/ruby-gems/chef.git/lib/chef/provider_resolver.rb, branch https</title>
<subtitle>github.com: opscode/chef.git
</subtitle>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/ruby-gems/chef.git/'/>
<entry>
<title>Convert require to require_relative</title>
<updated>2019-05-09T00:03:26+00:00</updated>
<author>
<name>Lamont Granquist</name>
<email>lamont@scriptkiddie.org</email>
</author>
<published>2019-05-09T00:03:26+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/ruby-gems/chef.git/commit/?id=bc7687e56763cedbd010cfd566aa2fc0c53bb194'/>
<id>bc7687e56763cedbd010cfd566aa2fc0c53bb194</id>
<content type='text'>
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 &lt;lamont@scriptkiddie.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;lamont@scriptkiddie.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mechanical conversion of most debug log statements to trace</title>
<updated>2018-03-26T17:34:39+00:00</updated>
<author>
<name>Thom May</name>
<email>thom@chef.io</email>
</author>
<published>2018-03-23T13:05:13+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/ruby-gems/chef.git/commit/?id=97c1dd6f1cac6d97e85d05039cad8b28596141ba'/>
<id>97c1dd6f1cac6d97e85d05039cad8b28596141ba</id>
<content type='text'>
Signed-off-by: Thom May &lt;thom@chef.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Thom May &lt;thom@chef.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Chef-13: remove more deprecated provider_resolver code</title>
<updated>2017-03-29T19:48:24+00:00</updated>
<author>
<name>Lamont Granquist</name>
<email>lamont@scriptkiddie.org</email>
</author>
<published>2017-03-20T19:36:33+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/ruby-gems/chef.git/commit/?id=6f11e1c36caba0b56ed304746551868c0ff1a546'/>
<id>6f11e1c36caba0b56ed304746551868c0ff1a546</id>
<content type='text'>
I think this nukes descendants tracker, although might need to clean it
up in a few more spots.

Signed-off-by: Lamont Granquist &lt;lamont@scriptkiddie.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I think this nukes descendants tracker, although might need to clean it
up in a few more spots.

Signed-off-by: Lamont Granquist &lt;lamont@scriptkiddie.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix Chef-13 action_class bug and cleanup</title>
<updated>2017-03-27T19:05:17+00:00</updated>
<author>
<name>Lamont Granquist</name>
<email>lamont@scriptkiddie.org</email>
</author>
<published>2017-03-27T18:55:40+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/ruby-gems/chef.git/commit/?id=d82ac7a7c66ffcf6120092f536dd41a9c06db872'/>
<id>d82ac7a7c66ffcf6120092f536dd41a9c06db872</id>
<content type='text'>
The old action_class code was doing some magical stuff with the provider
accessor in order to determine if the class was supposed to be a custom
resource or not and have the action_class autovivifying accessor return nil
in cases when the resource wasn't a custom resource and implementing
inheritance by walking back up the tree in ways that were difficult to
grok.

This removes the magic from the provider so that there's no longer any
accessor that magically short-circuits to nil if the resource is not
supposed to be a custom resource.

There is now a simple inherited API for `Chef::Resource.custom_resource?`
which just defines if the class is a custom resource or not.  Since both
`action` and `action_class` call `define_action_class` they both wind up
setting this boolean on the class, which is then inherited to subclasses
automatically, which eliminates the need to walk up the hierarchy.

The superclass.respond_to?(:action_class) checks have also been rendered
unnecessary by removing the code that walked up the inheritance
hierarchy and also because Chef::Resource is never going to be a
custom resource itself, so will never call `define_action_class` so from
inside of `define_action_class` you can always rely on the superclass
being a resource and implementing `custom_resource?` and `action_class`.

The wiring for picking the provider is now moved explicitly to the
ProviderResolver -- even though custom resources hardcode a 1:1
resource-to-provider mapping.  This reads much clearer to me than the
magical wiring to the provider accessor off of the instance.

The bug that this fixes was that the way the magical accessor
nil-or-action_class was implemented the old way of defining action
helpers with class_eval broke:

```ruby
action_class.class_eval &lt;&lt; EOM
  def a
    "foo"
  end
EOM
```

If that came before any action_class-with-a-block or action declaration
and the resource did not inherit from another custom resource then the
action_class would not be created and it would return nil, which was an
API which the magical wiring in the provider accessor required.

Signed-off-by: Lamont Granquist &lt;lamont@scriptkiddie.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The old action_class code was doing some magical stuff with the provider
accessor in order to determine if the class was supposed to be a custom
resource or not and have the action_class autovivifying accessor return nil
in cases when the resource wasn't a custom resource and implementing
inheritance by walking back up the tree in ways that were difficult to
grok.

This removes the magic from the provider so that there's no longer any
accessor that magically short-circuits to nil if the resource is not
supposed to be a custom resource.

There is now a simple inherited API for `Chef::Resource.custom_resource?`
which just defines if the class is a custom resource or not.  Since both
`action` and `action_class` call `define_action_class` they both wind up
setting this boolean on the class, which is then inherited to subclasses
automatically, which eliminates the need to walk up the hierarchy.

The superclass.respond_to?(:action_class) checks have also been rendered
unnecessary by removing the code that walked up the inheritance
hierarchy and also because Chef::Resource is never going to be a
custom resource itself, so will never call `define_action_class` so from
inside of `define_action_class` you can always rely on the superclass
being a resource and implementing `custom_resource?` and `action_class`.

The wiring for picking the provider is now moved explicitly to the
ProviderResolver -- even though custom resources hardcode a 1:1
resource-to-provider mapping.  This reads much clearer to me than the
magical wiring to the provider accessor off of the instance.

The bug that this fixes was that the way the magical accessor
nil-or-action_class was implemented the old way of defining action
helpers with class_eval broke:

```ruby
action_class.class_eval &lt;&lt; EOM
  def a
    "foo"
  end
EOM
```

If that came before any action_class-with-a-block or action declaration
and the resource did not inherit from another custom resource then the
action_class would not be created and it would return nil, which was an
API which the magical wiring in the provider accessor required.

Signed-off-by: Lamont Granquist &lt;lamont@scriptkiddie.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "Chef-13: remove more deprecated provider_resolver code"</title>
<updated>2017-03-20T19:38:22+00:00</updated>
<author>
<name>Lamont Granquist</name>
<email>lamont@scriptkiddie.org</email>
</author>
<published>2017-03-20T19:38:22+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/ruby-gems/chef.git/commit/?id=62f18e4d6db732e3d86991f08815c4e091a9dd27'/>
<id>62f18e4d6db732e3d86991f08815c4e091a9dd27</id>
<content type='text'>
forgot to branch and need more coffee

This reverts commit 02ec917f9356d999c44aceb7f1ff43957b0fe832.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
forgot to branch and need more coffee

This reverts commit 02ec917f9356d999c44aceb7f1ff43957b0fe832.
</pre>
</div>
</content>
</entry>
<entry>
<title>Chef-13: remove more deprecated provider_resolver code</title>
<updated>2017-03-20T19:36:33+00:00</updated>
<author>
<name>Lamont Granquist</name>
<email>lamont@scriptkiddie.org</email>
</author>
<published>2017-03-20T19:36:33+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/ruby-gems/chef.git/commit/?id=02ec917f9356d999c44aceb7f1ff43957b0fe832'/>
<id>02ec917f9356d999c44aceb7f1ff43957b0fe832</id>
<content type='text'>
I think this nukes descendants tracker, although might need to clean it
up in a few more spots.

Signed-off-by: Lamont Granquist &lt;lamont@scriptkiddie.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I think this nukes descendants tracker, although might need to clean it
up in a few more spots.

Signed-off-by: Lamont Granquist &lt;lamont@scriptkiddie.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Chef-13:  remove Chef::Platform.set and related methods</title>
<updated>2017-03-17T19:35:58+00:00</updated>
<author>
<name>Lamont Granquist</name>
<email>lamont@scriptkiddie.org</email>
</author>
<published>2017-03-17T19:33:28+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/ruby-gems/chef.git/commit/?id=ddb93d1d20205565fd7092e2fdeca3efddb00698'/>
<id>ddb93d1d20205565fd7092e2fdeca3efddb00698</id>
<content type='text'>
Switch over the Chef-12.0 ProviderResolver is now completed.

Signed-off-by: Lamont Granquist &lt;lamont@scriptkiddie.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Switch over the Chef-12.0 ProviderResolver is now completed.

Signed-off-by: Lamont Granquist &lt;lamont@scriptkiddie.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fix provider_resolver comment to remove FIXME</title>
<updated>2016-12-08T19:26:36+00:00</updated>
<author>
<name>Lamont Granquist</name>
<email>lamont@scriptkiddie.org</email>
</author>
<published>2016-12-08T19:26:36+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/ruby-gems/chef.git/commit/?id=6300a9206d1d6cd354deffd3dbad587db6c35912'/>
<id>6300a9206d1d6cd354deffd3dbad587db6c35912</id>
<content type='text'>
no, we should not do this only in why-run mode, add more yapping to
make that clear.

Signed-off-by: Lamont Granquist &lt;lamont@scriptkiddie.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
no, we should not do this only in why-run mode, add more yapping to
make that clear.

Signed-off-by: Lamont Granquist &lt;lamont@scriptkiddie.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Structure deprecations with additional metadata</title>
<updated>2016-11-16T16:28:15+00:00</updated>
<author>
<name>Thom May</name>
<email>thom@chef.io</email>
</author>
<published>2016-10-14T15:46:51+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/ruby-gems/chef.git/commit/?id=64b8b0efd90e59ad609ba30fe4bc7ff19e70e940'/>
<id>64b8b0efd90e59ad609ba30fe4bc7ff19e70e940</id>
<content type='text'>
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 &lt;thom@chef.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;thom@chef.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Copyright year update for 2016 and massive cleanup.</title>
<updated>2016-02-02T22:43:28+00:00</updated>
<author>
<name>Noah Kantrowitz</name>
<email>noah@coderanger.net</email>
</author>
<published>2016-02-02T22:43:28+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/ruby-gems/chef.git/commit/?id=0878ed6123706ed4201644ee798da993f8cb5ad4'/>
<id>0878ed6123706ed4201644ee798da993f8cb5ad4</id>
<content type='text'>
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"</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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"</pre>
</div>
</content>
</entry>
</feed>
