Sha256: a4e34a5fc3875dd0f6073f8d742532f992820c0228ac4008600c407a04ac65c7

Contents?: true

Size: 1.65 KB

Versions: 26

Compression:

Stored size: 1.65 KB

Contents

#!/usr/bin/ruby

# = Rudy S3
# 
# === A Rudy interface to Amazon Simple Storage Service
#
# 
# 
# See rudy-s3 -h for usage
# 

$:.unshift File.join(File.dirname(__FILE__), '..', 'lib') # Put our local lib in first place

require 'drydock'
require 'rudy'
require 'rudy/cli'

# Command-line interface for bin/rudy-s3
module RudyCLI_S3
  extend Drydock
  
  # ------------------------------------  AMAZON S3 COMMANDS  --------
  # ------------------------------------------------------------------
  
  about "Amazon S3 Buckets"
  usage "rudy-s3 buckets"
  option :l, :location, String, "Specify a bucket location. One of: us, eu"
  action :C, :create, "Create a bucket"
  action :D, :destroy, "Destroy a bucket"
  argv :name
  command :buckets => Rudy::CLI::AWS::S3::Buckets
  command_alias :buckets, :b

  #about "Amazon S3 Storage Interface"
  #usage "rudy-s3 store file-path"
  #option :b, :bucket, String, "Bucket name"
  #argv :path
  #command :store => Rudy::CLI::AWS::S3::Store
  #command_alias :store, :s

  
  
  # ---------------------------------  RUDY-S3 MISCELLANEOUS  --------
  # ------------------------------------------------------------------
  
  default :buckets
  
end


begin
  Drydock.run!(ARGV, STDIN) if Drydock.run? && !Drydock.has_run?
rescue Drydock::ArgError, Drydock::OptError => ex
  STDERR.puts ex.message
  STDERR.puts ex.usage
rescue Drydock::InvalidArgument => ex
  STDERR.puts ex.message  
rescue Rudy::Error => ex
  STDERR.puts ex.message
  STDERR.puts ex.backtrace if Drydock.debug?
rescue => ex
  STDERR.puts "ERROR (#{ex.class.to_s}): #{ex.message}"
  STDERR.puts ex.backtrace if Drydock.debug?
rescue Interrupt
  puts "#{$/}Exiting... "
  exit 1
end

Version data entries

26 entries across 26 versions & 2 rubygems

Version Path
solutious-rudy-0.9.0 bin/rudy-s3
solutious-rudy-0.9.1 bin/rudy-s3
solutious-rudy-0.9.2 bin/rudy-s3
solutious-rudy-0.9.3 bin/rudy-s3
solutious-rudy-0.9.4 bin/rudy-s3
rudy-0.9.8.010 bin/rudy-s3
rudy-0.9.8.009 bin/rudy-s3
rudy-0.9.8.008 bin/rudy-s3
rudy-0.9.8.007 bin/rudy-s3
rudy-0.9.8.006 bin/rudy-s3
rudy-0.9.8.005 bin/rudy-s3
rudy-0.9.8.004 bin/rudy-s3
rudy-0.9.8.003 bin/rudy-s3
rudy-0.9.8.002 bin/rudy-s3
rudy-0.9.8.001 bin/rudy-s3
rudy-0.9.7.001 bin/rudy-s3
rudy-0.9.6.001 bin/rudy-s3
rudy-0.9.5.004 bin/rudy-s3
rudy-0.9.5.003 bin/rudy-s3
rudy-0.9.5.002 bin/rudy-s3