mimemagic-dorian 0.5.4 → 0.5.5
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 +4 -4
- data/lib/mimemagic/version.rb +1 -1
- data/lib/mimemagic-dorian.rb +1 -0
- data/lib/mimemagic.rb +5 -3
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 144a66162ec74400e632d236e81adbaa15a5e508c55f780b1b8314800af3fc64
|
|
4
|
+
data.tar.gz: 0c17b8d7bcb7b35cd49e2e89ebe7f81a05ae41a5a20309171e4632bf01005a0a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1837bd49db48079d34ae234b73825d449164c9ab6a4c9c2e8b4faa5f386a871342f6d1893cbeaa1cf11d821a5fd4bb9295d98b8aca4bbbb23d5591382fa7a695
|
|
7
|
+
data.tar.gz: 97f8bc92d245a7c3cd1f6dff1340064ac95c3c01a882c0703774cfa0ac74d407775f3b26c0acb98e720e05718ae96b3ce3f9ad564c27136e1bdb452fbc51ebaf
|
data/lib/mimemagic/version.rb
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require 'mimemagic'
|
data/lib/mimemagic.rb
CHANGED
|
@@ -155,10 +155,11 @@ class MimeMagic
|
|
|
155
155
|
#
|
|
156
156
|
def descendant_of? ancestor
|
|
157
157
|
# always false if we don't know what this is
|
|
158
|
-
return unless c = canonical
|
|
158
|
+
return false unless c = canonical
|
|
159
|
+
return false unless ancestor = self.class[ancestor].canonical
|
|
159
160
|
|
|
160
161
|
# ancestor canonical could be nil which will be false
|
|
161
|
-
c.lineage.include?
|
|
162
|
+
c.lineage.include? ancestor
|
|
162
163
|
end
|
|
163
164
|
|
|
164
165
|
# Returns true if type is child of parent type. Behaves the same as
|
|
@@ -217,8 +218,9 @@ class MimeMagic
|
|
|
217
218
|
# @return [false, true] whether the two are equal.
|
|
218
219
|
#
|
|
219
220
|
def eql?(other)
|
|
221
|
+
return false unless other
|
|
220
222
|
# coerce the rhs
|
|
221
|
-
other = self.class[other]
|
|
223
|
+
other = self.class[other] or return false
|
|
222
224
|
|
|
223
225
|
# check for an exact match
|
|
224
226
|
return true if type == other.type
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: mimemagic-dorian
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.5.
|
|
4
|
+
version: 0.5.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Dorian Taylor
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
- Jon Wood
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2026-06-
|
|
12
|
+
date: 2026-06-13 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: nokogiri
|
|
@@ -75,6 +75,7 @@ files:
|
|
|
75
75
|
- README.md
|
|
76
76
|
- Rakefile
|
|
77
77
|
- ext/mimemagic/Rakefile
|
|
78
|
+
- lib/mimemagic-dorian.rb
|
|
78
79
|
- lib/mimemagic.rb
|
|
79
80
|
- lib/mimemagic/tables.rb
|
|
80
81
|
- lib/mimemagic/version.rb
|