jekyll-zopfli 2.4.1 → 2.5.0

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
  SHA256:
3
- metadata.gz: dc0f0d47de0345996beda095ec41eecf3ddc301e5e90f6df57af970802abd6ce
4
- data.tar.gz: e707b922ee812dd09bfe938d7de81d35fde61d12f8a2bdb41bf7750c6c6fce21
3
+ metadata.gz: 69d64e88350322aa287a04de9c9dba6d60b1588f21973a3a1f5e40b37fd6265c
4
+ data.tar.gz: cfb0d765560b20803e39f42f8e194d3f7a5e0f68fc0290b3357947c284cb3488
5
5
  SHA512:
6
- metadata.gz: 38e0acfb990962309ea401e0aa8c781093226ba13d561252f71882dedb8c230f8c102caeffb80f2c20c40ff8a07478559b4d00a40fd2a1f3dbdd6bf256c1813d
7
- data.tar.gz: df3375272757bc92da2483fe42308402484b5b34850540be8e04ca57e1a1817846bc9ffb7556f0ee49653867f2a23af36df0f4c5596d03f4a35797a772d1ebf6
6
+ metadata.gz: 2a5cbdf255e010eaacecf8b3795ab98c1ce2cac6cb8ef603b452632823f0988498acfd036298a876fdf5fd4b3da127153d8d581e2e2e35fe062f5523f61af1b7
7
+ data.tar.gz: 908118206b320010b26e51d399dd62eab09b571c6d97347f5417641872723b0f2766e3209a1656b72f3c4b41135691634ff5fc3b294956fc58c57d51d3eec8e5
@@ -0,0 +1 @@
1
+ github: philnash
@@ -0,0 +1,25 @@
1
+ name: tests
2
+
3
+ on: [push, pull_request]
4
+
5
+ jobs:
6
+ test:
7
+ runs-on: ubuntu-latest
8
+ strategy:
9
+ fail-fast: false
10
+ matrix:
11
+ ruby: [2.5, 2.6, 2.7, 3.0, head]
12
+ jekyll: ["3.0", "4.0"]
13
+ continue-on-error: ${{ endsWith(matrix.ruby, 'head') }}
14
+ env:
15
+ JEKYLL_VERSION: ~> ${{ matrix.jekyll }}
16
+ steps:
17
+ - uses: actions/checkout@v2
18
+ - name: Set up Ruby ${{ matrix.ruby }}
19
+ uses: ruby/setup-ruby@v1
20
+ with:
21
+ ruby-version: ${{ matrix.ruby }}
22
+ - name: "Install dependencies"
23
+ run: bundle install
24
+ - name: Run tests
25
+ run: bundle exec rspec
data/CHANGELOG.md CHANGED
@@ -1,10 +1,21 @@
1
1
  # Changelog
2
2
 
3
- ## Ongoing [☰](https://github.com/philnash/jekyll-gzip/compare/v2.4.1...master)
3
+ ## Ongoing [☰](https://github.com/philnash/jekyll-zopfli/compare/v2.4.1...main)
4
4
 
5
5
  ...
6
6
 
7
- ## 2.4.1 (2020-01-30) [☰](https://github.com/philnash/jekyll-gzip/compare/v2.4.0...v2.4.1)
7
+ ## 2.5.0 (2021-02-13) [☰](https://github.com/philnash/jekyll-zopfli/compare/v2.4.1...v2.5.0)
8
+
9
+ ### Changed
10
+
11
+ - Added JSON files to compressable extensions
12
+ - Moved from Travis CI to GitHub Actions
13
+
14
+ ### Fixed
15
+
16
+ - Stop overwriting Jekyll config, which invalidates the Jekyll cache (see https://github.com/jekyll/jekyll/issues/8551)
17
+
18
+ ## 2.4.1 (2020-01-30) [☰](https://github.com/philnash/jekyll-zopfli/compare/v2.4.0...v2.4.1)
8
19
 
9
20
  ### Changed
10
21
 
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Generate gzipped assets and files for your Jekyll site at build time using [Zopfli](https://github.com/google/zopfli) compression.
4
4
 
5
- [![Gem Version](https://badge.fury.io/rb/jekyll-zopfli.svg)](https://rubygems.org/gems/jekyll-zopfli) [![Build Status](https://travis-ci.org/philnash/jekyll-zopfli.svg?branch=master)](https://travis-ci.org/philnash/jekyll-zopfli) [![Maintainability](https://api.codeclimate.com/v1/badges/177f76759bc3b996e9e2/maintainability)](https://codeclimate.com/github/philnash/jekyll-zopfli/maintainability) [![Inline docs](https://inch-ci.org/github/philnash/jekyll-zopfli.svg?branch=master)](https://inch-ci.org/github/philnash/jekyll-zopfli)
5
+ [![Gem Version](https://badge.fury.io/rb/jekyll-zopfli.svg)](https://rubygems.org/gems/jekyll-zopfli) [![Build status](https://github.com/philnash/jekyll-zopfli/workflows/tests/badge.svg)](https://github.com/philnash/jekyll-zopfli/actions) [![Maintainability](https://api.codeclimate.com/v1/badges/177f76759bc3b996e9e2/maintainability)](https://codeclimate.com/github/philnash/jekyll-zopfli/maintainability) [![Inline docs](https://inch-ci.org/github/philnash/jekyll-zopfli.svg?branch=main)](https://inch-ci.org/github/philnash/jekyll-zopfli)
6
6
 
7
7
  [API docs](http://www.rubydoc.info/gems/jekyll-zopfli/) | [GitHub repo](https://github.com/philnash/jekyll-zopfli)
8
8
 
@@ -72,6 +72,7 @@ By default, `Jekyll::Zopfli` will compress all files with the following extensio
72
72
  - '.html'
73
73
  - '.css'
74
74
  - '.js'
75
+ - '.json'
75
76
  - '.txt'
76
77
  - '.ttf'
77
78
  - '.atom'
@@ -146,4 +147,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
146
147
 
147
148
  ## Code of Conduct
148
149
 
149
- Everyone interacting in the Jekyll::Zopfli project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/philnash/jekyll-gzip/blob/master/CODE_OF_CONDUCT.md).
150
+ Everyone interacting in the Jekyll::Zopfli project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/philnash/jekyll-zopfli/blob/main/CODE_OF_CONDUCT.md).
@@ -25,7 +25,7 @@ Gem::Specification.new do |spec|
25
25
  spec.add_dependency "zopfli", "~> 0.0.7"
26
26
 
27
27
  spec.add_development_dependency "bundler", ">= 1.16", "< 3.0"
28
- spec.add_development_dependency "rake", "~> 10.0"
28
+ spec.add_development_dependency "rake", "~> 13.0"
29
29
  spec.add_development_dependency "rspec", "~> 3.0"
30
30
  spec.add_development_dependency "simplecov", "~> 0.15.1"
31
31
  end
data/lib/jekyll/zopfli.rb CHANGED
@@ -10,11 +10,6 @@ module Jekyll
10
10
  end
11
11
  end
12
12
 
13
- Jekyll::Hooks.register :site, :after_init do |site|
14
- config = site.config['zopfli'] || {}
15
- site.config['zopfli'] = Jekyll::Zopfli::DEFAULT_CONFIG.merge(config) || {}
16
- end
17
-
18
13
  Jekyll::Hooks.register :site, :post_write do |site|
19
14
  Jekyll::Zopfli::Compressor.compress_site(site) if Jekyll.env == 'production'
20
15
  end
@@ -91,12 +91,11 @@ module Jekyll
91
91
  private
92
92
 
93
93
  def self.zippable_extensions(site)
94
- site.config['zopfli'] && site.config['zopfli']['extensions'] || Jekyll::Zopfli::DEFAULT_CONFIG['extensions']
94
+ site.config.dig("zopfli", "extensions") || Jekyll::Zopfli::DEFAULT_CONFIG.fetch("extensions")
95
95
  end
96
96
 
97
97
  def self.replace_files(site)
98
- replace_files = site.config.dig('zopfli', 'replace_files')
99
- replace_files.nil? ? Jekyll::Zopfli::DEFAULT_CONFIG['replace_files'] : replace_files
98
+ site.config.dig("zopfli", "replace_files") || Jekyll::Zopfli::DEFAULT_CONFIG.fetch("replace_files")
100
99
  end
101
100
 
102
101
  def self.zipped(file_name, replace_file)
@@ -7,6 +7,7 @@ module Jekyll
7
7
  '.html',
8
8
  '.css',
9
9
  '.js',
10
+ '.json',
10
11
  '.txt',
11
12
  '.ttf',
12
13
  '.atom',
@@ -18,4 +19,4 @@ module Jekyll
18
19
  'replace_files' => false
19
20
  }.freeze
20
21
  end
21
- end
22
+ end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Jekyll
4
4
  module Zopfli
5
- VERSION = "2.4.1"
5
+ VERSION = "2.5.0"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-zopfli
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.1
4
+ version: 2.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Phil Nash
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-01-30 00:00:00.000000000 Z
11
+ date: 2021-02-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -70,14 +70,14 @@ dependencies:
70
70
  requirements:
71
71
  - - "~>"
72
72
  - !ruby/object:Gem::Version
73
- version: '10.0'
73
+ version: '13.0'
74
74
  type: :development
75
75
  prerelease: false
76
76
  version_requirements: !ruby/object:Gem::Requirement
77
77
  requirements:
78
78
  - - "~>"
79
79
  - !ruby/object:Gem::Version
80
- version: '10.0'
80
+ version: '13.0'
81
81
  - !ruby/object:Gem::Dependency
82
82
  name: rspec
83
83
  requirement: !ruby/object:Gem::Requirement
@@ -114,9 +114,10 @@ executables: []
114
114
  extensions: []
115
115
  extra_rdoc_files: []
116
116
  files:
117
+ - ".github/FUNDING.yml"
118
+ - ".github/workflows/tests.yml"
117
119
  - ".gitignore"
118
120
  - ".rspec"
119
- - ".travis.yml"
120
121
  - CHANGELOG.md
121
122
  - CODE_OF_CONDUCT.md
122
123
  - Gemfile
@@ -135,7 +136,7 @@ homepage: https://github.com/philnash/jekyll-zopfli
135
136
  licenses:
136
137
  - MIT
137
138
  metadata: {}
138
- post_install_message:
139
+ post_install_message:
139
140
  rdoc_options: []
140
141
  require_paths:
141
142
  - lib
@@ -150,8 +151,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
150
151
  - !ruby/object:Gem::Version
151
152
  version: '0'
152
153
  requirements: []
153
- rubygems_version: 3.0.3
154
- signing_key:
154
+ rubygems_version: 3.1.4
155
+ signing_key:
155
156
  specification_version: 4
156
157
  summary: Generate gzipped assets and files for your Jekyll site at build time using
157
158
  Zopfli compression.
data/.travis.yml DELETED
@@ -1,16 +0,0 @@
1
- sudo: false
2
- language: ruby
3
- rvm:
4
- - 2.7
5
- - 2.6
6
- - 2.5
7
- - 2.4
8
- - ruby-head
9
- env:
10
- - 'JEKYLL_VERSION="~> 3.0"'
11
- - 'JEKYLL_VERSION="~> 4.0"'
12
- matrix:
13
- allow_failures:
14
- - rvm: ruby-head
15
- before_install: gem install bundler
16
- script: bundle exec rspec