jekyll-assets 0.9.2 → 0.10.0

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: be09a65858868010feaa42928c212ab8c02469fc
4
- data.tar.gz: 2e86bb155a6c8f49775600a0230a4b795f2bd5cc
3
+ metadata.gz: 166cb1e3cc6725c829dfa2cf6936fa6598c4f2c3
4
+ data.tar.gz: a6b7fefe00f1039dcfcd749ac54a9eb23057f78a
5
5
  SHA512:
6
- metadata.gz: 588585739f1351fd9e22ce57ab6eefefffa2b5d35f16bd40614733fb25d0098fa15adc0e4913a33526c00b45d6c799113ea9b9a857fcbb0854a66d146ebc4212
7
- data.tar.gz: 2f98a13683f3d5c6dcc3efdb9329f405d8ef44afbd404990183479a440ae05c441bf2e6b69b10c143a18f2d99136071200cca0705ab5a2210b79fcb2f7988e04
6
+ metadata.gz: ed52bd661c49400d4c5f88d2b88e92869dd2588c56a0e904be5e3c22796c12e47da27f2012f729ffd7b1f5101c81ac47b91064a7206a39b28d2c2cb0a1e2d21b
7
+ data.tar.gz: e4eda01d82b244ea60c5185c8394ae36c71d2e348f891e0226e4097968d8f84a12f4e206f427d9aaa37ace4076dd408bd6f3673964011ae2a18ae125364f98fd
data/.travis.yml CHANGED
@@ -3,7 +3,10 @@ language: ruby
3
3
  rvm:
4
4
  - 1.9.3
5
5
  - 2.0.0
6
+ - 2.1.2
6
7
 
7
8
  gemfile:
8
9
  - Gemfile
9
- - Gemfile.jekyll-1.0
10
+ - gemfiles/Gemfile.bootstrap-pre-3.2
11
+ - gemfiles/Gemfile.fontawesome-pre-4.2
12
+ - gemfiles/Gemfile.jekyll-1.0
data/Gemfile CHANGED
@@ -3,8 +3,8 @@ source "https://rubygems.org"
3
3
  gem "compass"
4
4
  gem "bourbon"
5
5
  gem "neat"
6
- gem "bootstrap-sass"
7
- gem "font-awesome-sass"
6
+ gem "bootstrap-sass", "~> 3.2"
7
+ gem "font-awesome-sass", "~> 4.2"
8
8
 
9
9
  # compass fails with SASS than 3.3+
10
10
  # https://github.com/chriseppstein/compass/issues/1513
data/HISTORY.md CHANGED
@@ -1,6 +1,14 @@
1
1
  ### master (unreleased)
2
2
 
3
3
 
4
+ ### 0.10.0 (2014-09-14)
5
+
6
+ * Drop support of `bootstrap-sass < 3.2`, `font-awesome-sass < 4.2`
7
+ and `jekyll < 2.0`.
8
+ * Allow configure autoprefixer. See #95. (Thanks @silvenon)
9
+ * Fix support for FontAwesome `v4.2`. See #99. (Thanks @janlindblom)
10
+
11
+
4
12
  ### 0.9.2 (2014-08-05)
5
13
 
6
14
  * Fix tags renderer with attributes. See #93. (Thanks @tomdiggle)
data/README.md CHANGED
@@ -24,10 +24,12 @@ Jekyll plugin, that adds Rails-alike assets pipeline, that means that:
24
24
  details.
25
25
  - [Compass][compass], [Bourbon][bourbon] and [Neat][neat] built-in support.
26
26
  See "Custom Vendors" below.
27
+ - [Autoprefixer][autoprefixer] support
27
28
 
28
- [compass]: http://compass-style.org/
29
- [bourbon]: http://bourbon.io/
30
- [neat]: http://neat.bourbon.io/
29
+ [compass]: http://compass-style.org/
30
+ [bourbon]: http://bourbon.io/
31
+ [neat]: http://neat.bourbon.io/
32
+ [autoprefixer]: https://github.com/postcss/autoprefixer
31
33
 
32
34
  Jekyll-Assets uses fabulous [Sprockets][sprockets] under the hood, so you may
33
35
  refer to Rails guide about [Asset Pipeline][rails-guide] for detailed
@@ -349,6 +351,25 @@ require "jekyll-assets/neat"
349
351
  Now you can add `@import "neat"` in your SASS assets to get Neat goodies.
350
352
 
351
353
 
354
+ ## Autoprefixer
355
+
356
+ To enable Autoprefixer, add `autoprefixer-rails` to your `Gemfile`:
357
+
358
+ ``` ruby
359
+ gem "autoprefixer-rails"
360
+ ```
361
+
362
+ You can configure it by creating an `autoprefixer.yml` file in your `source`
363
+ directory (by default your project's root):
364
+
365
+ ``` yaml
366
+ browsers:
367
+ - "last 1 version"
368
+ - "> 1%"
369
+ - "Explorer 10"
370
+ ```
371
+
372
+
352
373
  ## The Directive Processor
353
374
 
354
375
  *Note:* This section extracted from [Sprockets][sprockets] README.
@@ -22,7 +22,7 @@ Gem::Specification.new do |spec|
22
22
  spec.test_files = spec.files.grep(/^(test|spec|features)\//)
23
23
  spec.require_paths = ["lib"]
24
24
 
25
- spec.add_dependency "jekyll", ">= 1.0.0", "< 3.0.0"
25
+ spec.add_dependency "jekyll", "~> 2.0"
26
26
  spec.add_dependency "sprockets", "~> 2.10"
27
27
  spec.add_dependency "sprockets-sass"
28
28
  spec.add_dependency "sprockets-helpers"
@@ -1,8 +1,7 @@
1
1
  require "sprockets"
2
2
 
3
3
  gemspec = Gem::Specification.find_by_name "bootstrap-sass"
4
- subpath = Gem::Version.new("3.2") <= gemspec.version ? "" : "vendor"
5
4
 
6
5
  %w[images fonts javascripts stylesheets].each do |asset|
7
- Sprockets.append_path File.join(gemspec.gem_dir, subpath, "assets", asset)
6
+ Sprockets.append_path File.join(gemspec.gem_dir, "assets", asset)
8
7
  end
@@ -1,6 +1,7 @@
1
1
  require "sprockets"
2
2
 
3
- fa = Gem::Specification.find_by_name("font-awesome-sass").gem_dir
3
+ gemspec = Gem::Specification.find_by_name "font-awesome-sass"
4
+
4
5
  %w[fonts stylesheets].each do |asset|
5
- Sprockets.append_path File.join(fa, "vendor", "assets", asset)
6
+ Sprockets.append_path File.join(gemspec.gem_dir, "assets", asset)
6
7
  end
@@ -54,9 +54,21 @@ module Jekyll
54
54
 
55
55
  private
56
56
 
57
+ def browsers
58
+ file = Pathname.new(@site.source).join "autoprefixer.yml"
59
+ opts = {}
60
+ params = file.exist? ? YAML.load_file(file) : {}
61
+ params = params.reduce({}) do |h, (key, value)|
62
+ h.update(key.to_sym => value)
63
+ end
64
+
65
+ opts[:safe] = true if params.delete(:safe)
66
+ [params, opts]
67
+ end
68
+
57
69
  def install_autoprefixer!
58
70
  require "autoprefixer-rails"
59
- AutoprefixerRails.install(self)
71
+ AutoprefixerRails.install(self, *browsers)
60
72
  rescue LoadError
61
73
  nil
62
74
  end
@@ -1,5 +1,5 @@
1
1
  module Jekyll
2
2
  module AssetsPlugin
3
- VERSION = "0.9.2"
3
+ VERSION = "0.10.0"
4
4
  end
5
5
  end
@@ -0,0 +1 @@
1
+ @import "bootstrap"
@@ -3,6 +3,7 @@ require "jekyll-assets/bootstrap"
3
3
 
4
4
  RSpec.describe "Bootstrap integration" do
5
5
  it "globally appends bootstrap paths into Sprockets environment" do
6
- expect(@site.assets["bootstrap.css"].to_s).to match(/bootstrap\//)
6
+ expect(@site.assets["vendor/with_bootstrap.css"].to_s)
7
+ .to match(/bootstrap\//)
7
8
  end
8
9
  end
metadata CHANGED
@@ -1,35 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-assets
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.2
4
+ version: 0.10.0
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-08-05 00:00:00.000000000 Z
11
+ date: 2014-09-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
18
- - !ruby/object:Gem::Version
19
- version: 1.0.0
20
- - - "<"
17
+ - - "~>"
21
18
  - !ruby/object:Gem::Version
22
- version: 3.0.0
19
+ version: '2.0'
23
20
  type: :runtime
24
21
  prerelease: false
25
22
  version_requirements: !ruby/object:Gem::Requirement
26
23
  requirements:
27
- - - ">="
28
- - !ruby/object:Gem::Version
29
- version: 1.0.0
30
- - - "<"
24
+ - - "~>"
31
25
  - !ruby/object:Gem::Version
32
- version: 3.0.0
26
+ version: '2.0'
33
27
  - !ruby/object:Gem::Dependency
34
28
  name: sprockets
35
29
  requirement: !ruby/object:Gem::Requirement
@@ -116,7 +110,6 @@ files:
116
110
  - ".travis.yml"
117
111
  - ".yardopts"
118
112
  - Gemfile
119
- - Gemfile.jekyll-1.0
120
113
  - Guardfile
121
114
  - HISTORY.md
122
115
  - LICENSE
@@ -160,6 +153,7 @@ files:
160
153
  - spec/fixtures/_assets/should_fail.css.erb
161
154
  - spec/fixtures/_assets/vapor.css.scss
162
155
  - spec/fixtures/_assets/vapor.js
156
+ - spec/fixtures/_assets/vendor/with_bootstrap.css.sass
163
157
  - spec/fixtures/_assets/vendor/with_bourbon.css.sass
164
158
  - spec/fixtures/_assets/vendor/with_compass.css.sass
165
159
  - spec/fixtures/_assets/vendor/with_neat.css.sass
@@ -202,10 +196,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
202
196
  version: '0'
203
197
  requirements: []
204
198
  rubyforge_project:
205
- rubygems_version: 2.2.2
199
+ rubygems_version: 2.4.1
206
200
  signing_key:
207
201
  specification_version: 4
208
- summary: jekyll-assets-0.9.2
202
+ summary: jekyll-assets-0.10.0
209
203
  test_files:
210
204
  - spec/fixtures/.gitignore
211
205
  - spec/fixtures/_assets/alert.js
@@ -223,6 +217,7 @@ test_files:
223
217
  - spec/fixtures/_assets/should_fail.css.erb
224
218
  - spec/fixtures/_assets/vapor.css.scss
225
219
  - spec/fixtures/_assets/vapor.js
220
+ - spec/fixtures/_assets/vendor/with_bootstrap.css.sass
226
221
  - spec/fixtures/_assets/vendor/with_bourbon.css.sass
227
222
  - spec/fixtures/_assets/vendor/with_compass.css.sass
228
223
  - spec/fixtures/_assets/vendor/with_neat.css.sass
data/Gemfile.jekyll-1.0 DELETED
@@ -1,2 +0,0 @@
1
- eval_gemfile "Gemfile"
2
- gem "jekyll", "~> 1.0"