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 +4 -4
- data/README.md +1 -1
- data/lib/imgix/rails/image_tag.rb +1 -1
- data/lib/imgix/rails/tag.rb +1 -1
- data/lib/imgix/rails/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9c75754475382bc08cea7f12c6d5bee8d0b794cc
|
4
|
+
data.tar.gz: b2bc84807ab40633b2fa05c57a4c24a8484b7bb6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.”](
|
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
|
data/lib/imgix/rails/tag.rb
CHANGED
@@ -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?
|
data/lib/imgix/rails/version.rb
CHANGED
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.
|
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:
|
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.
|
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
|