nanoc-gzip.rb 0.2.3 → 0.2.4

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: 84bd3ce661bd3c5a96251ce6352417d3037b64ed584802d397b38437ebdbeb6d
4
- data.tar.gz: 67d2c901952a101e2cee5cb9b31052637ce2e3758a8131c0506747dbc5a120ee
3
+ metadata.gz: a2bcd25ed2965a4c05b2be2c376f3f9487ba1b1cb699e5c7c51896aef2216050
4
+ data.tar.gz: 7fa92b9ba442f27f1fe785fa8196b5c0b55a84c661abce661e0f08475813d533
5
5
  SHA512:
6
- metadata.gz: d55d15ce56cd317f582c4c489f3ea98904b3008a1941247fe0f48282349fcea7777d2a1d7207b175930ddca5c52e258061a0f5fe2ebb26f823bb91e7bbb0150a
7
- data.tar.gz: 408eba814eeabd31d0349e63f9e227346905b2fce21a839393885f32040676de5f1ccd555bf5f8492f0229fa757f5bba838f31a7ddc40f3f32a51c9d5d792ba7
6
+ metadata.gz: 5d37026fa5c9a879011d957be885c574951d97964edaed5c2bf997a2b75c28eb58d620f0cfc00abb0a749863a8b5c6348489f1cc064fb488847f0fdb4819b9c5
7
+ data.tar.gz: ec88c16c66b9c3602f483cfe487dc658b7bbb1b0afce054043eb616ab8630da616b01da0ce9095b0b3c2d110169680bbcae9895caeb4490ae4d58c57a699bb7a
data/.projectile CHANGED
@@ -0,0 +1 @@
1
+ -/.gems/
data/README.md CHANGED
@@ -2,8 +2,8 @@
2
2
 
3
3
  nanoc-gzip.rb is a
4
4
  [nanoc](https://nanoc.app)
5
- filter that integrates gzip compression into nanoc-powered
6
- websites. The filter can be combined with the nginx module
5
+ filter that integrates gzip into nanoc.
6
+ The filter can be combined with the nginx module
7
7
  [gzip_static](http://nginx.org/en/docs/http/ngx_http_gzip_static_module.html)
8
8
  or its equivalent in other web servers.
9
9
 
@@ -29,8 +29,8 @@ end
29
29
 
30
30
  The filter can be configured with "level", and
31
31
  "strategy" options. Both are integer values. The
32
- default level is 9. And the default strategy
33
- is 0. The
32
+ default compression level is `Zlib::BEST_COMPRESSION`.
33
+ And the default strategy is `Zlib::DEFAULT_STRATEGY`. The
34
34
  [zlib manual](https://www.zlib.net/manual.html#Constants)
35
35
  documents what integers are accepted and what
36
36
  they represent. Example:
@@ -40,39 +40,26 @@ they represent. Example:
40
40
  require "nanoc-gzip"
41
41
  compile "/js/app.js" do
42
42
  write("/js/app.js")
43
- filter(:gzip, {level: 1, strategy: 2})
43
+ filter(:gzip, {level: Zlib::BEST_SPEED, strategy: Zlib::HUFFMAN_ONLY})
44
44
  write("/js/app.js.gz")
45
45
  end
46
46
  ```
47
47
 
48
- ## Sources
49
-
50
- * [Source code (GitHub)](https://github.com/0x1eef/nanoc-gzip.rb)
51
- * [Source code (GitLab)](https://gitlab.com/0x1eef/nanoc-gzip.rb)
52
-
53
- ## <a id='install'>Install</a>
54
-
55
- **Git**
56
-
57
- nanoc-gzip.rb is distributed as a RubyGem through its git repositories. <br>
58
- [GitHub](https://github.com/0x1eef/nanoc-gzip.rb),
59
- and
60
- [GitLab](https://gitlab.com/0x1eef/nanoc-gzip.rb)
61
- are available as sources.
62
-
63
- ```ruby
64
- # Gemfile
65
- gem "nanoc-gzip.rb", github: "0x1eef/nanoc-gzip.rb", tag: "v0.2.2"
66
- ```
48
+ ## Install
67
49
 
68
50
  **Rubygems.org**
69
51
 
70
- nanoc-gzip.rb can also be installed via rubygems.org.
52
+ nanoc-gzip.rb can be installed via rubygems.org:
71
53
 
72
54
  gem install nanoc-gzip.rb
73
55
 
56
+ ## Sources
57
+
58
+ * [GitHub](https://github.com/0x1eef/nanoc-gzip.rb#readme)
59
+ * [GitLab](https://gitlab.com/0x1eef/nanoc-gzip.rb#about)
60
+
74
61
  ## License
75
62
 
76
- [BSD Zero Clause](https://choosealicense.com/licenses/0bsd/).
63
+ [BSD Zero Clause](https://choosealicense.com/licenses/0bsd/)
77
64
  <br>
78
- See [LICENSE](./LICENSE).
65
+ See [LICENSE](./LICENSE)
@@ -7,17 +7,15 @@ module Nanoc::Gzip
7
7
  include Zlib
8
8
 
9
9
  ##
10
- # Compresses a string, and writes the string to "Nanoc::Filter#output_filename".
11
- #
12
10
  # @param [String] content
13
11
  # The contents of a file.
14
12
  #
15
13
  # @param [Integer] level
16
- # The compression level represented by an integer between 0, and 9. <br>
14
+ # The compression level.
17
15
  # The default is 9 (Zlib::BEST_COMPRESSION).
18
16
  #
19
17
  # @param [Integer] strategy
20
- # The compression strategy represented by an integer between 0, and 4. <br>
18
+ # The compression strategy.
21
19
  # The default is 0 (Zlib::DEFAULT_STRATEGY).
22
20
  #
23
21
  # @return [void]
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Nanoc
4
4
  module Gzip
5
- VERSION = "0.2.3"
5
+ VERSION = "0.2.4"
6
6
  end
7
7
  end
@@ -10,7 +10,7 @@ Gem::Specification.new do |gem|
10
10
  gem.licenses = ["0BSD"]
11
11
  gem.files = `git ls-files`.split($/)
12
12
  gem.require_paths = ["lib"]
13
- gem.summary = "A nanoc filter that compresses content in the gzip format"
13
+ gem.summary = "nanoc-gzip.rb integrates gzip into nanoc"
14
14
  gem.description = gem.summary
15
15
  gem.metadata = { "documentation_uri" => "https://0x1eef.github.io/x/nanoc-gzip.rb" }
16
16
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nanoc-gzip.rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - '0x1eef'
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-02-15 00:00:00.000000000 Z
11
+ date: 2024-05-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nanoc
@@ -108,7 +108,7 @@ dependencies:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
110
  version: '2.11'
111
- description: A nanoc filter that compresses content in the gzip format
111
+ description: nanoc-gzip.rb integrates gzip into nanoc
112
112
  email:
113
113
  - 0x1eef@protonmail.com
114
114
  executables: []
@@ -154,8 +154,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
154
154
  - !ruby/object:Gem::Version
155
155
  version: '0'
156
156
  requirements: []
157
- rubygems_version: 3.5.3
157
+ rubygems_version: 3.5.9
158
158
  signing_key:
159
159
  specification_version: 4
160
- summary: A nanoc filter that compresses content in the gzip format
160
+ summary: nanoc-gzip.rb integrates gzip into nanoc
161
161
  test_files: []