puts cleanups

This commit is contained in:
Kyle Drake 2013-06-20 20:48:43 -07:00
parent 712371101e
commit 4c61c1c040
3 changed files with 3 additions and 8 deletions

6
app.rb
View file

@ -38,9 +38,7 @@ get '/browse' do
@current_page = params[:current_page] || 1
@current_page = @current_page.to_i
site_dataset = Site.order(:id.desc).filter(~{updated_at: nil}).paginate(@current_page, 100)
@page_count = site_dataset.page_count
@page_count = site_dataset.page_count || 1
@sites = site_dataset.all
slim :browse
end
@ -175,8 +173,6 @@ get '/site_files/:username.zip' do |username|
Zip::ZipFile.open(file_path, Zip::ZipFile::CREATE) do |zipfile|
current_site.file_list.collect {|f| f.filename}.each do |filename|
puts filename
puts site_file_path(filename)
zipfile.add filename, site_file_path(filename)
end
end

View file

@ -28,7 +28,6 @@ class ScreenshotJob
screenshot.unlink
img_list.new_image(img_list.first.columns, img_list.first.rows) { self.background_color = "white" }
img = img_list.reverse.flatten_images
puts 'boners'
img.crop!(0, 0, 1280, 720)
img.resize! 600, 400
img.write File.join(DIR_ROOT, 'public', 'site_screenshots', "#{username}.jpg")