Class: Ale::CLI
Instance Method Summary collapse
Instance Method Details
#build ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/ale/cli.rb', line 12 def build opts = .dup say("Building site in #{Ale.root}") rescue AlefileNotFound say('Count not locale Alefile', :red) end |
#clean ⇒ Object
21 22 23 |
# File 'lib/ale/cli.rb', line 21 def clean say('Cleaning up') end |
#init ⇒ Object
26 27 28 29 30 31 32 33 |
# File 'lib/ale/cli.rb', line 26 def init if File.exist?('Alefile') say("Alefile already exists at #{Dir.pwd}/Alefile", :red) else say("Writing new Alefile to #{Dir.pwd}/Alefile") FileUtils.cp(File.('../../templates/Alefile', __FILE__), 'Alefile') end end |
#setup ⇒ Object
36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/ale/cli.rb', line 36 def setup opts = .dup Ale.alefile = opts[:alefile] Ale::Config.load(Ale.alefile) say("Setting up website for bucket: #{Ale::Config.bucket}") uploader.setup! rescue AlefileNotFound say('Count not locale Alefile', :red) rescue BucketNotSpecified say('No bucket specificed in Alefile', :red) end |
#upload ⇒ Object
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/ale/cli.rb', line 53 def upload opts = .dup Ale.alefile = opts[:alefile] Ale::Config.load(Ale.alefile) say("Uploading site in #{uploader.site.directory}") uploader.upload! rescue AlefileNotFound say('Count not locale Alefile', :red) rescue BucketNotFound say('Bucket not found on S3', :red) rescue BucketNotSpecified say('No bucket specificed in Alefile', :red) end |