<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/ruby-gems/chef.git/lib/chef/node.rb, branch https</title>
<subtitle>github.com: opscode/chef.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/ruby-gems/chef.git/'/>
<entry>
<title>Rename Attribute Whitelist/Blacklist to Allowlist/Blocklist</title>
<updated>2020-07-23T21:38:50+00:00</updated>
<author>
<name>Tim Smith</name>
<email>tsmith84@gmail.com</email>
</author>
<published>2020-06-11T18:28:04+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/ruby-gems/chef.git/commit/?id=859e4bdee9d636b51b38537889ad9c2c484e87b9'/>
<id>859e4bdee9d636b51b38537889ad9c2c484e87b9</id>
<content type='text'>
This is an overdue change. These are not terms we should be using as a company or community. To quote our Code of Conduct (https://community.chef.io/code-of-conduct/). "Be careful in the words that you choose. Be kind to others. Practice empathy." This change aims to do exactly that, while maintaining a level of backwards compatibility so we can transition existing users off the legacy configs.

Signed-off-by: Tim Smith &lt;tsmith@chef.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is an overdue change. These are not terms we should be using as a company or community. To quote our Code of Conduct (https://community.chef.io/code-of-conduct/). "Be careful in the words that you choose. Be kind to others. Practice empathy." This change aims to do exactly that, while maintaining a level of backwards compatibility so we can transition existing users off the legacy configs.

Signed-off-by: Tim Smith &lt;tsmith@chef.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix platform_version Chef::VersionString API</title>
<updated>2020-04-17T03:50:56+00:00</updated>
<author>
<name>Lamont Granquist</name>
<email>lamont@scriptkiddie.org</email>
</author>
<published>2020-04-17T03:50:56+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/ruby-gems/chef.git/commit/?id=35fde7009976d30d3783266b51828a6afe5f712c'/>
<id>35fde7009976d30d3783266b51828a6afe5f712c</id>
<content type='text'>
The consumption of ohai attributes by the ohai segment plugin code
was breaking this feature.

Signed-off-by: Lamont Granquist &lt;lamont@scriptkiddie.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The consumption of ohai attributes by the ohai segment plugin code
was breaking this feature.

Signed-off-by: Lamont Granquist &lt;lamont@scriptkiddie.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove copyright dates</title>
<updated>2020-04-13T22:47:17+00:00</updated>
<author>
<name>Lamont Granquist</name>
<email>lamont@scriptkiddie.org</email>
</author>
<published>2020-04-13T22:21:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/ruby-gems/chef.git/commit/?id=4d3b847aee1b917bb139862c623e9633d180fb31'/>
<id>4d3b847aee1b917bb139862c623e9633d180fb31</id>
<content type='text'>
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 &lt;lamont@scriptkiddie.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;lamont@scriptkiddie.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Convert the node[:platform_version] to a Chef::VersionString</title>
<updated>2020-02-26T19:47:50+00:00</updated>
<author>
<name>Lamont Granquist</name>
<email>lamont@scriptkiddie.org</email>
</author>
<published>2020-02-26T19:47:50+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/ruby-gems/chef.git/commit/?id=cf453de40ea9e8f70069b11890d52a09d96d441a'/>
<id>cf453de40ea9e8f70069b11890d52a09d96d441a</id>
<content type='text'>
`node[:platform_version] =~ "~&gt; 1.2"` will now just work.

This might conceivably be breaking if people are doing really weird
things by the class changing (Chef::VersionString still inherits from
String though, so it'll have to be weirdness on par with the bad
`thing.class.to_s == "Mash"` kind of comparisons that were in ohai).

Signed-off-by: Lamont Granquist &lt;lamont@scriptkiddie.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
`node[:platform_version] =~ "~&gt; 1.2"` will now just work.

This might conceivably be breaking if people are doing really weird
things by the class changing (Chef::VersionString still inherits from
String though, so it'll have to be weirdness on par with the bad
`thing.class.to_s == "Mash"` kind of comparisons that were in ohai).

Signed-off-by: Lamont Granquist &lt;lamont@scriptkiddie.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix node[:cookbooks] attribute</title>
<updated>2019-08-26T21:09:12+00:00</updated>
<author>
<name>Lamont Granquist</name>
<email>lamont@scriptkiddie.org</email>
</author>
<published>2019-08-23T22:01:12+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/ruby-gems/chef.git/commit/?id=a8a6ea0734998c32e015259b385ee4fc3e9ccfa8'/>
<id>a8a6ea0734998c32e015259b385ee4fc3e9ccfa8</id>
<content type='text'>
closes #8817

Note that if any calling code winds up seeing this error message:

```
NoMethodError: undefined method `set_cookbook_attribute' for nil:NilClass
```

That means that the cookbook_collection was set before the node was
set on the run_context.  That wouldn't be a bug in core chef, that must
be fixed in the caller to reverse the order of operations.

Since I only made the positional arguments to the run_context constructor
optional in Chef-15.0 though I don't expect this breaks any existing code
written in the past month or two, but if anything crops up in the future,
consider this a definitive statement that the caller must reverse the
order of their operations and this error being thrown is a feature not
a bug to be fixed.

(The fact that we silently aborted rather than threw a NoMethodError on
NilClass meant that we shipped this defect -- sometimes defensive
programming can be overly defensive and swallow real errors).

Signed-off-by: Lamont Granquist &lt;lamont@scriptkiddie.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
closes #8817

Note that if any calling code winds up seeing this error message:

```
NoMethodError: undefined method `set_cookbook_attribute' for nil:NilClass
```

That means that the cookbook_collection was set before the node was
set on the run_context.  That wouldn't be a bug in core chef, that must
be fixed in the caller to reverse the order of operations.

Since I only made the positional arguments to the run_context constructor
optional in Chef-15.0 though I don't expect this breaks any existing code
written in the past month or two, but if anything crops up in the future,
consider this a definitive statement that the caller must reverse the
order of their operations and this error being thrown is a feature not
a bug to be fixed.

(The fact that we silently aborted rather than threw a NoMethodError on
NilClass meant that we shipped this defect -- sometimes defensive
programming can be overly defensive and swallow real errors).

Signed-off-by: Lamont Granquist &lt;lamont@scriptkiddie.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Consistently use NOT_PASSED over alternatives</title>
<updated>2019-08-08T00:07:40+00:00</updated>
<author>
<name>Lamont Granquist</name>
<email>lamont@scriptkiddie.org</email>
</author>
<published>2019-08-08T00:07:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/ruby-gems/chef.git/commit/?id=a90264ea2573173debca60e3acad92f7865d7008'/>
<id>a90264ea2573173debca60e3acad92f7865d7008</id>
<content type='text'>
We have four different versions of this now, and this converts to
just using the one convention in `lib/chef/constants.rb`

Interestingly `Chef::NIL_ARGUMENT` is used nowhere in the codebase, that
probably got refactored out in 12.5.1.

Node objects still use `NIL` but that is a different kind of `Object.new`
which really is semantically private to the implementation of
attributes.

Signed-off-by: Lamont Granquist &lt;lamont@scriptkiddie.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We have four different versions of this now, and this converts to
just using the one convention in `lib/chef/constants.rb`

Interestingly `Chef::NIL_ARGUMENT` is used nowhere in the codebase, that
probably got refactored out in 12.5.1.

Node objects still use `NIL` but that is a different kind of `Object.new`
which really is semantically private to the implementation of
attributes.

Signed-off-by: Lamont Granquist &lt;lamont@scriptkiddie.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fix 4 cops</title>
<updated>2019-07-05T20:41:00+00:00</updated>
<author>
<name>Lamont Granquist</name>
<email>lamont@scriptkiddie.org</email>
</author>
<published>2019-07-05T20:41:00+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/ruby-gems/chef.git/commit/?id=174a2748b54a5dbd746005e2aead59221b80f2b9'/>
<id>174a2748b54a5dbd746005e2aead59221b80f2b9</id>
<content type='text'>
- Layout/MultilineMethodCallBraceLayout
- Layout/ClosingParenthesisIndentation
- Layout/IndentFirstArgument
  EnforcedStyle: consistent
- Layout/BlockEndNewline

the first of these autocorrected to horrible looking code which exposed
that we really needed the other three as well, which also cleaned up a
bunch of other terrible looking code.

Signed-off-by: Lamont Granquist &lt;lamont@scriptkiddie.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Layout/MultilineMethodCallBraceLayout
- Layout/ClosingParenthesisIndentation
- Layout/IndentFirstArgument
  EnforcedStyle: consistent
- Layout/BlockEndNewline

the first of these autocorrected to horrible looking code which exposed
that we really needed the other three as well, which also cleaned up a
bunch of other terrible looking code.

Signed-off-by: Lamont Granquist &lt;lamont@scriptkiddie.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Style/SymbolProc</title>
<updated>2019-07-05T20:26:53+00:00</updated>
<author>
<name>Lamont Granquist</name>
<email>lamont@scriptkiddie.org</email>
</author>
<published>2019-07-05T20:26:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/ruby-gems/chef.git/commit/?id=3b10f9ca503dcbce747241281b9151d3d010f9ef'/>
<id>3b10f9ca503dcbce747241281b9151d3d010f9ef</id>
<content type='text'>
enforce pretzels.

Signed-off-by: Lamont Granquist &lt;lamont@scriptkiddie.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
enforce pretzels.

Signed-off-by: Lamont Granquist &lt;lamont@scriptkiddie.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Style/ClassCheck</title>
<updated>2019-07-05T19:57:40+00:00</updated>
<author>
<name>Lamont Granquist</name>
<email>lamont@scriptkiddie.org</email>
</author>
<published>2019-07-05T19:03:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/ruby-gems/chef.git/commit/?id=8215091264d67d81f0da9a13f968b864ff736cb2'/>
<id>8215091264d67d81f0da9a13f968b864ff736cb2</id>
<content type='text'>
convert kind_of? to is_a?

Signed-off-by: Lamont Granquist &lt;lamont@scriptkiddie.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
convert kind_of? to is_a?

Signed-off-by: Lamont Granquist &lt;lamont@scriptkiddie.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Style/EmptyLiteral</title>
<updated>2019-07-05T19:40:44+00:00</updated>
<author>
<name>Lamont Granquist</name>
<email>lamont@scriptkiddie.org</email>
</author>
<published>2019-07-03T19:26:05+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/ruby-gems/chef.git/commit/?id=4978a9a8a402477f3b35f43404701d6a5cf26fa1'/>
<id>4978a9a8a402477f3b35f43404701d6a5cf26fa1</id>
<content type='text'>
Signed-off-by: Lamont Granquist &lt;lamont@scriptkiddie.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Lamont Granquist &lt;lamont@scriptkiddie.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
