simple-mappr 0.1.3 → 0.1.4
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/simple-mappr.rb +17 -0
- data/lib/simple-mappr/transporter.rb +1 -1
- data/lib/simple-mappr/validator.rb +4 -0
- data/lib/simple-mappr/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: 240e070b736fb1b10a5edc3ddc376686509876be
|
4
|
+
data.tar.gz: 521907f01de62174a16938be0e5448a70f8e3c9b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bd59cbd4bdbdaa598cb02972166badf875627e1b62428cbd56ba71c11af1995272079c2dc1d10400a4ed46399ba209c1e92e4ec8add2ae64bd7d5ea9479c083b
|
7
|
+
data.tar.gz: ee1311deadf391be39c791d67b67a92c4ade0fdfcd4caf3c31b0e97e91a69796172c77a71e9807c99c2de780b50fe5688c6077c999edb0545fa01ddb9d363c82
|
data/lib/simple-mappr.rb
CHANGED
@@ -399,6 +399,23 @@ class SimpleMappr
|
|
399
399
|
@parameters[:url] || nil
|
400
400
|
end
|
401
401
|
|
402
|
+
##
|
403
|
+
# Specify if watermark is shown
|
404
|
+
# Must be boolean
|
405
|
+
#
|
406
|
+
# == Example
|
407
|
+
#
|
408
|
+
# instance.watermark = [true,false]
|
409
|
+
#
|
410
|
+
def watermark=(mark)
|
411
|
+
Validator.validate_watermark(mark)
|
412
|
+
@parameters[:watermark] = mark
|
413
|
+
end
|
414
|
+
|
415
|
+
def watermark
|
416
|
+
@parameters[:watermark] || nil
|
417
|
+
end
|
418
|
+
|
402
419
|
##
|
403
420
|
# Specify the width of the output in pixels
|
404
421
|
# Must be less than or eqaual to 4500
|
@@ -8,7 +8,7 @@ class SimpleMappr
|
|
8
8
|
|
9
9
|
def self.send_data params, download = false
|
10
10
|
Validator.validate_type(params, 'Hash')
|
11
|
-
params.delete_if{ |k,v|
|
11
|
+
params.delete_if{ |k,v| v.nil? }
|
12
12
|
RestClient.post(API_URL, params) do |response, request, result, &block|
|
13
13
|
if response.code == 303 && download
|
14
14
|
response.follow_redirection
|
data/lib/simple-mappr/version.rb
CHANGED