datauris 1.1.0 → 1.1.1

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
  SHA256:
3
- metadata.gz: 7709f8cf824f237c4aed38259191ecb6fd4cf39d3b29664a93ea1ee16902f492
4
- data.tar.gz: 8961a0856b232df9c7a5995db91e4f4ae08c072e7d4d655d51ae0be6b8226009
3
+ metadata.gz: 89ab6159a9beb6750504017159f5d0e0391c78ea965aaea0d705531299bae7b1
4
+ data.tar.gz: 87bc327d253eb5464e47dbb2ef2d4770da2caacda008aac0ae8c8ad0b8f74483
5
5
  SHA512:
6
- metadata.gz: 85584d023850013b98801c46775c5a43ea76d08eedef815457921684063081a0786517919190c1b9c0b2fbd2d9923773739c0f029338d78d44fcfe88513b9459
7
- data.tar.gz: e4a6796902329a3efb962f3733012bbce8b9dd2baf2f315f92b033e41c627630a4ef5c0981368c84526623ed9226bd573e7f079cae6b03c0beb3f0382cdc98d8
6
+ metadata.gz: bd984682f79f95f7170e023a4f1aa8a048339010e71ee984958c528a7c5bf7a8d6102d90398e636bf27c553cd88f38bae4417708ec6367e7ee713fe84b96620f
7
+ data.tar.gz: 0ebfd59f4ca9aa3ee881c5a5eab954d4ecd3691594418fc35b1709468d1012ede78139e180b47a700c25f796d8f2e827a1c76734b6aefb236f27e79fc5c0cf8d
data/CHANGELOG.md CHANGED
@@ -1,4 +1,4 @@
1
- ### 1.1.0
1
+ ### 1.1.1
2
2
  ### 0.0.1 / 2023-11-23
3
3
 
4
4
  * Everything is new. First release
@@ -2,7 +2,7 @@
2
2
  module DataUri
3
3
  MAJOR = 1 ## todo: namespace inside version or something - why? why not??
4
4
  MINOR = 1
5
- PATCH = 0
5
+ PATCH = 1
6
6
  VERSION = [MAJOR,MINOR,PATCH].join('.')
7
7
 
8
8
  def self.version
data/lib/datauris.rb CHANGED
@@ -172,8 +172,8 @@ module DataUri
172
172
  ## utf8 - or force utf8 encoding (utf8: true)
173
173
  ## uri - or force STOPPING uri encoding (uri: false)
174
174
  def self.build( data, type=nil, base64: nil, utf8: nil, uri: nil )
175
- uri = "data:"
176
- uri += type if type ## note: allow optional / no type
175
+ str = "data:"
176
+ str += type if type ## note: allow optional / no type
177
177
 
178
178
  ## puts " type: #{type.inspect}, base64: #{base64.inspect}"
179
179
 
@@ -195,9 +195,9 @@ module DataUri
195
195
  end
196
196
 
197
197
  if base64
198
- uri += ";base64," + Base64.strict_encode64( data )
198
+ str += ";base64," + Base64.strict_encode64( data )
199
199
  elsif utf8
200
- uri += ";utf8," + data
200
+ str += ";utf8," + data
201
201
  else
202
202
  ## use encode_uri_component by default - why? why not?
203
203
  ## space becomes %20
@@ -205,7 +205,7 @@ module DataUri
205
205
  ## , becomes %2C and so on
206
206
  ##
207
207
  ## note: use uri: false to turn of uri encode!!!
208
- uri += "," + (uri == false ? data : encode_uri( data ))
208
+ str += "," + (uri == false ? data : encode_uri( data ))
209
209
  end
210
210
  end
211
211
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: datauris
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gerald Bauer