cookbook 'delayed_evaluator', '~> 0.2.0'
delayed_evaluator (2) Versions 0.2.0 Follow1
Delay stuff!
cookbook 'delayed_evaluator', '~> 0.2.0', :supermarket
knife supermarket install delayed_evaluator
knife supermarket download delayed_evaluator
DelayedEvaluator
This is a PoC cookbook to show a working solution for delayed
attribute evaluation within resource blocks. The relevant
Chef ticket is here:
Update
This feature will be a native feature in Chef 11. The naming has
been updated from #delay_eval to #lazy.
Example
Below is an example recipe to demonstrate the usage.
include_recipe 'delayed_evaluator' node.default[:testbook][:test_content] = "I'm the compile time value!" ruby_block 'reset test content' do block do node.default[:testbook][:test_content] = "I'm the execution time value!" end end file '/opt/test_no_delay' do content node[:testbook][:test_content] end file '/opt/test_delay' do content lazy{ node[:testbook][:test_content] } end
Note that the evaluation block must be provided to the #lazy
method. It simply generates a Chef::DelayedEvaluator instance to
prevent conflicts where attributes are expecting a block.
Dependent cookbooks
This cookbook has no specified dependencies.
Contingent cookbooks
Collaborator Number Metric
0.2.0 failed this metric
Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.
Contributing File Metric
0.2.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
Foodcritic Metric
0.2.0 failed this metric
FC064: Ensure issues_url is set in metadata: delayed_evaluator/metadata.rb:1
FC065: Ensure source_url is set in metadata: delayed_evaluator/metadata.rb:1
FC066: Ensure chef_version is set in metadata: delayed_evaluator/metadata.rb:1
FC067: Ensure at least one platform supported in metadata: delayed_evaluator/metadata.rb:1
FC069: Ensure standardized license defined in metadata: delayed_evaluator/metadata.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
No Binaries Metric
0.2.0 passed this metric
Testing File Metric
0.2.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
0.2.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
0.2.0 failed this metric
0.2.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
Foodcritic Metric
0.2.0 failed this metric
FC064: Ensure issues_url is set in metadata: delayed_evaluator/metadata.rb:1
FC065: Ensure source_url is set in metadata: delayed_evaluator/metadata.rb:1
FC066: Ensure chef_version is set in metadata: delayed_evaluator/metadata.rb:1
FC067: Ensure at least one platform supported in metadata: delayed_evaluator/metadata.rb:1
FC069: Ensure standardized license defined in metadata: delayed_evaluator/metadata.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
No Binaries Metric
0.2.0 passed this metric
Testing File Metric
0.2.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
0.2.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
0.2.0 failed this metric
FC065: Ensure source_url is set in metadata: delayed_evaluator/metadata.rb:1
FC066: Ensure chef_version is set in metadata: delayed_evaluator/metadata.rb:1
FC067: Ensure at least one platform supported in metadata: delayed_evaluator/metadata.rb:1
FC069: Ensure standardized license defined in metadata: delayed_evaluator/metadata.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
0.2.0 passed this metric
Testing File Metric
0.2.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
0.2.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
0.2.0 failed this metric
0.2.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number