imgproxy 1.0.5 → 1.0.6

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: 4ed41c993893a923a3928ced02b17092d8ca3c22f5710c422116c787345e5446
4
- data.tar.gz: 34ba26c5d491d02b535dc7f709439298c353e57967471165790cfe941ad29248
3
+ metadata.gz: 95f295a470a117f44dff275879b3c048d4c0553ccb121f448b34c9282c1bebcc
4
+ data.tar.gz: 90aef03fecd81f74a7e3d73fe465ef7ff4e35e8cf9fdee605aa50edefe03da9c
5
5
  SHA512:
6
- metadata.gz: 2aa0486f2d19d87820bbe6cd1f2e79835cae25a0f1aff11bd7c891aa42a7858c8d0b93b950597272bb62a35c07a9bac5865bf0b99a6ed7baea4b06242f697b3c
7
- data.tar.gz: 6a835bded01ca926636cc9557d594add1ed1738ca73b18cded31d3065b4180cce85f495fc3a64924d58c3f2ae4e4763b55b43984a0f6738f1b4bfa098d54ad7f
6
+ metadata.gz: a04dfc605cc6143e67555de585f91dbcb443f09043e55eb66dad31f20a156cb8b1a6654f44c7c9f3e5458bd3ea089287bfe361747ee27426132b3512223de648
7
+ data.tar.gz: 5138489ca03ddb7f1835ae670a0dda2bf4d9c234f19a524f5189e7a61b203b81401c474886f5c659d1dbc57f0e797479f538c81d3be0d51ee4a78a1fca37d336
@@ -1,6 +1,6 @@
1
1
  require "openssl"
2
2
  require "base64"
3
- require "uri"
3
+ require "erb"
4
4
 
5
5
  require "imgproxy/options"
6
6
 
@@ -40,7 +40,7 @@ module Imgproxy
40
40
 
41
41
  signature = sign_path(path)
42
42
 
43
- URI.join(Imgproxy.config.endpoint.to_s, "#{signature}/#{path}").to_s
43
+ File.join(Imgproxy.config.endpoint.to_s, signature, path)
44
44
  end
45
45
 
46
46
  private
@@ -63,7 +63,7 @@ module Imgproxy
63
63
  cachebuster: :cb,
64
64
  }.freeze
65
65
 
66
- NEED_ESCAPE_RE = /[@?%]|[^\p{Ascii}]/.freeze
66
+ NEED_ESCAPE_RE = /[@?% ]|[^\p{Ascii}]/.freeze
67
67
 
68
68
  def processing_options
69
69
  @processing_options ||=
@@ -84,7 +84,7 @@ module Imgproxy
84
84
 
85
85
  def url(image)
86
86
  url = config.url_adapters.url_of(image)
87
- url.match?(NEED_ESCAPE_RE) ? CGI.escape(url) : url
87
+ url.match?(NEED_ESCAPE_RE) ? ERB::Util.url_encode(url) : url
88
88
  end
89
89
 
90
90
  def sign_path(path)
@@ -1,3 +1,3 @@
1
1
  module Imgproxy
2
- VERSION = "1.0.5".freeze
2
+ VERSION = "1.0.6".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: imgproxy
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ version: 1.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sergey Alexandrovich
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-09-04 00:00:00.000000000 Z
11
+ date: 2019-09-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry-byebug