Skip to content

Commit 3d7a312

Browse files
ngocvt-048422026536truongducquang
authored andcommitted
Update pull_request_template.md
chapter_3_4_5 chapter_3_4_5 chapter_3_4_5 chapter_3_4_5" chapter_3_4_5
1 parent 31947a7 commit 3d7a312

39 files changed

+606
-100
lines changed

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
# Ignore bundler config.
88
/.bundle
99

10+
# Ignore all environment files.
11+
/.env*
12+
1013
# Ignore all logfiles and tempfiles.
1114
/log/*
1215
/tmp/*
@@ -31,3 +34,7 @@
3134
/config/master.key
3235
/config/database.yml
3336
/test/*
37+
38+
config/settings.local.yml
39+
config/settings/*.local.yml
40+
config/environments/*.local.yml

.rubocop.yml

Lines changed: 69 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This is rubocop configuration file for Sun-Asterisk's coding style. Enabling and disabling is configured
1+
# This is rubocop configuration file for Sun-Asterisk"s coding style. Enabling and disabling is configured
22
# in separate files. This file adds all other parameters apart from Enabled.
33

44
# Add this to load Rails extension for rubocop
@@ -9,29 +9,52 @@ inherit_from:
99
- .rubocop_enabled.yml
1010
- .rubocop_disabled.yml
1111

12+
Style/StringLiterals:
13+
EnforcedStyle: double_quotes
14+
SupportedStyles:
15+
- single_quotes
16+
- double_quotes
17+
18+
Layout/TrailingEmptyLines:
19+
Enabled: true
20+
21+
Layout/EmptyLineBetweenDefs:
22+
Enabled: true
23+
24+
Style/PercentLiteralDelimiters:
25+
PreferredDelimiters:
26+
default: ()
27+
w: ()
28+
i: ()
29+
30+
Style/WordArray:
31+
Enabled: true
32+
Style/SymbolArray:
33+
Enabled: true
34+
1235
# Common configuration.
1336
AllCops:
1437
# Include gemspec and Rakefile
1538
SuggestExtensions: false
1639
Include:
17-
- 'app/**/*'
18-
- 'lib/**/*'
19-
- '**/*.gemspec'
20-
- 'Gemfile'
40+
- "app/**/*"
41+
- "lib/**/*"
42+
- "**/*.gemspec"
43+
- "Gemfile"
2144
Exclude:
22-
- 'vendor/**/*'
23-
- 'config/unicorn.rb'
24-
- 'bin/*'
25-
- 'db/**/*'
26-
- 'spec/**/*'
27-
- 'script/rails'
28-
- 'config/**/*'
29-
- 'app/views/**/*'
30-
- 'app/assets/**/*'
31-
- 'app/javascript/**/*'
32-
- '.idea/**/*'
33-
- '**/.DS_Store'
34-
- '**/.keep'
45+
- "vendor/**/*"
46+
- "config/unicorn.rb"
47+
- "bin/*"
48+
- "db/**/*"
49+
- "spec/**/*"
50+
- "script/rails"
51+
- "config/**/*"
52+
- "app/views/**/*"
53+
- "app/assets/**/*"
54+
- "app/javascript/**/*"
55+
- ".idea/**/*"
56+
- "**/.DS_Store"
57+
- "**/.keep"
3558

3659
# Indent private/protected/public as deep as method definitions
3760
Layout/AccessModifierIndentation:
@@ -45,14 +68,14 @@ Layout/HashAlignment:
4568
# Alignment of entries using hash rocket as separator. Valid values are:
4669
#
4770
# key - left alignment of keys
48-
# 'a' => 2
49-
# 'bb' => 3
71+
# "a" => 2
72+
# "bb" => 3
5073
# separator - alignment of hash rockets, keys are right aligned
51-
# 'a' => 2
52-
# 'bb' => 3
74+
# "a" => 2
75+
# "bb" => 3
5376
# table - left alignment of keys, hash rockets, and values
54-
# 'a' => 2
55-
# 'bb' => 3
77+
# "a" => 2
78+
# "bb" => 3
5679
EnforcedHashRocketStyle: key
5780
# Alignment of entries using colon as separator. Valid values are:
5881
#
@@ -179,11 +202,11 @@ Style/CollectionMethods:
179202
# PreferredMethods:
180203
# find: detect
181204
PreferredMethods:
182-
collect: 'map'
183-
collect!: 'map!'
184-
inject: 'reduce'
185-
detect: 'find'
186-
find_all: 'select'
205+
collect: "map"
206+
collect!: "map!"
207+
inject: "reduce"
208+
detect: "find"
209+
find_all: "select"
187210

188211
# Checks formatting of special comments
189212
Style/CommentAnnotation:
@@ -207,7 +230,7 @@ Layout/DotPosition:
207230

208231
# Use empty lines between defs.
209232
Layout/EmptyLineBetweenDefs:
210-
# If true, this parameter means that single line method definitions don't
233+
# If true, this parameter means that single line method definitions don"t
211234
# need an empty line between them.
212235
AllowAdjacentOneLineDefs: false
213236

@@ -228,9 +251,9 @@ Layout/EmptyLinesAroundModuleBody:
228251

229252
Naming/FileName:
230253
Exclude:
231-
- '**/Rakefile'
232-
- '**/Gemfile'
233-
- '**/Capfile'
254+
- "**/Rakefile"
255+
- "**/Gemfile"
256+
- "**/Capfile"
234257

235258
# Checks use of for or each in multiline loops.
236259
Style/For:
@@ -282,7 +305,7 @@ Style/LambdaCall:
282305
- call
283306
- braces
284307

285-
Metrics/LineLength:
308+
Layout/LineLength:
286309
Max: 80
287310
AllowURI: true
288311
Exclude:
@@ -292,7 +315,7 @@ Metrics/LineLength:
292315
Style/Next:
293316
# With `always` all conditions at the end of an iteration needs to be
294317
# replace by next - with `skip_modifier_ifs` the modifier if like this one
295-
# are ignored: [1, 2].each { |a| return 'yes' if a == 1 }
318+
# are ignored: [1, 2].each { |a| return "yes" if a == 1 }
296319
EnforcedStyle: skip_modifier_ifs
297320
SupportedStyles:
298321
- skip_modifier_ifs
@@ -336,15 +359,15 @@ Style/ParenthesesAroundCondition:
336359

337360
Style/PercentLiteralDelimiters:
338361
PreferredDelimiters:
339-
'%': ()
340-
'%i': ()
341-
'%q': ()
342-
'%Q': ()
343-
'%r': '{}'
344-
'%s': ()
345-
'%w': ()
346-
'%W': ()
347-
'%x': ()
362+
"%": ()
363+
"%i": ()
364+
"%q": ()
365+
"%Q": ()
366+
"%r": "{}"
367+
"%s": ()
368+
"%w": ()
369+
"%W": ()
370+
"%x": ()
348371

349372
Naming/PredicateName:
350373
ForbiddenPrefixes:
@@ -464,12 +487,12 @@ Style/TrailingCommaInHashLiteral:
464487
- consistent_comma
465488
- no_comma
466489

467-
# TrivialAccessors doesn't require exact name matches and doesn't allow
490+
# TrivialAccessors doesn"t require exact name matches and doesn"t allow
468491
# predicated methods by default.
469492
Style/TrivialAccessors:
470493
ExactNameMatch: false
471494
AllowPredicates: false
472-
# Allows trivial writers that don't end in an equal sign. e.g.
495+
# Allows trivial writers that don"t end in an equal sign. e.g.
473496
#
474497
# def on_exception(action)
475498
# @on_exception=action

.rubocop_enabled.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -508,17 +508,17 @@ Layout/TrailingEmptyLines:
508508
Enabled: true
509509

510510
Style/TrailingCommaInArguments:
511-
Description: 'Checks for trailing comma in argument lists.'
512-
StyleGuide: '#no-trailing-params-comma'
511+
Description: "Checks for trailing comma in argument lists."
512+
StyleGuide: "#no-trailing-params-comma"
513513
Enabled: true
514514

515515
Style/TrailingCommaInArrayLiteral:
516-
Description: 'Checks for trailing comma in array literals.'
517-
StyleGuide: '#no-trailing-array-commas'
516+
Description: "Checks for trailing comma in array literals."
517+
StyleGuide: "#no-trailing-array-commas"
518518
Enabled: true
519519

520520
Style/TrailingCommaInHashLiteral:
521-
Description: 'Checks for trailing comma in hash literals.'
521+
Description: "Checks for trailing comma in hash literals."
522522
Enabled: true
523523

524524
Layout/TrailingWhitespace:

Gemfile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ gem "puma", "~> 5.0"
1818
# Use JavaScript with ESM import maps [https://github.com/rails/importmap-rails]
1919
gem "importmap-rails"
2020

21+
# Load environment variables from .env file
22+
gem "dotenv-rails", groups: %i(development test)
23+
2124
# Hotwire's SPA-like page accelerator [https://turbo.hotwired.dev]
2225
gem "turbo-rails"
2326

@@ -43,7 +46,10 @@ gem "tzinfo-data", platforms: %i(mingw mswin x64_mingw jruby)
4346
gem "bootsnap", require: false
4447

4548
# Use Sass to process CSS
46-
# gem "sassc-rails"
49+
gem "bootstrap-sass", "3.4.1"
50+
gem "config"
51+
gem "rails-i18n", "~> 7.0"
52+
gem "sassc-rails"
4753

4854
# Use Active Storage variants [https://guides.rubyonrails.org/active_storage_overview.html]
4955
# gem "image_processing", "~> 1.2"

Gemfile.lock

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,15 @@ GEM
6969
addressable (2.8.5)
7070
public_suffix (>= 2.0.2, < 6.0)
7171
ast (2.4.2)
72+
autoprefixer-rails (10.4.21.0)
73+
execjs (~> 2)
7274
base64 (0.1.1)
7375
bindex (0.8.1)
7476
bootsnap (1.16.0)
7577
msgpack (~> 1.2)
78+
bootstrap-sass (3.4.1)
79+
autoprefixer-rails (>= 5.2.1)
80+
sassc (>= 2.0.0)
7681
builder (3.2.4)
7782
capybara (3.39.2)
7883
addressable
@@ -84,12 +89,22 @@ GEM
8489
regexp_parser (>= 1.5, < 3.0)
8590
xpath (~> 3.2)
8691
concurrent-ruby (1.2.2)
92+
config (5.6.1)
93+
deep_merge (~> 1.2, >= 1.2.1)
94+
ostruct
8795
crass (1.0.6)
8896
date (3.3.3)
8997
debug (1.8.0)
9098
irb (>= 1.5.0)
9199
reline (>= 0.3.1)
100+
deep_merge (1.2.2)
101+
dotenv (3.1.8)
102+
dotenv-rails (3.1.8)
103+
dotenv (= 3.1.8)
104+
railties (>= 6.1)
92105
erubi (1.12.0)
106+
execjs (2.10.0)
107+
ffi (1.17.2-x86_64-linux-gnu)
93108
globalid (1.1.0)
94109
activesupport (>= 5.0)
95110
i18n (1.14.1)
@@ -132,6 +147,7 @@ GEM
132147
nio4r (2.5.9)
133148
nokogiri (1.15.4-x86_64-linux)
134149
racc (~> 1.4)
150+
ostruct (0.6.3)
135151
parallel (1.23.0)
136152
parser (3.2.2.3)
137153
ast (~> 2.4.1)
@@ -164,6 +180,9 @@ GEM
164180
rails-html-sanitizer (1.6.0)
165181
loofah (~> 2.21)
166182
nokogiri (~> 1.14)
183+
rails-i18n (7.0.10)
184+
i18n (>= 0.7, < 2)
185+
railties (>= 6.0.0, < 8)
167186
railties (7.0.7)
168187
actionpack (= 7.0.7)
169188
activesupport (= 7.0.7)
@@ -199,6 +218,14 @@ GEM
199218
rubocop (>= 1.7.0, < 2.0)
200219
ruby-progressbar (1.13.0)
201220
rubyzip (2.3.2)
221+
sassc (2.4.0)
222+
ffi (~> 1.9)
223+
sassc-rails (2.1.2)
224+
railties (>= 4.0.0)
225+
sassc (>= 2.0)
226+
sprockets (> 3.0)
227+
sprockets-rails
228+
tilt
202229
selenium-webdriver (4.10.0)
203230
rexml (~> 3.2, >= 3.2.5)
204231
rubyzip (>= 1.2.2, < 3.0)
@@ -213,6 +240,7 @@ GEM
213240
stimulus-rails (1.2.2)
214241
railties (>= 6.0.0)
215242
thor (1.2.2)
243+
tilt (2.6.1)
216244
timeout (0.4.0)
217245
turbo-rails (1.4.0)
218246
actionpack (>= 6.0.0)
@@ -243,16 +271,21 @@ PLATFORMS
243271

244272
DEPENDENCIES
245273
bootsnap
274+
bootstrap-sass (= 3.4.1)
246275
capybara
276+
config
247277
debug
278+
dotenv-rails
248279
importmap-rails
249280
jbuilder
250281
mysql2 (~> 0.5)
251282
puma (~> 5.0)
252283
rails (~> 7.0.5)
284+
rails-i18n (~> 7.0)
253285
rubocop (~> 1.26)
254286
rubocop-checkstyle_formatter
255287
rubocop-rails (~> 2.14.0)
288+
sassc-rails
256289
selenium-webdriver
257290
sprockets-rails
258291
stimulus-rails

0 commit comments

Comments
 (0)