increase 1.95.0 → 1.95.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 +4 -4
- data/CHANGELOG.md +8 -0
- data/README.md +1 -1
- data/lib/increase/file_part.rb +10 -7
- data/lib/increase/internal/type/file_input.rb +7 -4
- data/lib/increase/version.rb +1 -1
- data/rbi/increase/file_part.rbi +1 -1
- data/sig/increase/file_part.rbs +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f2f9d327dbc2d663a8524b5c14294e2c9ee64b554b142d263e8e5ea6ed747413
|
4
|
+
data.tar.gz: 910e8e227f048d92882bd408248388c079d174090203403c6f03f3bffeb31605
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f69a80ff672f63645ed8ec94a154cbef4184ad4d0d6ba61e79e9dee467600fa26c443aa04b4d82f16786d9810682a252a0c57bb004ed46f46b90f976db45549f
|
7
|
+
data.tar.gz: fa18ad3a3edd0d32f4470851d06a1a8c545e6d78a435ad3a3a0d7c33b26f731070d077bd1ad6fe7c18fff79921d91c4b2242ab7344a1c62bebc9148c7dbd026c
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 1.95.1 (2025-09-29)
|
4
|
+
|
5
|
+
Full Changelog: [v1.95.0...v1.95.1](https://github.com/Increase/increase-ruby/compare/v1.95.0...v1.95.1)
|
6
|
+
|
7
|
+
### Bug Fixes
|
8
|
+
|
9
|
+
* always send `filename=...` for multipart requests where a file is expected ([990c13f](https://github.com/Increase/increase-ruby/commit/990c13f7c641c20586059d7991e197cb47f67e72))
|
10
|
+
|
3
11
|
## 1.95.0 (2025-09-26)
|
4
12
|
|
5
13
|
Full Changelog: [v1.94.0...v1.95.0](https://github.com/Increase/increase-ruby/compare/v1.94.0...v1.95.0)
|
data/README.md
CHANGED
data/lib/increase/file_part.rb
CHANGED
@@ -38,18 +38,21 @@ module Increase
|
|
38
38
|
def to_yaml(*a) = read.to_yaml(*a)
|
39
39
|
|
40
40
|
# @param content [Pathname, StringIO, IO, String]
|
41
|
-
# @param filename [String, nil]
|
41
|
+
# @param filename [Pathname, String, nil]
|
42
42
|
# @param content_type [String, nil]
|
43
43
|
def initialize(content, filename: nil, content_type: nil)
|
44
|
-
@
|
44
|
+
@content_type = content_type
|
45
45
|
@filename =
|
46
|
-
case content
|
47
|
-
in Pathname
|
48
|
-
|
46
|
+
case [filename, (@content = content)]
|
47
|
+
in [String | Pathname, _]
|
48
|
+
::File.basename(filename)
|
49
|
+
in [nil, Pathname]
|
50
|
+
content.basename.to_path
|
51
|
+
in [nil, IO]
|
52
|
+
content.to_path
|
49
53
|
else
|
50
|
-
filename
|
54
|
+
filename
|
51
55
|
end
|
52
|
-
@content_type = content_type
|
53
56
|
end
|
54
57
|
end
|
55
58
|
end
|
@@ -82,17 +82,20 @@ module Increase
|
|
82
82
|
#
|
83
83
|
# @return [Pathname, StringIO, IO, String, Object]
|
84
84
|
def dump(value, state:)
|
85
|
-
# rubocop:disable Lint/DuplicateBranch
|
86
85
|
case value
|
86
|
+
in StringIO | String
|
87
|
+
# https://datatracker.ietf.org/doc/html/rfc7578#section-4.2
|
88
|
+
# while not required, a filename is recommended, and in practice many servers do expect this
|
89
|
+
Increase::FilePart.new(value, filename: "upload")
|
87
90
|
in IO
|
88
91
|
state[:can_retry] = false
|
92
|
+
value.to_path.nil? ? Increase::FilePart.new(value, filename: "upload") : value
|
89
93
|
in Increase::FilePart if value.content.is_a?(IO)
|
90
94
|
state[:can_retry] = false
|
95
|
+
value
|
91
96
|
else
|
97
|
+
value
|
92
98
|
end
|
93
|
-
# rubocop:enable Lint/DuplicateBranch
|
94
|
-
|
95
|
-
value
|
96
99
|
end
|
97
100
|
|
98
101
|
# @api private
|
data/lib/increase/version.rb
CHANGED
data/rbi/increase/file_part.rbi
CHANGED
data/sig/increase/file_part.rbs
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: increase
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.95.
|
4
|
+
version: 1.95.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Increase
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-09-
|
11
|
+
date: 2025-09-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: connection_pool
|