Method: Cluster#fetch_credentials

Defined in:
lib/cluster.rb

#fetch_credentials(url) ⇒ Object



209
210
211
212
213
214
215
216
217
218
219
# File 'lib/cluster.rb', line 209

def fetch_credentials(url)
  unless Cluster::Configuration.credentials?
    msg = "Need to know where to save the incoming credentials."
    $stderr.puts msg
    raise RuntimeError.new(msg)
  end

  out = File.open(Cluster::Configuration[:credentials_file], 'w')
  open(url).each do |l| out.write(l); end
  out.close
end