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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ba8536a2e15844c5d235f20655bc72f93af878c9
4
- data.tar.gz: cb9abde9e0090beb2395fe2519e103ba36878299
3
+ metadata.gz: 67c8251b05c08262e174c1727c3d449539f8a3a8
4
+ data.tar.gz: 9c1fb552a782ebc78e1ec9df099350a3cefc0bab
5
5
  SHA512:
6
- metadata.gz: a1c15769940bcce4ac92ece69ce073c3a3f663092bae8d8513adea9627056d1832b28b0b54c71e6a8f8adf8aab63b9606f0ce3807c38bbbbfcd7311507f8a613
7
- data.tar.gz: c80b2bc3c8a6db3d500fbe8598487d9f2771dc072cd46669874b86c473e0cefcd88ab51a8ae35ba1962aa125ae429d94538df96fe1a58401a81393668b88b5eb
6
+ metadata.gz: fed8a30e0e0206c509ad005eb614ed27ffa0d10fc83759e0c73fe19c5653695672ba13c5d97394a6d6d16992df81ac6c7883bd9e7d8fd09cc6c1ac0786dd928b
7
+ data.tar.gz: 71b0ecef171d30906b4ba23e972f2b56e17a3775489ec132e349a3c617d55568fa9f0512023910504fed708ae1f29cefa3d3f8bca90b85cfdd7d090504c44d0b
data/Gemfile CHANGED
@@ -1,4 +1,8 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
+ group :development, :test do
4
+ gem 'ns-rake_tasks', github: 'u2i/ns-rake_tasks'
5
+ end
6
+
3
7
  # Specify your gem's dependencies in rails_config_validator.gemspec
4
8
  gemspec
data/Rakefile CHANGED
@@ -20,4 +20,10 @@ rescue LoadError => e
20
20
  STDERR.puts e
21
21
  end
22
22
 
23
+ begin
24
+ require 'ns/rake_tasks/tasks/all'
25
+ rescue LoadError => e
26
+ STDERR.puts e
27
+ end
28
+
23
29
  task default: [:spec, :rubocop]
@@ -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.files %w(database.yml)
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.files.map { |c| File.join(Rails.root, 'config', c) }
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
@@ -1,3 +1,3 @@
1
1
  module RailsConfigValidator
2
- VERSION = '1.0.0'
2
+ VERSION = '2.0.0'
3
3
  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: 1.0.0
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-07-15 00:00:00.000000000 Z
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.6
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.