increase 1.95.0 → 1.96.0

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: 3da30aa3bf7a17c414fc4c89e918e54c0a5e225d8c42902c35e11b3b675176dd
4
- data.tar.gz: 158518602cfe419844ab25a2ee189c04f34b33e85dc7cbf8d69b5f753ae47e23
3
+ metadata.gz: 5d7c93b95c241278e985c95451c6bdc77b0ae320ca07901741fc414258dd1813
4
+ data.tar.gz: 12282e3ad63ca1318714353ab4e477de3197f3b40ad0636aa4626692d2b2b480
5
5
  SHA512:
6
- metadata.gz: bfd164104eae844bbd658f3bb310aad070c9b58c12477bed8bc422a834f9527832bbeef6c016f0a73dc26f523918610011ee8f0bf50c35edab5180eefa5b2ec5
7
- data.tar.gz: 5933e86d0c11450953aa7c4b68ad776e85a8ba6bd173e9576713ceba7e42d104f2dd25431857dfd1e91b4cd9b849c8c8a4b1b47344a03963e35a00f4b45bb950
6
+ metadata.gz: 5af934f753635227d9935d70b829d730229cab9fd63da16e213fbefb7ded297b77d34a736f5543b04f830d0a670a7babdcce43e93af8bbcfe5ffbdf2941b3d40
7
+ data.tar.gz: 141e2b041e8a3fcf4df2d57e8272488eead2dfc4048c5707a18f38dac2fd1312e6c26ff31326837a9b675290493db458fad4aab12d5f09b6226a573c5a7dfbcb
data/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.96.0 (2025-09-29)
4
+
5
+ Full Changelog: [v1.95.1...v1.96.0](https://github.com/Increase/increase-ruby/compare/v1.95.1...v1.96.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** api update ([45fc3a3](https://github.com/Increase/increase-ruby/commit/45fc3a389e67a98c786df6e0f8ab387fcdee209f))
10
+
11
+ ## 1.95.1 (2025-09-29)
12
+
13
+ Full Changelog: [v1.95.0...v1.95.1](https://github.com/Increase/increase-ruby/compare/v1.95.0...v1.95.1)
14
+
15
+ ### Bug Fixes
16
+
17
+ * always send `filename=...` for multipart requests where a file is expected ([990c13f](https://github.com/Increase/increase-ruby/commit/990c13f7c641c20586059d7991e197cb47f67e72))
18
+
3
19
  ## 1.95.0 (2025-09-26)
4
20
 
5
21
  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
@@ -15,7 +15,7 @@ To use this gem, install via Bundler by adding the following to your application
15
15
  <!-- x-release-please-start-version -->
16
16
 
17
17
  ```ruby
18
- gem "increase", "~> 1.95.0"
18
+ gem "increase", "~> 1.96.0"
19
19
  ```
20
20
 
21
21
  <!-- x-release-please-end -->
@@ -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
- @content = content
44
+ @content_type = content_type
45
45
  @filename =
46
- case content
47
- in Pathname
48
- filename.nil? ? content.basename.to_path : ::File.basename(filename)
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.nil? ? nil : ::File.basename(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
@@ -21,7 +21,7 @@ module Increase
21
21
  optional :client_id, String
22
22
 
23
23
  # @!attribute client_secret
24
- # The secret that confirms you own the application. This is redundent given that
24
+ # The secret that confirms you own the application. This is redundant given that
25
25
  # the request is made with your API key but it's a required component of OAuth
26
26
  # 2.0.
27
27
  #
@@ -51,7 +51,7 @@ module Increase
51
51
  #
52
52
  # @param client_id [String] The public identifier for your application.
53
53
  #
54
- # @param client_secret [String] The secret that confirms you own the application. This is redundent given that t
54
+ # @param client_secret [String] The secret that confirms you own the application. This is redundant given that t
55
55
  #
56
56
  # @param code [String] The authorization code generated by the user and given to you as a query paramet
57
57
  #
@@ -14,7 +14,7 @@ module Increase
14
14
  #
15
15
  # @param client_id [String] The public identifier for your application.
16
16
  #
17
- # @param client_secret [String] The secret that confirms you own the application. This is redundent given that t
17
+ # @param client_secret [String] The secret that confirms you own the application. This is redundant given that t
18
18
  #
19
19
  # @param code [String] The authorization code generated by the user and given to you as a query paramet
20
20
  #
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Increase
4
- VERSION = "1.95.0"
4
+ VERSION = "1.96.0"
5
5
  end
@@ -27,7 +27,7 @@ module Increase
27
27
  sig do
28
28
  params(
29
29
  content: T.any(Pathname, StringIO, IO, String),
30
- filename: T.nilable(String),
30
+ filename: T.nilable(T.any(Pathname, String)),
31
31
  content_type: T.nilable(String)
32
32
  ).returns(T.attached_class)
33
33
  end
@@ -23,7 +23,7 @@ module Increase
23
23
  sig { params(client_id: String).void }
24
24
  attr_writer :client_id
25
25
 
26
- # The secret that confirms you own the application. This is redundent given that
26
+ # The secret that confirms you own the application. This is redundant given that
27
27
  # the request is made with your API key but it's a required component of OAuth
28
28
  # 2.0.
29
29
  sig { returns(T.nilable(String)) }
@@ -65,7 +65,7 @@ module Increase
65
65
  grant_type:,
66
66
  # The public identifier for your application.
67
67
  client_id: nil,
68
- # The secret that confirms you own the application. This is redundent given that
68
+ # The secret that confirms you own the application. This is redundant given that
69
69
  # the request is made with your API key but it's a required component of OAuth
70
70
  # 2.0.
71
71
  client_secret: nil,
@@ -20,7 +20,7 @@ module Increase
20
20
  grant_type:,
21
21
  # The public identifier for your application.
22
22
  client_id: nil,
23
- # The secret that confirms you own the application. This is redundent given that
23
+ # The secret that confirms you own the application. This is redundant given that
24
24
  # the request is made with your API key but it's a required component of OAuth
25
25
  # 2.0.
26
26
  client_secret: nil,
@@ -14,7 +14,7 @@ module Increase
14
14
 
15
15
  def initialize: (
16
16
  Pathname | StringIO | IO | String content,
17
- ?filename: String?,
17
+ ?filename: (Pathname | String)?,
18
18
  ?content_type: String?
19
19
  ) -> void
20
20
  end
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.0
4
+ version: 1.96.0
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-26 00:00:00.000000000 Z
11
+ date: 2025-09-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: connection_pool