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 +4 -4
- data/lib/imgproxy/builder.rb +4 -4
- data/lib/imgproxy/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 95f295a470a117f44dff275879b3c048d4c0553ccb121f448b34c9282c1bebcc
|
4
|
+
data.tar.gz: 90aef03fecd81f74a7e3d73fe465ef7ff4e35e8cf9fdee605aa50edefe03da9c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a04dfc605cc6143e67555de585f91dbcb443f09043e55eb66dad31f20a156cb8b1a6654f44c7c9f3e5458bd3ea089287bfe361747ee27426132b3512223de648
|
7
|
+
data.tar.gz: 5138489ca03ddb7f1835ae670a0dda2bf4d9c234f19a524f5189e7a61b203b81401c474886f5c659d1dbc57f0e797479f538c81d3be0d51ee4a78a1fca37d336
|
data/lib/imgproxy/builder.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
require "openssl"
|
2
2
|
require "base64"
|
3
|
-
require "
|
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
|
-
|
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) ?
|
87
|
+
url.match?(NEED_ESCAPE_RE) ? ERB::Util.url_encode(url) : url
|
88
88
|
end
|
89
89
|
|
90
90
|
def sign_path(path)
|
data/lib/imgproxy/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2019-09-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pry-byebug
|