Skip to content

Commit e45e66b

Browse files
authored
Merge pull request #16 from Hexlet/release-please--branches--main--changes--next
2 parents c123571 + 16bcbc4 commit e45e66b

8 files changed

Lines changed: 34 additions & 7 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-
".": "0.5.4"
2+
".": "0.6.0"
33
}

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 140
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hexlet%2Famocrm-800f4ed7083bc38fd4ddc3fdb0b975c2ad3f95b7e0375ff64d31690a3a0d5d34.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hexlet/amocrm-800f4ed7083bc38fd4ddc3fdb0b975c2ad3f95b7e0375ff64d31690a3a0d5d34.yml
33
openapi_spec_hash: ee149ec82a8a54b8ba43f99fa8a53004
44
config_hash: e17200f7c5d0bdc4e3739a97df48b802

CHANGELOG.md

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

3+
## 0.6.0 (2026-04-30)
4+
5+
Full Changelog: [v0.5.4...v0.6.0](https://github.com/Hexlet/amocrm-ruby/compare/v0.5.4...v0.6.0)
6+
7+
### Features
8+
9+
* support setting headers via env ([9d3e5cc](https://github.com/Hexlet/amocrm-ruby/commit/9d3e5ccbfb69032008b65d94ea95429ad28e67ae))
10+
11+
12+
### Chores
13+
14+
* **internal:** more robust bootstrap script ([8159023](https://github.com/Hexlet/amocrm-ruby/commit/8159023a5aae2e0345da38e58737a8e8c3ab5c9e))
15+
316
## 0.5.4 (2026-04-09)
417

518
Full Changelog: [v0.5.3...v0.5.4](https://github.com/Hexlet/amocrm-ruby/compare/v0.5.3...v0.5.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-
amocrm (0.5.4)
14+
amocrm (0.6.0)
1515
cgi
1616
connection_pool
1717

README.md

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

1717
```ruby
18-
gem "amocrm", "~> 0.5.4"
18+
gem "amocrm", "~> 0.6.0"
1919
```
2020

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

lib/amocrm/client.rb

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,19 @@ def initialize(
172172
raise ArgumentError.new("subdomain is required, and can be set via environ: \"AMOCRM_SUBDOMAIN\"")
173173
end
174174

175+
headers = {}
176+
custom_headers_env = ENV["AMOCRM_CUSTOM_HEADERS"]
177+
unless custom_headers_env.nil?
178+
parsed = {}
179+
custom_headers_env.split("\n").each do |line|
180+
colon = line.index(":")
181+
unless colon.nil?
182+
parsed[line[0...colon].strip] = line[(colon + 1)..].strip
183+
end
184+
end
185+
headers = parsed.merge(headers)
186+
end
187+
175188
@token = token.to_s
176189
@subdomain = subdomain.to_s
177190

@@ -180,7 +193,8 @@ def initialize(
180193
timeout: timeout,
181194
max_retries: max_retries,
182195
initial_retry_delay: initial_retry_delay,
183-
max_retry_delay: max_retry_delay
196+
max_retry_delay: max_retry_delay,
197+
headers: headers
184198
)
185199

186200
@account = Amocrm::Resources::Account.new(client: self)

lib/amocrm/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 Amocrm
4-
VERSION = "0.5.4"
4+
VERSION = "0.6.0"
55
end

scripts/bootstrap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ set -e
44

55
cd -- "$(dirname -- "$0")/.."
66

7-
if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ] && [ "$SKIP_BREW" != "1" ] && [ -t 0 ]; then
7+
if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ] && [ "${SKIP_BREW:-}" != "1" ] && [ -t 0 ]; then
88
brew bundle check >/dev/null 2>&1 || {
99
echo -n "==> Install Homebrew dependencies? (y/N): "
1010
read -r response

0 commit comments

Comments
 (0)