Skip to content

Commit ba24996

Browse files
committed
add frozen for rubocop
1 parent a62cf4a commit ba24996

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+125
-56
lines changed

.idea/la-mission-parfaite.iml

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.rubocop.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
require:
2+
- rubocop-rails
3+
- rubocop-rspec
4+
5+
RSpec/DescribeClass:
6+
IgnoredMetadata:
7+
type:
8+
- request
9+
- controller
10+
11+
Metrics/BlockLength:
12+
IgnoredMethods: [ 'describe', 'context' ]

Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ group :development, :test do
3737
gem 'ffaker', '~> 2.18', '>= 2.20'
3838
gem 'rspec-rails', '~> 5.0', '>= 5.0.1'
3939
gem 'shoulda-matchers', '~> 4.5', '>= 4.5.1'
40+
gem 'rubocop-rails', require: false
4041
end
4142

4243
group :development do

Gemfile.lock

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ GEM
6262
zeitwerk (~> 2.3)
6363
addressable (2.8.0)
6464
public_suffix (>= 2.0.2, < 5.0)
65+
ast (2.4.2)
6566
bcrypt (3.1.16)
6667
better_errors (2.9.1)
6768
coderay (>= 1.0.0)
@@ -141,6 +142,9 @@ GEM
141142
nokogiri (1.12.5-x86_64-linux)
142143
racc (~> 1.4)
143144
orm_adapter (0.5.0)
145+
parallel (1.21.0)
146+
parser (3.0.2.0)
147+
ast (~> 2.4.1)
144148
pg (1.2.3)
145149
public_suffix (4.0.6)
146150
puma (5.5.2)
@@ -183,6 +187,7 @@ GEM
183187
method_source
184188
rake (>= 0.13)
185189
thor (~> 1.0)
190+
rainbow (3.0.0)
186191
rake (13.0.6)
187192
rb-fsevent (0.11.0)
188193
rb-inotify (0.10.1)
@@ -209,6 +214,22 @@ GEM
209214
rspec-mocks (~> 3.10)
210215
rspec-support (~> 3.10)
211216
rspec-support (3.10.2)
217+
rubocop (1.22.1)
218+
parallel (~> 1.10)
219+
parser (>= 3.0.0.0)
220+
rainbow (>= 2.2.2, < 4.0)
221+
regexp_parser (>= 1.8, < 3.0)
222+
rexml
223+
rubocop-ast (>= 1.12.0, < 2.0)
224+
ruby-progressbar (~> 1.7)
225+
unicode-display_width (>= 1.4.0, < 3.0)
226+
rubocop-ast (1.12.0)
227+
parser (>= 3.0.1.1)
228+
rubocop-rails (2.12.4)
229+
activesupport (>= 4.2.0)
230+
rack (>= 1.1)
231+
rubocop (>= 1.7.0, < 2.0)
232+
ruby-progressbar (1.11.0)
212233
ruby-vips (2.1.3)
213234
ffi (~> 1.12)
214235
rubyzip (2.3.2)
@@ -244,6 +265,7 @@ GEM
244265
turbolinks-source (5.2.0)
245266
tzinfo (2.0.4)
246267
concurrent-ruby (~> 1.0)
268+
unicode-display_width (2.1.0)
247269
warden (1.2.9)
248270
rack (>= 2.0.9)
249271
web-console (4.1.0)
@@ -297,6 +319,7 @@ DEPENDENCIES
297319
rails (~> 6.1.3)
298320
rexml (~> 3.2, >= 3.2.4)
299321
rspec-rails (~> 5.0, >= 5.0.1)
322+
rubocop-rails
300323
sass-rails (>= 6)
301324
selenium-webdriver
302325
shoulda-matchers (~> 4.5, >= 4.5.1)

app/controllers/application_controller.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
class ApplicationController < ActionController::Base
24
rescue_from Pundit::NotAuthorizedError, with: :render_401
35

app/controllers/cities_controller.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
class CitiesController < ApplicationController
24
helper_method :city, :cities
35

app/controllers/errors_controller.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
class ErrorsController < ApplicationController
24
helper_method :errors
35

app/controllers/gateways_controller.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
class GatewaysController < ApplicationController
24
def user
35
redirect_to static_pages_home_path if session_password_match?

app/controllers/restaurants_controller.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
class RestaurantsController < ApplicationController
24
helper_method :restaurant, :restaurants
35
include RestaurantsHelper
@@ -31,5 +33,3 @@ def params_restaurant
3133
params.require(:restaurant).permit(:vegan, :city_id, :name)
3234
end
3335
end
34-
35-

app/controllers/static_pages_controller.rb

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
1+
# frozen_string_literal: true
2+
13
class StaticPagesController < ApplicationController
24
before_action :home_redirection
35

4-
def home
5-
6-
end
7-
8-
def refund
9-
10-
end
6+
def home; end
7+
def refund; end
118

129
private
1310

0 commit comments

Comments
 (0)