wraith 3.0.1 → 3.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/wraith/javascript/_helper.js +2 -0
- data/lib/wraith/save_images.rb +12 -3
- data/lib/wraith/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 13036a727cbf41313e2f5cca465b321ed0e97384
|
4
|
+
data.tar.gz: 9f5764f80b6feb916fb42afaa5a0350eab832f7e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5c7f3eeaa4cac1c130640dae9553fac360169bc5faa4a23bf979caa251eac9900692988333f6a20c1212203a6a982176ca6715f7f90de3ab99c2df4d96f5764d
|
7
|
+
data.tar.gz: ff3c62e8cea78a21d112cf54235e83c0d8f29e32bf688a792d3f869ef8d6023dc043ee68bf987875da4002e82876c5358550e2087048de20babcd73ffd5ed83d
|
data/lib/wraith/save_images.rb
CHANGED
@@ -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
|
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
|
data/lib/wraith/version.rb
CHANGED