rubocop-ordered_methods 0.2 → 0.3

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: efe0a069919334996c9317cf8d9dd03bb19fe984a9d8d7a294f017dcb361ec96
4
- data.tar.gz: b8c6b15fbfa6d2b44c99b051ebfb4a2ba047c2958f16cf9015b4f2d87f674fe5
3
+ metadata.gz: 33871b68e39c03de6c12f462dc732d282489b190bdaedca681f955c60a27c20c
4
+ data.tar.gz: c9c22948ef1db00f774d8fcfdf0cd2f60422da6c44b16a3e9430bdef42c86efb
5
5
  SHA512:
6
- metadata.gz: cca41398955b51c5d968fc84b4ec0833339224c696de865d6421834491da2113b12d7e4bfce8fe1771b53f18a0ae872e350ffff96fccce4610b71eca38b3583d
7
- data.tar.gz: 57f61650ad8df63193aa45f9fa35133c85698a134d9a6ee3bfa305b9de074763cc45d7fc26a64da216ba79f86d5b19e5fec84084ee989f266e82dc56251f00fd
6
+ metadata.gz: 571d2b28004397aff91256be2d4b153255870d5b7a4bd8877c3956003e3d73959e5bca95fa7b26901ccf43ee343a5b722eae24dea79540948cbe48a3d016d3bb
7
+ data.tar.gz: 3fe6b38928ed8c4ee6b5c08d27e3ba4e84277f98e7dfa9fe2e74cca570874b4f63caed8ba40ef5e8799d22bd6ae39db4a619beaddde5cc5328d9685e02525809
@@ -0,0 +1,4 @@
1
+ ---
2
+ Layout/OrderedMethods:
3
+ IgnoredMethods:
4
+ - initialize
@@ -0,0 +1,15 @@
1
+ module RuboCop
2
+ module OrderedMethods
3
+ PROJECT_ROOT = Pathname.new(__dir__).parent.parent.expand_path.freeze
4
+ CONFIG_DEFAULT = PROJECT_ROOT.join("config", "default.yml").freeze
5
+
6
+ def self.inject_defaults!
7
+ path = CONFIG_DEFAULT.to_s
8
+ hash = ConfigLoader.send(:load_yaml_configuration, path)
9
+ config = Config.new(hash, path)
10
+ puts "configuration from #{path}" if ConfigLoader.debug?
11
+ config = ConfigLoader.merge_with_default(config, path)
12
+ ConfigLoader.instance_variable_set(:@default_configuration, config)
13
+ end
14
+ end
15
+ end
@@ -1,3 +1,6 @@
1
1
  require 'rubocop'
2
+ require_relative 'rubocop/ordered_methods'
2
3
  require_relative 'rubocop/cop/layout/ordered_methods'
3
4
  require_relative 'rubocop/cop/correctors/ordered_methods_corrector'
5
+
6
+ RuboCop::OrderedMethods.inject_defaults!
@@ -3,7 +3,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
3
 
4
4
  Gem::Specification.new do |spec|
5
5
  spec.name = 'rubocop-ordered_methods'
6
- spec.version = '0.2'
6
+ spec.version = '0.3'
7
7
  spec.authors = ['Shane Cavanaugh']
8
8
  spec.email = ['shane@shanecav.net']
9
9
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop-ordered_methods
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.2'
4
+ version: '0.3'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shane Cavanaugh
@@ -83,9 +83,11 @@ files:
83
83
  - README.md
84
84
  - Rakefile
85
85
  - bin/console
86
+ - config/default.yml
86
87
  - lib/rubocop-ordered_methods.rb
87
88
  - lib/rubocop/cop/correctors/ordered_methods_corrector.rb
88
89
  - lib/rubocop/cop/layout/ordered_methods.rb
90
+ - lib/rubocop/ordered_methods.rb
89
91
  - rubocop-ordered_methods.gemspec
90
92
  homepage: https://github.com/shanecav84/rubocop-ordered_methods
91
93
  licenses: