Class: S3log::Cli

Inherits:
Thor
  • Object
show all
Includes:
Thor::Actions
Defined in:
lib/s3log/cli.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.source_rootObject



8
9
10
# File 'lib/s3log/cli.rb', line 8

def self.source_root
  File.expand_path("../../../templates", __FILE__)
end

Instance Method Details

#bucketsObject



33
34
35
36
# File 'lib/s3log/cli.rb', line 33

def buckets
  @s3log = S3log::Runner.new(options[:configfile])
  @s3log.buckets
end

#downloadObject



39
40
41
42
# File 'lib/s3log/cli.rb', line 39

def download
  @s3log = S3log::Runner.new(options[:configfile])
  @s3log.download
end

#init(name = "s3log") ⇒ Object



20
21
22
# File 'lib/s3log/cli.rb', line 20

def init(name="s3log")
  directory "s3log", name
end

#listObject



25
26
27
28
29
30
# File 'lib/s3log/cli.rb', line 25

def list
  @s3log = S3log::Runner.new(options[:configfile])
  @s3log.items.each do |o|
    puts o
  end
end

#scheduleObject



45
46
47
48
# File 'lib/s3log/cli.rb', line 45

def schedule
  @cron = S3log::Cron.new(options[:configfile])
  @cron.update
end