yaml_structure_checker 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -1
- data/README.md +57 -5
- data/lib/yaml_structure_checker/runner.rb +5 -1
- data/lib/yaml_structure_checker/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 290a787b965f0af918bc85af4433e1d1cb3f42673198d21293208d67579b13b9
|
4
|
+
data.tar.gz: 997bc0826d6c7a144180ecf4e050913606f385f37d55baf298c4181fb0984f74
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 706749f393d395878b24c8e2111a8ab4ad01a3ca429112fe7f2afbde5f6f036b5b15d863e6b4baf7f7159eff521d7963e284c21c670d61179b9a2340d59c21f1
|
7
|
+
data.tar.gz: 4115d35138dc3ffda4acd8c0ac266747bbb3707c7d7edd8acaf28d080671cc64c6a4b0a1d29745de886762cb048a09da3a22c62348ebed5f8c1a51c5ea8fd73b
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -2,17 +2,69 @@
|
|
2
2
|
|
3
3
|
This Gem can detect that the keys in the yaml file do not match for each environment.
|
4
4
|
|
5
|
+
This prevents cases where errors occur only in the production environment.
|
6
|
+
|
7
|
+
The following is an example
|
8
|
+
|
9
|
+
```yaml
|
10
|
+
# This file is OK.
|
11
|
+
development: &default
|
12
|
+
db:
|
13
|
+
username: username
|
14
|
+
password: password
|
15
|
+
|
16
|
+
test:
|
17
|
+
<<: *default
|
18
|
+
|
19
|
+
integration:
|
20
|
+
<<: *default
|
21
|
+
|
22
|
+
production:
|
23
|
+
<<: *default
|
24
|
+
db:
|
25
|
+
username: <%= ENV['DATABASE_UERNAME'] %>
|
26
|
+
password: <%= ENV['DATABASE_PASSWORD'] %>
|
27
|
+
```
|
28
|
+
|
29
|
+
```yaml
|
30
|
+
# This file is NG. Raises an exception.
|
31
|
+
development: &default
|
32
|
+
db:
|
33
|
+
username: username
|
34
|
+
password: password
|
35
|
+
|
36
|
+
test:
|
37
|
+
<<: *default
|
38
|
+
|
39
|
+
integration:
|
40
|
+
<<: *default
|
41
|
+
|
42
|
+
production:
|
43
|
+
<<: *default
|
44
|
+
db:
|
45
|
+
username: <%= ENV['DATABASE_UERNAME'] %>
|
46
|
+
password: <%= ENV['DATABASE_PASSWORD'] %>
|
47
|
+
```
|
48
|
+
|
5
49
|
## Installation
|
6
50
|
|
7
|
-
|
51
|
+
Add this line to your application's Gemfile:
|
8
52
|
|
9
|
-
|
53
|
+
```ruby
|
54
|
+
gem 'yaml_structure_checker'
|
55
|
+
```
|
10
56
|
|
11
|
-
|
57
|
+
And then execute:
|
12
58
|
|
13
|
-
|
59
|
+
```bash
|
60
|
+
$ bundle
|
61
|
+
```
|
14
62
|
|
15
|
-
|
63
|
+
Or install it yourself as:
|
64
|
+
|
65
|
+
```bash
|
66
|
+
$ gem install yaml_structure_checker
|
67
|
+
```
|
16
68
|
|
17
69
|
## Usage
|
18
70
|
|
@@ -1,6 +1,10 @@
|
|
1
1
|
module YamlStructureChecker
|
2
2
|
class Runner
|
3
|
-
def self.invoke(settings_path
|
3
|
+
def self.invoke(settings_path)
|
4
|
+
if settings_path.nil?
|
5
|
+
settings_path='config/yaml_structure_checker.yml'
|
6
|
+
end
|
7
|
+
|
4
8
|
Checker.new.test_yamls(settings_path)
|
5
9
|
end
|
6
10
|
end
|
metadata
CHANGED
@@ -1,16 +1,17 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yaml_structure_checker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- yosipy
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-04-
|
11
|
+
date: 2023-04-10 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
|
-
description:
|
13
|
+
description: This Gem can detect that the keys in the yaml file do not match for each
|
14
|
+
environment. This prevents cases where errors occur only in the production environment.
|
14
15
|
email:
|
15
16
|
- yosi.contact@gmail.com
|
16
17
|
executables:
|
@@ -63,6 +64,5 @@ requirements: []
|
|
63
64
|
rubygems_version: 3.2.32
|
64
65
|
signing_key:
|
65
66
|
specification_version: 4
|
66
|
-
summary:
|
67
|
-
environment.
|
67
|
+
summary: Yaml structure checker in ruby
|
68
68
|
test_files: []
|