squoosh 0.4.0 → 0.4.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: 5629b74c30885ffe74552245300726730050c5b08be3a0ae3270d87d26940b3b
4
- data.tar.gz: e10c8aa994b60e7ad192da3b0c0f5ef27346827c7e777f30a5b828d5c891a718
3
+ metadata.gz: 1a4678d05fe913414d3a1d884f430ad878774c3f652f437482934ed414631f00
4
+ data.tar.gz: f4d858d1fa5941dd1b55fe78757fa51a05a0480e0b7e70dd36f6ad90468f44ad
5
5
  SHA512:
6
- metadata.gz: 64cd4ba5c5c8ab4de943685546a0aef694489c1f68ab809383b21f2a1bc650e68b0c20d5a4eeafaa144a44e9f35978c44868b1bd27c857fa41442a26cae48db2
7
- data.tar.gz: d3d0e28e5b4201552f7db683c97b6b5b7195dae718abf020869b180b23c6eab04b07ed5bc501310b88d8a4ba481247b78149ee45b31eb93e045cce215713b2dc
6
+ metadata.gz: b683caef16cd477d32fdacbc2dd181b25110ae41a1b811f814b5d3157316b803e45d84d4e1778bfe9bc25bd08c89ab27670f73f0e5189a9686ea5fb7513a8ac2
7
+ data.tar.gz: 961b95dde228f037f2ae1ff681d2093dfcb8d5b3d59dc15f2acc801c261611d7f48461c8946bfc62aefb65e887c4e92120273d8d62d27e764ced1e3b8abb26f1
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  [![Actions
2
- Status](https://github.com/stevecheckoway/squoosh/workflows/CI%20Test/badge.svg)](https://github.com/stevecheckoway/squoosh/actions)
2
+ Status](https://github.com/stevecheckoway/squoosh/actions/workflows/ci.yml/badge.svg)](https://github.com/stevecheckoway/squoosh/actions)
3
3
  [![Coverage
4
- Status](https://coveralls.io/repos/github/stevecheckoway/squoosh/badge.svg?branch=master)](https://coveralls.io/github/stevecheckoway/squoosh?branch=master)
4
+ Status](https://coveralls.io/repos/github/stevecheckoway/squoosh/badge.svg?branch=main)](https://coveralls.io/github/stevecheckoway/squoosh?branch=main)
5
5
 
6
6
  # Squoosh
7
7
 
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Squoosh
4
4
  # The version of squoosh.
5
- VERSION = '0.4.0'
5
+ VERSION = '0.4.1'
6
6
  end
data/lib/squoosh.rb CHANGED
@@ -67,7 +67,7 @@ module Squoosh
67
67
  #
68
68
  # @param options [Hash] options to override the default options
69
69
  def initialize(options = {})
70
- options.each do |key, _val|
70
+ options.each_key do |key|
71
71
  unless DEFAULT_OPTIONS.include?(key)
72
72
  raise ArgumentError, "Invalid option `#{key}'"
73
73
  end
@@ -387,18 +387,23 @@ module Squoosh
387
387
  output.string
388
388
  end
389
389
 
390
+ XML_NAMESPACE = 'http://www.w3.org/XML/1998/namespace'
391
+ XMLNS_NAMESPACE = 'http://www.w3.org/2000/xmlns/'
392
+ XLINK_NAMESPACE = 'http://www.w3.org/1999/xlink'
393
+ private_constant :XML_NAMESPACE, :XMLNS_NAMESPACE, :XLINK_NAMESPACE
394
+
390
395
  def qualified_attribute_name(attr)
391
396
  ns = attr.namespace
392
397
  return attr.name if ns.nil?
393
398
 
394
399
  uri = ns.href
395
- if uri == Nokogiri::HTML5::XML_NAMESPACE
400
+ if uri == XML_NAMESPACE
396
401
  "xml:#{attr.name}"
397
- elsif uri == Nokogiri::HTML5::XMLNS_NAMESPACE && attr.name == 'xmlns'
402
+ elsif uri == XMLNS_NAMESPACE && attr.name == 'xmlns'
398
403
  'xmlns'
399
- elsif uri == Nokogiri::HTML5::XMLNS_NAMESPACE
404
+ elsif uri == XMLNS_NAMESPACE
400
405
  "xmlns:#{attr.name}"
401
- elsif uri == Nokogiri::HTML5::XLINK_NAMESPACE
406
+ elsif uri == XLINK_NAMESPACE
402
407
  "xlink:#{attr.name}"
403
408
  else
404
409
  # :nocov:
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: squoosh
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen Checkoway
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-08-22 00:00:00.000000000 Z
11
+ date: 2024-01-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -66,6 +66,34 @@ dependencies:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rubocop-rake
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: rubocop-rspec
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
69
97
  - !ruby/object:Gem::Dependency
70
98
  name: simplecov
71
99
  requirement: !ruby/object:Gem::Requirement
@@ -169,6 +197,7 @@ metadata:
169
197
  changelog_uri: https://github.com/stevecheckoway/squoosh/blob/master/CHANGELOG.md
170
198
  homepage_uri: https://github.com/stevecheckoway/squoosh
171
199
  source_code_uri: https://github.com/stevecheckoway/squoosh
200
+ rubygems_mfa_required: 'true'
172
201
  post_install_message:
173
202
  rdoc_options: []
174
203
  require_paths:
@@ -187,7 +216,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
187
216
  - !ruby/object:Gem::Version
188
217
  version: '0'
189
218
  requirements: []
190
- rubygems_version: 3.1.6
219
+ rubygems_version: 3.4.22
191
220
  signing_key:
192
221
  specification_version: 4
193
222
  summary: Minify HTML/CSS/JavaScript files.