<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/ruby-gems/chef.git/spec/unit/property, 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>Force requiring properties</title>
<updated>2020-04-17T23:23:51+00:00</updated>
<author>
<name>Lamont Granquist</name>
<email>lamont@scriptkiddie.org</email>
</author>
<published>2020-04-17T19:51:13+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/ruby-gems/chef.git/commit/?id=49aa17ad9805b6949baaa37cfe66f8cf2b8083a8'/>
<id>49aa17ad9805b6949baaa37cfe66f8cf2b8083a8</id>
<content type='text'>
All required properties are now required for all actions by default
even if the action does not reference the property.

In order to only make the property required for a subset of the
actions, specify them as an array of symbols to the required
options on the property.

```
property :whatever, String, required: %i{start stop}

action :start do
end

action :stop do
end

action :enable do
end

action :disable do
end
```

That property will be required for start+stop but not for
enable+disable.

There's an unaddressed edge case here where if you reference the
property in an action which was not specified that it will also
fail validation.  That is correct behavior.  We should probably
dig into how to warn the user that they must either remove the
reference to the property from that action or else to add the
action to the list of required actions on the property.

Signed-off-by: Lamont Granquist &lt;lamont@scriptkiddie.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
All required properties are now required for all actions by default
even if the action does not reference the property.

In order to only make the property required for a subset of the
actions, specify them as an array of symbols to the required
options on the property.

```
property :whatever, String, required: %i{start stop}

action :start do
end

action :stop do
end

action :enable do
end

action :disable do
end
```

That property will be required for start+stop but not for
enable+disable.

There's an unaddressed edge case here where if you reference the
property in an action which was not specified that it will also
fail validation.  That is correct behavior.  We should probably
dig into how to warn the user that they must either remove the
reference to the property from that action or else to add the
action to the list of required actions on the property.

Signed-off-by: Lamont Granquist &lt;lamont@scriptkiddie.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Change name_property to be identity and not desired_state by default</title>
<updated>2020-04-03T02:52:21+00:00</updated>
<author>
<name>Lamont Granquist</name>
<email>lamont@scriptkiddie.org</email>
</author>
<published>2020-04-03T02:52:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/ruby-gems/chef.git/commit/?id=8dcf5be92642700ee3f2aedb83484bcf0e2c159c'/>
<id>8dcf5be92642700ee3f2aedb83484bcf0e2c159c</id>
<content type='text'>
If no other property is an identity property then the name_property is
the default identity property.  The name_property is also marked as not
being desired state by default (the 'name' should never change).

Signed-off-by: Lamont Granquist &lt;lamont@scriptkiddie.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If no other property is an identity property then the name_property is
the default identity property.  The name_property is also marked as not
being desired state by default (the 'name' should never change).

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>tweak Lint/BlockAlignment</title>
<updated>2019-07-02T22:50:39+00:00</updated>
<author>
<name>Lamont Granquist</name>
<email>lamont@scriptkiddie.org</email>
</author>
<published>2019-07-02T22:50:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/ruby-gems/chef.git/commit/?id=f50ffe2b1b3b0afc7aa2b01a9356e439f78a5fcd'/>
<id>f50ffe2b1b3b0afc7aa2b01a9356e439f78a5fcd</id>
<content type='text'>
Lint/BlockAlignment:
  Enabled: true
  EnforcedStyleAlignWith: start_of_block

this works better with Layout/MultilineMethodCallIndentation to
force indentation of multiline method calls that wind up with multiline
blocks.

i'd probably pull back the end to match with the start of the expression
but this gets the indentation level inside the block correct.

Signed-off-by: Lamont Granquist &lt;lamont@scriptkiddie.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Lint/BlockAlignment:
  Enabled: true
  EnforcedStyleAlignWith: start_of_block

this works better with Layout/MultilineMethodCallIndentation to
force indentation of multiline method calls that wind up with multiline
blocks.

i'd probably pull back the end to match with the start of the expression
but this gets the indentation level inside the block correct.

Signed-off-by: Lamont Granquist &lt;lamont@scriptkiddie.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Style/SymbolArray</title>
<updated>2019-07-02T22:11:54+00:00</updated>
<author>
<name>Lamont Granquist</name>
<email>lamont@scriptkiddie.org</email>
</author>
<published>2019-07-02T22:11:54+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/ruby-gems/chef.git/commit/?id=e71560df5cebbfb209089c6255e37e65f0e34d95'/>
<id>e71560df5cebbfb209089c6255e37e65f0e34d95</id>
<content type='text'>
start enforcing using %i{} instead of arrays of symbols

Signed-off-by: Lamont Granquist &lt;lamont@scriptkiddie.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
start enforcing using %i{} instead of arrays of symbols

Signed-off-by: Lamont Granquist &lt;lamont@scriptkiddie.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fix Layout/EmptyLineAfterGuardClause</title>
<updated>2019-07-02T22:09:07+00:00</updated>
<author>
<name>Lamont Granquist</name>
<email>lamont@scriptkiddie.org</email>
</author>
<published>2019-07-02T22:09:07+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/ruby-gems/chef.git/commit/?id=7a1a6c8ef26c787e4b6dd1602f3d158b37e81720'/>
<id>7a1a6c8ef26c787e4b6dd1602f3d158b37e81720</id>
<content type='text'>
i like this one, gives visual priority to returns or raises that are
buried in the middle of things.

Signed-off-by: Lamont Granquist &lt;lamont@scriptkiddie.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
i like this one, gives visual priority to returns or raises that are
buried in the middle of things.

Signed-off-by: Lamont Granquist &lt;lamont@scriptkiddie.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fix Layout/AlignArguments</title>
<updated>2019-07-02T18:13:54+00:00</updated>
<author>
<name>Lamont Granquist</name>
<email>lamont@scriptkiddie.org</email>
</author>
<published>2019-07-02T18:11:35+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/ruby-gems/chef.git/commit/?id=77f8739a4741e2370e40ec39345a92a6ea393a1a'/>
<id>77f8739a4741e2370e40ec39345a92a6ea393a1a</id>
<content type='text'>
this is using:

Layout/AlignArguments:
  Enabled: true
  EnforcedStyle: with_fixed_indentation

the default style can use really excessive whitespace.  on starting
lines which are already long, it fully indents across to where the
arguments start and then begins the line there.

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

Layout/AlignArguments:
  Enabled: true
  EnforcedStyle: with_fixed_indentation

the default style can use really excessive whitespace.  on starting
lines which are already long, it fully indents across to where the
arguments start and then begins the line there.

Signed-off-by: Lamont Granquist &lt;lamont@scriptkiddie.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Setting nil to properties with implicit nil sets default value</title>
<updated>2018-03-23T02:49:10+00:00</updated>
<author>
<name>Lamont Granquist</name>
<email>lamont@scriptkiddie.org</email>
</author>
<published>2018-03-23T02:48:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/ruby-gems/chef.git/commit/?id=7eb06ba4180c2acd0821fc127e8f4149c0f88bca'/>
<id>7eb06ba4180c2acd0821fc127e8f4149c0f88bca</id>
<content type='text'>
- This makes converting core resources to properties safer

- This makes it easier to apply wrapping properties to subresources

property :foo, String, default: "foo"

This is where the change lies, and writing a nil here will now actually
write a "foo" to the variable.

property :foo, [ String, nil ], default: "foo"

This is unchanged.  Writing nil writes nil.

property :foo, String

Technically this is changed, since it writes the default value, but
since nil.equal?(nil) in a very deep way no behavior changes.

Signed-off-by: Lamont Granquist &lt;lamont@scriptkiddie.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- This makes converting core resources to properties safer

- This makes it easier to apply wrapping properties to subresources

property :foo, String, default: "foo"

This is where the change lies, and writing a nil here will now actually
write a "foo" to the variable.

property :foo, [ String, nil ], default: "foo"

This is unchanged.  Writing nil writes nil.

property :foo, String

Technically this is changed, since it writes the default value, but
since nil.equal?(nil) in a very deep way no behavior changes.

Signed-off-by: Lamont Granquist &lt;lamont@scriptkiddie.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Implement RFC 101: Custom Validation Messages</title>
<updated>2018-02-12T17:36:27+00:00</updated>
<author>
<name>Thom May</name>
<email>thom@chef.io</email>
</author>
<published>2018-02-12T15:10:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/ruby-gems/chef.git/commit/?id=edba4de26a16e5445a803814c2703f10e6317d12'/>
<id>edba4de26a16e5445a803814c2703f10e6317d12</id>
<content type='text'>
Adds validation_message as a property option

Signed-off-by: Thom May &lt;thom@chef.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Adds validation_message as a property option

Signed-off-by: Thom May &lt;thom@chef.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Chef-13:  Nillable properties</title>
<updated>2017-03-16T05:58:08+00:00</updated>
<author>
<name>Lamont Granquist</name>
<email>lamont@scriptkiddie.org</email>
</author>
<published>2017-03-16T05:58:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/ruby-gems/chef.git/commit/?id=0d6c4462a6c88584ee8a2c8cedc0865c39880154'/>
<id>0d6c4462a6c88584ee8a2c8cedc0865c39880154</id>
<content type='text'>
remove deprecations and now properties are nillable and passing a nil is
now always a set, not a get.

Signed-off-by: Lamont Granquist &lt;lamont@scriptkiddie.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
remove deprecations and now properties are nillable and passing a nil is
now always a set, not a get.

Signed-off-by: Lamont Granquist &lt;lamont@scriptkiddie.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
