rubocop-schema 0.1.8 → 0.2.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 50c6a638c658d3ad0c033284bede9eab9d49ca6a
4
- data.tar.gz: 7267401a276f104a5e4f0a2299c7b37175e3d353
3
+ metadata.gz: 3e2a13cee8d529026123bb812103b0204f2b9442
4
+ data.tar.gz: 3979ba6532f7c02953dc60e82fe7e472ced53f4f
5
5
  SHA512:
6
- metadata.gz: e8d3dd3cac4c8620d6e62192737bf32b2509c75185dee2fe4d556fb51987c9d018ecc8d68190a180eb0cc17b56afa30aa40063ae1f074a69b35225ddacd6c098
7
- data.tar.gz: 7b7210548b7512435b7c8104213069f9c5947218a85882ad7f65a8e7967e7f5107d459fff839e67e674c6085681b50e6b0352e46a5ad6d68d06b0d9c4ba0f740
6
+ metadata.gz: 5e8d6daa2ee04157a3259e6fa29cb96c6cded016b116bc7dfec97cbf5bb683ae74fa02e036b4dd111a5fcabb2a768da983e31d320210912dffafbdc1729045ba
7
+ data.tar.gz: 2a142f78601a3d6bffabaf877d3388c383f2e585df50c8985173a0eda82baa5579191603b87f30d4726da21800032b6c76fab5e23d81f32f35f83e19f7bb8f27
@@ -0,0 +1,22 @@
1
+ require 'yaml'
2
+
3
+ module RuboCop
4
+ module Cask
5
+ # Because RuboCop doesn't yet support plugins, we have to monkey patch in a
6
+ # bit of our configuration.
7
+ module Inject
8
+ DEFAULT_FILE = File.expand_path(
9
+ '../../../../config/default.yml', __FILE__
10
+ )
11
+
12
+ def self.defaults!
13
+ hash = ConfigLoader.send(:load_yaml_configuration, DEFAULT_FILE)
14
+ config = Config.new(hash, DEFAULT_FILE)
15
+ puts "configuration from #{DEFAULT_FILE}" if ConfigLoader.debug?
16
+ config = ConfigLoader.merge_with_default(config, DEFAULT_FILE)
17
+
18
+ ConfigLoader.instance_variable_set(:@default_configuration, config)
19
+ end
20
+ end
21
+ end
22
+ end
@@ -1,3 +1,5 @@
1
1
  require 'rubocop'
2
2
 
3
+ RuboCop::Cask::Inject.defaults!
4
+
3
5
  require 'rubocop/cop/style/schema_comments'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop-schema
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ceclinux
@@ -33,6 +33,7 @@ files:
33
33
  - config/default.yml
34
34
  - lib/rubocop-schema.rb
35
35
  - lib/rubocop/cop/style/schema_comments.rb
36
+ - lib/rubocop/style/inject.rb
36
37
  homepage: http://rubygems.org/gems/rubocop-schema
37
38
  licenses:
38
39
  - MIT