Skip to content

Commit fcde074

Browse files
committed
Get rid of omakase from test apps and other rubocop fixes
1 parent 91f1224 commit fcde074

11 files changed

Lines changed: 20 additions & 66 deletions

File tree

.rubocop.yml

Lines changed: 3 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -46,39 +46,16 @@ Layout/LineLength:
4646
IgnoreCopDirectives: true
4747
# AllowedPatterns: []
4848

49-
# Rails 5 only requires 2.2.2.
5049
AllCops:
5150
NewCops: enable
5251
DisplayCopNames: true
5352
DisplayStyleGuide: true
54-
TargetRubyVersion: 2.6
53+
TargetRubyVersion: 3.2
5554
Exclude:
5655
- Capfile
5756
- Gemfile
58-
- "test/rails_app/bin/**/*"
59-
- "test/rails_app/config/**/*"
60-
- test/rails_app/config.ru
61-
- "test/rails_app/db/**/*"
62-
- "test/rails_app/log/**/*"
63-
- "test/rails_app/tmp/**/*"
64-
- "test/rails_app/vendor/**/*"
65-
- "test/rails_app/node_modules/**/*"
66-
- "test/rails_app/bower_components/**/*"
67-
- test/rails_app/Gemfile
68-
- test/rails_app/Guardfile
69-
- test/rails_app/Rakefile
70-
- "test/es_rails_app/bin/**/*"
71-
- "test/es_rails_app/config/**/*"
72-
- test/es_rails_app/config.ru
73-
- "test/es_rails_app/db/**/*"
74-
- "test/es_rails_app/log/**/*"
75-
- "test/es_rails_app/tmp/**/*"
76-
- "test/es_rails_app/vendor/**/*"
77-
- "test/es_rails_app/node_modules/**/*"
78-
- "test/es_rails_app/bower_components/**/*"
79-
- test/es_rails_app/Gemfile
80-
- test/es_rails_app/Guardfile
81-
- test/es_rails_app/Rakefile
57+
- test/es_rails_app/**/*
58+
- test/rails_app/**/*
8259
- vendor/bundle/**/*
8360

8461
Metrics/BlockLength:
@@ -96,9 +73,3 @@ Metrics/ClassLength:
9673
Metrics/MethodLength:
9774
Exclude:
9875
- test/**/*.rb
99-
100-
# TODO: Remove this when minimum Ruby is 2.3.
101-
Layout/HeredocIndentation:
102-
Exclude:
103-
- Dangerfile
104-
- devise-bootstrap-form.gemspec

Dangerfile

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ has_changelog_changes = git.modified_files.include?("CHANGELOG.md")
2121
# You've made changes to lib, but didn't write any tests?
2222
# ------------------------------------------------------------------------------
2323
if has_lib_changes && !has_test_changes
24-
warn("There are code changes, but no corresponding tests. "\
25-
"Please include tests if this PR introduces any modifications in "\
24+
warn("There are code changes, but no corresponding tests. " \
25+
"Please include tests if this PR introduces any modifications in " \
2626
"#{project_name}'s behavior.",
2727
sticky: false)
2828
end
@@ -32,14 +32,14 @@ end
3232
# ------------------------------------------------------------------------------
3333
if !has_changelog_changes && has_lib_changes
3434
markdown <<~MARKDOWN
35-
Here's an example of a CHANGELOG.md entry (place it immediately under the `* Your contribution here!` line):
35+
Here's an example of a CHANGELOG.md entry (place it immediately under the `* Your contribution here!` line):
3636
37-
```markdown
38-
* [##{pr_number}](#{pr_url}): #{github.pr_title} - [@#{github.pr_author}](https://github.com/#{github.pr_author}).
39-
```
37+
```markdown
38+
* [##{pr_number}](#{pr_url}): #{github.pr_title} - [@#{github.pr_author}](https://github.com/#{github.pr_author}).
39+
```
4040
MARKDOWN
41-
warn("Please update CHANGELOG.md with a description of your changes. "\
42-
"If this PR is not a user-facing change (e.g. just refactoring), "\
41+
warn("Please update CHANGELOG.md with a description of your changes. " \
42+
"If this PR is not a user-facing change (e.g. just refactoring), " \
4343
"you can disregard this.", sticky: false)
4444
end
4545

Gemfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ source "https://rubygems.org"
66
gemspec
77

88
group :development do
9-
gem "chandler", ">= 0.7.0"
10-
# gem "htmlbeautifier"
9+
gem "rubocop-rails-omakase"
1110
gem "rubocop", require: false
1211
gem "rubocop-rake", require: false
1312
end

RELEASING.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ Follow these steps to release a new version of `devise-bootstrap-form` to `rubyg
66

77
* You must have commit rights to the `devise-bootstrap-form` repository.
88
* You must have push rights for the `devise-bootstrap-form` gem on `rubygems.org`.
9-
* You must be using Ruby >= 2.2.
10-
* Your GitHub credentials must be available to Chandler via `~/.netrc` or an environment variable, [as explained here](https://github.com/mattbrictson/chandler#2-configure-credentials).
9+
* You must be using Ruby >= 3.2.
1110

1211
## How to release
1312

Rakefile

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,3 @@ desc "Run RuboCop lint checks"
1414
RuboCop::RakeTask.new(:lint)
1515

1616
task default: %i[test lint]
17-
18-
require "chandler/tasks"
19-
20-
# Add chandler as a prerequisite for `rake release`
21-
task "release:rubygem_push" => "chandler:push"

devise-bootstrap-form.gemspec

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Gem::Specification.new do |spec|
3131
raise "RubyGems 2.0 or newer is required to protect against public gem pushes."
3232
end
3333

34-
spec.required_ruby_version = ">= 2.6"
34+
spec.required_ruby_version = ">= 3.2"
3535

3636
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
3737
spec.bindir = "exe"
@@ -43,10 +43,6 @@ Gem::Specification.new do |spec|
4343
# we add a new partial.
4444
spec.add_dependency "devise", ">= 4.6.0"
4545
spec.add_dependency "rails", ">= 5.0.0"
46-
spec.add_development_dependency "bundler"
47-
spec.add_development_dependency "chandler"
48-
spec.add_development_dependency "pry"
49-
spec.add_development_dependency "rake"
5046
spec.metadata = {
5147
"rubygems_mfa_required" => "true"
5248
}

lib/generators/devise/views/bootstrap_form_generator.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ def copy_views
3131
def copy_assets
3232
directory "assets/stylesheets", "app/assets/stylesheets"
3333
target_file = if File.exist?("app/assets/stylesheets/application.bootstrap.scss")
34-
"app/assets/stylesheets/application.bootstrap.scss"
35-
else
36-
"app/assets/stylesheets/application.scss"
37-
end
34+
"app/assets/stylesheets/application.bootstrap.scss"
35+
else
36+
"app/assets/stylesheets/application.scss"
37+
end
3838
append_to_file target_file do
3939
'@import "devise_bootstrap_form";'
4040
end

test/es_rails_app/.rubocop.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Omakase Ruby styling for Rails
2-
inherit_gem: { rubocop-rails-omakase: rubocop.yml }
2+
# inherit_gem: { rubocop-rails-omakase: rubocop.yml }
33

44
# Overwrite or add rules to create your own house style
55
#

test/es_rails_app/Gemfile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,6 @@ group :development, :test do
4444

4545
# Static analysis for security vulnerabilities [https://brakemanscanner.org/]
4646
gem "brakeman", require: false
47-
48-
# Omakase Ruby styling [https://github.com/rails/rubocop-rails-omakase/]
49-
gem "rubocop-rails-omakase", require: false
5047
end
5148

5249
group :development do

test/rails_app/.rubocop.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Omakase Ruby styling for Rails
2-
inherit_gem: { rubocop-rails-omakase: rubocop.yml }
2+
# inherit_gem: { rubocop-rails-omakase: rubocop.yml }
33

44
# Overwrite or add rules to create your own house style
55
#

0 commit comments

Comments
 (0)