forked from mikhaillopandia/Ruby
-
Notifications
You must be signed in to change notification settings - Fork 0
/
0001-fix-rubocop-issues.patch
169 lines (160 loc) · 4.42 KB
/
0001-fix-rubocop-issues.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
From aa0b359286c89b4a787e0bee5c6d5395ad295354 Mon Sep 17 00:00:00 2001
From: Roman Parashchenko <romikoops1@gmail.com>
Date: Wed, 18 Apr 2018 21:45:47 +0200
Subject: [PATCH] fix rubocop issues
---
.rubocop.yml | 28 +++++++++++++++++++++++++-
.rubocop_todo.yml | 58 -----------------------------------------------------
.ruby-version | 2 +-
Gemfile | 2 +-
Gemfile.lock | 2 +-
test/test_helper.rb | 10 +++++----
6 files changed, 36 insertions(+), 66 deletions(-)
delete mode 100644 .rubocop_todo.yml
diff --git a/.rubocop.yml b/.rubocop.yml
index cc32da4..ab6d4c2 100644
--- a/.rubocop.yml
+++ b/.rubocop.yml
@@ -1 +1,27 @@
-inherit_from: .rubocop_todo.yml
+AllCops:
+ TargetRubyVersion: 2.4
+ ExtraDetails: true
+ DisplayCopNames: true
+ DisplayStyleGuide: true
+ Exclude:
+ - db/schema.rb
+ - vendor/**/*
+Rails:
+ Enabled: true
+
+Style/FrozenStringLiteralComment:
+ Enabled: false
+
+Metrics/LineLength:
+ Max: 120
+
+Style/MixinUsage:
+ Exclude:
+ - 'bin/setup'
+ - 'bin/update'
+
+Style/Documentation:
+ Enabled: false
+
+Style/NumericLiterals:
+ Exclude:
diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml
deleted file mode 100644
index 3fd7399..0000000
--- a/.rubocop_todo.yml
+++ /dev/null
@@ -1,58 +0,0 @@
-# This configuration was generated by
-# `rubocop --auto-gen-config`
-# on 2018-04-16 18:11:54 +0300 using RuboCop version 0.54.0.
-# The point is for the user to remove these configuration records
-# one by one as the offenses are removed from the code base.
-# Note that changes in the inspected code, or installation of new
-# versions of RuboCop, may require this file to be generated again.
-
-# Offense count: 1
-# Cop supports --auto-correct.
-# Configuration parameters: AutoCorrect, EnforcedStyle.
-# SupportedStyles: nested, compact
-Style/ClassAndModuleChildren:
- Exclude:
- - 'test/test_helper.rb'
-
-# Offense count: 11
-Style/Documentation:
- Exclude:
- - 'spec/**/*'
- - 'test/**/*'
- - 'app/controllers/welcome_controller.rb'
- - 'app/helpers/application_helper.rb'
- - 'app/helpers/articles_helper.rb'
- - 'app/helpers/comments_helper.rb'
- - 'app/helpers/welcome_helper.rb'
- - 'app/mailers/application_mailer.rb'
- - 'app/models/application_record.rb'
- - 'app/models/comment.rb'
- - 'config/application.rb'
- - 'db/migrate/20180416121455_create_articles.rb'
- - 'db/migrate/20180416133452_create_comments.rb'
-
-# Offense count: 54
-# Cop supports --auto-correct.
-# Configuration parameters: EnforcedStyle.
-# SupportedStyles: when_needed, always, never
-Style/FrozenStringLiteralComment:
- Enabled: false
-
-# Offense count: 2
-Style/MixinUsage:
- Exclude:
- - 'bin/setup'
- - 'bin/update'
-
-# Offense count: 1
-# Cop supports --auto-correct.
-# Configuration parameters: MinDigits, Strict.
-Style/NumericLiterals:
- Exclude:
- - 'db/schema.rb'
-
-# Offense count: 17
-# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
-# URISchemes: http, https
-Metrics/LineLength:
- Max: 130
diff --git a/.ruby-version b/.ruby-version
index 58073ef..35cee72 100644
--- a/.ruby-version
+++ b/.ruby-version
@@ -1 +1 @@
-2.4.1
\ No newline at end of file
+2.4.3
diff --git a/Gemfile b/Gemfile
index 775dd01..18e8db3 100644
--- a/Gemfile
+++ b/Gemfile
@@ -1,7 +1,7 @@
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
-ruby '2.4.1'
+ruby '2.4.3'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.2.0'
diff --git a/Gemfile.lock b/Gemfile.lock
index 3fbd62b..a8debc5 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -212,7 +212,7 @@ DEPENDENCIES
web-console (>= 3.3.0)
RUBY VERSION
- ruby 2.4.1p111
+ ruby 2.4.3p205
BUNDLED WITH
1.16.1
diff --git a/test/test_helper.rb b/test/test_helper.rb
index 3ab84e3..0d5c9bc 100644
--- a/test/test_helper.rb
+++ b/test/test_helper.rb
@@ -2,9 +2,11 @@ ENV['RAILS_ENV'] ||= 'test'
require_relative '../config/environment'
require 'rails/test_help'
-class ActiveSupport::TestCase
- # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order.
- fixtures :all
+module ActiveSupport
+ class TestCase
+ # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order.
+ fixtures :all
- # Add more helper methods to be used by all tests here...
+ # Add more helper methods to be used by all tests here...
+ end
end
--
2.15.1 (Apple Git-101)