marcel 1.0.3 → 1.0.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: d72cd32835e2c94cb305350ca65c70471ba0003730705c42f880571344b9a79c
4
- data.tar.gz: bf87bf4e6739db822a9e474677d4785aad74a37add0ad88fba3c2daac24bb142
3
+ metadata.gz: a51f606ee622330ffe46d2163caca9452ad4b9c704f6733628bb5c228bbdd15c
4
+ data.tar.gz: f661a5a357dd426328906391a0997f1919d4f36da4120006bb3be0e4a32b87e2
5
5
  SHA512:
6
- metadata.gz: 002d7bf37923e0ce1da283ee7d41f36f604c454aa0924066013590805bb5bcaa878fab1cda9a884544afbcaf589384e0960a80774723f202a7c6dfa637bea05a
7
- data.tar.gz: c3c361fc72ceec92d38e938613f8e1bbb7821cbe7221a59255d5d6eb8012aafd775b38f431c34df3fb5e9b443fedfdcda500fb76a2cb52e03cbe6028a042c26e
6
+ metadata.gz: 5e4cf80453f5f398a4012dafcd7c60f4c0badebf5850c64d318d3705c2de486ddb14015965f9d067f45afa5ddf4e22fd12d01d5069959b49114c5fe7c219278a
7
+ data.tar.gz: e03fffed012927c64dcfff9cc37a61db4d66ff7f0eb39517d8eefe1c5a0089cdcc630dc7385fd7dd95a6760b7b5b855c0999f1182a63cae75e8b12f9aabc44d2
@@ -60,7 +60,12 @@ module Marcel
60
60
  end
61
61
 
62
62
  def for_declared_type(declared_type)
63
- parse_media_type(declared_type)
63
+ type = parse_media_type(declared_type)
64
+
65
+ # application/octet-stream is treated as an undeclared/missing type,
66
+ # allowing the type to be inferred from the filename. If there's no
67
+ # filename extension, then the type falls back to binary anyway.
68
+ type unless type == BINARY
64
69
  end
65
70
 
66
71
  def with_io(pathname_or_io, &block)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Marcel
4
- VERSION = "1.0.3"
4
+ VERSION = "1.0.4"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: marcel
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Ward
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-02-28 00:00:00.000000000 Z
11
+ date: 2024-03-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest