rubocop-custom 0.0.1
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 +7 -0
- data/Gemfile +5 -0
- data/MIT-LICENSE.md +22 -0
- data/README.md +22 -0
- data/lib/rubocop-custom.rb +8 -0
- data/lib/rubocop/custom/railtie.rb +14 -0
- data/lib/rubocop/custom/version.rb +5 -0
- data/rubocop-custom.gemspec +29 -0
- metadata +67 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: df64f4c66d25729b0e2881fede9016533ff0bb38
|
4
|
+
data.tar.gz: 0d917983f7bee6b7bdbb21bfb33e38422e7130cc
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 39ece224711cbe3f7b204b60572ab91174579490d84d2f0c3c090d85eed40a676f10e908bc56484f2a1b58f7b4f276bdb2972eeb0eaf1982342d3aed2bfd90f3
|
7
|
+
data.tar.gz: 910e406beeef62884d6b998a3ae6eac2bba86f603bd9fdcf47adf8bed3eaf6e8cc9eba1135578e2d340404a79d5a217895b9c9aaa14c6b505d72b2da49b3f6d7
|
data/Gemfile
ADDED
data/MIT-LICENSE.md
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
=====================
|
3
|
+
|
4
|
+
Copyright (c) 2016 Zack Hubert <zhubert@gmail.com>
|
5
|
+
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
7
|
+
this software and associated documentation files (the "Software"), to deal in
|
8
|
+
the Software without restriction, including without limitation the rights to
|
9
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
10
|
+
of the Software, and to permit persons to whom the Software is furnished to do
|
11
|
+
so, subject to the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be included in all
|
14
|
+
copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
22
|
+
SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
# RuboCop Custom
|
2
|
+
|
3
|
+
This is entirely derivative of [rubocop-rspec](https://github.com/nevir/rubocop-rspec), the primary difference is it's designed to let you host your Cops inside your project rather than in someone's Gem.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
|
8
|
+
In your `Gemfile` (or perhaps in a custom group)
|
9
|
+
|
10
|
+
```
|
11
|
+
gem 'rubocop-custom'
|
12
|
+
```
|
13
|
+
|
14
|
+
And modify your `.rubocop.yml`.
|
15
|
+
|
16
|
+
```
|
17
|
+
require: rubocop-custom
|
18
|
+
```
|
19
|
+
|
20
|
+
## Custom Cops
|
21
|
+
|
22
|
+
Make new cops and put them into `spec/cops` and they'll be loaded automatically.
|
@@ -0,0 +1,14 @@
|
|
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
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
$LOAD_PATH.unshift File.expand_path('../lib', __FILE__)
|
4
|
+
require 'rubocop/custom/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = 'rubocop-custom'
|
8
|
+
spec.summary = 'Project based custom cops for Rubocop'
|
9
|
+
spec.description = 'Project based custom cops for Rubocop.'
|
10
|
+
spec.homepage = 'http://github.com/zhubert/rubocop-custom'
|
11
|
+
spec.authors = ['Zack Hubert']
|
12
|
+
spec.email = ['zhubert@gmail.com']
|
13
|
+
spec.licenses = ['MIT']
|
14
|
+
|
15
|
+
spec.version = RuboCop::Custom::VERSION
|
16
|
+
spec.platform = Gem::Platform::RUBY
|
17
|
+
spec.required_ruby_version = '>= 1.9.3'
|
18
|
+
|
19
|
+
spec.require_paths = ['lib']
|
20
|
+
spec.files = Dir[
|
21
|
+
'lib/**/*',
|
22
|
+
'*.md',
|
23
|
+
'*.gemspec',
|
24
|
+
'Gemfile'
|
25
|
+
]
|
26
|
+
spec.extra_rdoc_files = ['MIT-LICENSE.md', 'README.md']
|
27
|
+
|
28
|
+
spec.add_development_dependency('rubocop', '~> 0.31')
|
29
|
+
end
|
metadata
ADDED
@@ -0,0 +1,67 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: rubocop-custom
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Zack Hubert
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-01-12 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rubocop
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0.31'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0.31'
|
27
|
+
description: Project based custom cops for Rubocop.
|
28
|
+
email:
|
29
|
+
- zhubert@gmail.com
|
30
|
+
executables: []
|
31
|
+
extensions: []
|
32
|
+
extra_rdoc_files:
|
33
|
+
- MIT-LICENSE.md
|
34
|
+
- README.md
|
35
|
+
files:
|
36
|
+
- Gemfile
|
37
|
+
- MIT-LICENSE.md
|
38
|
+
- README.md
|
39
|
+
- lib/rubocop-custom.rb
|
40
|
+
- lib/rubocop/custom/railtie.rb
|
41
|
+
- lib/rubocop/custom/version.rb
|
42
|
+
- rubocop-custom.gemspec
|
43
|
+
homepage: http://github.com/zhubert/rubocop-custom
|
44
|
+
licenses:
|
45
|
+
- MIT
|
46
|
+
metadata: {}
|
47
|
+
post_install_message:
|
48
|
+
rdoc_options: []
|
49
|
+
require_paths:
|
50
|
+
- lib
|
51
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - ">="
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: 1.9.3
|
56
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - ">="
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '0'
|
61
|
+
requirements: []
|
62
|
+
rubyforge_project:
|
63
|
+
rubygems_version: 2.4.5.1
|
64
|
+
signing_key:
|
65
|
+
specification_version: 4
|
66
|
+
summary: Project based custom cops for Rubocop
|
67
|
+
test_files: []
|