imgix-rails 4.3.0 → 4.3.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: 98533b06694b9f4b6e0a1a7efa85f10542da35f6e3de8f41db8bf81f7e43cca0
4
- data.tar.gz: 448ab739e71fd41287b9c8eecdac0fc0214c09bda78104287fc13552030299bc
3
+ metadata.gz: a34ec282416d5a7b415af7dc9bfba931814f255834a5c9f7a6bcb2b952ddad77
4
+ data.tar.gz: 1577c493b3d075c351cc087dfb87322d8d9315317fc45a1fd5aa62cc4c033c62
5
5
  SHA512:
6
- metadata.gz: 0a3de9ced7e43cbf79f35aca4c7b102994b8e8fa91e97ac4884b376f5741b7fee7dbf0fdb1be3e4eedf6a1a0e3538800d1af9e8cd28b1647b00924df18483dd6
7
- data.tar.gz: 6f46063c7cd96e2bc1793dd5df3e7b93c529fe9bc6a9c1d5b6fd7b05382cc9a28e662697b5dea3ea7144eb4bf6ceea5b6cc5fe166d28ab3be6ccb024422dda54
6
+ metadata.gz: 22a1dc794c948eb8a38a40b99e0d672a794c33a333be7eb727f9cfe654485c6ed9ead4e5263ebf4f5000f501a9228eac4b22d59c4609a023d153f10bcb4c0c88
7
+ data.tar.gz: 0b7cf4965dde8401b4a6a9b720f55ea557049574d3cb515ab1bde850fa40b5b40b595b0737e75c4fe46480d6c4b81d159d9785e0738fe2be56e9a1c797472623
data/.circleci/config.yml CHANGED
@@ -1,12 +1,12 @@
1
1
  version: 2.1 # Use 2.1 to enable using orbs and other features.
2
-
2
+
3
3
  orbs:
4
4
  ruby: circleci/ruby@1.2.0
5
5
  node: circleci/node@2
6
6
 
7
7
  commands:
8
8
  rspec:
9
- parameters:
9
+ parameters:
10
10
  out-path:
11
11
  default: /tmp/test-results/rspec
12
12
  description: >-
@@ -17,8 +17,8 @@ commands:
17
17
  - run:
18
18
  command: >
19
19
  mkdir -p <<parameters.out-path>>
20
-
21
- bundle exec rspec --format RspecJunitFormatter --out <<parameters.out-path>>/results.xml --format progress
20
+
21
+ bundle exec rspec --format RspecJunitFormatter --out <<parameters.out-path>>/results.xml --format progress
22
22
  name: "Run tests with RSpec"
23
23
  - store_test_results:
24
24
  path: <<parameters.out-path>>
@@ -37,7 +37,7 @@ commands:
37
37
  lives in the root.
38
38
  type: string
39
39
  bundler-version:
40
- default: ''
40
+ default: ""
41
41
  description: >
42
42
  Configure which version of bundler to install and utilize. By default, it
43
43
  gets the bundler version from Gemfile.lock, but if it is not working use
@@ -58,7 +58,7 @@ commands:
58
58
  description: Enable automatic caching of your gemfile dependencies for increased speed.
59
59
  type: boolean
60
60
  platform:
61
- default: 'x86_64-linux'
61
+ default: "x86_64-linux"
62
62
  type: string
63
63
  steps:
64
64
  - when:
@@ -75,9 +75,14 @@ commands:
75
75
  - << parameters.key >>
76
76
  - run:
77
77
  command: |
78
- gem install bundler
79
78
 
80
- # here is only part that is changed from the orb command,
79
+ # we use an pinned bundler version for jruby
80
+ if [ "<< parameters.key >>" == "circleci/jruby:9.2.11.0-node" ]; then
81
+ gem install bundler -v 2.3.26
82
+ else
83
+ gem install bundler
84
+ fi
85
+
81
86
  # where we add the platform command to allow CircleCI to bundle
82
87
  bundle lock --add-platform <<parameters.platform>>
83
88
  if [ "<< parameters.path >>" == "./vendor/bundle" ]; then
@@ -98,11 +103,11 @@ commands:
98
103
  "<<parameters.app-dir>>/Gemfile" }}-{{ .Branch }}
99
104
  paths:
100
105
  - <<parameters.app-dir>>/<< parameters.path >>
101
-
106
+
102
107
  jobs:
103
108
  test:
104
109
  parameters:
105
- version:
110
+ version:
106
111
  default: "cimg/ruby:3.0-node"
107
112
  description: Ruby image to use
108
113
  type: string
@@ -114,10 +119,9 @@ jobs:
114
119
  key: <<parameters.version>>
115
120
  - rspec
116
121
 
117
-
118
122
  workflows:
119
123
  version: 2
120
- test:
124
+ test:
121
125
  jobs:
122
126
  - test:
123
127
  matrix:
@@ -126,4 +130,4 @@ workflows:
126
130
  - "cimg/ruby:3.0-node"
127
131
  - "cimg/ruby:2.7-node"
128
132
  - "cimg/ruby:3.1-node"
129
- - "circleci/jruby:9.2.11.0-node"
133
+ - "circleci/jruby:9.2.11.0-node"
data/CHANGELOG.md CHANGED
@@ -3,6 +3,10 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  This project adheres to [Semantic Versioning](http://semver.org/).
5
5
 
6
+ ## [4.3.1](https://github.com/imgix/imgix-rb/compare/4.3.0...4.3.1) - January 30, 2023
7
+
8
+ - Allow disabling path encoding in ix_image_url ([#125] (https://github.com/imgix/imgix-rails/pull/125))
9
+
6
10
  ## [4.3.0](https://github.com/imgix/imgix-rb/compare/4.2.0...4.3.0) - December 14, 2022
7
11
 
8
12
  - Add img_tag_options to ix_picture_tag ([#118] (https://github.com/imgix/imgix-rails/pull/118))
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  <!-- ix-docs-ignore -->
2
2
  ![imgix logo](https://assets.imgix.net/sdk-imgix-logo.svg)
3
3
 
4
- `imgix-rails` is a gem for integrating [imgix](https://www.imgix.com/) into Ruby on Rails applications. It builds on [imgix-rb](https://github.com/imgix/imgix-rb) to offer a few Rails-specific interfaces.
4
+ `imgix-rails` is a gem for integrating [imgix](https://www.imgix.com/) into Ruby on Rails applications. It builds on [imgix-rb](https://github.com/imgix/imgix-rb) to offer a few Rails-specific interfaces. It is tested under Ruby versions `3.1`, `3.0`, `2.7`, and `jruby-9.2.11.0`.
5
5
 
6
6
  [![Gem Version](https://img.shields.io/gem/v/imgix-rails.svg)](https://rubygems.org/gems/imgix-rails)
7
7
  [![Build Status](https://circleci.com/gh/imgix/imgix-rails.svg?style=shield)](https://circleci.com/gh/imgix/imgix-rails)
@@ -290,11 +290,11 @@ The `ix_image_url` helper makes it easy to generate a URL to an image in your Ra
290
290
 
291
291
  * `source`: an optional String indicating the source to be used. If unspecified `:source` or `:default_source` will be used. If specified, the value must be defined in the config.
292
292
  * `path`: The path or URL of the image to display.
293
- * `options`: The imgix URL parameters to apply to this image URL.
293
+ * `options`: The imgix URL parameters to apply to this image URL. Optionally, you can use `disable_path_encoding: false` for disabling URL-encoding which will be applied by default.
294
294
 
295
295
  ```erb
296
296
  <%= ix_image_url('/users/1/avatar.png', { w: 400, h: 300 }) %>
297
- <%= ix_image_url('assets2.imgix.net', '/users/1/avatar.png', { w: 400, h: 300 }) %>
297
+ <%= ix_image_url('assets2.imgix.net', '/users/1/avatar.png', { w: 400, h: 300, disable_path_encoding: true }) %>
298
298
  ```
299
299
 
300
300
  Will generate the following URLs:
@@ -6,6 +6,8 @@ module Imgix
6
6
  def ix_image_url(*args)
7
7
  validate_configuration!
8
8
 
9
+ disable_path_encoding = args.last.is_a?(Hash) && args.last.delete(:disable_path_encoding)
10
+
9
11
  case args.size
10
12
  when 1
11
13
  path = args[0]
@@ -31,7 +33,7 @@ module Imgix
31
33
  raise RuntimeError.new('path missing')
32
34
  end
33
35
 
34
- imgix_client(source).path(path).to_url(params).html_safe
36
+ imgix_client(source).path(path).to_url(params, disable_path_encoding: disable_path_encoding).html_safe
35
37
  end
36
38
 
37
39
  protected
@@ -1,5 +1,5 @@
1
1
  module Imgix
2
2
  module Rails
3
- VERSION = '4.3.0'
3
+ VERSION = '4.3.1'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: imgix-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.3.0
4
+ version: 4.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kelly Sutton
8
8
  - Paul Straw
9
- autorequire:
9
+ autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2022-12-15 00:00:00.000000000 Z
12
+ date: 2023-01-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: imgix
@@ -139,10 +139,10 @@ licenses:
139
139
  metadata:
140
140
  bug_tracker_uri: https://github.com/imgix/imgix-rails/issues
141
141
  changelog_uri: https://github.com/imgix/imgix-rails/blob/main/CHANGELOG.md
142
- documentation_uri: https://www.rubydoc.info/gems/imgix-rails/4.3.0
143
- source_code_uri: https://github.com/imgix/imgix-rails/tree/v4.3.0
142
+ documentation_uri: https://www.rubydoc.info/gems/imgix-rails/4.3.1
143
+ source_code_uri: https://github.com/imgix/imgix-rails/tree/v4.3.1
144
144
  allowed_push_host: https://rubygems.org
145
- post_install_message:
145
+ post_install_message:
146
146
  rdoc_options: []
147
147
  require_paths:
148
148
  - lib
@@ -157,8 +157,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
157
157
  - !ruby/object:Gem::Version
158
158
  version: '0'
159
159
  requirements: []
160
- rubygems_version: 3.0.3.1
161
- signing_key:
160
+ rubygems_version: 3.2.33
161
+ signing_key:
162
162
  specification_version: 4
163
163
  summary: Makes integrating imgix into your Rails app easier. It builds on imgix-rb
164
164
  to offer a few Rails-specific interfaces.