rails_config_validator 1.0.0 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +4 -0
- data/Rakefile +6 -0
- data/lib/rails_config_validator/railtie.rb +2 -2
- data/lib/rails_config_validator/rake_task.rb +12 -0
- data/lib/rails_config_validator/version.rb +1 -1
- data/rails_config_validator.gemspec +0 -11
- metadata +3 -129
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 67c8251b05c08262e174c1727c3d449539f8a3a8
|
4
|
+
data.tar.gz: 9c1fb552a782ebc78e1ec9df099350a3cefc0bab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fed8a30e0e0206c509ad005eb614ed27ffa0d10fc83759e0c73fe19c5653695672ba13c5d97394a6d6d16992df81ac6c7883bd9e7d8fd09cc6c1ac0786dd928b
|
7
|
+
data.tar.gz: 71b0ecef171d30906b4ba23e972f2b56e17a3775489ec132e349a3c617d55568fa9f0512023910504fed708ae1f29cefa3d3f8bca90b85cfdd7d090504c44d0b
|
data/Gemfile
CHANGED
data/Rakefile
CHANGED
@@ -2,11 +2,11 @@ module RailsConfigValidator
|
|
2
2
|
class Railtie < Rails::Railtie
|
3
3
|
config.before_configuration do
|
4
4
|
config.config_validator = ActiveSupport::OrderedOptions.new
|
5
|
-
config.config_validator.
|
5
|
+
config.config_validator.configs %w(database)
|
6
6
|
end
|
7
7
|
|
8
8
|
initializer 'config_validator.configure' do
|
9
|
-
config_paths = config.config_validator.
|
9
|
+
config_paths = config.config_validator.configs.map { |c| File.join(Rails.root, 'config', "#{c}.yml") }
|
10
10
|
|
11
11
|
validators = config_paths.map do |config|
|
12
12
|
RailsConfigValidator::Validator.new(config, Rails.env)
|
@@ -9,6 +9,7 @@ module RailsConfigValidator
|
|
9
9
|
namespace :config_validator do
|
10
10
|
task_init
|
11
11
|
task_validate
|
12
|
+
task_validate_all
|
12
13
|
end
|
13
14
|
end
|
14
15
|
|
@@ -37,5 +38,16 @@ module RailsConfigValidator
|
|
37
38
|
v.valid!
|
38
39
|
end
|
39
40
|
end
|
41
|
+
|
42
|
+
def task_validate_all
|
43
|
+
namespace :validate do
|
44
|
+
desc 'Validates all Rails config files against YML schema'
|
45
|
+
task :all, [:env] do |_, args|
|
46
|
+
Rails.application.config.config_validator.configs.each do |file_name|
|
47
|
+
Rake::Task['config_validator:validate'].invoke("config/#{file_name}.yml", nil, args[:env])
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
40
52
|
end
|
41
53
|
end
|
@@ -31,15 +31,4 @@ Gem::Specification.new do |spec|
|
|
31
31
|
|
32
32
|
spec.add_development_dependency 'guard-rubocop', '~> 1.2'
|
33
33
|
spec.add_development_dependency 'guard-rspec', '~> 4.5'
|
34
|
-
spec.add_development_dependency 'rubocop', '~> 0.31'
|
35
|
-
spec.add_development_dependency 'rubocop-rspec', '~> 1.3'
|
36
|
-
spec.add_development_dependency 'rubocop-checkstyle_formatter', '~> 0.2'
|
37
|
-
|
38
|
-
spec.add_development_dependency 'ci_reporter', '~> 2.0'
|
39
|
-
spec.add_development_dependency 'ci_reporter_rspec', '~> 1.0'
|
40
|
-
|
41
|
-
spec.add_development_dependency 'simplecov', '~> 0.10'
|
42
|
-
spec.add_development_dependency 'simplecov-rcov', '~> 0.2'
|
43
|
-
spec.add_development_dependency 'simplecov-rcov-text', '~> 0.0.3'
|
44
|
-
spec.add_development_dependency 'codeclimate-test-reporter', '~> 0.4'
|
45
34
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_config_validator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michał Knapik
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-09-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: kwalify
|
@@ -80,132 +80,6 @@ dependencies:
|
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '4.5'
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: rubocop
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - "~>"
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: '0.31'
|
90
|
-
type: :development
|
91
|
-
prerelease: false
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - "~>"
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: '0.31'
|
97
|
-
- !ruby/object:Gem::Dependency
|
98
|
-
name: rubocop-rspec
|
99
|
-
requirement: !ruby/object:Gem::Requirement
|
100
|
-
requirements:
|
101
|
-
- - "~>"
|
102
|
-
- !ruby/object:Gem::Version
|
103
|
-
version: '1.3'
|
104
|
-
type: :development
|
105
|
-
prerelease: false
|
106
|
-
version_requirements: !ruby/object:Gem::Requirement
|
107
|
-
requirements:
|
108
|
-
- - "~>"
|
109
|
-
- !ruby/object:Gem::Version
|
110
|
-
version: '1.3'
|
111
|
-
- !ruby/object:Gem::Dependency
|
112
|
-
name: rubocop-checkstyle_formatter
|
113
|
-
requirement: !ruby/object:Gem::Requirement
|
114
|
-
requirements:
|
115
|
-
- - "~>"
|
116
|
-
- !ruby/object:Gem::Version
|
117
|
-
version: '0.2'
|
118
|
-
type: :development
|
119
|
-
prerelease: false
|
120
|
-
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
requirements:
|
122
|
-
- - "~>"
|
123
|
-
- !ruby/object:Gem::Version
|
124
|
-
version: '0.2'
|
125
|
-
- !ruby/object:Gem::Dependency
|
126
|
-
name: ci_reporter
|
127
|
-
requirement: !ruby/object:Gem::Requirement
|
128
|
-
requirements:
|
129
|
-
- - "~>"
|
130
|
-
- !ruby/object:Gem::Version
|
131
|
-
version: '2.0'
|
132
|
-
type: :development
|
133
|
-
prerelease: false
|
134
|
-
version_requirements: !ruby/object:Gem::Requirement
|
135
|
-
requirements:
|
136
|
-
- - "~>"
|
137
|
-
- !ruby/object:Gem::Version
|
138
|
-
version: '2.0'
|
139
|
-
- !ruby/object:Gem::Dependency
|
140
|
-
name: ci_reporter_rspec
|
141
|
-
requirement: !ruby/object:Gem::Requirement
|
142
|
-
requirements:
|
143
|
-
- - "~>"
|
144
|
-
- !ruby/object:Gem::Version
|
145
|
-
version: '1.0'
|
146
|
-
type: :development
|
147
|
-
prerelease: false
|
148
|
-
version_requirements: !ruby/object:Gem::Requirement
|
149
|
-
requirements:
|
150
|
-
- - "~>"
|
151
|
-
- !ruby/object:Gem::Version
|
152
|
-
version: '1.0'
|
153
|
-
- !ruby/object:Gem::Dependency
|
154
|
-
name: simplecov
|
155
|
-
requirement: !ruby/object:Gem::Requirement
|
156
|
-
requirements:
|
157
|
-
- - "~>"
|
158
|
-
- !ruby/object:Gem::Version
|
159
|
-
version: '0.10'
|
160
|
-
type: :development
|
161
|
-
prerelease: false
|
162
|
-
version_requirements: !ruby/object:Gem::Requirement
|
163
|
-
requirements:
|
164
|
-
- - "~>"
|
165
|
-
- !ruby/object:Gem::Version
|
166
|
-
version: '0.10'
|
167
|
-
- !ruby/object:Gem::Dependency
|
168
|
-
name: simplecov-rcov
|
169
|
-
requirement: !ruby/object:Gem::Requirement
|
170
|
-
requirements:
|
171
|
-
- - "~>"
|
172
|
-
- !ruby/object:Gem::Version
|
173
|
-
version: '0.2'
|
174
|
-
type: :development
|
175
|
-
prerelease: false
|
176
|
-
version_requirements: !ruby/object:Gem::Requirement
|
177
|
-
requirements:
|
178
|
-
- - "~>"
|
179
|
-
- !ruby/object:Gem::Version
|
180
|
-
version: '0.2'
|
181
|
-
- !ruby/object:Gem::Dependency
|
182
|
-
name: simplecov-rcov-text
|
183
|
-
requirement: !ruby/object:Gem::Requirement
|
184
|
-
requirements:
|
185
|
-
- - "~>"
|
186
|
-
- !ruby/object:Gem::Version
|
187
|
-
version: 0.0.3
|
188
|
-
type: :development
|
189
|
-
prerelease: false
|
190
|
-
version_requirements: !ruby/object:Gem::Requirement
|
191
|
-
requirements:
|
192
|
-
- - "~>"
|
193
|
-
- !ruby/object:Gem::Version
|
194
|
-
version: 0.0.3
|
195
|
-
- !ruby/object:Gem::Dependency
|
196
|
-
name: codeclimate-test-reporter
|
197
|
-
requirement: !ruby/object:Gem::Requirement
|
198
|
-
requirements:
|
199
|
-
- - "~>"
|
200
|
-
- !ruby/object:Gem::Version
|
201
|
-
version: '0.4'
|
202
|
-
type: :development
|
203
|
-
prerelease: false
|
204
|
-
version_requirements: !ruby/object:Gem::Requirement
|
205
|
-
requirements:
|
206
|
-
- - "~>"
|
207
|
-
- !ruby/object:Gem::Version
|
208
|
-
version: '0.4'
|
209
83
|
description: The gem uses Kwalify schema validator to check Rails configuration files
|
210
84
|
syntax.
|
211
85
|
email:
|
@@ -254,7 +128,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
254
128
|
version: '0'
|
255
129
|
requirements: []
|
256
130
|
rubyforge_project:
|
257
|
-
rubygems_version: 2.4.
|
131
|
+
rubygems_version: 2.4.8
|
258
132
|
signing_key:
|
259
133
|
specification_version: 4
|
260
134
|
summary: Gem for validating Rails YAML configuration files.
|