lib/amiba/site.rb in amiba-0.0.6 vs lib/amiba/site.rb in amiba-0.0.7
- old
+ new
@@ -36,10 +36,11 @@
include Amiba::Generator
namespace :"site:upload:s3"
class_option :credentials, :default => :default
+ class_option :target, :default => "site"
def init_s3
cf = File.expand_path(File.join(Dir.pwd, ".fog"))
Fog.credentials_path = cf if File.exists? cf
Fog.credential = options[:credentials].to_sym
@@ -77,11 +78,11 @@
say_status "Available at", host, :green
end
private
def bucket
- Amiba::Configuration.site_name
+ Amiba::Configuration.send(:"#{options[:target]}_name")
end
def location
Amiba::Configuration.s3_location || "EU"
end
@@ -196,10 +197,10 @@
begin
create_file(page.output_filename) do
Tilt.new(layout.staged_filename).render(Amiba::Scope.new(page))
end
rescue
- puts "Unable to process #{page.name}, skipping"
+ puts "Unable to process #{page.name}: #{$!}, skipping"
end
end
end
end