thumbor_helpers 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +9 -2
- data/lib/thumbor_helpers/alchemy_overrides/picture.rb +2 -1
- data/lib/thumbor_helpers/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a4e000332232949367c0c3fb3d92f0b1e5a992c81a9b25d109b1193e7e50b9a3
|
4
|
+
data.tar.gz: ba365cfd0b487fc6ad58e3f8a4f8b101d168f62af8256259354d9a822d5a55e3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a20f11bb83c957f16079a5f290d17505856b4e4737ecf3c3dd311cb8f09ff25dcbd1f3dbf06019532d42a1c597f47e5f288d68ec58b55580de5e426f23645568
|
7
|
+
data.tar.gz: ae7f240c6017822252a60db0b70aa60ca264d1beac3614db4aed94bc395b1061f20525156e959189f9901993345c5c3e905ed206d75de222774246f4ffbfe832
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -26,14 +26,21 @@ Now go in config/initializers and configure the thumbors with the server creaden
|
|
26
26
|
|
27
27
|
## Usage
|
28
28
|
|
29
|
-
|
29
|
+
When enabled the helpers replace de standard url method of picture and create the absolute url to work with and instance
|
30
|
+
of thumbor.
|
31
|
+
You can bypass globaly by setting in the configurations to disable thumbor, or you can pass to url an optional parameter
|
32
|
+
to single disable thumbor.
|
33
|
+
ES:
|
34
|
+
```ruby
|
35
|
+
record.picture.url(thumbor_disable:true)
|
36
|
+
```
|
30
37
|
|
31
38
|
## Development
|
32
39
|
|
33
40
|
Start a thumbor server with the command:
|
34
41
|
|
35
42
|
```shell
|
36
|
-
docker run --network host -e THUMBOR_PORT=8888 -e SECURITY_KEY='1234567890123456' -e ALLOW_UNSAFE_URL=
|
43
|
+
docker run --network host -e THUMBOR_PORT=8888 -e SECURITY_KEY='1234567890123456' -e AUTO_WEBP='True' -e ALLOW_UNSAFE_URL='False' minimalcompact/thumbor thumbor
|
37
44
|
```
|
38
45
|
|
39
46
|
## Version Release
|
@@ -5,9 +5,10 @@ module ThumborHelpers
|
|
5
5
|
module Picture
|
6
6
|
|
7
7
|
def url(options = {})
|
8
|
+
thumbor_disable = options.delete(:thumbor_disable) { false }
|
8
9
|
url = super(options)
|
9
10
|
|
10
|
-
if ThumborHelpers.config.enabled?
|
11
|
+
if ThumborHelpers.config.enabled? and !thumbor_disable
|
11
12
|
escaped = CGI.escape("#{ThumborHelpers.config.image_root_host}#{url}")
|
12
13
|
encrypted_request = ThumborHelpers.config.cripto_generator.generate(image: escaped)
|
13
14
|
"#{ThumborHelpers.config.server_url}#{encrypted_request}"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: thumbor_helpers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marino Bonetti
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-03-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ruby-thumbor
|
@@ -72,7 +72,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
72
72
|
- !ruby/object:Gem::Version
|
73
73
|
version: '0'
|
74
74
|
requirements: []
|
75
|
-
rubygems_version: 3.1.
|
75
|
+
rubygems_version: 3.1.6
|
76
76
|
signing_key:
|
77
77
|
specification_version: 4
|
78
78
|
summary: collection of helpers to simplify live for use thumbor with rails and alchemy
|