imgix-rails 2.1.3 → 2.1.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d1fdaf6a0a8278327492dd878bb5af599feccd9f
4
- data.tar.gz: c93a4e96de9c38cccf4bd0de9af952ac90e67d64
3
+ metadata.gz: 9c75754475382bc08cea7f12c6d5bee8d0b794cc
4
+ data.tar.gz: b2bc84807ab40633b2fa05c57a4c24a8484b7bb6
5
5
  SHA512:
6
- metadata.gz: d4d34cb75e5e39867179c6ca213cb47fd208d7b9cf980a15753ec5e1e52c9fa4a0a607f91370254567a46b62211498cae3317577aee4e18f53818fc7cbd986e6
7
- data.tar.gz: 47761da1fe44af0ad2b9181b75221cbbe4225d625550fa0fd9a47c9b648a3007f8cb013670fdf4683ec2e8f4c55093faf618315e5f6fa53a362406f45f49af20
6
+ metadata.gz: cd75ed3285539c743aada0c7ce94c1cf72a297f85b4545e0b3439e9cd4ebe3df5c56f84c90c789782191d054fd1287082b2a13a6bdf785e9b67f8d61ab204d54
7
+ data.tar.gz: 6ee0e5ac18b1d7a4321b81e6c825e40dc4b1718dd20e11109c8eb6706dbb217ad1ebe5983d743b2faa056df602cf2047dc94703843a70b39741297eaa726dac5
data/README.md CHANGED
@@ -65,7 +65,7 @@ The following configuration flags will be respected:
65
65
  <a name="ix_image_tag"></a>
66
66
  ### ix_image_tag
67
67
 
68
- The `ix_image_tag` helper method makes it easy to pass parameters to imgix to handle resizing, cropping, etc. It also simplifies adding responsive imagery to your Rails app by automatically generating a `srcset` based on the parameters you pass. We talk a bit about using the `srcset` attribute in an application in the following blog post: [“Responsive Images with `srcset` and imgix.”](http://blog.imgix.com/post/127012184664/responsive-images-with-srcset-imgix).
68
+ The `ix_image_tag` helper method makes it easy to pass parameters to imgix to handle resizing, cropping, etc. It also simplifies adding responsive imagery to your Rails app by automatically generating a `srcset` based on the parameters you pass. We talk a bit about using the `srcset` attribute in an application in the following blog post: [“Responsive Images with `srcset` and imgix.”](https://blog.imgix.com/2015/08/18/responsive-images-with-srcset-imgix.html).
69
69
 
70
70
  `ix_image_tag` generates `<img>` tags with a filled-out `srcset` attribute that leans on imgix to do the hard work. If you already know the minimum or maximum number of physical pixels that this image will need to be displayed at, you can pass the `min_width` and/or `max_width` options. This will result in a smaller, more tailored `srcset`.
71
71
 
@@ -8,6 +8,6 @@ class Imgix::Rails::ImageTag < Imgix::Rails::Tag
8
8
  @source = replace_hostname(@source)
9
9
  normal_opts = @options.slice!(*self.class.available_parameters)
10
10
 
11
- image_tag(ix_image_url(@source, @options), normal_opts)
11
+ image_tag(ix_image_url(@source, @options.except(:widths)), normal_opts)
12
12
  end
13
13
  end
@@ -35,7 +35,7 @@ protected
35
35
  widths = opts[:widths] || target_widths
36
36
 
37
37
  widths.map do |width|
38
- srcset_options = opts.slice(*self.class.available_parameters)
38
+ srcset_options = opts.slice(*self.class.available_parameters).except(:widths)
39
39
  srcset_options[:w] = width
40
40
 
41
41
  if opts[:w].present? && opts[:h].present?
@@ -1,5 +1,5 @@
1
1
  module Imgix
2
2
  module Rails
3
- VERSION = '2.1.3'
3
+ VERSION = '2.1.4'
4
4
  end
5
5
  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: 2.1.3
4
+ version: 2.1.4
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: 2016-10-26 00:00:00.000000000 Z
12
+ date: 2017-06-01 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.6.8
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