hint-rubocop_style 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +12 -0
- data/.rubocop.yml +1 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +52 -0
- data/Rakefile +6 -0
- data/default.yml +124 -0
- data/hint-rubocop_style.gemspec +37 -0
- data/lib/hint/rubocop_style.rb +7 -0
- data/lib/hint/rubocop_style/version.rb +5 -0
- metadata +111 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 0475cdaad4030870b12358b9a70e28f2d6be5d06
|
4
|
+
data.tar.gz: 91822501374dad945f964bda73fc0de8ded9b8b3
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: eee465b9e804612805784e1f99878ae772342cd7d7e86dd9f10d236d7f01bc91619286e381f664aa38e2847873a6f46737da604d23e30474c6f08b4863632787
|
7
|
+
data.tar.gz: 98d1c82c70543386faf818ea1482db2b6b690edfe009a0e11af7a134e6c7539d064c667f20968c2776742f77655b0eba0a36dc33796e7b8bca2e164c373f67d6
|
data/.gitignore
ADDED
data/.rubocop.yml
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
inherit_from: default.yml
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2017 nvick
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
# Hint::RubocopStyle
|
2
|
+
|
3
|
+
Shared Hint Rubocop style config
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
group :development, :test do
|
11
|
+
gem 'hint-rubocop_style'
|
12
|
+
end
|
13
|
+
```
|
14
|
+
_This gem includes Rubocop and RubocopRspec as dependencies._
|
15
|
+
|
16
|
+
And then execute:
|
17
|
+
|
18
|
+
$ bundle
|
19
|
+
|
20
|
+
Or install it yourself as:
|
21
|
+
|
22
|
+
$ gem install hint-rubocop_style
|
23
|
+
|
24
|
+
## Usage
|
25
|
+
|
26
|
+
Either create or update the `.rubocop.yml` with the following:
|
27
|
+
|
28
|
+
```yaml
|
29
|
+
inherit_gem:
|
30
|
+
hint-rubocop_style:
|
31
|
+
- default.yml
|
32
|
+
|
33
|
+
AllCops:
|
34
|
+
TargetRubyVersion: PROJECT_RUBY_VERSION
|
35
|
+
TargetRailsVersion: PROJECT_RAILS_VERSION
|
36
|
+
```
|
37
|
+
|
38
|
+
If there are project specific styles you can override the Hint gem by adding them to `.rubocop.yml`
|
39
|
+
|
40
|
+
Rubocop's inheritance trail is:
|
41
|
+
|
42
|
+
`inherit_gem` -> `inherit_from` -> `.rubocop.yml`
|
43
|
+
|
44
|
+
## Contributing
|
45
|
+
|
46
|
+
Pull requests are welcome on GitHub at https://github.com/hintmedia/hint-rubocop_style.
|
47
|
+
|
48
|
+
|
49
|
+
## License
|
50
|
+
|
51
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
52
|
+
|
data/Rakefile
ADDED
data/default.yml
ADDED
@@ -0,0 +1,124 @@
|
|
1
|
+
# adding Rubocop to a project run rubocop --auto-gen-config then uncomment line below
|
2
|
+
# inherit_from: .rubocop_todo.yml
|
3
|
+
require: rubocop-rspec
|
4
|
+
|
5
|
+
AllCops:
|
6
|
+
DisplayCopNames: true
|
7
|
+
Include:
|
8
|
+
- '**/Rakefile'
|
9
|
+
- '**/config.ru'
|
10
|
+
Exclude:
|
11
|
+
- 'bin/**/*'
|
12
|
+
- 'config/**/*'
|
13
|
+
- 'db/**/*'
|
14
|
+
- 'Gemfile*'
|
15
|
+
- 'script/**/*'
|
16
|
+
- 'test/**/*'
|
17
|
+
- 'vendor/**/*'
|
18
|
+
|
19
|
+
Rails:
|
20
|
+
Enabled: true
|
21
|
+
|
22
|
+
Style/FrozenStringLiteralComment:
|
23
|
+
EnforcedStyle: when_needed
|
24
|
+
SupportedStyles:
|
25
|
+
# `when_needed` will add the frozen string literal comment to files
|
26
|
+
# only when the `TargetRubyVersion` is set to 2.3+.
|
27
|
+
- when_needed
|
28
|
+
|
29
|
+
Style/PercentLiteralDelimiters:
|
30
|
+
# Specify the default preferred delimiter for all types with the 'default' key
|
31
|
+
# Override individual delimiters (even with default specified) by specifying
|
32
|
+
# an individual key
|
33
|
+
PreferredDelimiters:
|
34
|
+
default: ()
|
35
|
+
'%i': '()'
|
36
|
+
'%I': '()'
|
37
|
+
'%r': '()'
|
38
|
+
'%w': '()'
|
39
|
+
'%W': '()'
|
40
|
+
|
41
|
+
# Allow empty lines around class body
|
42
|
+
Layout/EmptyLinesAroundClassBody:
|
43
|
+
Enabled: false
|
44
|
+
|
45
|
+
Layout/MultilineMethodCallIndentation:
|
46
|
+
Enabled: false
|
47
|
+
|
48
|
+
# Allow empty lines around module body
|
49
|
+
Layout/EmptyLinesAroundModuleBody:
|
50
|
+
Enabled: false
|
51
|
+
|
52
|
+
# Allow empty lines around block body
|
53
|
+
Layout/EmptyLinesAroundBlockBody:
|
54
|
+
Enabled: false
|
55
|
+
|
56
|
+
# Limit line length
|
57
|
+
Metrics/LineLength:
|
58
|
+
Max: 100
|
59
|
+
|
60
|
+
Metrics/ModuleLength:
|
61
|
+
Max: 200
|
62
|
+
|
63
|
+
Layout/CaseIndentation:
|
64
|
+
Enabled: true
|
65
|
+
EnforcedStyle: case
|
66
|
+
IndentOneStep: true
|
67
|
+
|
68
|
+
Style/AndOr:
|
69
|
+
Enabled: false
|
70
|
+
|
71
|
+
Style/SignalException:
|
72
|
+
Enabled: false
|
73
|
+
AutoCorrect: false
|
74
|
+
|
75
|
+
Layout/SpaceBeforeBlockBraces:
|
76
|
+
AutoCorrect: true
|
77
|
+
|
78
|
+
Layout/ExtraSpacing:
|
79
|
+
AutoCorrect: true
|
80
|
+
|
81
|
+
Layout/EmptyLines:
|
82
|
+
AutoCorrect: true
|
83
|
+
|
84
|
+
Layout/MultilineOperationIndentation:
|
85
|
+
Enabled: true
|
86
|
+
EnforcedStyle: indented
|
87
|
+
|
88
|
+
Performance/Count:
|
89
|
+
Enabled: false
|
90
|
+
|
91
|
+
Style/NumericLiterals:
|
92
|
+
Enabled: false
|
93
|
+
|
94
|
+
Style/RedundantFreeze:
|
95
|
+
Enabled: false
|
96
|
+
|
97
|
+
Layout/SpaceAroundOperators:
|
98
|
+
Enabled: false
|
99
|
+
|
100
|
+
Layout/ExtraSpacing:
|
101
|
+
AllowForAlignment: true
|
102
|
+
# When true, forces the alignment of = in assignments on consecutive lines.
|
103
|
+
ForceEqualSignAlignment: false
|
104
|
+
|
105
|
+
RSpec/ExampleLength:
|
106
|
+
Max: 19
|
107
|
+
|
108
|
+
RSpec/MultipleExpectations:
|
109
|
+
Max: 10
|
110
|
+
|
111
|
+
RSpec/NamedSubject:
|
112
|
+
Enabled: false
|
113
|
+
|
114
|
+
RSpec/MessageExpectation:
|
115
|
+
Enabled: false
|
116
|
+
|
117
|
+
RSpec/LetSetup:
|
118
|
+
Enabled: false
|
119
|
+
|
120
|
+
Security/YAMLLoad:
|
121
|
+
Enabled: false
|
122
|
+
|
123
|
+
Naming/FileName:
|
124
|
+
Enabled: false
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
lib = File.expand_path('../lib', __FILE__)
|
4
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
|
+
require 'hint/rubocop_style/version'
|
6
|
+
|
7
|
+
Gem::Specification.new do |spec|
|
8
|
+
spec.name = 'hint-rubocop_style'
|
9
|
+
spec.version = Hint::RubocopStyle::VERSION
|
10
|
+
spec.authors = ['Hint']
|
11
|
+
spec.email = ['tech@hint.io']
|
12
|
+
|
13
|
+
spec.summary = 'Hint shared Rubocop style guide'
|
14
|
+
spec.homepage = 'https://github.com/hintmedia/hint-rubocop_style'
|
15
|
+
spec.license = 'MIT'
|
16
|
+
|
17
|
+
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
|
18
|
+
# to allow pushing to a single host or delete this section to allow pushing to any host.
|
19
|
+
if spec.respond_to?(:metadata)
|
20
|
+
spec.metadata['allowed_push_host'] = 'https://rubygems.org'
|
21
|
+
else
|
22
|
+
raise 'RubyGems 2.0 or newer is required to protect against ' \
|
23
|
+
'public gem pushes.'
|
24
|
+
end
|
25
|
+
|
26
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
27
|
+
f.match(%r{^(test|spec|features)/})
|
28
|
+
end
|
29
|
+
spec.bindir = 'exe'
|
30
|
+
spec.executables = spec.files.grep(%r( ^exe/ )) { |f| File.basename(f) }
|
31
|
+
spec.require_paths = ['lib']
|
32
|
+
|
33
|
+
spec.add_dependency 'rubocop', '~> 0.49'
|
34
|
+
spec.add_dependency 'rubocop-rspec', '~> 1.15'
|
35
|
+
spec.add_development_dependency 'bundler', '~> 1.14'
|
36
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
37
|
+
end
|
metadata
ADDED
@@ -0,0 +1,111 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: hint-rubocop_style
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Hint
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2017-08-21 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.49'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0.49'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rubocop-rspec
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.15'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.15'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: bundler
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '1.14'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.14'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rake
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '10.0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '10.0'
|
69
|
+
description:
|
70
|
+
email:
|
71
|
+
- tech@hint.io
|
72
|
+
executables: []
|
73
|
+
extensions: []
|
74
|
+
extra_rdoc_files: []
|
75
|
+
files:
|
76
|
+
- ".gitignore"
|
77
|
+
- ".rubocop.yml"
|
78
|
+
- Gemfile
|
79
|
+
- LICENSE.txt
|
80
|
+
- README.md
|
81
|
+
- Rakefile
|
82
|
+
- default.yml
|
83
|
+
- hint-rubocop_style.gemspec
|
84
|
+
- lib/hint/rubocop_style.rb
|
85
|
+
- lib/hint/rubocop_style/version.rb
|
86
|
+
homepage: https://github.com/hintmedia/hint-rubocop_style
|
87
|
+
licenses:
|
88
|
+
- MIT
|
89
|
+
metadata:
|
90
|
+
allowed_push_host: https://rubygems.org
|
91
|
+
post_install_message:
|
92
|
+
rdoc_options: []
|
93
|
+
require_paths:
|
94
|
+
- lib
|
95
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
96
|
+
requirements:
|
97
|
+
- - ">="
|
98
|
+
- !ruby/object:Gem::Version
|
99
|
+
version: '0'
|
100
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
101
|
+
requirements:
|
102
|
+
- - ">="
|
103
|
+
- !ruby/object:Gem::Version
|
104
|
+
version: '0'
|
105
|
+
requirements: []
|
106
|
+
rubyforge_project:
|
107
|
+
rubygems_version: 2.6.11
|
108
|
+
signing_key:
|
109
|
+
specification_version: 4
|
110
|
+
summary: Hint shared Rubocop style guide
|
111
|
+
test_files: []
|