email_list_api 0.1.0.rc.3 → 0.1.0.rc.4

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: fe32723e27382ffb7908beeb38436889e7153b05ef2b84a61794ee42866ada66
4
- data.tar.gz: e1f0d33098604aa690df326886b24c4883f2966b24a6f3e7bf9a770d2a8edfb9
3
+ metadata.gz: 40ee3e78d98766e82df1c5f66b68d07de97296e9204ad7c121b996b1a8c8720f
4
+ data.tar.gz: 8269b928eb9d98df12771bada12b33d351c9db2f92e11716a298143c1b757946
5
5
  SHA512:
6
- metadata.gz: e50e8ef72f92ace4edc75c5b3aca5844cc4b2bc550ae56adb8bf4739a5d48d598a09164c0878ed557fb0b8c120173e831bf92db95db347717ccbc7f086493181
7
- data.tar.gz: de6289ec344f8382604339bf7105ba421a1613bb4a22ffc90a90c9fd809cb61d14103d313467004af717f79c7649219b9b8bc3ef83acf324f5e1e3d0c89a74f4
6
+ metadata.gz: 70e6101f5777e6b8339dff5b16be8c5b746a1ac078a28dcfe57478f3a24d9fbed28b52803157e70df32a2fdf865937c0e7136875218d50ff7134a4b616d4230e
7
+ data.tar.gz: 1c6b432fcb1fa03f464860cf2b176d3538e8f3909da35e22c9b2002ad9d912df395b236b7ba0fbdc1667921c3d0a7229e84b0548bb1748a6eb9073998d33172a
@@ -17,9 +17,22 @@ module EmailListApi
17
17
  private
18
18
 
19
19
  def build_url_parts(base_url_override = nil)
20
- # Priority: explicit parameter > config
20
+ # Priority: explicit parameter > config > environment detection > production default
21
21
  base_url = base_url_override || EmailListApi.configuration.base_url
22
22
 
23
+ # If still not set, try to detect environment and use appropriate default
24
+ if base_url.nil?
25
+ # Check if Rails is available and use environment-based default
26
+ if defined?(Rails) && Rails.env.development?
27
+ base_url = DEVELOPMENT_BASE_URL
28
+ elsif defined?(Rails) && Rails.env.test?
29
+ base_url = DEVELOPMENT_BASE_URL
30
+ else
31
+ # Default to production for all other cases
32
+ base_url = PRODUCTION_BASE_URL
33
+ end
34
+ end
35
+
23
36
  raise ArgumentError, "base_url must be configured" unless base_url
24
37
 
25
38
  uri = URI.parse(base_url)
@@ -1,3 +1,3 @@
1
1
  module EmailListApi
2
- VERSION = "0.1.0.rc.3"
2
+ VERSION = "0.1.0.rc.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: email_list_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0.rc.3
4
+ version: 0.1.0.rc.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Email List Dev
@@ -99,6 +99,7 @@ licenses:
99
99
  - MIT
100
100
  metadata:
101
101
  allowed_push_host: https://rubygems.org
102
+ homepage_uri: https://emaillist.dev/docs
102
103
  rdoc_options: []
103
104
  require_paths:
104
105
  - lib