salopulse 0.2.0 → 0.2.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: e595f060867547b1a24600f74efd2381427496a9f52ed4c601043ecfda8aea9d
4
- data.tar.gz: 8854fc8119f60edba1efdc9c2a03913a52a371ef4d512f3935b97f1811262876
3
+ metadata.gz: 512fe8f0a9da0a15111a1729565fe2625f2041738742ac2839b4a393b6d1a1ef
4
+ data.tar.gz: 2589d8bbbabb05653a35966f31e09a8332be762440bb1bb098e7ed379cd4d020
5
5
  SHA512:
6
- metadata.gz: 3ba6e7d361a664acf07b52ffbc681f5d7a17eacc971259c3692e66d32a66c0a42d58b25790ecbe8e8d87076904d7f38156522a0fd12981fe93e19cf43eb30795
7
- data.tar.gz: 46ebc72af0e1197d96590797add818733ddebfa56e844fc0b2f55d3be55b1a550a9cf544735fd207e2d80ef6c50aafe59a07e20443d0ae7e1304b016deda68f7
6
+ metadata.gz: 87cbf76171f6b4bd640e753ef5ddcb3e81b6cfcf6174fd0dbb8e029beedfda52c46b78b5ff163f46ee97f9bc798f8bcebc22af6a142bf957c03483cf8d32543a
7
+ data.tar.gz: e8cb2ebc978d880e87b51b98f8988dac008729b6863de71b12be5a65ceeeb4d2a0d3e49e66af42e1941597d9294fbc991f0bec591954f72f4e3a4c26895c98c2
data/CHANGELOG.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Format: [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
4
4
 
5
- ## [0.2.0] - 2026-06-04
5
+ ## [0.2.2] - 2026-06-04
6
6
 
7
7
  First public release of the rewritten Salopulse APM SDK. Bumped past the
8
8
  legacy `salopulse` 0.1.x line on RubyGems.
data/README.md CHANGED
@@ -43,7 +43,7 @@ Salopulse.close
43
43
 
44
44
  | Seçenek | Varsayılan | Açıklama |
45
45
  |--------------------|------------|------------------------------------------------|
46
- | `dsn` | — | **Zorunlu.** `https://api_key@host` formatı |
46
+ | `dsn` | — | **Zorunlu.** `http(s)://api_key@host` formatı |
47
47
  | `release` | `nil` | Sürüm etiketi (genelde git SHA) |
48
48
  | `environment` | `nil` | `production` / `staging` / ... |
49
49
  | `sample_rate` | `1.0` | 0..1 arası örnekleme oranı |
data/lib/salopulse/dsn.rb CHANGED
@@ -3,7 +3,7 @@ require_relative "error/invalid_dsn"
3
3
 
4
4
  module Salopulse
5
5
  class DSN
6
- attr_reader :api_key, :ingest_url, :host
6
+ attr_reader :api_key, :ingest_url, :host, :scheme
7
7
 
8
8
  def initialize(dsn_string)
9
9
  raise Salopulse::Error::InvalidDSN, "DSN boş" if dsn_string.nil? || dsn_string.to_s.empty?
@@ -15,14 +15,17 @@ module Salopulse
15
15
  raise Salopulse::Error::InvalidDSN, "geçersiz URL"
16
16
  end
17
17
 
18
- raise Salopulse::Error::InvalidDSN, "scheme https olmalı" unless uri.scheme == "https"
18
+ raise Salopulse::Error::InvalidDSN, "scheme http veya https olmalı" unless %w[http https].include?(uri.scheme)
19
19
  raise Salopulse::Error::InvalidDSN, "api_key eksik" if uri.userinfo.nil? || uri.userinfo.empty?
20
20
  raise Salopulse::Error::InvalidDSN, "host eksik" if uri.host.nil? || uri.host.empty?
21
21
 
22
+ @scheme = uri.scheme
22
23
  @api_key = uri.userinfo
23
24
  @host = uri.host
24
- port_part = (uri.port && uri.port != 443) ? ":#{uri.port}" : ""
25
- @ingest_url = "https://#{uri.host}#{port_part}/api/v1/ingest"
25
+
26
+ default_port = uri.scheme == "https" ? 443 : 80
27
+ port_part = (uri.port && uri.port != default_port) ? ":#{uri.port}" : ""
28
+ @ingest_url = "#{uri.scheme}://#{uri.host}#{port_part}/api/v1/ingest"
26
29
  end
27
30
  end
28
31
  end
@@ -1,3 +1,3 @@
1
1
  module Salopulse
2
- VERSION = "0.2.0".freeze
2
+ VERSION = "0.2.2".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: salopulse
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Salih İmran Büker