Skip to content

Commit ea7ce37

Browse files
Merge pull request #617 from OneBusAway/release-please--branches--main--changes--next
release: 1.7.0
2 parents 88b49c3 + 7b92adf commit ea7ce37

6 files changed

Lines changed: 27 additions & 5 deletions

File tree

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "1.6.4"
2+
".": "1.7.0"
33
}

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Changelog
22

3+
## 1.7.0 (2026-04-28)
4+
5+
Full Changelog: [v1.6.4...v1.7.0](https://github.com/OneBusAway/ruby-sdk/compare/v1.6.4...v1.7.0)
6+
7+
### Features
8+
9+
* support setting headers via env ([ade7a56](https://github.com/OneBusAway/ruby-sdk/commit/ade7a5671cc7801360dfb7fed8bd63a18f350945))
10+
311
## 1.6.4 (2026-04-23)
412

513
Full Changelog: [v1.6.3...v1.6.4](https://github.com/OneBusAway/ruby-sdk/compare/v1.6.3...v1.6.4)

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ GIT
1111
PATH
1212
remote: .
1313
specs:
14-
onebusaway-sdk (1.6.4)
14+
onebusaway-sdk (1.7.0)
1515
cgi
1616
connection_pool
1717

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ To use this gem, install via Bundler by adding the following to your application
1717
<!-- x-release-please-start-version -->
1818

1919
```ruby
20-
gem "onebusaway-sdk", "~> 1.6.4"
20+
gem "onebusaway-sdk", "~> 1.7.0"
2121
```
2222

2323
<!-- x-release-please-end -->

lib/onebusaway_sdk/client.rb

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,14 +140,28 @@ def initialize(
140140
raise ArgumentError.new("api_key is required, and can be set via environ: \"ONEBUSAWAY_API_KEY\"")
141141
end
142142

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+
143156
@api_key = api_key.to_s
144157

145158
super(
146159
base_url: base_url,
147160
timeout: timeout,
148161
max_retries: max_retries,
149162
initial_retry_delay: initial_retry_delay,
150-
max_retry_delay: max_retry_delay
163+
max_retry_delay: max_retry_delay,
164+
headers: headers
151165
)
152166

153167
@agencies_with_coverage = OnebusawaySDK::Resources::AgenciesWithCoverage.new(client: self)

lib/onebusaway_sdk/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# frozen_string_literal: true
22

33
module OnebusawaySDK
4-
VERSION = "1.6.4"
4+
VERSION = "1.7.0"
55
end

0 commit comments

Comments
 (0)