Skip to content

Commit

Permalink
attempted to fix 3.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisBAshton committed Dec 2, 2015
1 parent 53d2484 commit 4989c8a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
2 changes: 2 additions & 0 deletions lib/wraith/javascript/_helper.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
module.exports = function (commandLineDimensions) {

commandLineDimensions = '' + commandLineDimensions; // cast to string
// remove quotes from dimensions string
commandLineDimensions = commandLineDimensions.replace(/'/gi, '');

Expand Down
15 changes: 12 additions & 3 deletions lib/wraith/save_images.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def define_jobs
check_paths.each do |label, options|
settings = CaptureOptions.new(options, wraith)

if wraith.resize
if settings.resize
jobs = jobs + define_individual_job(label, settings, wraith.widths)
else
wraith.widths.each do |width|
Expand Down Expand Up @@ -66,7 +66,7 @@ def capture_page_image(browser, url, width, file_name, selector, global_before_c
command = "#{browser} #{wraith.phantomjs_options} '#{wraith.snap_file}' '#{url}' \"#{width}\" '#{file_name}' '#{selector}' '#{global_before_capture}' '#{path_before_capture}'"

# @TODO - uncomment the following line when we add a verbose mode
#puts command
# puts command
run_command command
end

Expand Down Expand Up @@ -132,7 +132,16 @@ def path
end

def selector
options["selector"] || " "
options["selector"] || "body"
end

def resize
# path level, or YAML-file level `resize_or_reload` property value
if @options["resize_or_reload"]
(@options["resize_or_reload"] == 'resize')
else
@wraith.resize
end
end

def before_capture
Expand Down
2 changes: 1 addition & 1 deletion lib/wraith/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Wraith
VERSION = "3.0.1"
VERSION = "3.0.2"
end

0 comments on commit 4989c8a

Please sign in to comment.