reputable 0.1.4 → 0.1.5
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/Gemfile.lock +1 -1
- data/README.md +4 -1
- data/lib/reputable/configuration.rb +6 -2
- data/lib/reputable/version.rb +1 -1
- data/lib/reputable.rb +1 -1
- 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: 1d8e38d02c6ad20f915ff71f489780dea010d1304132ba5f1946082e023ff797
|
|
4
|
+
data.tar.gz: 712a5a0eeadd88a5127a0d9086c57d4566c6074440e93724deaf28186cf0c55d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: bbffa423a948e82c995e5cce48f93356cb0f44519106872e588637a11678b980a26a6290d59289851130ddba212897172b5aaa343ae6b73ebd7d39e15d8a53ce
|
|
7
|
+
data.tar.gz: c18bec4b986c8a83cba202130ee3dcfcc2f999256c36622020768112285309bf1aca4744518ed0edeed5423b4dc538edf86f5c4f2a4dd97112cde6602a09cc8c
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
|
@@ -80,6 +80,9 @@ All configuration can be set via environment variables:
|
|
|
80
80
|
# Required
|
|
81
81
|
REPUTABLE_REDIS_URL=rediss://user:password@your-dragonfly.example.com:6379
|
|
82
82
|
|
|
83
|
+
# Optional: Base URL for verification and API endpoints (domain only)
|
|
84
|
+
REPUTABLE_BASE_URL=https://api.reputable.click
|
|
85
|
+
|
|
83
86
|
# Optional: Disable entirely (useful for test environments)
|
|
84
87
|
REPUTABLE_ENABLED=false
|
|
85
88
|
|
|
@@ -138,7 +141,7 @@ Reputable.configure do |config|
|
|
|
138
141
|
# Verification Configuration
|
|
139
142
|
# Supports comma-separated list in REPUTABLE_TRUSTED_KEYS or single key in REPUTABLE_TRUSTED_KEY
|
|
140
143
|
config.trusted_keys = ENV['REPUTABLE_TRUSTED_KEYS']&.split(',') || ENV['REPUTABLE_TRUSTED_KEY']
|
|
141
|
-
config.
|
|
144
|
+
config.base_url = ENV['REPUTABLE_BASE_URL'] # Domain only
|
|
142
145
|
|
|
143
146
|
# Error callback (optional)
|
|
144
147
|
config.on_error = ->(error, context) {
|
|
@@ -14,7 +14,11 @@ module Reputable
|
|
|
14
14
|
:default_ttls, :pool_size, :pool_timeout,
|
|
15
15
|
:connect_timeout, :read_timeout, :write_timeout,
|
|
16
16
|
:ssl_params, :trusted_proxies, :ip_header_priority,
|
|
17
|
-
:on_error, :trusted_keys, :
|
|
17
|
+
:on_error, :trusted_keys, :base_url
|
|
18
|
+
|
|
19
|
+
# Alias for backward compatibility
|
|
20
|
+
alias_method :verification_base_url, :base_url
|
|
21
|
+
alias_method :verification_base_url=, :base_url=
|
|
18
22
|
|
|
19
23
|
# Default TTLs in seconds (0 = forever)
|
|
20
24
|
DEFAULT_TTLS = {
|
|
@@ -73,7 +77,7 @@ module Reputable
|
|
|
73
77
|
elsif ENV["REPUTABLE_SECRET_KEY"]
|
|
74
78
|
@trusted_keys = [ENV["REPUTABLE_SECRET_KEY"]]
|
|
75
79
|
end
|
|
76
|
-
@
|
|
80
|
+
@base_url = ENV["REPUTABLE_BASE_URL"]
|
|
77
81
|
end
|
|
78
82
|
|
|
79
83
|
# Alias for backward compatibility
|
data/lib/reputable/version.rb
CHANGED
data/lib/reputable.rb
CHANGED
|
@@ -136,7 +136,7 @@ module Reputable
|
|
|
136
136
|
# Use the first key for signing new requests
|
|
137
137
|
secret = keys.first
|
|
138
138
|
|
|
139
|
-
base_url = configuration.
|
|
139
|
+
base_url = configuration.base_url
|
|
140
140
|
# Ensure base_url doesn't have a trailing slash, then append the verify path
|
|
141
141
|
base_url = base_url.chomp("/")
|
|
142
142
|
verify_url = "#{base_url}/_reputable/verify"
|