| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
department of redundancy department
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
| |
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
|
|
|
|
|
|
| |
closes #5556
corrects behavior to 12.11.x behavior which was lost in the refactor
may address #5715
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|\
| |
| | |
Core: fix Lint/UnifiedInteger cop
|
| |
| |
| |
| |
| |
| | |
believe this becomes necessary for ruby 2.4/3.0
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
|/
|
|
|
|
|
| |
Obvious fix.
Introduced in: e57e29b96b75ff7fc04abb7f9db73920b2a5894a
Signed-off-by: Adam Ward <adamw@subdesigns.net>
|
|
|
|
| |
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
| |
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
| |
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
consistency with Unchain here:
https://github.com/chef/chef/blob/master/lib/chef/decorator/unchain.rb#L23-L24
and with SimpleDelegator:
https://ruby-doc.org/stdlib-2.1.0/libdoc/delegate/rdoc/SimpleDelegator.html#method-i-__getobj__
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
| |
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
if anyone is using these directly this might be a breaking change,
although it makes it considerably easier to use VividMash and IMO
ImmutableMash is an implementation detail of the deep merge cache
and Chef::Node object.
we definitely have never documented these APIs, so I think the onus
is on the consumer to update their code.
VividMash.new() should now work.
VividMash.new({ foo: :bar }) should also now work.
IDK what object people would have been passing in as the root object
before.
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
| |
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
|
|
| |
much less red now
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
| |
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
|
|
| |
gets the inheritence chain correct
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
| |
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
|
|
|
|
|
|
| |
via node.__path variable
using __underscore format because node["path"] could very
well be used and we still have to deal with node.path method_missing
horribleness.
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
VividMash, unlike Mash, does not recursively convert values inside
arrays, just the array itself.
As such, hashes inside arrays are not converted to *Mash, introducing
a behaviour that differs from Chef 11, e.g.
having this attr defined
node['foo'] = [ { 'attr' => 'value' } ]
in Chef 11 `node[:foo][0][:attr]` returns `'value'` while in Chef 12 it
returns `nil`
This commit fixes VividMash so arrays are recursively converted and the
behaviour restored.
Plus, immutablize merge_all result, so to be sure that hashes contained
in Arrays are properly immutablized as well, so not existing attributes
are not automatically vivified (thus returning an empty VividMash
instead of nil)
This problem was first reported in chef/chef#2871.
Signed-off-by: Giacomo Bagnoli <gbagnoli@gmail.com>
|
|
|
|
| |
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
| |
|
|\
| |
| | |
add back method_missing support to set_unless
|
| | |
|
|/
|
|
|
|
| |
note that the node_spec test in this commit is not red on master
so it ain't testing the right thing yet, but this fixes the
issue in chef-shell...
|
|
|
|
|
|
|
|
|
|
|
| |
- fixes *_unless behavior and set_unless_value_present hack from Chef 12
- simplifies rm_* code
- introduces functional read/write/unlink/exist? API
- deprecates method_missing access to attributes for Chef 13
- deprecates set/set_unless aliases for Chef 14
- removes MultiMash mess that I wrote for Chef 13
https://github.com/chef/chef/pull/5029 for more details
|
|
|
|
| |
second round of autofixing for some reason...
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
4174 Style/SpaceInsideHashLiteralBraces
1860 Style/SpaceAroundOperators
1336 Style/SpaceInsideBlockBraces
1292 Style/AlignHash
997 Style/SpaceAfterComma
860 Style/SpaceAroundEqualsInParameterDefault
310 Style/EmptyLines
294 Style/IndentationConsistency
267 Style/TrailingWhitespace
238 Style/ExtraSpacing
212 Style/SpaceBeforeBlockBraces
166 Style/MultilineOperationIndentation
144 Style/TrailingBlankLines
120 Style/EmptyLineBetweenDefs
101 Style/IndentationWidth
82 Style/SpaceAroundBlockParameters
40 Style/EmptyLinesAroundMethodBody
29 Style/EmptyLinesAroundAccessModifier
1 Style/RescueEnsureAlignment
|
|
|
| |
Generated via git ls-files | xargs perl -pi -e "s/(Author.*?<[^@]+@)(?:opscode\\.com|getchef\\.com)(>)/\\1chef.io\\2/gi"
|
|
|
| |
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"
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
chefstyle -a fixed 1044 occurrances
|
|
|
|
|
|
|
| |
previously if the node had a { normal: { tags: nil } } that we read
since the key existed (but was nil) we would not initialize with an
array. replacing the code with a call to node.set_unless revealed that
set_unless was similarly buggy. fixed both issues by fixing set_unless.
|
|
|
|
| |
https://github.com/chef/chef/issues/1562
|
| |
|
|
|
|
|
|
|
|
| |
In 12.0.0 we introduced a cache for the merged attributes for the
top-level node attribute keys. This fixes this so that node['foo']
and node[:foo] are not cached separately. This also showed up in bugs
as issues between node['foo'] access and node.foo access because
node.foo is translated into node[:foo].
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
- adding rm, rm_default, rm_normal, rm_override APIs
- adding default!, normal! and override! APIs
- changing force_default! and force_override! APIs
|
| |
|
|
|
|
|
|
|
|
| |
to_a respectively
- ImmutableMash now implements a to_hash method. This recurses through the ImmutableMash and returns a fully mutable Hash
- ImmutableArray now implements a to_a method. This recurses through the ImmutableArray and returns a fully mutable Array
- Unit tests added for both of the above methods
|