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 +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/legion/settings/loader.rb +8 -0
- data/lib/legion/settings/version.rb +1 -1
- data/lib/legion/settings.rb +8 -0
- 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: 0646cd4b6cfc444c7a7468206df6a2ebb4148c82f561a6f8df47e663199cc776
|
|
4
|
+
data.tar.gz: 9eb1f3e56f4af70ba7df5dd8a494998ad9e3e1ace96bf2141eae8dbbaed60afb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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)
|
data/lib/legion/settings.rb
CHANGED
|
@@ -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
|