onebusaway-sdk 1.6.4 → 1.7.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: 6a813f37c8cc7ef5f6a98036e3a641a50363b508131b98b945270abf85e16ca2
4
- data.tar.gz: b03f88f3a8f691db01936bfbec2b99d7b9487b238a19efe1e9885bf45ecbf97c
3
+ metadata.gz: e7dc0cbc1d74932ae91f5805493effaed0d0522f597480b480ba8dbe499e907f
4
+ data.tar.gz: e46525a11a97246aa6850233925dc91f7385a0820dee0f268a102bd93ab9dcc3
5
5
  SHA512:
6
- metadata.gz: b6ad5e2b48e7c91708f625fd89fa6c01a435a737e9fcda63ed71436d71d182196809c42eb61a2cdccfef444240e25a36c0d65b1014477021562d8baa5ca72c9c
7
- data.tar.gz: f3e87e08aec04124c6bb72cb2545a6900370e8ae862998eedff37ce48d9ca1ce5fdd2a0be5590a767090a0eaf1b2f44deac3eb6bf9ae39e29e842e944644f29a
6
+ metadata.gz: d7d2aafa933161cada76756c272d4521fb2f3ff3e71fcd71564ff72c1f180afc10fcf63a9ae0b82529ce9fb384a8978f648b9d7f06c7cfd72ce193eabf9617ce
7
+ data.tar.gz: 9e8364afb8bce86f14974fbcf2229b0f72e175a0c3e9528ee069636227e0acb6ef1ddb89bd26ccf49c66b6fce0d4fc33fdad984b00599711ffe8b83229e86d7b
data/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.7.1 (2026-05-14)
4
+
5
+ Full Changelog: [v1.7.0...v1.7.1](https://github.com/OneBusAway/ruby-sdk/compare/v1.7.0...v1.7.1)
6
+
7
+ ### Bug Fixes
8
+
9
+ * **client:** elide content type header on requests without body ([c8163aa](https://github.com/OneBusAway/ruby-sdk/commit/c8163aac1892c0bc83dce876b959451a5f63b031))
10
+
11
+ ## 1.7.0 (2026-04-28)
12
+
13
+ Full Changelog: [v1.6.4...v1.7.0](https://github.com/OneBusAway/ruby-sdk/compare/v1.6.4...v1.7.0)
14
+
15
+ ### Features
16
+
17
+ * support setting headers via env ([ade7a56](https://github.com/OneBusAway/ruby-sdk/commit/ade7a5671cc7801360dfb7fed8bd63a18f350945))
18
+
3
19
  ## 1.6.4 (2026-04-23)
4
20
 
5
21
  Full Changelog: [v1.6.3...v1.6.4](https://github.com/OneBusAway/ruby-sdk/compare/v1.6.3...v1.6.4)
data/README.md CHANGED
@@ -17,7 +17,7 @@ To use this gem, install via Bundler by adding the following to your application
17
17
  <!-- x-release-please-start-version -->
18
18
 
19
19
  ```ruby
20
- gem "onebusaway-sdk", "~> 1.6.4"
20
+ gem "onebusaway-sdk", "~> 1.7.1"
21
21
  ```
22
22
 
23
23
  <!-- x-release-please-end -->
@@ -140,6 +140,19 @@ module OnebusawaySDK
140
140
  raise ArgumentError.new("api_key is required, and can be set via environ: \"ONEBUSAWAY_API_KEY\"")
141
141
  end
142
142
 
143
+ headers = {}
144
+ custom_headers_env = ENV["ONEBUSAWAY_SDK_CUSTOM_HEADERS"]
145
+ unless custom_headers_env.nil?
146
+ parsed = {}
147
+ custom_headers_env.split("\n").each do |line|
148
+ colon = line.index(":")
149
+ unless colon.nil?
150
+ parsed[line[0...colon].strip] = line[(colon + 1)..].strip
151
+ end
152
+ end
153
+ headers = parsed.merge(headers)
154
+ end
155
+
143
156
  @api_key = api_key.to_s
144
157
 
145
158
  super(
@@ -147,7 +160,8 @@ module OnebusawaySDK
147
160
  timeout: timeout,
148
161
  max_retries: max_retries,
149
162
  initial_retry_delay: initial_retry_delay,
150
- max_retry_delay: max_retry_delay
163
+ max_retry_delay: max_retry_delay,
164
+ headers: headers
151
165
  )
152
166
 
153
167
  @agencies_with_coverage = OnebusawaySDK::Resources::AgenciesWithCoverage.new(client: self)
@@ -309,6 +309,8 @@ module OnebusawaySDK
309
309
  OnebusawaySDK::Internal::Util.deep_merge(*[req[:body], opts[:extra_body]].compact)
310
310
  end
311
311
 
312
+ headers.delete("content-type") if body.nil?
313
+
312
314
  url = OnebusawaySDK::Internal::Util.join_parsed_uri(
313
315
  @base_url_components,
314
316
  {**req, path: path, query: query}
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module OnebusawaySDK
4
- VERSION = "1.6.4"
4
+ VERSION = "1.7.1"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: onebusaway-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.4
4
+ version: 1.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Onebusaway SDK
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-04-23 00:00:00.000000000 Z
11
+ date: 2026-05-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cgi