Module: Masamune::Commands::S3Cmd::ClassMethods

Included in:
Actions::S3Cmd
Defined in:
lib/masamune/commands/s3cmd.rb

Instance Method Summary collapse

Instance Method Details

#s3b(file, options = {}) ⇒ Object



62
63
64
65
66
67
# File 'lib/masamune/commands/s3cmd.rb', line 62

def s3b(file, options = {})
  file.dup.tap do |out|
    out.sub!(%r{\As3n://}, 's3://')
    out.sub!(%r{/?\z}, '/') if options[:dir]
  end
end

#s3n(file, options = {}) ⇒ Object



55
56
57
58
59
60
# File 'lib/masamune/commands/s3cmd.rb', line 55

def s3n(file, options = {})
  file.dup.tap do |out|
    out.sub!(%r{\As3://}, 's3n://')
    out.sub!(%r{/?\z}, '/') if options[:dir]
  end
end