databricks_sql 0.1.0 → 0.1.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 +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/databricks_sql/client.rb +5 -1
- data/lib/databricks_sql/version.rb +1 -1
- data/spec/databricks_sql/client_spec.rb +6 -0
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2a37f0aac72ebe44aadbaa052653349570edd15e2578a25567a4f659cb8e2595
|
|
4
|
+
data.tar.gz: 7863ee55f40fb2150c42289d75f3811a635931e7ef208a52f1ea0ecb5a00afea
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cb0b8862dce691fca534019de7bbf0bf937bd1c137bc8cdb2326870d7784f5f473ef5a474b95aa03ffa26c8181e7232f09a2e41a76f7292487e99dcf2516447a
|
|
7
|
+
data.tar.gz: 247821e0c7635e154b09756bb93ffb4799ad6250392f856228bd238227807a681681c458fd71583e491b2e5f570fb44b15b0f40f7a13637b9ad9e08feff366bf
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
## [0.1.1] - 2026-04-09
|
|
2
|
+
|
|
3
|
+
- Host configuration now accepts both full HTTPS URLs and plain domains.
|
|
4
|
+
- Plain domain hosts are normalized automatically to HTTPS.
|
|
5
|
+
- Added test coverage for host normalization without URL scheme.
|
|
6
|
+
|
|
1
7
|
## [0.1.0] - 2026-04-06
|
|
2
8
|
|
|
3
9
|
- First public release of the gem.
|
|
@@ -192,7 +192,11 @@ module DatabricksSql
|
|
|
192
192
|
end
|
|
193
193
|
|
|
194
194
|
def normalize_host(host)
|
|
195
|
-
host.to_s.strip
|
|
195
|
+
normalized = host.to_s.strip
|
|
196
|
+
return "" if normalized.empty?
|
|
197
|
+
|
|
198
|
+
normalized = "https://#{normalized}" unless normalized.match?(%r{\Ahttps?://}i)
|
|
199
|
+
normalized.sub(%r{/+\z}, "")
|
|
196
200
|
end
|
|
197
201
|
|
|
198
202
|
def terminal_status?(status)
|
|
@@ -14,6 +14,12 @@ RSpec.describe DatabricksSql::Client do
|
|
|
14
14
|
let(:statement) { "SELECT id, name FROM users" }
|
|
15
15
|
|
|
16
16
|
describe "#initialize" do
|
|
17
|
+
it "accepts host without scheme and normalizes to HTTPS" do
|
|
18
|
+
configured_client = described_class.new(host: "dbc.example.com", token: token, warehouse_id: warehouse_id)
|
|
19
|
+
|
|
20
|
+
expect(configured_client.host).to eq("https://dbc.example.com")
|
|
21
|
+
end
|
|
22
|
+
|
|
17
23
|
it "raises when host does not use HTTPS" do
|
|
18
24
|
expect do
|
|
19
25
|
described_class.new(host: "http://dbc.example.com", token: token, warehouse_id: warehouse_id)
|