legion-settings 1.3.14 → 1.3.15

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: 6916c1cced7ef98b95b8e6e62b6f1c21eb7981afdb5acccdd649d7de0c4509d5
4
- data.tar.gz: 7317a016bcbccbc30f554453342882913f127fd9e7ff257949381619ff7640a8
3
+ metadata.gz: 5064a806037efdeabe9fde9da614bfc5de32dbcd38d2a85acfe4506be1f6f001
4
+ data.tar.gz: d59c47c946b9a807e809418ec1dd6b512d0217bee6c03546e41991acb91ca895
5
5
  SHA512:
6
- metadata.gz: cbd256e6a54095c29557798fa828db210e2b4e305201f6022848e7d48a87ae8d50ca1703af0071c3408cee6388531676dca6472442ae2a6058cf8428be5d9c22
7
- data.tar.gz: fba8430817f85d31713cc877bdd2258e1bcec190c32d9628de99e2afe671b8c465150c23fa6d3bd1a1ac20627a7bbbcf3ad9b1ba7a36d74ab1a939d7a411bf4c
6
+ metadata.gz: 9979038cd915b3bd445da82973ea005c0da7c8c8e8c956d47704670aa2f11dc52f8dbabb2747f8dff8c8c727285f21061cb460531fe8508a14747e42877dcc54
7
+ data.tar.gz: 33bc653d6a817152b7d3f9836301aec3e30752f53197176bc1b69887c16ba9ac0a6b2cfd78cc24b056d494aa69df1bf0c4ae38292b6a40c2f1ef448ca144b7c4
@@ -0,0 +1,6 @@
1
+ # Auto-generated from team-config.yml
2
+ # Team: core
3
+ #
4
+ # To apply: scripts/apply-codeowners.sh legion-settings
5
+
6
+ * @LegionIO/maintainers @LegionIO/core
@@ -0,0 +1,18 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: bundler
4
+ directory: /
5
+ schedule:
6
+ interval: weekly
7
+ day: monday
8
+ open-pull-requests-limit: 5
9
+ labels:
10
+ - "type:dependencies"
11
+ - package-ecosystem: github-actions
12
+ directory: /
13
+ schedule:
14
+ interval: weekly
15
+ day: monday
16
+ open-pull-requests-limit: 5
17
+ labels:
18
+ - "type:dependencies"
@@ -3,14 +3,32 @@ on:
3
3
  push:
4
4
  branches: [main]
5
5
  pull_request:
6
+ schedule:
7
+ - cron: '0 9 * * 1'
6
8
 
7
9
  jobs:
8
10
  ci:
9
11
  uses: LegionIO/.github/.github/workflows/ci.yml@main
10
12
 
13
+ lint:
14
+ uses: LegionIO/.github/.github/workflows/lint-patterns.yml@main
15
+
16
+ security:
17
+ uses: LegionIO/.github/.github/workflows/security-scan.yml@main
18
+
19
+ version-changelog:
20
+ uses: LegionIO/.github/.github/workflows/version-changelog.yml@main
21
+
22
+ dependency-review:
23
+ uses: LegionIO/.github/.github/workflows/dependency-review.yml@main
24
+
25
+ stale:
26
+ if: github.event_name == 'schedule'
27
+ uses: LegionIO/.github/.github/workflows/stale.yml@main
28
+
11
29
  release:
12
- needs: ci
30
+ needs: [ci, lint]
13
31
  if: github.event_name == 'push' && github.ref == 'refs/heads/main'
14
32
  uses: LegionIO/.github/.github/workflows/release.yml@main
15
33
  secrets:
16
- rubygems-api-key: ${{ secrets.RUBYGEMS_API_KEY }}
34
+ rubygems-api-key: ${{ secrets.RUBYGEMS_API_KEY }}
data/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # Legion::Settings Changelog
2
2
 
3
+ ## [1.3.15] - 2026-03-23
4
+
5
+ ### Added
6
+ - `Loader.default_directories` class method: canonical settings directory discovery with `LEGION_SETTINGS_DIRS` env var override
7
+ - Returns `~/.legionio/settings` + `/etc/legionio/settings` (unix) or `~/.legionio/settings` + optional `%APPDATA%\legionio\settings` (windows, when APPDATA is set)
8
+ - `log_info` private helper for info-level logging in Loader
9
+
10
+ ### Changed
11
+ - `load_directory` logging upgraded from debug to info level
12
+
3
13
  ## [1.3.14] - 2026-03-22
4
14
 
5
15
  ### Added
@@ -13,6 +13,23 @@ module Legion
13
13
  class Error < RuntimeError; end
14
14
  attr_reader :warnings, :errors, :loaded_files, :settings
15
15
 
16
+ def self.default_directories
17
+ env_dirs = ENV.fetch('LEGION_SETTINGS_DIRS', nil)
18
+ if env_dirs && !env_dirs.strip.empty?
19
+ env_dirs_list = env_dirs.split(File::PATH_SEPARATOR).map(&:strip).reject(&:empty?).map { |p| File.expand_path(p) }
20
+ return env_dirs_list unless env_dirs_list.empty?
21
+ end
22
+
23
+ dirs = [File.expand_path('~/.legionio/settings')]
24
+ if OS.windows?
25
+ appdata = ENV.fetch('APPDATA', nil)
26
+ dirs << File.join(appdata, 'legionio', 'settings') if appdata && !appdata.strip.empty?
27
+ else
28
+ dirs << '/etc/legionio/settings'
29
+ end
30
+ dirs
31
+ end
32
+
16
33
  def initialize
17
34
  @warnings = []
18
35
  @errors = []
@@ -195,7 +212,7 @@ module Legion
195
212
  if File.readable?(path) && File.executable?(path)
196
213
  files = Dir.glob(File.join(path, '**{,/*/**}/*.json')).uniq
197
214
  files.each { |file| load_file(file) }
198
- log_debug("Loaded directory #{path}: #{files.size} files")
215
+ log_info("Settings: loaded directory #{path} (#{files.size} files)")
199
216
  else
200
217
  load_error('insufficient permissions for loading', directory: directory)
201
218
  end
@@ -373,6 +390,10 @@ module Legion
373
390
  'unknown'
374
391
  end
375
392
 
393
+ def log_info(message)
394
+ defined?(Legion::Logging) ? Legion::Logging.info(message) : $stdout.puts(message)
395
+ end
396
+
376
397
  def log_debug(message)
377
398
  Legion::Logging.debug(message) if defined?(Legion::Logging)
378
399
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Legion
4
4
  module Settings
5
- VERSION = '1.3.14'
5
+ VERSION = '1.3.15'
6
6
  end
7
7
  end
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.14
4
+ version: 1.3.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Esity
@@ -34,6 +34,8 @@ extra_rdoc_files:
34
34
  - LICENSE
35
35
  - README.md
36
36
  files:
37
+ - ".github/CODEOWNERS"
38
+ - ".github/dependabot.yml"
37
39
  - ".github/workflows/ci.yml"
38
40
  - ".gitignore"
39
41
  - ".rubocop.yml"