wraith 3.0.1 → 3.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3b81224f867711e225c6f7a2060e37deb7c089d5
4
- data.tar.gz: 3613a71af35b90bf3c7b6f200db0c9b16870cd43
3
+ metadata.gz: 13036a727cbf41313e2f5cca465b321ed0e97384
4
+ data.tar.gz: 9f5764f80b6feb916fb42afaa5a0350eab832f7e
5
5
  SHA512:
6
- metadata.gz: 6bed22eccfb886b54541c7f15468be1bb82da36a95266e384f6e3571c7d90c650a8a7a8c87cba57780d0dd5bafb505fbc407ddea7c41e11fd118bb1abe617f9d
7
- data.tar.gz: 38b14beb294e7f7d3bce79c43ffa19c44474bdd39de521e2c2346ce71f4395ca34171035ac1b182b8d42dff302783c89280d95f47ee510be3b568e310267c6cb
6
+ metadata.gz: 5c7f3eeaa4cac1c130640dae9553fac360169bc5faa4a23bf979caa251eac9900692988333f6a20c1212203a6a982176ca6715f7f90de3ab99c2df4d96f5764d
7
+ data.tar.gz: ff3c62e8cea78a21d112cf54235e83c0d8f29e32bf688a792d3f869ef8d6023dc043ee68bf987875da4002e82876c5358550e2087048de20babcd73ffd5ed83d
@@ -1,4 +1,6 @@
1
1
  module.exports = function (commandLineDimensions) {
2
+
3
+ commandLineDimensions = '' + commandLineDimensions; // cast to string
2
4
  // remove quotes from dimensions string
3
5
  commandLineDimensions = commandLineDimensions.replace(/'/gi, '');
4
6
 
@@ -31,7 +31,7 @@ class Wraith::SaveImages
31
31
  check_paths.each do |label, options|
32
32
  settings = CaptureOptions.new(options, wraith)
33
33
 
34
- if wraith.resize
34
+ if settings.resize
35
35
  jobs = jobs + define_individual_job(label, settings, wraith.widths)
36
36
  else
37
37
  wraith.widths.each do |width|
@@ -66,7 +66,7 @@ class Wraith::SaveImages
66
66
  command = "#{browser} #{wraith.phantomjs_options} '#{wraith.snap_file}' '#{url}' \"#{width}\" '#{file_name}' '#{selector}' '#{global_before_capture}' '#{path_before_capture}'"
67
67
 
68
68
  # @TODO - uncomment the following line when we add a verbose mode
69
- #puts command
69
+ # puts command
70
70
  run_command command
71
71
  end
72
72
 
@@ -132,7 +132,16 @@ class CaptureOptions
132
132
  end
133
133
 
134
134
  def selector
135
- options["selector"] || " "
135
+ options["selector"] || "body"
136
+ end
137
+
138
+ def resize
139
+ # path level, or YAML-file level `resize_or_reload` property value
140
+ if @options["resize_or_reload"]
141
+ (@options["resize_or_reload"] == 'resize')
142
+ else
143
+ @wraith.resize
144
+ end
136
145
  end
137
146
 
138
147
  def before_capture
@@ -1,3 +1,3 @@
1
1
  module Wraith
2
- VERSION = "3.0.1"
2
+ VERSION = "3.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wraith
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.1
4
+ version: 3.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dave Blooman