grabzit 3.2.0 → 3.2.1
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 +8 -8
- data/lib/grabzit/exception.rb +1 -0
- data/lib/grabzit/imageoptions.rb +18 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NDVhNGE1NWE2YmM0MjE5ZWI3MzA3YzlmMGU3NzAzYTM0MjRhMzA4Mw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZGVkMDlmZTNkODUyNjI4OWI0YzdiZGNmMDIyYjhkMWFmODU3MDg1ZA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YTgwY2U4NzgzZTEwNTg4Mjg5ZmI2NTI3YzViZjEzYjg5MmRhMGEwOTFiNjQz
|
10
|
+
NjZkMWJkZTY5YmUyZjhmNDM0NmRiNGRhMzZjOWRmMmUxYWEzN2IzMGQwODQ2
|
11
|
+
ZjgzZmQ5NWY5MWQ0Y2RlM2I4ZDIwNDZmMmY0ZjQxZTQ4M2JkM2M=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MzEwYTIwZGI3YjA3ZmZhZDAzMDRhZWZmMWNiNWE1MTkxMzBkOGU2MmEyY2Nl
|
14
|
+
NTJlMGJkYTk2NDA3MGYxYjE2NmMyZTc4ODAyYTAyNDA2MTE0NjdkNjZiOTdj
|
15
|
+
ZTA5MmNiNmNlZDY1OWFiYWMwYWM0NDA0MjM2NmM1ZWRkZTY2ZmU=
|
data/lib/grabzit/exception.rb
CHANGED
@@ -66,6 +66,7 @@ module GrabzIt
|
|
66
66
|
PARAMETER_INVALID_INCLUDE_IMAGES = 167
|
67
67
|
PARAMETER_INVALID_EXPORT_URL = 168
|
68
68
|
PARAMETER_INVALID_WAIT_FOR_VALUE = 169
|
69
|
+
PARAMETER_INVALID_TRANSPARENT_VALUE = 170
|
69
70
|
NETWORK_SERVER_OFFLINE = 200
|
70
71
|
NETWORK_GENERAL_ERROR = 201
|
71
72
|
NETWORK_DDOS_ATTACK = 202
|
data/lib/grabzit/imageoptions.rb
CHANGED
@@ -17,6 +17,7 @@ module GrabzIt
|
|
17
17
|
@requestAs = 0
|
18
18
|
@customWaterMarkId = nil
|
19
19
|
@quality = -1
|
20
|
+
@transparent = false
|
20
21
|
end
|
21
22
|
|
22
23
|
# @return [Integer] the width of the browser in pixels
|
@@ -169,12 +170,25 @@ module GrabzIt
|
|
169
170
|
|
170
171
|
# Set the quality of the screenshot where 0 is poor and 100 excellent. The default is -1 which uses the recommended quality
|
171
172
|
#
|
172
|
-
# @param value [Integer] the
|
173
|
-
# @return [void]
|
173
|
+
# @param value [Integer] the quality
|
174
|
+
# @return [void]
|
174
175
|
def quality(value)
|
175
176
|
@quality = value
|
176
177
|
end
|
177
178
|
|
179
|
+
# @return [Boolean] true if the image capture should be transparent
|
180
|
+
def transparent
|
181
|
+
@transparent
|
182
|
+
end
|
183
|
+
|
184
|
+
# Set to true if the image capture should be transparent. This is only compatible with png and tiff images
|
185
|
+
#
|
186
|
+
# @param value [Boolean] true if the image should be transparent
|
187
|
+
# @return [void]
|
188
|
+
def transparent(value)
|
189
|
+
@transparent = value
|
190
|
+
end
|
191
|
+
|
178
192
|
# @!visibility private
|
179
193
|
def _getSignatureString(applicationSecret, callBackURL, url = nil)
|
180
194
|
urlParam = ''
|
@@ -190,7 +204,7 @@ module GrabzIt
|
|
190
204
|
return applicationSecret+"|"+ urlParam + callBackURLParam +
|
191
205
|
"|"+GrabzIt::Utility.nil_check(@format)+"|"+GrabzIt::Utility.nil_int_check(@height)+"|"+GrabzIt::Utility.nil_int_check(@width)+"|"+GrabzIt::Utility.nil_int_check(@browserHeight)+
|
192
206
|
"|"+GrabzIt::Utility.nil_int_check(@browserWidth)+"|"+GrabzIt::Utility.nil_check(@customId)+"|"+GrabzIt::Utility.nil_int_check(@delay)+"|"+GrabzIt::Utility.nil_check(@targetElement)+
|
193
|
-
"|"+GrabzIt::Utility.nil_check(@customWaterMarkId)+"|"+GrabzIt::Utility.nil_int_check(@requestAs)+"|"+GrabzIt::Utility.nil_check(@country)+"|"+GrabzIt::Utility.nil_int_check(@quality)+"|"+GrabzIt::Utility.nil_check(@hideElement)+"|"+GrabzIt::Utility.nil_check(@exportURL)+"|"+GrabzIt::Utility.nil_check(@waitForElement)
|
207
|
+
"|"+GrabzIt::Utility.nil_check(@customWaterMarkId)+"|"+GrabzIt::Utility.nil_int_check(@requestAs)+"|"+GrabzIt::Utility.nil_check(@country)+"|"+GrabzIt::Utility.nil_int_check(@quality)+"|"+GrabzIt::Utility.nil_check(@hideElement)+"|"+GrabzIt::Utility.nil_check(@exportURL)+"|"+GrabzIt::Utility.nil_check(@waitForElement)+"|"+GrabzIt::Utility.b_to_str(@transparent)
|
194
208
|
end
|
195
209
|
|
196
210
|
# @!visibility private
|
@@ -208,6 +222,7 @@ module GrabzIt
|
|
208
222
|
params['waitfor'] = GrabzIt::Utility.nil_check(@waitForElement)
|
209
223
|
params['requestmobileversion'] = GrabzIt::Utility.nil_int_check(@requestAs)
|
210
224
|
params['quality'] = GrabzIt::Utility.nil_int_check(@quality)
|
225
|
+
params['transparent'] = GrabzIt::Utility.b_to_str(@transparent)
|
211
226
|
|
212
227
|
return params
|
213
228
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: grabzit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.2.
|
4
|
+
version: 3.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GrabzIt
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-07-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|