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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0c39e960378d885e97cac40ebc6147ea8f41bc9276a24e341011edd7590090b9
4
- data.tar.gz: '09a3302c4e84261dd2b6941d87747297d37aa6458bc23fdd181d05fe715124be'
3
+ metadata.gz: 1d8e38d02c6ad20f915ff71f489780dea010d1304132ba5f1946082e023ff797
4
+ data.tar.gz: 712a5a0eeadd88a5127a0d9086c57d4566c6074440e93724deaf28186cf0c55d
5
5
  SHA512:
6
- metadata.gz: aa66be8227fbe97f9b270ec901642c397f59ec9cd39e6a8dc16dcfe7ab8d09c3b7ce7984d3ddf66d00a74d319a3b05fa8167b8b1a45fca6c1da84a20917c80f3
7
- data.tar.gz: 36166971d3eec60a629a03992968381d57f7b52b3cd43f8c9876ebbf99528e4ed4fe6370b1c41abdb904c7100d970b7e58d032228f4c7c22187c283466d1e0bf
6
+ metadata.gz: bbffa423a948e82c995e5cce48f93356cb0f44519106872e588637a11678b980a26a6290d59289851130ddba212897172b5aaa343ae6b73ebd7d39e15d8a53ce
7
+ data.tar.gz: c18bec4b986c8a83cba202130ee3dcfcc2f999256c36622020768112285309bf1aca4744518ed0edeed5423b4dc538edf86f5c4f2a4dd97112cde6602a09cc8c
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- reputable (0.1.3)
4
+ reputable (0.1.4)
5
5
  connection_pool (~> 2.2)
6
6
  redis (>= 4.0, < 6.0)
7
7
 
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.verification_base_url = ENV['REPUTABLE_VERIFY_URL'] # Base URL of your Reputable API (e.g., https://dev-new-1.verify.reputable.click)
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, :verification_base_url
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
- @verification_base_url = ENV.fetch("REPUTABLE_VERIFY_URL", "https://api.reputable.click")
80
+ @base_url = ENV["REPUTABLE_BASE_URL"]
77
81
  end
78
82
 
79
83
  # Alias for backward compatibility
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Reputable
4
- VERSION = "0.1.4"
4
+ VERSION = "0.1.5"
5
5
  end
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.verification_base_url
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"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: reputable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Reputable