Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
44135dc
commit 14
hungdmh Aug 12, 2020
9b0d4ce
commit 15
hungdmh Aug 12, 2020
ad4d981
commit 16
hungdmh Aug 12, 2020
a4558d5
commit 17
hungdmh Aug 12, 2020
11be78b
commit 18
hungdmh Aug 12, 2020
96cbba1
commit 19
hungdmh Aug 12, 2020
af3ff49
commit 20
hungdmh Aug 12, 2020
1a9d374
commit 21
hungdmh Aug 12, 2020
cb57b7b
commit 22
hungdmh Aug 12, 2020
3c31dd0
commit 23
hungdmh Aug 12, 2020
3c4ae0d
commit 24
hungdmh Aug 12, 2020
2d8115c
commit 25
hungdmh Aug 12, 2020
1038c5f
commit 26
hungdmh Aug 12, 2020
938f881
commit 26
hungdmh Aug 12, 2020
48cd340
commit 27
hungdmh Aug 12, 2020
660d1ba
commit 28
hungdmh Aug 13, 2020
021f853
commit 29
hungdmh Aug 13, 2020
99a5a88
commit 30
hungdmh Aug 13, 2020
136ac15
commit 31
hungdmh Aug 13, 2020
017e305
commit 32
hungdmh Aug 13, 2020
b4e8c62
commit 33
hungdmh Aug 14, 2020
ee4764c
commit 34
hungdmh Aug 14, 2020
e2376b5
commit 35
hungdmh Aug 14, 2020
971af9c
commit 36
hungdmh Aug 14, 2020
1365b24
commit 37
hungdmh Aug 14, 2020
3019ffc
commit 38
hungdmh Aug 14, 2020
875e008
commit 39
hungdmh Aug 14, 2020
8e8e345
commit 40
hungdmh Aug 14, 2020
1d6dc68
commit 41
hungdmh Aug 16, 2020
22d3e92
caching test 1
hungdmh Aug 21, 2020
19ae979
caching test 2
hungdmh Aug 21, 2020
2622ac1
caching test 3
hungdmh Aug 21, 2020
3752565
caching test 4
mhughdo Aug 31, 2020
748846a
caching test 5
mhughdo Aug 31, 2020
3136c31
caching test 6
mhughdo Aug 31, 2020
47c58a7
caching test 7
mhughdo Aug 31, 2020
e0f00e9
caching test 8
mhughdo Aug 31, 2020
79c819a
caching test 9
mhughdo Aug 31, 2020
4966f4f
caching test 10
mhughdo Aug 31, 2020
2df333c
caching test 11
mhughdo Aug 31, 2020
a6800ee
caching test 12
mhughdo Aug 31, 2020
bc43e62
caching test 13
mhughdo Aug 31, 2020
7e47107
caching test 14
mhughdo Aug 31, 2020
83f0696
caching test 15
mhughdo Aug 31, 2020
01a0774
caching test 16
mhughdo Aug 31, 2020
3760c5a
caching test 16
mhughdo Aug 31, 2020
f804e0f
caching test 17
mhughdo Aug 31, 2020
9e9cb57
caching test 18
mhughdo Aug 31, 2020
e598016
caching test 19
mhughdo Aug 31, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified .DS_Store
Binary file not shown.
32 changes: 18 additions & 14 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,23 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: |
sudo curl -o /usr/bin/framgia-ci https://raw.githubusercontent.com/framgia/ci-report-tool/master/dist/framgia-ci
sudo chmod +x /usr/bin/framgia-ci
sudo apt install python3-pip
sudo apt install libcurl4-openssl-dev libssl-dev
sudo apt-get install -y python3-setuptools
- run: |
yes | pip3 install wheel
pip3 install framgia-ci
pip3 uninstall --yes cleo clikit
yes | pip3 install cleo==0.6.8
- name: Run CI
- run: sudo gem install bundler:1.17.2
- uses: actions/cache@v2
with:
path: api/vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-
- name: Install gemfilee
run: |
cd api
ls -la && pwd
framgia-ci run --local
bundle config path vendor/bundle
bundle install
- name: Rubocop
run: cd api && bundle exec rubocop -c .rubocop.yml
- name: Rails Best Practices
run: cd api && bundle exec rails_best_practices -e "db/schema.rb,db/migrate,vendor,app/models/application_record.rb"
- name: Rpec
run: cd api && bundle exec rspec --format documentation
- name: reek
run: cd api && bundle exec reek
Binary file modified api/.DS_Store
Binary file not shown.
1 change: 0 additions & 1 deletion api/.rspec
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
--color
--require spec_helper
98 changes: 45 additions & 53 deletions api/.rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,25 @@ inherit_from:
AllCops:
# Include gemspec and Rakefile
Include:
- 'app/**/*'
- 'lib/**/*'
- '**/*.gemspec'
- 'Gemfile'
- "app/**/*"
- "lib/**/*"
- "**/*.gemspec"
- "Gemfile"
Exclude:
- 'vendor/**/*'
- 'config/unicorn.rb'
- 'bin/*'
- 'db/**/*'
- 'spec/**/*'
- 'script/rails'
- 'config/**/*'
- 'app/views/**/*'
- 'app/assets/**/*'
- 'app/javascript/**/*'
- '.idea/**/*'
- '**/.DS_Store'
- '**/.keep'
- "vendor/**/*"
- "api/vendor/**/*"
- "config/unicorn.rb"
- "bin/*"
- "db/**/*"
- "spec/**/*"
- "script/rails"
- "config/**/*"
- "app/views/**/*"
- "app/assets/**/*"
- "app/javascript/**/*"
- ".idea/**/*"
- "**/.DS_Store"
- "**/.keep"

# Indent private/protected/public as deep as method definitions
Layout/AccessModifierIndentation:
Expand All @@ -40,7 +41,7 @@ Layout/AccessModifierIndentation:
- indent

# Align the elements of a hash literal if they span more than one line.
Layout/AlignHash:
Layout/HashAlignment:
# Alignment of entries using hash rocket as separator. Valid values are:
#
# key - left alignment of keys
Expand Down Expand Up @@ -103,7 +104,7 @@ Layout/AlignHash:
- ignore_implicit
- ignore_explicit

Layout/AlignParameters:
Layout/ParameterAlignment:
# Alignment of parameters in multi-line method calls.
#
# The `with_first_parameter` style aligns the following lines along the same column
Expand All @@ -130,12 +131,6 @@ Metrics/AbcSize:
# a Float.
Max: 20

Style/BracesAroundHashParameters:
EnforcedStyle: no_braces
SupportedStyles:
- braces
- no_braces

# Indentation of `when`.
Layout/CaseIndentation:
EnforcedStyle: case
Expand Down Expand Up @@ -172,7 +167,7 @@ Style/ClassCheck:
- kind_of?

Metrics/ClassLength:
CountComments: false # count full line comments?
CountComments: false # count full line comments?
Max: 100

# Align with the style guide.
Expand All @@ -184,11 +179,11 @@ Style/CollectionMethods:
# PreferredMethods:
# find: detect
PreferredMethods:
collect: 'map'
collect!: 'map!'
inject: 'reduce'
detect: 'find'
find_all: 'select'
collect: "map"
collect!: "map!"
inject: "reduce"
detect: "find"
find_all: "select"

# Checks formatting of special comments
Style/CommentAnnotation:
Expand Down Expand Up @@ -233,9 +228,9 @@ Layout/EmptyLinesAroundModuleBody:

Naming/FileName:
Exclude:
- '**/Rakefile'
- '**/Gemfile'
- '**/Capfile'
- "**/Rakefile"
- "**/Gemfile"
- "**/Capfile"

# Checks use of for or each in multiline loops.
Style/For:
Expand Down Expand Up @@ -268,7 +263,7 @@ Style/HashSyntax:
- hash_rockets

# Checks the indentation of the first key in a hash literal.
Layout/IndentFirstHashElement:
Layout/FirstHashElementIndentation:
# The value `special_inside_parentheses` means that hash literals with braces
# that have their opening brace on the same line as a surrounding opening
# round parenthesis, shall have their first key indented relative to the
Expand All @@ -287,13 +282,12 @@ Style/LambdaCall:
- call
- braces

Metrics/LineLength:
Max: 80
Layout/LineLength:
Max: 120
AllowURI: true
Exclude:
- config/routes.rb


Style/Next:
# With `always` all conditions at the end of an iteration needs to be
# replace by next - with `skip_modifier_ifs` the modifier if like this one
Expand All @@ -319,7 +313,7 @@ Style/MethodDefParentheses:
- require_no_parentheses

Metrics/MethodLength:
CountComments: false # count full line comments?
CountComments: false # count full line comments?
Max: 10

Naming/MethodName:
Expand All @@ -341,18 +335,18 @@ Style/ParenthesesAroundCondition:

Style/PercentLiteralDelimiters:
PreferredDelimiters:
'%': ()
'%i': ()
'%q': ()
'%Q': ()
'%r': '{}'
'%s': ()
'%w': ()
'%W': ()
'%x': ()
"%": ()
"%i": ()
"%q": ()
"%Q": ()
"%r": "{}"
"%s": ()
"%w": ()
"%W": ()
"%x": ()

Naming/PredicateName:
NamePrefixBlacklist:
ForbiddenPrefixes:
- get_

Style/RaiseArgs:
Expand All @@ -361,7 +355,6 @@ Style/RaiseArgs:
- compact # raise Exception.new(msg)
- exploded # raise Exception, msg


Style/RedundantReturn:
# When true allows code like `return x, y`.
AllowMultipleReturnValues: false
Expand All @@ -382,7 +375,6 @@ Style/SignalException:
- only_fail
- semantic


Style/SingleLineBlockParams:
Methods:
- reduce:
Expand Down Expand Up @@ -430,7 +422,7 @@ Layout/SpaceInsideHashLiteralBraces:
- space
- no_space

Layout/TrailingBlankLines:
Layout/TrailingEmptyLines:
EnforcedStyle: final_newline
SupportedStyles:
- final_newline
Expand Down Expand Up @@ -483,7 +475,7 @@ Style/TrivialAccessors:
#
# Commonly used in DSLs
AllowDSLWriters: false
Whitelist:
AllowedMethods:
- to_ary
- to_a
- to_c
Expand Down
12 changes: 6 additions & 6 deletions api/.rubocop_disabled.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

Style/FrozenStringLiteralComment:
Description: >-
Add the frozen_string_literal comment to the top of files
to help transition from Ruby 2.3.0 to Ruby 3.0.
Add the frozen_string_literal comment to the top of files
to help transition from Ruby 2.3.0 to Ruby 3.0.
Enabled: false

Style/InlineComment:
Expand Down Expand Up @@ -50,13 +50,13 @@ Metrics/CyclomaticComplexity:
Description: "Avoid complex methods."
Enabled: false

Layout/AlignArray:
Layout/ArrayAlignment:
Description: >-
Align the elements of an array literal if they span more than
one line.
Align the elements of an array literal if they span more than
one line.
Enabled: false

Style/UnneededPercentQ:
Style/RedundantPercentQ:
Description: "Checks for %q/%Q when single quotes or double quotes would do."
Enabled: false

Expand Down
Loading