thumbor_helpers 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c43665acba064ebb65e0b6c35c23b0c0c97bd295979d019ae86def6e8df9465f
4
- data.tar.gz: 3b0658e26c608185978ff8cbee7de339c8e8e3b9ac2c741c66ace2b4a62e646a
3
+ metadata.gz: a4e000332232949367c0c3fb3d92f0b1e5a992c81a9b25d109b1193e7e50b9a3
4
+ data.tar.gz: ba365cfd0b487fc6ad58e3f8a4f8b101d168f62af8256259354d9a822d5a55e3
5
5
  SHA512:
6
- metadata.gz: 0d266f2a3b1122aa899bc3d160cafb38a9e4e75240019cd2bf3ceec8379c96f5538b2248d02e3e7289aaac4420313fd6c0696245a100503e92f42df1c2f11e3a
7
- data.tar.gz: 9c44ef26932a6cc6e4680c6c9851de7988677c5f36d37305328572551242375caa9a909521b51e5c21fd7ae0744a1ae19498fe66171c2d0889f89fe08495181a
6
+ metadata.gz: a20f11bb83c957f16079a5f290d17505856b4e4737ecf3c3dd311cb8f09ff25dcbd1f3dbf06019532d42a1c597f47e5f288d68ec58b55580de5e426f23645568
7
+ data.tar.gz: ae7f240c6017822252a60db0b70aa60ca264d1beac3614db4aed94bc395b1061f20525156e959189f9901993345c5c3e905ed206d75de222774246f4ffbfe832
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- thumbor_helpers (0.1.0)
4
+ thumbor_helpers (0.1.1)
5
5
  ruby-thumbor (>= 4)
6
6
 
7
7
  GEM
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
- TODO: Write usage instructions here
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=0 minimalcompact/thumbor thumbor
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}"
@@ -1,3 +1,3 @@
1
1
  module ThumborHelpers
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
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.0
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: 2022-06-19 00:00:00.000000000 Z
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.4
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