imgix-rails 3.0.0 → 3.0.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
  SHA1:
3
- metadata.gz: 685c398ffbc9325b01ab084285513ec1587d71dc
4
- data.tar.gz: d661d482080130d3af706b7815616825d9fd8785
3
+ metadata.gz: e71702fcfd1e0307fae20e59675b30066848d923
4
+ data.tar.gz: 5af8395c4981ea8209cf7a7d3b27953d36e48b61
5
5
  SHA512:
6
- metadata.gz: 797dd684241810df8b30356c6faca343e34f911129f7646fd1a37758a110a870363f951d2c20aedffbb480593434ec902f16882cda4dc2fa25f77a2730501334
7
- data.tar.gz: a543310314e39172cc523188ef2e053fff42997f0f28276763dbe479de23131325886b654e7d57712f73837666b1bbb3a6592c2f1d6d5f15288ffcc1509791d8
6
+ metadata.gz: 02a723f03d26f1fc366c932f90a30d04a968846aeca3a1640568084d3eed675e3b5f2e83826ef085575dc0487105f3ca8134f021b2300173d2e22a2d54b0d315
7
+ data.tar.gz: 6c4c787e319cafec5ee4d59fc4241cc782862fa3137cee444b1e21cc6330e0fd44587c65bc2f4bce363167c48253482ffae9d92c775a6a23c6dcb0929465566d
data/README.md CHANGED
@@ -94,8 +94,8 @@ The `ix_image_tag` helper method makes it easy to pass parameters to imgix to ha
94
94
 
95
95
  * `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.
96
96
  * `path`: The path or URL of the image to display.
97
- * `tag_options`: Any options to apply to the parent `picture` element. This is useful for adding class names, etc.
98
- * `url_params`: Default imgix options. These will be used to generate a fallback `img` tag for older browsers, and used in each `source` unless overridden by `breakpoints`.
97
+ * `tag_options`: Any options to apply to the generated `img` element. This is useful for adding class names, etc.
98
+ * `url_params`: The imgix URL parameters to apply to this image. These will be applied to each URL in the `srcset` attribute, as well as the fallback `src` attribute.
99
99
 
100
100
  ```erb
101
101
  <%= ix_image_tag('/unsplash/hotairballoon.jpg', url_params: { w: 300, h: 500, fit: 'crop', crop: 'right'}, tag_options: { alt: 'A hot air balloon on a sunny day' }) %>
@@ -157,7 +157,7 @@ The `ix_picture_tag` helper method makes it easy to generate `picture` elements
157
157
  * `path`: The path or URL of the image to display.
158
158
  * `tag_options`: Any options to apply to the parent `picture` element. This is useful for adding class names, etc.
159
159
  * `url_params`: Default imgix options. These will be used to generate a fallback `img` tag for older browsers, and used in each `source` unless overridden by `breakpoints`.
160
- * `breakpoints`: A hash describing the variants. Each key must be a media query (e.g. `(max-width: 880px)`), and each value must be a hash of param overrides for that media query. A `source` element will be generated for each breakpoint specified.
160
+ * `breakpoints`: A hash describing the variants. Each key must be a media query (e.g. `(max-width: 880px)`), and each value must be a hash of parameter overrides for that media query. A `source` element will be generated for each breakpoint specified.
161
161
 
162
162
  ```erb
163
163
  <%= ix_picture_tag('bertandernie.jpg',
@@ -222,7 +222,7 @@ The `ix_image_url` helper makes it easy to generate a URL to an image in your Ra
222
222
 
223
223
  * `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.
224
224
  * `path`: The path or URL of the image to display.
225
- * `options`: Any options to apply to the parent `picture` element. This is useful for adding class names, etc.
225
+ * `options`: The imgix URL parameters to apply to this image URL.
226
226
 
227
227
  ```erb
228
228
  <%= ix_image_url('/users/1/avatar.png', { w: 400, h: 300 }) %>
@@ -1,5 +1,5 @@
1
1
  module Imgix
2
2
  module Rails
3
- VERSION = '3.0.0'
3
+ VERSION = '3.0.1'
4
4
  end
5
5
  end
@@ -12,8 +12,8 @@ module Imgix
12
12
  return Imgix::Rails::ImageTag.new(path, source: source, tag_options: tag_options, url_params: url_params, widths: widths).render
13
13
  end
14
14
 
15
- def ix_picture_tag(source=nil, path, tag_options: {}, url_params: {}, breakpoints:)
16
- return Imgix::Rails::PictureTag.new(path, source: source, tag_options: tag_options, url_params: url_params, breakpoints: breakpoints).render
15
+ def ix_picture_tag(source=nil, path, tag_options: {}, url_params: {}, breakpoints: {}, widths: [])
16
+ return Imgix::Rails::PictureTag.new(path, source: source, tag_options: tag_options, url_params: url_params, breakpoints: breakpoints, widths: widths).render
17
17
  end
18
18
  end
19
19
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: imgix-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kelly Sutton
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2018-09-24 00:00:00.000000000 Z
12
+ date: 2018-10-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: imgix
@@ -136,7 +136,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
136
136
  version: '0'
137
137
  requirements: []
138
138
  rubyforge_project:
139
- rubygems_version: 2.5.1
139
+ rubygems_version: 2.5.2.3
140
140
  signing_key:
141
141
  specification_version: 4
142
142
  summary: Makes integrating imgix into your Rails app easier. It builds on imgix-rb