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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c5b1ce6fcb49b5f7a073c2f0192e764bd31cd2548913fc142417f2177201049e
4
- data.tar.gz: a21da4ba0ac21d7739ddaa274f7aad1a8fcf2a55dcf79376b64f4971e75a5bec
3
+ metadata.gz: 290a787b965f0af918bc85af4433e1d1cb3f42673198d21293208d67579b13b9
4
+ data.tar.gz: 997bc0826d6c7a144180ecf4e050913606f385f37d55baf298c4181fb0984f74
5
5
  SHA512:
6
- metadata.gz: 3253e65b6567752fec9a7bd2bfeb014a89f81c52e2790bfa9f0bafa50e3f3bca3dbcf4bc6eaae6bb1ec9b0a1a6cdfccbed01ea3c74a91f3510bb34a1968b906d
7
- data.tar.gz: 0e945ec8fc8b7bd4a308355b8873a46ee751fa954363ca51b8d8bc51b4cf62e7718721986b11576fb9c6608e6f808215edd6521e2788ed0f403b90a905e0d4d0
6
+ metadata.gz: 706749f393d395878b24c8e2111a8ab4ad01a3ca429112fe7f2afbde5f6f036b5b15d863e6b4baf7f7159eff521d7963e284c21c670d61179b9a2340d59c21f1
7
+ data.tar.gz: 4115d35138dc3ffda4acd8c0ac266747bbb3707c7d7edd8acaf28d080671cc64c6a4b0a1d29745de886762cb048a09da3a22c62348ebed5f8c1a51c5ea8fd73b
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- yaml_structure_checker (0.1.0)
4
+ yaml_structure_checker (0.1.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -23,6 +23,7 @@ GEM
23
23
  rspec-support (3.12.0)
24
24
 
25
25
  PLATFORMS
26
+ ruby
26
27
  x86_64-linux
27
28
 
28
29
  DEPENDENCIES
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
- TODO: Replace `UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG` with your gem name right after releasing it to RubyGems.org. Please do not do it earlier due to security reasons. Alternatively, replace this section with instructions to install your gem from git if you don't plan to release to RubyGems.org.
51
+ Add this line to your application's Gemfile:
8
52
 
9
- Install the gem and add to the application's Gemfile by executing:
53
+ ```ruby
54
+ gem 'yaml_structure_checker'
55
+ ```
10
56
 
11
- $ bundle add UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG
57
+ And then execute:
12
58
 
13
- If bundler is not being used to manage dependencies, install the gem by executing:
59
+ ```bash
60
+ $ bundle
61
+ ```
14
62
 
15
- $ gem install UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG
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='config/yaml_structure_checker.yml')
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module YamlStructureChecker
4
- VERSION = "0.1.0"
4
+ VERSION = "0.1.1"
5
5
  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.0
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-09 00:00:00.000000000 Z
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: This Gem verifies that the structure of the Yaml file is consistent for each
67
- environment.
67
+ summary: Yaml structure checker in ruby
68
68
  test_files: []