configsl 1.0.1 → 1.0.2
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 +19 -0
- data/lib/configsl/file_format/shared_spec.rb +19 -0
- data/lib/configsl/version.rb +7 -0
- data/lib/configsl.rb +1 -4
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 996520d6a141a33f05a05cca3318e284646e1513b25ee4c0a4f40cfacc794922
|
4
|
+
data.tar.gz: 4c3df5cff5db3806c8e8423c0d6813bd2e180ccf05827b65a80e47f0aa99b29b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0d2d5b158111e87a0de35946016c8bd29ed2fdd9b47f85ec72e4224ade52ae292ddbe84bbad7ac48cf0221a57f6fed14d05ff17e54a56a04dfed471078cfbff1
|
7
|
+
data.tar.gz: ae533574e3eb01cb827e71eb7319e7028fdd723eb546f85fd28d57bc27d21c76a007724ea075a6366420062fafe03acdc09059ba763168ce19ba4350216760c7
|
data/CHANGELOG.md
CHANGED
@@ -5,6 +5,25 @@ All notable changes to this project will be documented in this file.
|
|
5
5
|
The format is based on [Keep a Changelog][changelog], and this project adheres
|
6
6
|
to [Semantic Versioning][versioning].
|
7
7
|
|
8
|
+
## [1.0.2]
|
9
|
+
|
10
|
+
### Added
|
11
|
+
|
12
|
+
- Moved `ConfigSL::VERSION` to `configsl/version` for easier reference.
|
13
|
+
- Exposed the shared example for file formats. Include it in your specs with:
|
14
|
+
|
15
|
+
```ruby
|
16
|
+
require 'configsl/file_format/shared_spec'
|
17
|
+
|
18
|
+
RSpec.describe MyFileFormat do
|
19
|
+
it_behaves_like 'a file format', 'spec-config.json', %i[json], {
|
20
|
+
format: 'JSON',
|
21
|
+
name: 'config.json',
|
22
|
+
nested: { title: 'JSON file for testing' }
|
23
|
+
}
|
24
|
+
end
|
25
|
+
```
|
26
|
+
|
8
27
|
## [1.0.1]
|
9
28
|
|
10
29
|
### Fixed
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
shared_examples 'a file format' do |filename, extensions, expected|
|
4
|
+
subject(:file) { described_class.new(path) }
|
5
|
+
|
6
|
+
let(:path) { "spec/support/fixtures/#{filename}" }
|
7
|
+
|
8
|
+
describe '.extensions' do
|
9
|
+
it 'returns the JSON extension' do
|
10
|
+
expect(described_class.extensions).to eq(extensions)
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
describe '#read' do
|
15
|
+
it 'returns a hash of configuration values' do
|
16
|
+
expect(file.read).to eq(expected)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
data/lib/configsl.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: configsl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James I. Armes
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-09-
|
11
|
+
date: 2024-09-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: facets
|
@@ -41,12 +41,14 @@ files:
|
|
41
41
|
- lib/configsl/exception.rb
|
42
42
|
- lib/configsl/file_format/base.rb
|
43
43
|
- lib/configsl/file_format/json.rb
|
44
|
+
- lib/configsl/file_format/shared_spec.rb
|
44
45
|
- lib/configsl/file_format/yaml.rb
|
45
46
|
- lib/configsl/file_support.rb
|
46
47
|
- lib/configsl/format.rb
|
47
48
|
- lib/configsl/from_environment.rb
|
48
49
|
- lib/configsl/from_file.rb
|
49
50
|
- lib/configsl/validation.rb
|
51
|
+
- lib/configsl/version.rb
|
50
52
|
homepage: https://github.com/jamesiarmes/configsl
|
51
53
|
licenses:
|
52
54
|
- MIT
|