arkency / ruby-build-cookbook

Cookbook providing definition to install Ruby for user using ruby-build.
11 stars 1 forks source link

Use node.run_state to store computed ruby properties #2

Open paneq opened 11 years ago

paneq commented 11 years ago

Instead of node.set:

 if params[:exports]
    hash = params[:exports].inject(node.set){|memo, step| memo[step] }
    hash['ruby_computed'] = {
      'ruby_dir' => ruby_dir,
      'bin_dir'  => bin_dir,
      'gem_bin'  => gem_bin,
      'ruby_bin' => ruby_bin,
    }
  end