king_konf 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +28 -0
- data/king_konf.gemspec +1 -1
- data/lib/king_konf/config_file_loader.rb +7 -1
- data/lib/king_konf/version.rb +1 -1
- metadata +9 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2d2502b9771fc107ad2db0f49241e302ed80465c3e769d9c8f0dbb0888214aa4
|
4
|
+
data.tar.gz: bf947978e987de8ee67df77556768e7851a67637f18b5d83e74b2cdc5f8ac27e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f5419839b71bdca08588802b2ae5dac5d4e040e816e04e8482b213f7ef3866c0f7bf0a0e07fdd9a84e873fcd518cc8811c41b3a21d1a141a332192a9103b263e
|
7
|
+
data.tar.gz: f1cd338ae1e5379f65ac54a6e63d5525795a85201b97e7bb2b6f2ce876922713a18957ef696ec671d6591422b5027372575968be8a10f0b41de168b83e8f0216
|
@@ -0,0 +1,28 @@
|
|
1
|
+
name: CI
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches: [ "master" ]
|
6
|
+
pull_request:
|
7
|
+
branches: [ "master" ]
|
8
|
+
|
9
|
+
permissions:
|
10
|
+
contents: read
|
11
|
+
|
12
|
+
jobs:
|
13
|
+
test:
|
14
|
+
|
15
|
+
runs-on: ubuntu-latest
|
16
|
+
strategy:
|
17
|
+
matrix:
|
18
|
+
ruby-version: ['2.6', '2.7', '3.0']
|
19
|
+
|
20
|
+
steps:
|
21
|
+
- uses: actions/checkout@v3
|
22
|
+
- name: Set up Ruby
|
23
|
+
uses: ruby/setup-ruby@v1
|
24
|
+
with:
|
25
|
+
ruby-version: ${{ matrix.ruby-version }}
|
26
|
+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
27
|
+
- name: Run tests
|
28
|
+
run: bundle exec rake
|
data/king_konf.gemspec
CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
|
|
20
20
|
|
21
21
|
spec.require_paths = ["lib"]
|
22
22
|
|
23
|
-
spec.add_development_dependency "bundler", "~>
|
23
|
+
spec.add_development_dependency "bundler", "~> 2"
|
24
24
|
spec.add_development_dependency "rake", "~> 10.0"
|
25
25
|
spec.add_development_dependency "rspec", "~> 3.0"
|
26
26
|
spec.add_development_dependency "rspec_junit_formatter"
|
@@ -11,7 +11,13 @@ module KingKonf
|
|
11
11
|
# First, load the ERB template from disk.
|
12
12
|
template = ERB.new(File.new(path).read)
|
13
13
|
|
14
|
-
|
14
|
+
begin
|
15
|
+
# Without flag, loading the configuration file fails in Ruby 3.1 if it contains aliases.
|
16
|
+
data = YAML.load(template.result(binding), aliases: true)
|
17
|
+
rescue ArgumentError
|
18
|
+
# Covering prior YAML versions
|
19
|
+
data = YAML.load(template.result(binding))
|
20
|
+
end
|
15
21
|
|
16
22
|
# Grab just the config for the environment, if specified.
|
17
23
|
data = data.fetch(environment) unless environment.nil?
|
data/lib/king_konf/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: king_konf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Schierbeck
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-10-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '2'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '2'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -74,6 +74,7 @@ extensions: []
|
|
74
74
|
extra_rdoc_files: []
|
75
75
|
files:
|
76
76
|
- ".circleci/config.yml"
|
77
|
+
- ".github/workflows/ci.yml"
|
77
78
|
- ".gitignore"
|
78
79
|
- ".rspec"
|
79
80
|
- Gemfile
|
@@ -94,7 +95,7 @@ homepage: https://github.com/dasch/king_konf
|
|
94
95
|
licenses:
|
95
96
|
- Apache License Version 2.0
|
96
97
|
metadata: {}
|
97
|
-
post_install_message:
|
98
|
+
post_install_message:
|
98
99
|
rdoc_options: []
|
99
100
|
require_paths:
|
100
101
|
- lib
|
@@ -109,9 +110,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
109
110
|
- !ruby/object:Gem::Version
|
110
111
|
version: '0'
|
111
112
|
requirements: []
|
112
|
-
|
113
|
-
|
114
|
-
signing_key:
|
113
|
+
rubygems_version: 3.3.3
|
114
|
+
signing_key:
|
115
115
|
specification_version: 4
|
116
116
|
summary: A simple configuration library
|
117
117
|
test_files: []
|