EOS
end
+# read authentication data from ~/.arvados if present
+lineno = 0
+config_file = File.expand_path('~/.arvados')
+if File.exist? config_file then
+ File.open(config_file, 'r').each do |line|
+ lineno = lineno + 1
+ # skip comments
+ if line.match('^\s*#') then
+ next
+ end
+ var, val = line.chomp.split('=', 2)
+ # allow environment settings to override config files.
+ if var and val
+ ENV[var] ||= val
+ else
+ warn "#{config_file}: #{lineno}: could not parse `#{line}'"
+ end
+ end
+end
+
case ARGV[0]
when 'keep'
ARGV.shift
"(see arv-run-pipeline-instance --help for details)\n"
end
abort
+when 'tag'
+ ARGV.shift
+ exec `which arv-tag`.strip, *ARGV
end
ENV['ARVADOS_API_VERSION'] ||= 'v1'
discovered_params.each do |k,v|
k = k.to_sym
if ['object', 'array'].index(v["type"]) and method_opts.has_key? k
- if method_opts[k].match /^\//
+ if method_opts[k].andand.match /^\//
method_opts[k] = File.open method_opts[k], 'rb' do |f| f.read end
end
end
resource_body = request_parameters.delete(resource_schema.to_sym)
if resource_body
request_body = {
- resource_schema => JSON.parse(resource_body)
+ resource_schema => resource_body
}
else
request_body = {}