jekyll-assets 3.0.1 → 3.0.2

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: 808c14921b5df950107d2ff90e63c448b380fc1c
4
- data.tar.gz: de3fe1b44ef5d67786f37b7e14c7c72029e256f1
3
+ metadata.gz: b1f3d5acabf23dc9c653529ad978a669ce89eca2
4
+ data.tar.gz: 456822d533da03d2e708402be088c8a4d4dc3a2a
5
5
  SHA512:
6
- metadata.gz: 1f5a4c4ec74e5432f4546866f11a22c6c7ac4a30d68bf9fc52010176a660ec47b33463b0160c96a2bb08687baa7010ee3695e986aac3a182191395f839c88b19
7
- data.tar.gz: f35493a26c44a240c2e114de70559f87b19eadaec8e3740e22b2b5d98023dbf37ca8aac8a14f9398b1abd31f4994a3083d6550d373e9ce04ad5a0ab13f37fd97
6
+ metadata.gz: 057ae05da9d4ed582e2607816f593d5328a3e45b9cb58a3ed45d962311de786f3839b845fb2c78b6048f3c9bad9fa230b5d7be2dac749d2669efdfbbbdca04a8
7
+ data.tar.gz: b04b3b4811f88ee63a85323aa1bc4e17b6cb523d5ba89857e9d46040a8cf0c568baf802e3f6a382f51fcc69de8bd7f69afa8bf8528edeb9014573c0b7224da72
data/README.md CHANGED
@@ -1,28 +1,8 @@
1
- <p align=center>
2
- <a href=https://goo.gl/BhrgjW>
3
- <img src=https://envygeeks.io/badges/paypal-large_1.png>
4
- </a>
5
- <br>
6
- <a href=https://travis-ci.org/envygeeks/jekyll-assets>
7
- <img src="https://travis-ci.org/envygeeks/jekyll-assets.svg?branch=master">
8
- </a>
9
- <a href="https://codeclimate.com/github/envygeeks/jekyll-assets/test_coverage">
10
- <img src="https://api.codeclimate.com/v1/badges/56f67324553069bf51e7/test_coverage" />
11
- </a>
12
- <a href="https://codeclimate.com/github/envygeeks/jekyll-assets/maintainability">
13
- <img src="https://api.codeclimate.com/v1/badges/56f67324553069bf51e7/maintainability" />
14
- </a>
15
- </p>
16
-
17
- [1]:http://guides.rubyonrails.org/asset_pipeline.html
18
- [2]:https://github.com/rails/sprockets
19
- [3]:https://jekyllrb.com
20
-
21
- ***Jekyll Assets 3.0.0 has been released, see what's new: https://envygeeks.io/2017/11/21/jekyll-assets-3-released***
1
+ [![Code Climate](https://img.shields.io/codeclimate/maintainability/envygeeks/jekyll-assets.svg?style=for-the-badge)](https://codeclimate.com/github/envygeeks/jekyll-assets/maintainability) [![Code Climate](https://img.shields.io/codeclimate/coverage/github/envygeeks/jekyll-assets.svg?style=for-the-badge)](https://codeclimate.com/github/envygeeks/jekyll-assets/test_coverage) [![Travis branch](https://img.shields.io/travis/envygeeks/jekyll-assets/master.svg?style=for-the-badge)](https://travis-ci.org/envygeeks/jekyll-assets) [![Donate](https://img.shields.io/badge/DONATE-USD-green.svg?style=for-the-badge)](https://envygeeks.io#donate) [![Gem](https://img.shields.io/gem/v/jekyll-assets.svg?style=for-the-badge)]()
22
2
 
23
3
  # Jekyll Assets
24
4
 
25
- Jekyll Assets is a drop in [asset pipeline][1] that uses [Sprockets][2] to build specifically for Jekyll. It utilizes [Sprockets][2], and [Jekyll][3] to try and achieve a clean and extensible assets platform that supports plugins, caching, converting your assets, and even the proxy of said assets in a way that does not interfere with either [Sprockets][2], or [Jekyll][3], and your own source. By default you can add Jekyll Assets to your Gemfile, as a plugin, and have it act as a drop-in replacement for Jekyll's basic SASS/CoffeeScript processors, with you only having to add it to your Gemfile, and updating your `<img>`, and `<link>`.
5
+ Jekyll Assets is a drop in [asset pipeline](http://guides.rubyonrails.org/asset_pipeline.html) that uses [Sprockets](https://github.com/rails/sprockets) to build specifically for Jekyll. It utilizes [Sprockets](https://github.com/rails/sprockets), and [Jekyll](https://jekyllrb.com) to try and achieve a clean and extensible assets platform that supports plugins, caching, converting your assets, and even the proxy of said assets in a way that does not interfere with either [Sprockets](https://github.com/rails/sprockets), or [Jekyll](3), and your own source. By default you can add Jekyll Assets to your Gemfile, as a plugin, and have it act as a drop-in replacement for Jekyll's basic SASS/CoffeeScript processors, with you only having to add it to your Gemfile, and updating your `<img>`, and `<link>`.
26
6
 
27
7
  ## Using Jekyll Assets with Jekyll
28
8
 
@@ -385,8 +365,14 @@ assets:
385
365
  ### Bootstrap
386
366
  #### Installation
387
367
 
368
+ ***4.x***
388
369
  ```ruby
389
- gem "bootstrap-sass"
370
+ gem "bootstrap"
371
+ ```
372
+
373
+ ***3.x***
374
+ ```ruby
375
+ gem "boostrap-sass"
390
376
  ```
391
377
 
392
378
  #### Usage
@@ -3,3 +3,6 @@
3
3
  # Encoding: utf-8
4
4
 
5
5
  Jekyll::Assets::Utils.try_require "bootstrap"
6
+ Jekyll::Assets::Utils.try_require "boostrap-sass" do
7
+ Bootstrap.load!
8
+ end
@@ -0,0 +1,54 @@
1
+ # Frozen-string-literal: true
2
+ # Copyright: 2012 - 2017 - MIT License
3
+ # Encoding: utf-8
4
+
5
+ require "jekyll/assets"
6
+
7
+ module Jekyll
8
+ module Assets
9
+ class Default
10
+ class Favicon < Default
11
+ content_types "image/x-icon"
12
+
13
+ # --
14
+ def set_rel
15
+ @args[:rel] = "shortcut icon"
16
+ end
17
+
18
+ # --
19
+ def set_href
20
+ dpath = @asset.digest_path
21
+ return @args[:href] = @asset.url if @asset.is_a?(Url)
22
+ return @args[:href] = @env.prefix_url(dpath) unless @args[:inline]
23
+ @args[:href] = @asset.data_uri
24
+ end
25
+
26
+ # --
27
+ def set_integrity
28
+ return unless integrity?
29
+ @args[:integrity] = @asset.integrity
30
+ unless @args.key?(:crossorigin)
31
+ @args[:crossorigin] = "anonymous"
32
+ end
33
+ end
34
+
35
+ # --
36
+ def integrity?
37
+ config[:integrity] && !@asset.is_a?(Url) &&
38
+ !@args.key?(:integrity)
39
+ end
40
+ end
41
+ end
42
+ end
43
+ end
44
+
45
+ # --
46
+ Jekyll::Assets::Hook.register :config, :before_merge do |c|
47
+ c.deep_merge!({
48
+ defaults: {
49
+ favicon: {
50
+ integrity: Jekyll.production?,
51
+ },
52
+ },
53
+ })
54
+ end
@@ -0,0 +1,25 @@
1
+ # Frozen-string-literal: true
2
+ # Copyright: 2012 - 2017 - MIT License
3
+ # Encoding: utf-8
4
+
5
+ require "jekyll/assets"
6
+ require "nokogiri"
7
+
8
+ module Jekyll
9
+ module Assets
10
+ class HTML
11
+ class Favicon < HTML
12
+ content_types "image/x-icon"
13
+
14
+ # --
15
+ def run
16
+ Nokogiri::HTML::Builder.with(doc) do |d|
17
+ d.link(args.to_h({
18
+ html: true, skip: HTML.skips
19
+ }))
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
25
+ end
@@ -4,6 +4,6 @@
4
4
 
5
5
  module Jekyll
6
6
  module Assets
7
- VERSION = "3.0.1"
7
+ VERSION = "3.0.2"
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-assets
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.1
4
+ version: 3.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jordon Bedwell
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2017-11-22 00:00:00.000000000 Z
13
+ date: 2017-11-27 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: execjs
@@ -230,9 +230,11 @@ files:
230
230
  - lib/jekyll/assets/plugins/html/css.rb
231
231
  - lib/jekyll/assets/plugins/html/defaults/audio.rb
232
232
  - lib/jekyll/assets/plugins/html/defaults/css.rb
233
+ - lib/jekyll/assets/plugins/html/defaults/favicon.rb
233
234
  - lib/jekyll/assets/plugins/html/defaults/img.rb
234
235
  - lib/jekyll/assets/plugins/html/defaults/js.rb
235
236
  - lib/jekyll/assets/plugins/html/defaults/vid.rb
237
+ - lib/jekyll/assets/plugins/html/favicon.rb
236
238
  - lib/jekyll/assets/plugins/html/img.rb
237
239
  - lib/jekyll/assets/plugins/html/js.rb
238
240
  - lib/jekyll/assets/plugins/html/pic.rb
@@ -263,7 +265,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
263
265
  requirements:
264
266
  - - ">="
265
267
  - !ruby/object:Gem::Version
266
- version: '0'
268
+ version: 2.3.0
267
269
  required_rubygems_version: !ruby/object:Gem::Requirement
268
270
  requirements:
269
271
  - - ">="