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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fb1784eb43d904710d121f1718ce325b43fad687ca320fa0b5bbe2d370dcefd0
4
- data.tar.gz: e4ea467babed9260d712d7f566921ad1dbcf4a6fb2a5c7bf1acf7fee3b13974a
3
+ metadata.gz: 2a37f0aac72ebe44aadbaa052653349570edd15e2578a25567a4f659cb8e2595
4
+ data.tar.gz: 7863ee55f40fb2150c42289d75f3811a635931e7ef208a52f1ea0ecb5a00afea
5
5
  SHA512:
6
- metadata.gz: 28a3767b8b015dddd8c26140d3911906858b20c677188c9e78999d119c08915f8f66f37aef294be3e3b006e025ec6085f204b39425f7f78d9709e891c9cc132a
7
- data.tar.gz: ddd0c3ecb4725068cd3605db468ce1c0bee0472f262eeb63b91403f6a76337d798b593cdfcc3d60bee9fa83cc9a3462f18fce45546b7fb221cf82ebe5fb4efba
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.sub(%r{/+\z}, "")
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)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DatabricksSql
4
- VERSION = "0.1.0"
4
+ VERSION = "0.1.1"
5
5
  end
@@ -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)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: databricks_sql
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lairton Mendes