tilda-ruby 0.1.1 → 0.1.2

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: '068a7fcbbff23673a68889832eb699786ad1f1af35dca661c801d275e805174c'
4
- data.tar.gz: 13ccc52749fc560530a3892b967343acc7d2e97ebff976d1f922777819d7672c
3
+ metadata.gz: 29fa364e832dc2995324a9b1c74aabe4cb6b8035e3ab99017c7ffda3c73b6053
4
+ data.tar.gz: d56254306032f0d22fa62ba7d666097f285a1cfd5a147d63a587a9ae2a41830f
5
5
  SHA512:
6
- metadata.gz: 8c35f6e1aca14c2b52534592fb9cfe226d2425b8821716f32e8381b16a7c5c54de3aa653195e8cbbd353c8b5da636c3409fb53126461d7870668c2d16d93ace1
7
- data.tar.gz: 2187e141e260f9ac047b7531a3c0a72e42ab15b7f072bffb192f1cbeac27b3d150e4d3563db81775e4e44c139d0a12371f8287753e8f2e5c06bbadcc1e5d9954
6
+ metadata.gz: e4f7a0283c888ec5e08ddc9ac34455f360467dd0bdb52bff290fac821a6444b1857a0c393cfbee213b5a92778d43095c8acf0fec8ec12c27627c03ef5a7d5b7b
7
+ data.tar.gz: cbe77f94e14176db27079f1044158d2970e61da7863c7f7bfe0b6cc2e878afc9310a64d3ba3e35c0594ce9155a125b359362bc71570146751a86020ac17e5149
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.2 (2026-06-20)
4
+
5
+ Full Changelog: [v0.1.1...v0.1.2](https://github.com/Hexlet/tilda-ruby/compare/v0.1.1...v0.1.2)
6
+
7
+ ### Chores
8
+
9
+ * **internal:** codegen related update ([e0ac0b8](https://github.com/Hexlet/tilda-ruby/commit/e0ac0b81918825217fb21a2245bf4971e0d4385d))
10
+
3
11
  ## 0.1.1 (2026-04-23)
4
12
 
5
13
  Full Changelog: [v0.1.0...v0.1.1](https://github.com/Hexlet/tilda-ruby/compare/v0.1.0...v0.1.1)
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 "tilda-ruby", "~> 0.1.1"
20
+ gem "tilda-ruby", "~> 0.1.2"
21
21
  ```
22
22
 
23
23
  <!-- x-release-please-end -->
@@ -80,6 +80,19 @@ module TildaRuby
80
80
  )
81
81
  base_url ||= "https://api.tildacdn.info"
82
82
 
83
+ headers = {}
84
+ custom_headers_env = ENV["TILDA_CUSTOM_HEADERS"]
85
+ unless custom_headers_env.nil?
86
+ parsed = {}
87
+ custom_headers_env.split("\n").each do |line|
88
+ colon = line.index(":")
89
+ unless colon.nil?
90
+ parsed[line[0...colon].strip] = line[(colon + 1)..].strip
91
+ end
92
+ end
93
+ headers = parsed.merge(headers)
94
+ end
95
+
83
96
  @publickey = publickey&.to_s
84
97
  @secretkey = secretkey&.to_s
85
98
 
@@ -88,7 +101,8 @@ module TildaRuby
88
101
  timeout: timeout,
89
102
  max_retries: max_retries,
90
103
  initial_retry_delay: initial_retry_delay,
91
- max_retry_delay: max_retry_delay
104
+ max_retry_delay: max_retry_delay,
105
+ headers: headers
92
106
  )
93
107
 
94
108
  @projects = TildaRuby::Resources::Projects.new(client: self)
@@ -305,6 +305,11 @@ module TildaRuby
305
305
  TildaRuby::Internal::Util.deep_merge(*[req[:body], opts[:extra_body]].compact)
306
306
  end
307
307
 
308
+ # Generated methods always pass `req[:body]` for operations that define a
309
+ # request body, so only elide the content-type header when the operation
310
+ # has no body at all, not when an optional body param was omitted.
311
+ headers.delete("content-type") if body.nil? && !req.key?(:body)
312
+
308
313
  url = TildaRuby::Internal::Util.join_parsed_uri(
309
314
  @base_url_components,
310
315
  {**req, path: path, query: query}
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TildaRuby
4
- VERSION = "0.1.1"
4
+ VERSION = "0.1.2"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tilda-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tilda
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-06-19 00:00:00.000000000 Z
11
+ date: 2026-06-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cgi