rubocop-custom 0.0.1 → 0.0.3

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: df64f4c66d25729b0e2881fede9016533ff0bb38
4
- data.tar.gz: 0d917983f7bee6b7bdbb21bfb33e38422e7130cc
3
+ metadata.gz: 49b27b8c7836ba0602b7c6da8d86c251f622ecae
4
+ data.tar.gz: 7678188de16be58fa23e5344025da9e69cd967e7
5
5
  SHA512:
6
- metadata.gz: 39ece224711cbe3f7b204b60572ab91174579490d84d2f0c3c090d85eed40a676f10e908bc56484f2a1b58f7b4f276bdb2972eeb0eaf1982342d3aed2bfd90f3
7
- data.tar.gz: 910e406beeef62884d6b998a3ae6eac2bba86f603bd9fdcf47adf8bed3eaf6e8cc9eba1135578e2d340404a79d5a217895b9c9aaa14c6b505d72b2da49b3f6d7
6
+ metadata.gz: a3058df3ab169ac10d53c309a61262c20892ea6f3157add357231e3c97136e8fe7f894ff2e5f125772846c97001452338f1942bb307836e861fe17ae27e1408d
7
+ data.tar.gz: 4bf082d01ce53ab46520015dd3ede006c7e1090ca963d7406bbe1505f3f5d8308391804d7ded0973b42be14c51898f747ff38215401fa1cd5a042ce588f93815
@@ -1,8 +1,5 @@
1
1
  require 'rubocop'
2
2
  require 'rubocop/custom/version'
3
+ require 'rubocop/custom/railtie'
3
4
 
4
- if defined?(::Rails::Engine)
5
- require 'rubocop/custom/railtie'
6
- else
7
- fail 'Requires Rails'
8
- end
5
+ Rubocop::Custom.inject!
@@ -0,0 +1,9 @@
1
+ module Rubocop
2
+ module Custom
3
+ def self.inject!
4
+ Dir.glob(File.join(Dir.pwd, 'spec', 'cops', '*.rb')).each do |file|
5
+ require file
6
+ end
7
+ end
8
+ end
9
+ end
@@ -1,5 +1,5 @@
1
1
  module RuboCop
2
2
  module Custom
3
- VERSION = '0.0.1'
3
+ VERSION = '0.0.3'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop-custom
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zack Hubert
@@ -37,7 +37,7 @@ files:
37
37
  - MIT-LICENSE.md
38
38
  - README.md
39
39
  - lib/rubocop-custom.rb
40
- - lib/rubocop/custom/railtie.rb
40
+ - lib/rubocop/custom/inject.rb
41
41
  - lib/rubocop/custom/version.rb
42
42
  - rubocop-custom.gemspec
43
43
  homepage: http://github.com/zhubert/rubocop-custom
@@ -1,14 +0,0 @@
1
- module Rubocop
2
- module Custom
3
- def self.hook_rails!
4
- Dir.glob(Rails.root.join('spec', 'cops', '*.rb')).each do |file|
5
- require file
6
- end
7
- end
8
- class Railtie < Rails::Railtie
9
- initializer 'rubocop.custom.configure_rails_initialization' do
10
- Rubocop::Custom.hook_rails!
11
- end
12
- end
13
- end
14
- end