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 +4 -4
- data/CHANGELOG.md +8 -0
- data/README.md +1 -1
- data/lib/tilda_ruby/client.rb +15 -1
- data/lib/tilda_ruby/internal/transport/base_client.rb +5 -0
- data/lib/tilda_ruby/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 29fa364e832dc2995324a9b1c74aabe4cb6b8035e3ab99017c7ffda3c73b6053
|
|
4
|
+
data.tar.gz: d56254306032f0d22fa62ba7d666097f285a1cfd5a147d63a587a9ae2a41830f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
data/lib/tilda_ruby/client.rb
CHANGED
|
@@ -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}
|
data/lib/tilda_ruby/version.rb
CHANGED
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.
|
|
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-
|
|
11
|
+
date: 2026-06-26 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: cgi
|