conf_loader 2.1.0 → 3.0.0

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: 54c86f6f5b32b9d1eb905dec6024dc795dd7ff239d9cc55465a38439e3086cd2
4
- data.tar.gz: e29a190889f3c47a3ca517eafb100708872206f6cf0ad3959d1aaed7cbc3ec3c
3
+ metadata.gz: dbda35ef3cfb056650f71998e1eaf2fca28fd1461b3582f0b6d1a6b3e60138f3
4
+ data.tar.gz: 0e4539c07e4ddc3ad1e327f50bb03beac3bdae1f0e5fa5e158400eb73b1c235b
5
5
  SHA512:
6
- metadata.gz: d80800f2cc368da21002589a7a028b79fa3af8508521607f360fa8da190f8af5c39f58a8b35aea019d5a5cc965e3efba9b3d710cd967a296375b7f0d26f8cf2a
7
- data.tar.gz: af839ccd3b493377e535eabedefb1748a229163b32516d85fff6cdf65ad89aa1488f0c5ca5caf824d0b32197cfb44f520c4273bbcc787ec78b2b41639ce58ce1
6
+ metadata.gz: 83a2b25bc77a80e4f2e30e8eafa1d78e91b94d422a24a102aa2f0fc731dc10f080104fc9d41ea506caa490a2569fe77cde29abb795d16f79d407fc0c7d41d270
7
+ data.tar.gz: 1352781be8d9c235352685beed2cf15b270617144904f60ae04b06f8e254f90f1b732025f2a1546c914dd30b9597fd8f815d1f1f71ee27969df4e77cc55cfbb3
@@ -0,0 +1 @@
1
+ * @salemove/tm-quantum
@@ -0,0 +1,46 @@
1
+ # Gitleaks secret scanning for public repositories.
2
+ #
3
+ # Public repos cannot run the org-level "Gitleaks Secret Scanning ruleset"
4
+ # workflow (its file lives in a private repo, and GitHub refuses to require
5
+ # a workflow from a less visible repository), so they carry this copy.
6
+ #
7
+ # The `gitleaks-scan` job name is load-bearing: the branch ruleset managed
8
+ # by GHOM (ghom-manifests) requires a check named `gitleaks-scan` posted by
9
+ # GitHub Actions.
10
+ #
11
+ # Note: secrets are not available to workflows triggered by pull requests
12
+ # from forks, so this check fails on external contributors' PRs (accepted
13
+ # trade-off; a maintainer can re-push the branch to run it with the license).
14
+ name: Gitleaks Secret Scanning
15
+ on:
16
+ push:
17
+ branches: [ '**' ]
18
+ pull_request:
19
+ merge_group:
20
+
21
+ permissions:
22
+ contents: read
23
+
24
+ jobs:
25
+ gitleaks-scan:
26
+ name: gitleaks-scan
27
+ runs-on: ubuntu-latest
28
+ timeout-minutes: 15
29
+ concurrency:
30
+ group: ${{ github.workflow }}-${{ github.ref }}
31
+ cancel-in-progress: true
32
+ permissions:
33
+ contents: read
34
+ pull-requests: write
35
+ steps:
36
+ - name: Checkout code
37
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
38
+ with:
39
+ fetch-depth: 0
40
+ persist-credentials: false
41
+ - name: Run Gitleaks
42
+ uses: gitleaks/gitleaks-action@e0c47f4f8be36e29cdc102c57e68cb5cbf0e8d1e # v3.0.0
43
+ env:
44
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45
+ GITLEAKS_LICENSE: ${{ secrets.GITLEAKS_LICENSE_PUBLIC }}
46
+ GITLEAKS_NOTIFY_USER_LIST: '@salemove/tm-devsec'
@@ -0,0 +1,27 @@
1
+ name: Publish Gem
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - master
7
+ jobs:
8
+ build:
9
+ runs-on: ubuntu-latest
10
+ permissions:
11
+ contents: write
12
+
13
+ steps:
14
+ # The release needs these credentials: the action's entrypoint
15
+ # runs `git fetch origin refs/tags/vX`, then `rake release` pushes the
16
+ # tag. Nothing here uploads an artifact, so .git cannot leak that way.
17
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 # zizmor: ignore[artipacked]
18
+ with:
19
+ fetch-depth: 2
20
+
21
+
22
+ - name: Release Gem
23
+ uses: discourse/publish-rubygems-action@4bd305c65315cb691bad1e8de97a87aaf29a0a85 # v3
24
+ env:
25
+ GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
26
+ RUBYGEMS_API_KEY: ${{secrets.RUBYGEMS_API_KEY}}
27
+ RELEASE_COMMAND: rake release
data/.gitignore CHANGED
@@ -14,4 +14,3 @@ spec/reports
14
14
  test/tmp
15
15
  test/version_tmp
16
16
  tmp
17
- Gemfile.lock
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.2
1
+ 3.3.8
data/CONTRIBUTING.md ADDED
@@ -0,0 +1,9 @@
1
+ # Contributing to conf_loader
2
+
3
+ We currently do not accept any contributions from external sources.
4
+
5
+ The code is still open source and if you wish to add any changes, feel free to fork it and add changes to your fork.
6
+
7
+ Issues for any security-related bugs found are still welcome, but we offer no guarantees on whether or when they will be acted upon.
8
+
9
+ For any exceptional cases, please contact us at open-source@glia.com.
data/Gemfile CHANGED
@@ -1,14 +1,9 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  group :development, :test do
4
+ gem 'rake'
4
5
  gem 'rspec'
5
6
  end
6
7
 
7
- group :metrics do
8
- gem 'flay'
9
- gem 'flog'
10
- gem 'reek'
11
- end
12
-
13
8
  # Specify your gem's dependencies in conf_loader.gemspec
14
9
  gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,37 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ conf_loader (3.0.0)
5
+ symbolizer (~> 0.0.1)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ diff-lcs (1.6.2)
11
+ rake (13.4.2)
12
+ rspec (3.13.2)
13
+ rspec-core (~> 3.13.0)
14
+ rspec-expectations (~> 3.13.0)
15
+ rspec-mocks (~> 3.13.0)
16
+ rspec-core (3.13.6)
17
+ rspec-support (~> 3.13.0)
18
+ rspec-expectations (3.13.5)
19
+ diff-lcs (>= 1.2.0, < 2.0)
20
+ rspec-support (~> 3.13.0)
21
+ rspec-mocks (3.13.8)
22
+ diff-lcs (>= 1.2.0, < 2.0)
23
+ rspec-support (~> 3.13.0)
24
+ rspec-support (3.13.7)
25
+ symbolizer (0.0.1)
26
+
27
+ PLATFORMS
28
+ arm64-darwin-25
29
+ ruby
30
+
31
+ DEPENDENCIES
32
+ conf_loader!
33
+ rake
34
+ rspec
35
+
36
+ BUNDLED WITH
37
+ 2.6.2
data/README.md CHANGED
@@ -1,6 +1,5 @@
1
1
  # ConfLoader
2
2
 
3
- [![Build Status](https://travis-ci.org/salemove/conf_loader.svg?branch=master)](https://travis-ci.org/salemove/conf_loader)
4
3
  [![Code Climate](https://codeclimate.com/github/salemove/conf_loader.png)](https://codeclimate.com/github/salemove/conf_loader)
5
4
 
6
5
  ## Installation
data/conf_loader.gemspec CHANGED
@@ -17,6 +17,7 @@ Gem::Specification.new do |spec|
17
17
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ['lib']
20
+ spec.required_ruby_version = '>= 3.3'
20
21
 
21
22
  spec.add_dependency 'symbolizer', '~> 0.0.1'
22
23
  end
@@ -1,3 +1,3 @@
1
1
  class ConfLoader
2
- VERSION = '2.1.0'
2
+ VERSION = '3.0.0'
3
3
  end
data/lib/conf_loader.rb CHANGED
@@ -21,7 +21,9 @@ class ConfLoader
21
21
  # @api public
22
22
  def self.load(path, env)
23
23
  template = ERB.new File.new(path).read
24
- environments = YAML.load template.result(binding)
24
+ source = template.result(binding)
25
+
26
+ environments = load_environments(source)
25
27
 
26
28
  if environments.has_key?(env)
27
29
  hash = environments[env]
@@ -38,6 +40,10 @@ class ConfLoader
38
40
 
39
41
  private_class_method
40
42
 
43
+ def self.load_environments(source)
44
+ YAML.load(source, aliases: true)
45
+ end
46
+
41
47
  def self.guarantee_key_presence(hash)
42
48
  hash.default_proc = proc do |h, k|
43
49
  raise KeyError, "#{k} not defined"
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: conf_loader
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 3.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Indrek Juhkam
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2019-10-11 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: symbolizer
@@ -31,11 +30,14 @@ executables: []
31
30
  extensions: []
32
31
  extra_rdoc_files: []
33
32
  files:
33
+ - ".github/CODEOWNERS"
34
+ - ".github/workflows/gitleaks-scan.yml"
35
+ - ".github/workflows/publish.yml"
34
36
  - ".gitignore"
35
- - ".ruby-gemset"
36
37
  - ".ruby-version"
37
- - ".travis.yml"
38
+ - CONTRIBUTING.md
38
39
  - Gemfile
40
+ - Gemfile.lock
39
41
  - LICENSE.txt
40
42
  - README.md
41
43
  - Rakefile
@@ -50,7 +52,6 @@ homepage: ''
50
52
  licenses:
51
53
  - MIT
52
54
  metadata: {}
53
- post_install_message:
54
55
  rdoc_options: []
55
56
  require_paths:
56
57
  - lib
@@ -58,15 +59,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
58
59
  requirements:
59
60
  - - ">="
60
61
  - !ruby/object:Gem::Version
61
- version: '0'
62
+ version: '3.3'
62
63
  required_rubygems_version: !ruby/object:Gem::Requirement
63
64
  requirements:
64
65
  - - ">="
65
66
  - !ruby/object:Gem::Version
66
67
  version: '0'
67
68
  requirements: []
68
- rubygems_version: 3.0.6
69
- signing_key:
69
+ rubygems_version: 3.6.9
70
70
  specification_version: 4
71
71
  summary: Helps to load conf files in SaleMove ecosystem
72
72
  test_files:
data/.ruby-gemset DELETED
@@ -1 +0,0 @@
1
- config_loader
data/.travis.yml DELETED
@@ -1,6 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - 2.1.0
4
- before_script:
5
- - bundle
6
- script: bundle exec rspec