diff --git a/Gemfile b/Gemfile index 6c546840..73f50251 100644 --- a/Gemfile +++ b/Gemfile @@ -1,4 +1,7 @@ -source "https://rubygems.org" +source 'https://rubygems.org' # Specify your gem's dependencies in wraith.gemspec + +gem 'wraith', :git => 'https://github.com/gemmageee/wraith.git', :branch => 'master' + gemspec diff --git a/lib/wraith/gallery.rb b/lib/wraith/gallery.rb index b764dc9a..7771d95a 100755 --- a/lib/wraith/gallery.rb +++ b/lib/wraith/gallery.rb @@ -141,7 +141,7 @@ def generate_gallery(with_path = "") dest = "#{@location}/gallery.html" directories = parse_directories(@location) - template = File.expand_path("gallery_template/#{wraith.gallery_template}.erb", File.dirname(__FILE__)) + template = File.expand_path(Dir.pwd + "/gallery_template/#{wraith.gallery_template}.erb", File.dirname(__FILE__)) generate_html(@location, directories, template, dest, with_path) report_gallery_status dest diff --git a/lib/wraith/javascript/phantom.js b/lib/wraith/javascript/phantom.js index 78f1a89b..6dbd6a86 100644 --- a/lib/wraith/javascript/phantom.js +++ b/lib/wraith/javascript/phantom.js @@ -132,12 +132,6 @@ function resizeAndCaptureImage() { function takeScreenshot() { console.log('Snapping ' + url + ' at: ' + currentDimensions.viewportWidth + 'x' + currentDimensions.viewportHeight); - page.clipRect = { - top: 0, - left: 0, - height: currentDimensions.viewportHeight, - width: currentDimensions.viewportWidth - }; page.render(image_name); }