Sha256: f4b49e684175617376975adc83c75d085f970a459625e93ee8a983d229e40a68
Contents?: true
Size: 738 Bytes
Versions: 178
Compression:
Stored size: 738 Bytes
Contents
#!/usr/bin/env ruby require 'rbbt-util' require 'rbbt/util/simpleopt' $0 = "rbbt #{$previous_commands*" "} #{ File.basename(__FILE__) }" if $previous_commands options = SOPT.setup <<EOF Description $ #{$0} [options] <workflow> <url> Use - to read from STDIN -h--help Print this help EOF if options[:help] if defined? rbbt_usage rbbt_usage else puts SOPT.doc end exit 0 end workflow, url = ARGV raise ParameterException unless workflow && url url = File.join(url, workflow) unless url =~ /[\/\:]#{workflow}\/?$/ config_file = Rbbt.etc.remote_workflows remote_workflows = config_file.exists? ? config_file.yaml : {} remote_workflows[workflow] = url Open.write(config_file.find(:user), remote_workflows.to_yaml)
Version data entries
178 entries across 178 versions & 1 rubygems