jekyll-favicon 1.0.0 → 1.1.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
  SHA256:
3
- metadata.gz: 24f6bd5b0b3ce385c2ba309344e5852a5e0766121fd7b8e5b5692b2fbf57a719
4
- data.tar.gz: fb9071c07d3a9319454ff68f1bf4203971ac56e0abfc51890269647e1f6b6500
3
+ metadata.gz: 5fefe82f2a327fcfc67e7f5fbee4fbdd14d95f00f4f03da72716c5c92fdd8102
4
+ data.tar.gz: e147f09714c3d78304c9138a3ef15c0720c1bdbf5d1073f3367a72d7ee4bc24d
5
5
  SHA512:
6
- metadata.gz: 8959b2b93e8d89f97ea4b62a307e700d74fa60e75f8a807886cb0b3d9f607aed3d8a876181039bec09e30ad78dda561a715d4c7c1ce3222141d145b28d51cdbe
7
- data.tar.gz: 8c45c622de3aa0b7beb0d2d2680e9c2539028901a5e73d1ca9d42c09b509132679cf1af9576a83e0ba1db9fc16918de0c44f0c375b7f8ec59ea876f051dba07a
6
+ metadata.gz: 922f114d55014a2d0bd30973822a43c736d011d641bcdcb3c153e54c350526ea7ac0268a89d608e422d7ce7eeb324442da6b8adb7af82344a32ff58892520b7f
7
+ data.tar.gz: adb2ccbdf4659c83916e7bb2d00b308b8b700dd9f5cab297491c6d3d88842a6f721c854ba5d648bf83fb6a45265bcd6a1c19f8e42e28cb5b8eadce7243fc8970
@@ -32,7 +32,11 @@ jobs:
32
32
  gemfile: jekyll36
33
33
  - ruby-version: '3.0'
34
34
  gemfile: jekyll37
35
+ - ruby-version: '3.1'
36
+ gemfile: jekyll36
37
+ - ruby-version: '3.1'
38
+ gemfile: jekyll37
35
39
 
36
40
  gemfile: [ jekyll36, jekyll37, jekyll38, jekyll39, jekyll40, jekyll41, jekyll42 ]
37
41
  os: [ ubuntu-latest ]
38
- ruby-version: [ 2.6, 2.7, '3.0' ]
42
+ ruby-version: [ 2.6, 2.7, '3.0', '3.1' ]
data/CHANGELOG.md CHANGED
@@ -4,6 +4,12 @@ All notable changes to Jekyll-Favicon will be documented in this file.
4
4
  The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
5
5
  and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## [1.1.0] - 2022-07-31
8
+ ### Added
9
+ - Enable aliases when loading YAML
10
+ ### Fixed
11
+ - Ruby 3.x kwargs compatibility
12
+
7
13
  ## [1.0.0] - 2021-08-13
8
14
  ### Added
9
15
  - gitignore Gemfile.lock
data/README.md CHANGED
@@ -8,7 +8,7 @@ This [Jekyll](https://jekyllrb.com) plugin adds:
8
8
  Tested with:
9
9
 
10
10
  - Jekyll 3.6 to 3.7, ruby 2.6 to 2.7
11
- - Jekyll 3.8 to 4.2, ruby 2.6 to 3.0
11
+ - Jekyll 3.8 to 4.2, ruby 2.6 to 3.1
12
12
 
13
13
  ## Prerequisites
14
14
 
@@ -38,7 +38,7 @@ Check the devcontainer's [Dockerfile](.devcontainer/Dockerfile) for more practic
38
38
  Add this line to your application's Gemfile:
39
39
 
40
40
  ```ruby
41
- gem 'jekyll-favicon', '~> 1.0.0', group: :jekyll_plugins
41
+ gem 'jekyll-favicon', '~> 1.1.0', group: :jekyll_plugins
42
42
  ```
43
43
 
44
44
  ## Usage
@@ -24,11 +24,16 @@ module Jekyll
24
24
  def self.load_file(*parts)
25
25
  path = Favicon::ROOT.join(*parts).to_s
26
26
  path = "#{path}.yml"
27
- YAML.load_file path
27
+ # Handle Psych 3 and 4
28
+ begin
29
+ YAML.load_file path, aliases: true
30
+ rescue ArgumentError
31
+ YAML.load_file path
32
+ end
28
33
  end
29
34
 
30
35
  def self.define_defaults(base, method_name, &block)
31
- base.define_singleton_method("defaults", &block)
36
+ base.define_singleton_method(:defaults, &block)
32
37
  define_method(method_name, &block)
33
38
  end
34
39
 
@@ -15,11 +15,11 @@ module Jekyll
15
15
 
16
16
  def mutation
17
17
  refers = case @extname
18
- when ".xml"
19
- mutation_refers.select { |refer| refer.key? "browserconfig" }
20
- else
21
- mutation_refers.collect { |refer| refer["webmanifest"] }
22
- .compact
18
+ when ".xml"
19
+ mutation_refers.select { |refer| refer.key? "browserconfig" }
20
+ else
21
+ mutation_refers.collect { |refer| refer["webmanifest"] }
22
+ .compact
23
23
  end
24
24
  patch(Utils.merge(*refers) || {})
25
25
  end
@@ -12,10 +12,10 @@ module Jekyll
12
12
 
13
13
  def self.patch_unknown(value_or_values, &block)
14
14
  patch_method = case value_or_values
15
- when Array then :patch_array
16
- when Hash then :patch_hash
17
- when Symbol, String then :patch_value
18
- else return value_or_values
15
+ when Array then :patch_array
16
+ when Hash then :patch_hash
17
+ when Symbol, String then :patch_value
18
+ else return value_or_values
19
19
  end
20
20
  send patch_method, value_or_values, &block
21
21
  end
@@ -24,7 +24,8 @@ module Jekyll
24
24
  def self.mutate_iterator(key, value, memo)
25
25
  if key.start_with? "__" then memo.text = value
26
26
  elsif key.start_with? "_" then memo.add_attribute key[1..], value
27
- else Tag.mutate_xml Tag.mutate_find_or_create_element(memo, key), value
27
+ else
28
+ Tag.mutate_xml Tag.mutate_find_or_create_element(memo, key), value
28
29
  end
29
30
  end
30
31
 
@@ -45,7 +46,8 @@ module Jekyll
45
46
  if key.start_with? "__" then memo.text = value
46
47
  elsif (child_key = key.match(/^_(.*)$/))
47
48
  memo.add_attribute child_key[1], value
48
- else build_xml key, memo, value
49
+ else
50
+ build_xml key, memo, value
49
51
  end
50
52
  end
51
53
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Jekyll
4
4
  module Favicon
5
- VERSION = "1.0.0"
5
+ VERSION = "1.1.0"
6
6
  end
7
7
  end
@@ -20,8 +20,8 @@ module Jekyll
20
20
 
21
21
  def self.build_asset(site, attributes)
22
22
  asset_class = case File.extname attributes["name"]
23
- when ".ico", ".png", ".svg" then StaticGraphicFile
24
- when ".webmanifest", ".json", ".xml" then StaticDataFile
23
+ when ".ico", ".png", ".svg" then StaticGraphicFile
24
+ when ".webmanifest", ".json", ".xml" then StaticDataFile
25
25
  end
26
26
  asset_class&.new site, attributes
27
27
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-favicon
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alvaro Faundez
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-08-13 00:00:00.000000000 Z
11
+ date: 2022-07-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest