imageboss-rails 2.0.1 → 2.1.0

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: 3f8f345953b16b9516d8782f4aedeba2de339ec57aa57bd1f1cd53662a7b419f
4
- data.tar.gz: 45ff2b66250454941d0157f3baf587f9c02ab1c3125a95238729694d2270d284
3
+ metadata.gz: b4d8c7fa4f82578f05e56f891a1611ba30824022e92bd3ac07f4ba7d79555f30
4
+ data.tar.gz: 3e6e0f51be8f48ae2be39bad8999dbd4bee010d7ab4def9a338fd9860602f0d1
5
5
  SHA512:
6
- metadata.gz: 7e7376c47ccb7607f297d0c5d021e085caefa376b02cafb043731f51775ab5927c7303ebd03327f7fdf9baeb4020da429ac737548bc215b613cba025823e8b8d
7
- data.tar.gz: c30f201bc30d0ba5386194800536ad2b868905f7512fe849ace3c10eae861d359b6f847ab9d4b14587ecab18168c4b8dd8d0610cd576dda2b8b705ff926780d2
6
+ metadata.gz: 93b04da85690f62e733b39c44961bee6d3797773239f33faf04029433c99fefe7f96854251f058e8f0df6b791b22eec0450e9b726afee27c72603d1b8742f40a
7
+ data.tar.gz: 865110a1f04abb5765663cb4c9bc5b21f7bf69afa3bb64674ccc9d97cdeae821a5cb238e408f10498777fca6487aa65be1fbdf1e9231d4154e44991032798f1a
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- [![ImageBoss logo](https://img.imageboss.me/width/180/https://imageboss.me/emails/logo-2@2x.png)](https://imageboss.me)
1
+ [![ImageBoss logo](https://img.imageboss.me/boss-images/width/180/emails/logo-2@2x.png)](https://imageboss.me)
2
2
 
3
3
  # ImageBoss Helper for Ruby On Rails
4
4
  [![Build Status](https://travis-ci.org/imageboss/imageboss-rails.svg?branch=master)](https://travis-ci.org/imageboss/imageboss-rails) [![Gem Version](https://badge.fury.io/rb/imageboss-rails.svg)](https://badge.fury.io/rb/imageboss-rails)
@@ -17,6 +17,7 @@ We recommend using something like [Paperclip](https://github.com/thoughtbot/pape
17
17
  - [Configuration](#configuration)
18
18
  - [Same configuration across all environments](#same-configuration-across-all-environments)
19
19
  - [Environment specific configuration](#environment-specific-configuration)
20
+ - [Signing your URLs](#signing-your-urls)
20
21
  - [imageboss_tag](#imagebosstag)
21
22
  - [Native Rails image_tag options](#native-rails-imagetag-options)
22
23
  - [imageboss_url](#imagebossurl)
@@ -56,6 +57,15 @@ Rails.application.configure do
56
57
  end
57
58
  ```
58
59
 
60
+ ### Signing your URLs
61
+ Read more about this feature here:
62
+ https://www.imageboss.me/docs/security
63
+
64
+ ```ruby
65
+ Rails.application.configure do
66
+ config.imageboss.secret = "<MY_SECRET>"
67
+ end
68
+ ```
59
69
 
60
70
  ### imageboss_tag
61
71
  Just like the Rails' [image_tag](https://apidock.com/rails/ActionView/Helpers/AssetTagHelper/image_tag) it will generate an `<img>` tag for you - but wrapped by the ImageBoss gem adding some more functionalities. The syntax is the following:
@@ -73,13 +83,13 @@ Will output the following:
73
83
  ### Native Rails image_tag options
74
84
  If you want to provide native `image_url` helper options just add them to the end of the helper:
75
85
  ```ruby
76
- <%= imageboss_tag('my-nice-image', :cover, { width: 100, height: 100 }, alt: "Sunny Lisbon!") %>
86
+ <%= imageboss_tag('my-nice-image', :cover, { width: 100, height: 100, options: { blur: 2 } }, alt: "Sunny Lisbon!") %>
77
87
  ```
78
88
  Will output the following:
79
89
  ```html
80
90
  <img
81
91
  alt="Sunny Lisbon!"
82
- src="https://img.imageboss.me/mywebsite-assets/cover/100x100/assets/my-nice-image.jpg"
92
+ src="https://img.imageboss.me/mywebsite-assets/cover/100x100/blur:2/assets/my-nice-image.jpg"
83
93
  />
84
94
  ```
85
95
 
@@ -16,7 +16,9 @@ module ImageBoss
16
16
  config = ::ImageBoss::Rails.config.imageboss || {}
17
17
  client_options = {}
18
18
  client_options[:source] = config[:source]
19
+ client_options[:secret] = config[:secret] || false
19
20
  client_options[:enabled] = config[:enabled] unless config[:enabled].nil?
21
+
20
22
  @imageboss_client = ::ImageBoss::Client.new(**client_options)
21
23
  end
22
24
  end
@@ -1,5 +1,5 @@
1
1
  module ImageBoss
2
2
  module Rails
3
- VERSION = '2.0.1'
3
+ VERSION = '2.1.0'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: imageboss-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Igor Escobar
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-03-28 00:00:00.000000000 Z
11
+ date: 2020-04-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: imageboss-rb
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 2.0.0
19
+ version: 2.1.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 2.0.0
26
+ version: 2.1.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rails
29
29
  requirement: !ruby/object:Gem::Requirement