legion-settings 1.3.6 → 1.3.7

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: 226a1ae2303f64b96fc48bd42101545a9d06b73aefab19278f27007c406c39d2
4
- data.tar.gz: 4cbf2414166794436869ed44646f86c2860e7bdad4a07feebbd2536fe0e15276
3
+ metadata.gz: 0646cd4b6cfc444c7a7468206df6a2ebb4148c82f561a6f8df47e663199cc776
4
+ data.tar.gz: 9eb1f3e56f4af70ba7df5dd8a494998ad9e3e1ace96bf2141eae8dbbaed60afb
5
5
  SHA512:
6
- metadata.gz: 0b719320bd415ffbf14d68c5a43122dddf8182a0cfddca05915ba8f36490ede658abcb74fa499f320711a20fb5ec67d4f108c17fa4a1b35ee6a51dac801d0402
7
- data.tar.gz: 88220500e2cc7a8542ce32b26c94b8ccf143d6b90d7ef0054a32f8d4507d175534dd8ac4ddae724ac8cfaa1fb4e88ac099200ca7d028fe4e258fe945398d939a
6
+ metadata.gz: bca6f0949cf3e29992894d3b2d05a9f41283df50d8f4cf1f2d911048c5de95f66d3dbf76bca2eda9cc4c2124a888808c73ca3a4477499c22fec2a428a9a0b525
7
+ data.tar.gz: b55b543a2f387c813703d5276ff4975237c93dbe66b8281ecb05d4991645d793c0d413c1d929cc7497f63aae6d90975921444a6d1eba8159f3ab56cacd60fcb6
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Legion::Settings Changelog
2
2
 
3
+ ## [1.3.7] - 2026-03-20
4
+
5
+ ### Added
6
+ - `enterprise_privacy?` class method: returns true when `LEGION_ENTERPRISE_PRIVACY=true` env var or `enterprise_data_privacy` setting is set
7
+ - `LEGION_ENTERPRISE_PRIVACY` env var loaded into settings via `Loader#load_privacy_env`
8
+
3
9
  ## [1.3.6] - 2026-03-20
4
10
 
5
11
  ### Fixed
@@ -128,6 +128,7 @@ module Legion
128
128
 
129
129
  def load_env
130
130
  load_api_env
131
+ load_privacy_env
131
132
  end
132
133
 
133
134
  def load_dns_bootstrap(cache_dir: nil)
@@ -289,6 +290,13 @@ module Legion
289
290
  @indifferent_access = false
290
291
  end
291
292
 
293
+ def load_privacy_env
294
+ return unless ENV['LEGION_ENTERPRISE_PRIVACY'] == 'true'
295
+
296
+ @settings[:enterprise_data_privacy] = true
297
+ @indifferent_access = false
298
+ end
299
+
292
300
  def read_config_file(file)
293
301
  contents = File.read(file).dup
294
302
  if contents.respond_to?(:force_encoding)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Legion
4
4
  module Settings
5
- VERSION = '1.3.6'
5
+ VERSION = '1.3.7'
6
6
  end
7
7
  end
@@ -75,6 +75,14 @@ module Legion
75
75
  false
76
76
  end
77
77
 
78
+ def enterprise_privacy?
79
+ return true if ENV['LEGION_ENTERPRISE_PRIVACY'] == 'true'
80
+
81
+ Legion::Settings[:enterprise_data_privacy] ? true : false
82
+ rescue StandardError
83
+ false
84
+ end
85
+
78
86
  def validate!
79
87
  @loader = load if @loader.nil?
80
88
  revalidate_all_modules
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: legion-settings
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.6
4
+ version: 1.3.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Esity