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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fb87eec8e32d398702a6d71f32528eb9b8630b1a
4
- data.tar.gz: 2cba2dc3031aa2788b597aa27a5484703d34574b
3
+ metadata.gz: 240e070b736fb1b10a5edc3ddc376686509876be
4
+ data.tar.gz: 521907f01de62174a16938be0e5448a70f8e3c9b
5
5
  SHA512:
6
- metadata.gz: 0bdfdd1c42034d7ac32e0dd73b2e2064a014cc81298d43b52aaec0dc93dfca95cb249eabb4029100599c75cb0a95b16be950ca73aa09c0a927fb533263a1b59b
7
- data.tar.gz: 79b041227c2e17c2806de11427df7077796f5a2c2ebc7278946dea66f1d868d43239da0e8d346aac8d46774287a945b9a1641cf209ad861cfb5f76363bdf8468
6
+ metadata.gz: bd59cbd4bdbdaa598cb02972166badf875627e1b62428cbd56ba71c11af1995272079c2dc1d10400a4ed46399ba209c1e92e4ec8add2ae64bd7d5ea9479c083b
7
+ data.tar.gz: ee1311deadf391be39c791d67b67a92c4ade0fdfcd4caf3c31b0e97e91a69796172c77a71e9807c99c2de780b50fe5688c6077c999edb0545fa01ddb9d363c82
@@ -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| !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
@@ -158,5 +158,9 @@ class SimpleMappr
158
158
  end
159
159
  end
160
160
 
161
+ def self.validate_watermark(data)
162
+ validate_type(data, 'Boolean')
163
+ end
164
+
161
165
  end
162
166
  end
@@ -1,5 +1,5 @@
1
1
  class SimpleMappr
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
 
4
4
  def self.version
5
5
  VERSION
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple-mappr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - David P. Shorthouse