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 +4 -4
- data/lib/rubocop/style/inject.rb +22 -0
- data/lib/rubocop-schema.rb +2 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3e2a13cee8d529026123bb812103b0204f2b9442
|
4
|
+
data.tar.gz: 3979ba6532f7c02953dc60e82fe7e472ced53f4f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
data/lib/rubocop-schema.rb
CHANGED
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.
|
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
|