live_paper 0.0.20 → 0.0.21

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: 9b78bada6a9a8ab8ff6c8cb229635947544c4e7f
4
- data.tar.gz: b350744d43232723db63f9770f449a3c4104aede
3
+ metadata.gz: cabaa0a8b62afd08a1ec6637580396269646cb63
4
+ data.tar.gz: d0e5162054a4ffd11b888430fb984c434c2e3a92
5
5
  SHA512:
6
- metadata.gz: 7fa9418f1a5ecc2d26c6473fac545f0fc792aab1d95bb737fc4299b2c3bd2873d6ba6278203e574fc25474a3f971e03dd1423cfabdaca5989ed0d81306c3f7a0
7
- data.tar.gz: 63b41015e36b75060691730b83596848f3adf6b83d333dc523cae7a064624ec6de02a3270923a4c2829f0b431289bb9af969af3c13f5f0fe519b0c7683ee0418
6
+ metadata.gz: 30028ca41fb031fc9ba4527d2250707b802008192063ae4639590d060bc7528920b2b0e5cae181d4eef459ff62ce606706908b42277952b5e513de40bb1ad24f
7
+ data.tar.gz: 085e4b79a3c95668fe4d9b355b37481808064e01411d2fd051e47db1bbaff538c84f102803ced59fcff2e3b13f7dd2882c62d6825cbcb487466f43b3c0c332bf
data/README.md CHANGED
@@ -45,7 +45,7 @@ short_url = lp.shorten('http://www.google.com')
45
45
 
46
46
  ```ruby
47
47
  qr_bytes = lp.qr_bytes('http://www.amazon.com')
48
- File.open("qr.png", "w") { |f| f.write(qr_bytes) }
48
+ File.open("qr.png", "wb") { |f| f.write(qr_bytes) }
49
49
  ```
50
50
 
51
51
  ### Watermarking Images
@@ -53,7 +53,7 @@ qr_bytes = lp.qr_bytes('http://www.amazon.com')
53
53
  ```ruby
54
54
  wm_bytes = lp.watermark_bytes("http://www.hp.com",
55
55
  "http://www.letsstartsmall.com/ITSE2313_WebAuthoring/images/unit3/jpg_example1.jpg")
56
- File.open("watermark.jpg", "w:UTF-8") { |f| f.write(wm_bytes.force_encoding("UTF-8")) }
56
+ File.open("watermark.jpg", "wb:UTF-8") { |f| f.write(wm_bytes.force_encoding("UTF-8")) }
57
57
  ```
58
58
 
59
59
  > Note: Version 1 of the API only supports returning image bytes. Version 2 may host publicly accessible images.
data/lib/live_paper.rb CHANGED
@@ -35,12 +35,12 @@ module LivePaper
35
35
  uber[:short] = shorten dest
36
36
 
37
37
  qr_data = qr_bytes dest
38
- File.open("uber-qr.png", "w") { |f| f.write(qr_data) }
38
+ File.open("uber-qr.png", "wb") { |f| f.write(qr_data) }
39
39
  uber[:qr] = "./uber-qr.png"
40
40
 
41
41
  if image
42
42
  wm_bytes = watermark_bytes(dest, image)
43
- File.open("uber-wm.jpg", "w") { |f| f.write(wm_bytes) }
43
+ File.open("uber-wm.jpg", "wb") { |f| f.write(wm_bytes) }
44
44
  uber[:wm] = 'uber-wm.jpg'
45
45
  end
46
46
  uber
@@ -14,7 +14,7 @@ module LivePaper
14
14
  end
15
15
 
16
16
  def download_qrcode
17
- response = QrTrigger.rest_request( self.qrcode_url, :get, accept: "image/jpg" )
17
+ response = QrTrigger.rest_request( "#{self.qrcode_url}?width=200", :get, accept: "image/jpg" )
18
18
  response.body.empty? ? nil : response.body
19
19
  end
20
20
 
@@ -1,3 +1,3 @@
1
1
  module LivePaper
2
- VERSION = "0.0.20"
2
+ VERSION = "0.0.21"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: live_paper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.20
4
+ version: 0.0.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Whitmarsh
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-11-14 00:00:00.000000000 Z
12
+ date: 2014-11-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rest-client