jekyll-gzip 2.1.0 → 2.1.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
  SHA256:
3
- metadata.gz: 9cd633c28c8cb3598fe2026d582716f6c8dcad49e11886032e1a1860cd540fbd
4
- data.tar.gz: 5ca08691643c435a45293869d4964428335de8c3455f8872f96436b93680aabd
3
+ metadata.gz: e9b6615eacd308b2725edbc534a6191034246fbad0207028a3fca4d047314820
4
+ data.tar.gz: 60c0f1df14238b1e7306a577ff27573457f9b100bd957f2a865dee279c816564
5
5
  SHA512:
6
- metadata.gz: c8afea9d74a9c4c419d5b8348d0b383f6dc51ea7dd236f743047376ecd90e57d11f9021cb3c6606f1a5ad0460ca6287454e1d50502f7c6b707f28ec6daba315f
7
- data.tar.gz: f4ee3d3febd15c9eea55b34a82ef2d1791baa6a10bf6395867d6543bf63266856d67feff6450c5b3cfa54c43878f3503d5fef0c1bc0b74c102d21d3dc7dee7c5
6
+ metadata.gz: d4aa8011f4c7a3487deb1b26183a33aa596e470fecd557b57191ec29184e2cc4da4b29ff25fc0549a1503f0836086e170fb871f63fa861469fca1f8c5ddbe9ce
7
+ data.tar.gz: b88e330c3f0dbf73ca197913faa5a185387e70190436699901a61401cc478aca1e866302bccb483175bd724ffe0fc9cbef048b0d5886c7fb3d50a5969e138b2c
@@ -1,9 +1,15 @@
1
1
  # Changelog
2
2
 
3
- ## Ongoing [☰](https://github.com/philnash/jekyll-gzip/compare/v2.1.0...master)
3
+ ## Ongoing [☰](https://github.com/philnash/jekyll-gzip/compare/v2.1.1...master)
4
4
 
5
5
  ...
6
6
 
7
+ ## 2.1.1 (2019-03-30) [☰](https://github.com/philnash/jekyll-gzip/compare/v2.1.0...v2.1.1)
8
+
9
+ ### Fixed
10
+
11
+ * Replacing files with gzipped version wasn't working, fixed thanks to [k0nserv](https://github.com/k0nserv) in #6.
12
+
7
13
  ## 2.1.0 (2019-03-30) [☰](https://github.com/philnash/jekyll-gzip/compare/v2.0.0...v2.1.0)
8
14
 
9
15
  ### Added
@@ -65,15 +65,18 @@ module Jekyll
65
65
  # @param file_name [String] The file name of the file we want to compress
66
66
  # @param extensions [Array<String>] The extensions of files that will be
67
67
  # compressed.
68
+ # @param replace_file [Boolean] Whether the origina file should be
69
+ # replaced or written alongside the original with a `.gz` extension
68
70
  #
69
71
  # @return void
70
72
  def self.compress_file(file_name, extensions: [], replace_file: false)
71
73
  return unless extensions.include?(File.extname(file_name))
72
74
  zipped = replace_file ? file_name : "#{file_name}.gz"
75
+ file_content = IO.binread(file_name)
73
76
  Zlib::GzipWriter.open(zipped, Zlib::BEST_COMPRESSION) do |gz|
74
77
  gz.mtime = File.mtime(file_name)
75
78
  gz.orig_name = file_name
76
- gz.write IO.binread(file_name)
79
+ gz.write file_content
77
80
  end
78
81
  end
79
82
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Jekyll
4
4
  module Gzip
5
- VERSION = "2.1.0"
5
+ VERSION = "2.1.1"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-gzip
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Phil Nash
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-03-30 00:00:00.000000000 Z
11
+ date: 2019-04-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll