runger_style 0.2.22

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: c1bcc3c9137c1accceb2c3db1f794888e8391a013ebde9d67845d2690801aaad
4
+ data.tar.gz: d98cab391e0a4dd8ffce3fc06b12b8186fd0d9253a9ae064cd14e506ebb90ded
5
+ SHA512:
6
+ metadata.gz: d95eb12362a0c3d741c9a2809fa879c65b797a2d128a756e5822ffe609a618a19fbdf8fe7f12a4c1a7ea4c8f1835e8b3ac94bc89c82b2a62c42e121846e2aacd
7
+ data.tar.gz: 8397c96baa8380c5a9342b1d64c507e3882ab75709f5f3057349050ef6f32998e4757e80d523a649e77fc12d6abf69ddfdd1043f7e258ffa40631f55afc19791
@@ -0,0 +1,9 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: bundler
4
+ directory: "/"
5
+ schedule:
6
+ interval: weekly
7
+ time: "03:52"
8
+ timezone: America/Chicago
9
+ open-pull-requests-limit: 20
@@ -0,0 +1,29 @@
1
+ name: Run Rubocop
2
+
3
+ on:
4
+ pull_request:
5
+ branches:
6
+ - master
7
+
8
+ jobs:
9
+ build:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: actions/checkout@v3
13
+ - name: Set up Ruby 3.2.0
14
+ uses: ruby/setup-ruby@v1
15
+ with:
16
+ ruby-version: 3.2.0
17
+ bundler-cache: true
18
+ - name: Set up
19
+ run: |
20
+ gem install bundler -v 2.1.4
21
+ bundle install --jobs 4 --retry 3
22
+ - name: Run Rubocop
23
+ run: bin/rubocop --format clang
24
+ - name: Ensure alpha version
25
+ run: grep alpha $(find . -type f -name version.rb)
26
+ - name: Ensure no git diff
27
+ run: git diff --exit-code && git diff-index --quiet --cached HEAD
28
+ - name: Ensure "## Unreleased" is in CHANGELOG.md
29
+ run: grep "^## Unreleased" CHANGELOG.md
data/.gitignore ADDED
@@ -0,0 +1,7 @@
1
+ /.bundle/
2
+ /coverage/
3
+ /pkg/
4
+ /tmp/
5
+ .DS_Store
6
+ # rspec failure tracking
7
+ .rspec_status
@@ -0,0 +1,3 @@
1
+ ---
2
+ git: true
3
+ rubygems: true
data/.rubocop.yml ADDED
@@ -0,0 +1,7 @@
1
+ inherit_from:
2
+ - rulesets/capybara.yml
3
+ - rulesets/default.yml
4
+ - rulesets/performance.yml
5
+ - rulesets/rails.yml
6
+ - rulesets/rake.yml
7
+ - rulesets/rspec.yml
data/CHANGELOG.md ADDED
@@ -0,0 +1,112 @@
1
+ ## v0.2.22 (2023-05-04)
2
+ [no unreleased changes yet]
3
+
4
+ ## v0.2.21 (2021-06-28)
5
+ [no unreleased changes yet]
6
+
7
+ ## v0.2.20 (2021-05-19)
8
+ ### Changed
9
+ - Disable `Style/TopLevelMethodDefinition` in `db/datamigrate/`
10
+
11
+ ## v0.2.19 (2021-05-19)
12
+ ### Changed
13
+ - Allow reads for `Rails/EnvironmentVariableAccess`
14
+
15
+ ## v0.2.18 (2021-05-10)
16
+ ### Changed
17
+ - Disable `Layout/SingleLineBlockChain` cop
18
+
19
+ ## v0.2.17 (2021-05-10)
20
+ ### Changed
21
+ - Disable `Bundler/GemVersion` cop
22
+
23
+ ## v0.2.16 (2021-01-26)
24
+ ### Dependencies
25
+ - Bump `release_assistant` to `0.1.1.alpha`
26
+
27
+ ## v0.2.15 (2021-01-26)
28
+ ### Internal
29
+ - Add some new steps to CI (check for alpha version, no git diff, etc)
30
+ - Use `release_assistant` gem to manage the release process
31
+
32
+ ## v0.2.14 (2021-01-09)
33
+ ### Added
34
+ - Don't require parens for `change_column_default` method calls
35
+
36
+ ## v0.2.13 (2021-01-08)
37
+ ### Added
38
+ - Don't require parens for `and` method calls (e.g. in RSpec compound expectations)
39
+
40
+ ## v0.2.12 (2021-01-08)
41
+ ### Added
42
+ - Don't require parens for `boolean` method calls
43
+
44
+ ## v0.2.11 (2021-01-07)
45
+ ### Added
46
+ - Added `Layout/EmptyLineBetweenDefs` with `AllowAdjacentOneLineDefs: true` option
47
+
48
+ ## v0.2.10 (2021-01-07)
49
+ ### Changed
50
+ - Moved `AttributeDefinedStatically` from `FactoryBot` namespace to `RSpec/FactoryBot`
51
+
52
+ ## v0.2.9 (2021-01-07)
53
+ ### Added
54
+ - Disabled `Layout/FirstMethodArgumentLineBreak`
55
+
56
+ ## v0.2.8 (2021-01-04)
57
+ ### Added
58
+ - Disabled `Naming/VariableNumber`
59
+ - Disabled `Style/CommentAnnotation`
60
+ - Disabled `Style/RedundantArgument`
61
+
62
+ ## v0.2.7 (2021-01-03)
63
+ ### Added
64
+ - Disable `Rails/OrderById` in `rulesets/rails.yml`
65
+
66
+ ## v0.2.6 (2021-01-01)
67
+ ### Added
68
+ - Don't require parens for `timestamps` method calls
69
+
70
+ ### Internal
71
+ - Use Ruby 2.7.2 (not 2.7.1) in GitHub Actions
72
+
73
+ ## v0.2.5 (2020-09-01)
74
+ ### Added
75
+ - Disable `Layout/EmptyLineAfterMultilineCondition` cop
76
+ - Disable `Style/ClassMethodsDefinitions` cop
77
+
78
+ ## v0.2.4 (2020-08-05)
79
+ ### Added
80
+ - Disable `Lint/MissingSuper` rule
81
+ - Specify `required_ruby_version` (`>= 2.7.0`) in gemspec
82
+
83
+ ## v0.2.3 (2020-07-13)
84
+ ### Added
85
+ - Disable `Style/HashLikeCase` rule
86
+
87
+ ## v0.2.2 (2020-07-13)
88
+ ### Added
89
+ - Disable `Style/RedundantFileExtensionInRequire` rule
90
+
91
+ ## v0.2.1 (2020-07-02)
92
+ ### Docs
93
+ - Alphabetize suggested ordering of `:development` and `:test` groups in Gemfile
94
+
95
+ ## v0.2.0 (2020-07-02)
96
+ ### BREAKING CHANGE
97
+ - Break up rulesets based on plugin gem, not code directory
98
+
99
+ ## v0.1.3 (2020-07-01)
100
+ ### Added
101
+ - Don't require parens for `#inet` calls in migrations
102
+
103
+ ## v0.1.2 (2020-07-01)
104
+ ### Docs
105
+ - Fix typo in README.md ("spec-specific" => "binstubs-specific")
106
+
107
+ ## v0.1.1 (2020-07-01)
108
+ ### Added
109
+ - Add rulesets specifically designed for `spec/` and `db/migrate/` directories
110
+
111
+ ## v0.1.0 (2020-07-01)
112
+ - Initial release of `runger_style`!
data/Gemfile ADDED
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ source 'https://rubygems.org'
4
+
5
+ gemspec
6
+
7
+ group :development, :test do
8
+ gem 'bundler'
9
+ gem 'rake'
10
+ gem 'rubocop'
11
+ gem 'rubocop-performance'
12
+ end
13
+
14
+ group :development do
15
+ gem 'release_assistant', require: false, github: 'davidrunger/release_assistant'
16
+ end
17
+
18
+ group :test do
19
+ gem 'rubocop-capybara'
20
+ gem 'rubocop-rails'
21
+ gem 'rubocop-rake'
22
+ gem 'rubocop-rspec'
23
+ end
data/Gemfile.lock ADDED
@@ -0,0 +1,89 @@
1
+ GIT
2
+ remote: https://github.com/davidrunger/release_assistant.git
3
+ revision: 969b3a90264da6ce73275a7240cc7e54ff5a6370
4
+ specs:
5
+ release_assistant (0.3.3.alpha)
6
+ activesupport (>= 6, < 8)
7
+ colorize (~> 0.8)
8
+ memoist (~> 0.16)
9
+ slop (~> 4.8)
10
+
11
+ PATH
12
+ remote: .
13
+ specs:
14
+ runger_style (0.2.22)
15
+ rubocop (>= 1.38.0, < 2)
16
+
17
+ GEM
18
+ remote: https://rubygems.org/
19
+ specs:
20
+ activesupport (7.0.4.3)
21
+ concurrent-ruby (~> 1.0, >= 1.0.2)
22
+ i18n (>= 1.6, < 2)
23
+ minitest (>= 5.1)
24
+ tzinfo (~> 2.0)
25
+ ast (2.4.2)
26
+ colorize (0.8.1)
27
+ concurrent-ruby (1.2.2)
28
+ i18n (1.13.0)
29
+ concurrent-ruby (~> 1.0)
30
+ json (2.6.3)
31
+ memoist (0.16.2)
32
+ minitest (5.18.0)
33
+ parallel (1.23.0)
34
+ parser (3.2.2.0)
35
+ ast (~> 2.4.1)
36
+ rack (2.2.7)
37
+ rainbow (3.1.1)
38
+ rake (13.0.6)
39
+ regexp_parser (2.8.0)
40
+ rexml (3.2.5)
41
+ rubocop (1.50.2)
42
+ json (~> 2.3)
43
+ parallel (~> 1.10)
44
+ parser (>= 3.2.0.0)
45
+ rainbow (>= 2.2.2, < 4.0)
46
+ regexp_parser (>= 1.8, < 3.0)
47
+ rexml (>= 3.2.5, < 4.0)
48
+ rubocop-ast (>= 1.28.0, < 2.0)
49
+ ruby-progressbar (~> 1.7)
50
+ unicode-display_width (>= 2.4.0, < 3.0)
51
+ rubocop-ast (1.28.0)
52
+ parser (>= 3.2.1.0)
53
+ rubocop-capybara (2.18.0)
54
+ rubocop (~> 1.41)
55
+ rubocop-performance (1.17.1)
56
+ rubocop (>= 1.7.0, < 2.0)
57
+ rubocop-ast (>= 0.4.0)
58
+ rubocop-rails (2.19.1)
59
+ activesupport (>= 4.2.0)
60
+ rack (>= 1.1)
61
+ rubocop (>= 1.33.0, < 2.0)
62
+ rubocop-rake (0.6.0)
63
+ rubocop (~> 1.0)
64
+ rubocop-rspec (2.20.0)
65
+ rubocop (~> 1.33)
66
+ rubocop-capybara (~> 2.17)
67
+ ruby-progressbar (1.13.0)
68
+ slop (4.10.1)
69
+ tzinfo (2.0.6)
70
+ concurrent-ruby (~> 1.0)
71
+ unicode-display_width (2.4.2)
72
+
73
+ PLATFORMS
74
+ ruby
75
+
76
+ DEPENDENCIES
77
+ bundler
78
+ rake
79
+ release_assistant!
80
+ rubocop
81
+ rubocop-capybara
82
+ rubocop-performance
83
+ rubocop-rails
84
+ rubocop-rake
85
+ rubocop-rspec
86
+ runger_style!
87
+
88
+ BUNDLED WITH
89
+ 2.2.22
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2017 Perceptual Inc.
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 all
13
+ 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 THE
21
+ SOFTWARE.
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2020 David Runger
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,99 @@
1
+ # `runger_style`
2
+
3
+ Shared rubocop rules for the preferred Ruby coding style of [@davidrunger][1].
4
+
5
+ [1]: https://github.com/davidrunger/
6
+
7
+ # Table of Contents
8
+
9
+ <!--ts-->
10
+ * [runger_style](#runger_style)
11
+ * [Table of Contents](#table-of-contents)
12
+ * [Installation](#installation)
13
+ * [Usage](#usage)
14
+ * [Inspiration / Credits](#inspiration--credits)
15
+ * [For maintainers](#for-maintainers)
16
+
17
+ <!-- Added by: david, at: Tue Jan 26 02:54:38 PST 2021 -->
18
+
19
+ <!--te-->
20
+
21
+ # Installation
22
+
23
+ Add this to your application's Gemfile:
24
+
25
+ ```rb
26
+ group :development, :test do
27
+ gem 'runger_style', require: false
28
+ end
29
+ ```
30
+
31
+ And then run:
32
+
33
+ ```
34
+ $ bundle install
35
+ ```
36
+
37
+ # Usage
38
+
39
+ Create a `.rubocop.yml` file, including as many of the directives below as appropriate/desired.
40
+
41
+ ```yml
42
+ # file: .rubocop.yml
43
+
44
+ inherit_gem:
45
+ runger_style:
46
+ - rulesets/capybara.yml # gem 'rubocop-capybara'
47
+ - rulesets/default.yml # gem 'rubocop'
48
+ - rulesets/performance.yml # gem 'rubocop-performance'
49
+ - rulesets/rails.yml # gem 'rubocop-rails'
50
+ - rulesets/rake.yml # gem 'rubocop-rake'
51
+ - rulesets/rspec.yml # gem 'rubocop-rspec'
52
+ ```
53
+
54
+ For example, if you're setting up rubocop configuration for a Ruby on Rails app, then it's a good
55
+ idea to include `rulesets/rails.yml`. If your application or library uses RSpec for testing, then
56
+ it's a good idea to include `rulesets/rspec.yml`. If you care about performance, then it's a good
57
+ idea to include `rulesets/performance.yml`.
58
+
59
+ For each directive that you choose to include, **you'll need to make sure to also include the
60
+ corresponding gem** (as noted in a comment for each directive in the `.rubocop.yml` snippet above)
61
+ in the `Gemfile` of your application or library.
62
+
63
+ ```rb
64
+ # file: Gemfile
65
+
66
+ group :development, :test do
67
+ # include whichever of these gems are required, based on which ruleset(s) you use
68
+ gem 'rubocop', require: false
69
+ gem 'rubocop-capybara', require: false
70
+ gem 'rubocop-performance', require: false
71
+ gem 'rubocop-rails', require: false
72
+ gem 'rubocop-rake', require: false
73
+ gem 'rubocop-rspec', require: false
74
+ # (as mentioned in the "Installation" section, you need the `runger_style` gem itself, too)
75
+ gem 'runger_style', github: 'davidrunger/runger_style', require: false
76
+ end
77
+ ```
78
+
79
+ Then, run:
80
+
81
+ ```
82
+ $ bundle exec rubocop
83
+ ```
84
+
85
+ # Inspiration / Credits
86
+
87
+ This gem is inspired by (/ largely copied from) https://github.com/percy/percy-style , which was
88
+ written about here: https://blog.percy.io/share-rubocop-rules-across-all-of-your-repos-f3281fbd71f8
89
+ .
90
+
91
+ # For maintainers
92
+
93
+ To release a new version, run `bin/release` with an appropriate `--type` option, e.g.:
94
+
95
+ ```
96
+ bin/release --type minor
97
+ ```
98
+
99
+ (This uses the `release_assistant` gem.)
data/RELEASING.md ADDED
@@ -0,0 +1,9 @@
1
+ # Releasing
2
+
3
+ 1. check out the `master` branch
4
+ 2. update `CHANGELOG.md`
5
+ 3. update the version number in `version.rb`
6
+ 4. `bundle install` (which will update `Gemfile.lock`)
7
+ 5. commit the changes with a message like `Prepare to release v0.1.1`
8
+ 6. run `bin/release` (which will create a git tag for the version and push git commits and
9
+ tags to GitHub)
data/Rakefile ADDED
@@ -0,0 +1,3 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'bundler/gem_tasks'
data/bin/release ADDED
@@ -0,0 +1,28 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ #
5
+ # This file was generated by Bundler.
6
+ #
7
+ # The application 'release' is installed as part of a gem, and
8
+ # this file is here to facilitate running it.
9
+ #
10
+
11
+ require 'pathname'
12
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', Pathname.new(__FILE__).realpath)
13
+
14
+ bundle_binstub = File.expand_path('bundle', __dir__)
15
+
16
+ if File.file?(bundle_binstub)
17
+ if File.read(bundle_binstub, 300).include?('This file was generated by Bundler')
18
+ load(bundle_binstub)
19
+ else
20
+ abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
21
+ Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
22
+ end
23
+ end
24
+
25
+ require 'rubygems'
26
+ require 'bundler/setup'
27
+
28
+ load Gem.bin_path('release_assistant', 'release')
data/bin/rubocop ADDED
@@ -0,0 +1,28 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ #
5
+ # This file was generated by Bundler.
6
+ #
7
+ # The application 'rubocop' is installed as part of a gem, and
8
+ # this file is here to facilitate running it.
9
+ #
10
+
11
+ require 'pathname'
12
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', Pathname.new(__FILE__).realpath)
13
+
14
+ bundle_binstub = File.expand_path('bundle', __dir__)
15
+
16
+ if File.file?(bundle_binstub)
17
+ if File.read(bundle_binstub, 300).include?('This file was generated by Bundler')
18
+ load(bundle_binstub)
19
+ else
20
+ abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
21
+ Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
22
+ end
23
+ end
24
+
25
+ require 'rubygems'
26
+ require 'bundler/setup'
27
+
28
+ load Gem.bin_path('rubocop', 'rubocop')
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RungerStyle
4
+ VERSION = '0.2.22'
5
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RungerStyle ; end
4
+
5
+ require 'runger_style/version'
@@ -0,0 +1,5 @@
1
+ require:
2
+ - rubocop-capybara
3
+
4
+ Capybara/SpecificMatcher:
5
+ Enabled: false
@@ -0,0 +1,219 @@
1
+ AllCops:
2
+ EnabledByDefault: true
3
+ Exclude:
4
+ - db/schema.rb # auto-generated file; best to leave as-is
5
+ - node_modules/**/*
6
+ - vendor/bundle/**/*
7
+ TargetRubyVersion: 3.2
8
+ UseCache: true
9
+ Bundler/GemComment:
10
+ Enabled: false
11
+ Bundler/GemVersion:
12
+ Enabled: false
13
+ Layout/ArgumentAlignment:
14
+ EnforcedStyle: with_fixed_indentation
15
+ Layout/ClassStructure:
16
+ ExpectedOrder:
17
+ - module_inclusion
18
+ - constants
19
+ - public_class_methods
20
+ - initializer
21
+ - public_methods
22
+ - protected_methods
23
+ - private_methods
24
+ Layout/DotPosition:
25
+ EnforcedStyle: trailing
26
+ Layout/EmptyLineAfterMultilineCondition:
27
+ Enabled: false
28
+ Layout/EmptyLineBetweenDefs:
29
+ AllowAdjacentOneLineDefs: true
30
+ Layout/FirstArgumentIndentation:
31
+ Enabled: false # this rule doesn't play nicely with the way that I like to use `memoize`
32
+ Layout/FirstArrayElementIndentation:
33
+ EnforcedStyle: consistent
34
+ Layout/FirstMethodArgumentLineBreak:
35
+ Enabled: false
36
+ Layout/LineEndStringConcatenationIndentation:
37
+ Exclude:
38
+ - bin/*
39
+ Layout/LineLength:
40
+ AllowedPatterns:
41
+ # ignore line length if the line is a comment without any spaces; it's probably not something we
42
+ # can fix (e.g. a long file path)
43
+ - !ruby/regexp /^ *#? [\S]+$/
44
+ Max: 100
45
+ Layout/MultilineMethodCallIndentation:
46
+ EnforcedStyle: indented
47
+ Layout/RedundantLineBreak:
48
+ Enabled: false
49
+ Layout/SingleLineBlockChain:
50
+ Enabled: false
51
+ Layout/SpaceBeforeBlockBraces:
52
+ Enabled: false
53
+ Layout/SpaceBeforeSemicolon:
54
+ Enabled: false
55
+ Layout/SpaceInsideHashLiteralBraces:
56
+ EnforcedStyle: space
57
+ Lint/AmbiguousBlockAssociation:
58
+ Exclude:
59
+ - spec/**/*.rb
60
+ Lint/ConstantResolution:
61
+ Enabled: false
62
+ Lint/MissingSuper:
63
+ Enabled: false
64
+ Lint/RedundantSplatExpansion:
65
+ Enabled: false
66
+ Metrics/AbcSize:
67
+ Enabled: false
68
+ Metrics/BlockLength:
69
+ Enabled: false
70
+ Metrics/ClassLength:
71
+ Enabled: false
72
+ Metrics/MethodLength:
73
+ Max: 30
74
+ Naming/InclusiveLanguage:
75
+ Enabled: false
76
+ Naming/RescuedExceptionsVariableName:
77
+ Enabled: false
78
+ Naming/VariableNumber:
79
+ Enabled: false
80
+ Style/BlockDelimiters:
81
+ Enabled: false
82
+ Style/ClassAndModuleChildren:
83
+ EnforcedStyle: compact
84
+ Style/ClassMethodsDefinitions:
85
+ Enabled: false
86
+ Style/CollectionMethods:
87
+ Enabled: false
88
+ Style/CommentAnnotation:
89
+ Enabled: false
90
+ Style/ConstantVisibility:
91
+ Enabled: false
92
+ Style/Copyright:
93
+ Enabled: false
94
+ Style/DisableCopsWithinSourceCodeDirective:
95
+ Enabled: false
96
+ Style/Documentation:
97
+ Enabled: false
98
+ Style/DocumentationMethod:
99
+ Enabled: false
100
+ Style/EmptyCaseCondition:
101
+ Enabled: false
102
+ Style/FrozenStringLiteralComment:
103
+ Enabled: true
104
+ Style/GlobalStdStream:
105
+ Enabled: false
106
+ Style/GlobalVars:
107
+ Enabled: false
108
+ Style/GuardClause:
109
+ Enabled: false
110
+ Style/HashLikeCase:
111
+ Enabled: false
112
+ Style/IfUnlessModifier:
113
+ Enabled: false
114
+ Style/ImplicitRuntimeError:
115
+ Enabled: false
116
+ Style/InlineComment:
117
+ Enabled: false
118
+ Style/Lambda:
119
+ Enabled: false
120
+ Style/MethodCallWithArgsParentheses:
121
+ AllowedMethods:
122
+ - add_column
123
+ - add_foreign_key
124
+ - add_index
125
+ - add_reference
126
+ - and
127
+ - belongs_to
128
+ - bigint
129
+ - boolean
130
+ - change
131
+ - change_column
132
+ - change_column_default
133
+ - change_column_null
134
+ - change_table
135
+ - create_table
136
+ - datetime
137
+ - desc
138
+ - describe
139
+ - drop_table
140
+ - fail
141
+ - file
142
+ - float
143
+ - foreign_key
144
+ - gem
145
+ - head
146
+ - include
147
+ - index
148
+ - inet
149
+ - integer
150
+ - json
151
+ - jsonb
152
+ - load
153
+ - not_to
154
+ - p
155
+ - print
156
+ - puts
157
+ - references
158
+ - remove_column
159
+ - remove_index
160
+ - render
161
+ - require
162
+ - require_relative
163
+ - ruby
164
+ - run
165
+ - source
166
+ - string
167
+ - text
168
+ - timestamp
169
+ - timestamps
170
+ - to
171
+ - visit
172
+ Style/MethodCalledOnDoEndBlock:
173
+ Enabled: false
174
+ Style/MissingElse:
175
+ Enabled: false
176
+ Style/NegatedIf:
177
+ Enabled: false
178
+ Style/NumericPredicate:
179
+ Enabled: false
180
+ Style/ParenthesesAroundCondition:
181
+ Enabled: false
182
+ Style/RedundantArgument:
183
+ Enabled: false
184
+ Style/RedundantFileExtensionInRequire:
185
+ Enabled: false
186
+ Style/RegexpLiteral:
187
+ Enabled: false
188
+ Style/RequireOrder:
189
+ Exclude:
190
+ - bin/*
191
+ - spec/spec_helper.rb
192
+ Style/RescueModifier:
193
+ Enabled: false
194
+ Style/RescueStandardError:
195
+ Enabled: false
196
+ Style/ReturnNil:
197
+ Enabled: false
198
+ Style/Semicolon:
199
+ Enabled: false
200
+ Style/Send:
201
+ Exclude:
202
+ - spec/**/*.rb
203
+ Style/SignalException:
204
+ Enabled: false
205
+ Style/StderrPuts:
206
+ Enabled: false
207
+ Style/StringHashKeys:
208
+ Enabled: false
209
+ Style/TernaryParentheses:
210
+ Enabled: false
211
+ Style/TopLevelMethodDefinition:
212
+ Exclude:
213
+ - db/datamigrate/**/*.rb
214
+ Style/TrailingCommaInArguments:
215
+ EnforcedStyleForMultiline: comma
216
+ Style/TrailingCommaInArrayLiteral:
217
+ EnforcedStyleForMultiline: comma
218
+ Style/TrailingCommaInHashLiteral:
219
+ EnforcedStyleForMultiline: comma
@@ -0,0 +1,5 @@
1
+ require:
2
+ - rubocop-performance
3
+
4
+ Performance/ChainArrayAllocation:
5
+ Enabled: false
@@ -0,0 +1,31 @@
1
+ require:
2
+ - rubocop-rails
3
+
4
+ Rails:
5
+ Exclude:
6
+ - bin/* # `bin/` files don't have access to Rails add-on methods like `#present?`
7
+ Rails/ActionOrder:
8
+ Enabled: false
9
+ Rails/BulkChangeTable:
10
+ Exclude:
11
+ - !ruby/regexp /db/migrate/201[1-9].*\.rb\z/
12
+ Rails/CreateTableWithTimestamps:
13
+ Exclude:
14
+ - !ruby/regexp /db/migrate/201[1-9].*\.rb\z/
15
+ Rails/EnvironmentVariableAccess:
16
+ AllowReads: true
17
+ Rails/I18nLocaleTexts:
18
+ Enabled: false
19
+ Rails/OrderById:
20
+ Enabled: false
21
+ Rails/Output:
22
+ Enabled: false
23
+ Rails/NotNullColumn:
24
+ Enabled: false
25
+ Rails/RakeEnvironment:
26
+ Enabled: false
27
+ Rails/ReversibleMigration:
28
+ Exclude:
29
+ - !ruby/regexp /db/migrate/201[1-9].*\.rb\z/
30
+ Rails/SchemaComment:
31
+ Enabled: false
data/rulesets/rake.yml ADDED
@@ -0,0 +1,2 @@
1
+ require:
2
+ - rubocop-rake
@@ -0,0 +1,46 @@
1
+ require:
2
+ - rubocop-rspec
3
+
4
+ RSpec/BeEq:
5
+ Enabled: false
6
+ RSpec/BeNil:
7
+ Enabled: false
8
+ RSpec/ExampleLength:
9
+ Enabled: false
10
+ RSpec/FactoryBot/AttributeDefinedStatically:
11
+ Exclude:
12
+ - spec/support/fixture_builder.rb # false positives get raised in this file
13
+ RSpec/HookArgument:
14
+ Enabled: false
15
+ RSpec/IndexedLet:
16
+ Enabled: false
17
+ RSpec/MultipleExpectations:
18
+ Enabled: false
19
+ RSpec/MultipleMemoizedHelpers:
20
+ Enabled: false
21
+ RSpec/StubbedMock:
22
+ Enabled: false
23
+ RSpec/SubjectStub:
24
+ Enabled: false
25
+ RSpec/AlignLeftLetBrace:
26
+ Enabled: false
27
+ RSpec/AlignRightLetBrace:
28
+ Enabled: false
29
+ RSpec/DescribeClass:
30
+ Exclude:
31
+ # feature specs describe a scenario/flow rather than a single class
32
+ - spec/features/**/*
33
+ RSpec/DescribedClass:
34
+ Enabled: false
35
+ RSpec/ExpectChange:
36
+ EnforcedStyle: block
37
+ RSpec/ExpectInHook:
38
+ Enabled: false
39
+ RSpec/MessageExpectation:
40
+ Enabled: false
41
+ RSpec/MessageSpies:
42
+ Enabled: false
43
+ RSpec/NestedGroups:
44
+ Enabled: false
45
+ RSpec/Rails/HttpStatus:
46
+ Enabled: false
@@ -0,0 +1,31 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'lib/runger_style/version'
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = 'runger_style'
7
+ spec.version = RungerStyle::VERSION
8
+ spec.authors = ['David Runger']
9
+ spec.email = ['davidjrunger@gmail.com']
10
+
11
+ spec.summary = 'Shared rubocop rules for the preferred Ruby coding style of @davidrunger'
12
+ spec.description = 'Shared rubocop rules for the preferred Ruby coding style of @davidrunger'
13
+ spec.homepage = 'https://github.com/davidrunger/runger_style'
14
+ spec.license = 'MIT'
15
+
16
+ spec.metadata['rubygems_mfa_required'] = 'true'
17
+ spec.metadata['homepage_uri'] = spec.homepage
18
+ spec.metadata['source_code_uri'] = 'https://github.com/davidrunger/runger_style'
19
+ spec.metadata['changelog_uri'] =
20
+ 'https://github.com/davidrunger/runger_style/blob/master/CHANGELOG.md'
21
+
22
+ spec.files =
23
+ `git ls-files -z`.split("\x0").reject do |f|
24
+ f.match(%r{^(test|spec|features)/})
25
+ end
26
+ spec.require_paths = ['lib']
27
+
28
+ spec.required_ruby_version = '>= 3.2.0'
29
+
30
+ spec.add_runtime_dependency('rubocop', '>= 1.38.0', '< 2')
31
+ end
metadata ADDED
@@ -0,0 +1,91 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: runger_style
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.2.22
5
+ platform: ruby
6
+ authors:
7
+ - David Runger
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2023-05-04 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: 1.38.0
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: '2'
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ version: 1.38.0
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: '2'
33
+ description: Shared rubocop rules for the preferred Ruby coding style of @davidrunger
34
+ email:
35
+ - davidjrunger@gmail.com
36
+ executables: []
37
+ extensions: []
38
+ extra_rdoc_files: []
39
+ files:
40
+ - ".github/dependabot.yml"
41
+ - ".github/workflows/ruby.yml"
42
+ - ".gitignore"
43
+ - ".release_assistant.yml"
44
+ - ".rubocop.yml"
45
+ - CHANGELOG.md
46
+ - Gemfile
47
+ - Gemfile.lock
48
+ - LICENSE
49
+ - LICENSE.txt
50
+ - README.md
51
+ - RELEASING.md
52
+ - Rakefile
53
+ - bin/release
54
+ - bin/rubocop
55
+ - lib/runger_style.rb
56
+ - lib/runger_style/version.rb
57
+ - rulesets/capybara.yml
58
+ - rulesets/default.yml
59
+ - rulesets/performance.yml
60
+ - rulesets/rails.yml
61
+ - rulesets/rake.yml
62
+ - rulesets/rspec.yml
63
+ - runger_style.gemspec
64
+ homepage: https://github.com/davidrunger/runger_style
65
+ licenses:
66
+ - MIT
67
+ metadata:
68
+ rubygems_mfa_required: 'true'
69
+ homepage_uri: https://github.com/davidrunger/runger_style
70
+ source_code_uri: https://github.com/davidrunger/runger_style
71
+ changelog_uri: https://github.com/davidrunger/runger_style/blob/master/CHANGELOG.md
72
+ post_install_message:
73
+ rdoc_options: []
74
+ require_paths:
75
+ - lib
76
+ required_ruby_version: !ruby/object:Gem::Requirement
77
+ requirements:
78
+ - - ">="
79
+ - !ruby/object:Gem::Version
80
+ version: 3.2.0
81
+ required_rubygems_version: !ruby/object:Gem::Requirement
82
+ requirements:
83
+ - - ">="
84
+ - !ruby/object:Gem::Version
85
+ version: '0'
86
+ requirements: []
87
+ rubygems_version: 3.4.12
88
+ signing_key:
89
+ specification_version: 4
90
+ summary: Shared rubocop rules for the preferred Ruby coding style of @davidrunger
91
+ test_files: []