lib/rubber/recipes/rubber/setup.rb
# Helper for installing gems,allows one to respond to prompts
Helper for installing gems,allows one to respond to prompts
Helper for installing gems allows one to respond to prompts
def gem_helper(update=false)
    cmd = update ? "update" : "install"
    opts = get_host_options('gems') do |gem_list|
      expanded_gem_list = []
      gem_list.each do |gem_spec|
        if gem_spec.is_a?(Array)
          expanded_gem_list << "#{gem_spec[0]}:#{gem_spec[1]}"
        else
          expanded_gem_list << gem_spec
        end
      end
      expanded_gem_list.join(' ')
    end
    if opts.size > 0
      script = prepare_script('gem_helper', gem_helper_script, nil)
      rsudo "ruby #{script} #{cmd} $CAPISTRANO:VAR$", opts do |ch, str, data|
        handle_gem_prompt(ch, data, str)
      end
    end
  end
def gem_helper ( update = false ) cmd = update ? "update" : "install" opts = get_host_options ( 'gems' ) do | gem_list | expanded_gem_list = [ ] gem_list . each do | gem_spec | if gem_spec . is_a? ( Array ) expanded_gem_list << "#{gem_spec[0]}:#{gem_spec[1]}" else expanded_gem_list << gem_spec end end expanded_gem_list . join ( ' ' ) end if opts . size > 0 script = prepare_script ( 'gem_helper' , gem_helper_script , nil ) rsudo "ruby #{script} #{cmd} $CAPISTRANO:VAR$" , opts do | ch , str , data | handle_gem_prompt ( ch , data , str ) end end end
Helper for installing gems,allows one to respond to prompts
Helper for installing gems allows one to respond to prompts
update