jekyll-assets 0.12.0 → 0.12.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: cd81b41822b8b54ab4cc4d1a78ae99bff7a322b3
4
- data.tar.gz: edeadf3fc3490d45c86f8d1147cc632ad5f40367
3
+ metadata.gz: 4b13b9ae4b4a5eae8cb3afdf1e3d46e3b7b0ca23
4
+ data.tar.gz: 811a606087a27842d0b2b1a65d1720a734830712
5
5
  SHA512:
6
- metadata.gz: 9a1f4e0ad128cffc1733260886fbe06439b65e38eda2ef66fef350f25262387c39d546b5de4b8a15e6ea0a812050e82ec2bc1814fd0fb6b1be031440aee1332c
7
- data.tar.gz: 02ee95d9b922f750887a49095e6e56ea1c129f9dc29bc7493ca659a5dd95b33089ec3a0f84e1b8e1dae6ab7e44a6a4e26be5a5e3ad1aa5e9868bfebe309d048d
6
+ metadata.gz: 2aba32817397a9efc3daa1b63d213a3172a434a520c8ee0f69019ed3698c9308c438a1979fe8a4cd6da823d1deecbb556bd294bd04f6b9292ac01b4f60e1322c
7
+ data.tar.gz: e63294b112e63448dc5383c4f2346db0923649e93b0ffe3813eec2aa25e5d5f208326b00fa4e2b3ddc1f6f16f0e5249ab7ccaa6554c5ca7eead2c5b4846f1859
data/HISTORY.md CHANGED
@@ -1,6 +1,23 @@
1
1
  ### master (unreleased)
2
2
 
3
3
 
4
+ ### 0.12.1 (2014-12-08)
5
+
6
+ * Fix regression with image attributes when `autosize` is used. See #117.
7
+ (Thanks @ingar)
8
+
9
+
10
+ ### 0.12.0 (2014-12-07)
11
+
12
+ * Add `[autosize]` for the `image` helper. See #114. (Thanks @devm33)
13
+
14
+
15
+ ### 0.11.0 (2014-11-09)
16
+
17
+ * Add Rails Assets support. See #109. (Thanks @ingar)
18
+ * Sass precision Bootstrap. See #107. (Thanks @thbar)
19
+
20
+
4
21
  ### 0.10.1 (2014-10-13)
5
22
 
6
23
  * Fix regression in assets finder (#104), appeared after introducing tag
@@ -27,8 +27,10 @@ module Jekyll
27
27
  match = params.strip.match PARAMS_RE
28
28
 
29
29
  @path = match["path"]
30
- @attrs = match["attrs"]
30
+ @attrs = match["attrs"].strip
31
31
  @options = match["options"].to_s.split(",")
32
+
33
+ @attrs = " #{@attrs}" unless @attrs.empty?
32
34
  end
33
35
 
34
36
  def render_asset
@@ -78,7 +80,7 @@ module Jekyll
78
80
  width, height = FastImage.size(site.assets[path].pathname)
79
81
  end
80
82
 
81
- @attrs = %(#{@attrs} width="#{width}" height="#{height}").strip
83
+ @attrs = %(#{@attrs} width="#{width}" height="#{height}")
82
84
  end
83
85
 
84
86
  def autosize?
@@ -1,5 +1,5 @@
1
1
  module Jekyll
2
2
  module AssetsPlugin
3
- VERSION = "0.12.0"
3
+ VERSION = "0.12.1"
4
4
  end
5
5
  end
@@ -213,27 +213,35 @@ RSpec.describe Jekyll::AssetsPlugin::Renderer do
213
213
  end
214
214
 
215
215
  context "with [autosize] helper option" do
216
- let(:params) { "noise.png [autosize]" }
217
- it { is_expected.to include 'width="100" height="100"' }
216
+ let(:params) { "noise.png [autosize]" }
217
+ let(:attr_src) { 'src="/assets/noise-[^.]+\.png"' }
218
+ let(:attr_size) { 'width="100" height="100"' }
219
+
220
+ it { is_expected.to match(/^<img #{attr_src} #{attr_size}>$/) }
218
221
  end
219
222
 
220
223
  context "with [no-autosize] helper option" do
221
- let(:params) { "noise.png [no-autosize]" }
222
- it { is_expected.to_not include 'width="100" height="100"' }
224
+ let(:params) { "noise.png [no-autosize]" }
225
+ let(:attr_src) { 'src="/assets/noise-[^.]+\.png"' }
226
+
227
+ it { is_expected.to match(/^<img #{attr_src}>$/) }
223
228
  end
224
229
 
225
230
  context "with autosize enabled in config" do
226
231
  let(:assets_config) { Hash[:autosize, true] }
227
- it { is_expected.to include 'width="100" height="100"' }
232
+ let(:attr_src) { 'src="/assets/noise-[^.]+\.png"' }
233
+ let(:attr_size) { 'width="100" height="100"' }
234
+
235
+ it { is_expected.to match(/^<img #{attr_src} #{attr_size}>$/) }
228
236
 
229
237
  context "and [autosize] helper option given" do
230
238
  let(:params) { "noise.png [autosize]" }
231
- it { is_expected.to include 'width="100" height="100"' }
239
+ it { is_expected.to match(/^<img #{attr_src} #{attr_size}>$/) }
232
240
  end
233
241
 
234
242
  context "and [no-autosize] helper option given" do
235
243
  let(:params) { "noise.png [no-autosize]" }
236
- it { is_expected.to_not include 'width="100" height="100"' }
244
+ it { is_expected.to match(/^<img #{attr_src}>$/) }
237
245
  end
238
246
  end
239
247
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-assets
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.0
4
+ version: 0.12.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aleksey V Zapparov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-07 00:00:00.000000000 Z
11
+ date: 2014-12-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -212,10 +212,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
212
212
  version: '0'
213
213
  requirements: []
214
214
  rubyforge_project:
215
- rubygems_version: 2.4.1
215
+ rubygems_version: 2.2.2
216
216
  signing_key:
217
217
  specification_version: 4
218
- summary: jekyll-assets-0.12.0
218
+ summary: jekyll-assets-0.12.1
219
219
  test_files:
220
220
  - spec/fixtures/.gitignore
221
221
  - spec/fixtures/_assets/alert.js