Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup login #10

Merged
merged 2 commits into from
Jul 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
42 changes: 42 additions & 0 deletions .github/workflows/linters.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Linters

on: pull_request

env:
FORCE_COLOR: 1

jobs:
rubocop:
name: Rubocop
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-ruby@v1
with:
ruby-version: 3.1.x
- name: Setup Rubocop
run: |
gem install --no-document rubocop -v '>= 1.0, < 2.0' # https://docs.rubocop.org/en/stable/installation/
[ -f .rubocop.yml ] || wget https://raw.githubusercontent.com/microverseinc/linters-config/master/ror/.rubocop.yml
- name: Rubocop Report
run: rubocop --color
stylelint:
name: Stylelint
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "18.x"
- name: Setup Stylelint
run: |
npm install --save-dev stylelint@13.x stylelint-scss@3.x stylelint-config-standard@21.x stylelint-csstree-validator@1.x
[ -f .stylelintrc.json ] || wget https://raw.githubusercontent.com/microverseinc/linters-config/master/ror/.stylelintrc.json
nodechecker:
name: node_modules checker
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Check node_modules existence
run: |
if [ -d "node_modules/" ]; then echo -e "\e[1;31mThe node_modules/ folder was pushed to the repo. Please remove it from the GitHub repository and try again."; echo -e "\e[1;32mYou can set up a .gitignore file with this folder included on it to prevent this from happening in the future." && exit 1; fi
60 changes: 60 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
AllCops:
NewCops: enable
Exclude:
- "db/**/*"
- "bin/*"
- "config/**/*"
- "Guardfile"
- "Rakefile"
- "node_modules/**/*"

DisplayCopNames: true

Layout/LineLength:
Max: 120
Metrics/MethodLength:
Include:
- "app/controllers/*"
- "app/models/*"
Max: 20
Metrics/AbcSize:
Include:
- "app/controllers/*"
- "app/models/*"
Max: 50
Metrics/ClassLength:
Max: 150
Metrics/BlockLength:
AllowedMethods: ['describe']
Max: 30

Style/Documentation:
Enabled: false
Style/ClassAndModuleChildren:
Enabled: false
Style/EachForSimpleLoop:
Enabled: false
Style/AndOr:
Enabled: false
Style/DefWithParentheses:
Enabled: false
Style/FrozenStringLiteralComment:
EnforcedStyle: never

Layout/HashAlignment:
EnforcedColonStyle: key
Layout/ExtraSpacing:
AllowForAlignment: false
Layout/MultilineMethodCallIndentation:
Enabled: true
EnforcedStyle: indented
Lint/RaiseException:
Enabled: false
Lint/StructNewOverride:
Enabled: false
Style/HashEachMethods:
Enabled: false
Style/HashTransformKeys:
Enabled: false
Style/HashTransformValues:
Enabled: false
1 change: 0 additions & 1 deletion .ruby-version

This file was deleted.

32 changes: 32 additions & 0 deletions .stylelintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"extends": ["stylelint-config-standard"],
"plugins": ["stylelint-scss", "stylelint-csstree-validator"],
"rules": {
"at-rule-no-unknown": [
true,
{
"ignoreAtRules": [
"tailwind",
"apply",
"variants",
"responsive",
"screen"
]
}
],
"scss/at-rule-no-unknown": [
true,
{
"ignoreAtRules": [
"tailwind",
"apply",
"variants",
"responsive",
"screen"
]
}
],
"csstree/validator": true
},
"ignoreFiles": ["build/**", "dist/**", "**/reset*.css", "**/bootstrap*.css"]
}
40 changes: 22 additions & 18 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
source "https://rubygems.org"
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

ruby "3.1.2"
ruby '>=3.1.2'

# Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main"
gem "rails", "~> 7.0.6"
gem 'rails', '~> 7.0.6'

# The original asset pipeline for Rails [https://github.com/rails/sprockets-rails]
gem "sprockets-rails"
gem 'sprockets-rails'

# Use postgresql as the database for Active Record
gem "pg", "~> 1.1"
gem 'pg', '~> 1.1'

# Use the Puma web server [https://github.com/puma/puma]
gem "puma", "~> 5.0"
gem 'puma', '~> 5.0'

# Use JavaScript with ESM import maps [https://github.com/rails/importmap-rails]
gem "importmap-rails"
gem 'importmap-rails'

# Hotwire's SPA-like page accelerator [https://turbo.hotwired.dev]
gem "turbo-rails"
gem 'turbo-rails'

# Hotwire's modest JavaScript framework [https://stimulus.hotwired.dev]
gem "stimulus-rails"
gem 'stimulus-rails'

# Use Tailwind CSS [https://github.com/rails/tailwindcss-rails]
gem "tailwindcss-rails"
gem 'tailwindcss-rails'

# Build JSON APIs with ease [https://github.com/rails/jbuilder]
gem "jbuilder"
gem 'jbuilder'

# Use Redis adapter to run Action Cable in production
# gem "redis", "~> 4.0"
Expand All @@ -40,10 +40,10 @@ gem "jbuilder"
# gem "bcrypt", "~> 3.1.7"

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem "tzinfo-data", platforms: %i[ mingw mswin x64_mingw jruby ]
gem 'tzinfo-data', platforms: %i[mingw mswin x64_mingw jruby]

# Reduces boot times through caching; required in config/boot.rb
gem "bootsnap", require: false
gem 'bootsnap', require: false

# Use Sass to process CSS
# gem "sassc-rails"
Expand All @@ -53,12 +53,12 @@ gem "bootsnap", require: false

group :development, :test do
# See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem
gem "debug", platforms: %i[ mri mingw x64_mingw ]
gem 'debug', platforms: %i[mri mingw x64_mingw]
end

group :development do
# Use console on exceptions pages [https://github.com/rails/web-console]
gem "web-console"
gem 'web-console'

# Add speed badges [https://github.com/MiniProfiler/rack-mini-profiler]
# gem "rack-mini-profiler"
Expand All @@ -69,7 +69,11 @@ end

group :test do
# Use system testing [https://guides.rubyonrails.org/testing.html#system-testing]
gem "capybara"
gem "selenium-webdriver"
gem "webdrivers"
gem 'capybara'
gem 'selenium-webdriver'
gem 'webdrivers'
end

gem 'devise'
gem 'letter_opener'
gem 'rubocop', '>= 1.0', '< 2.0'
48 changes: 48 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ GEM
tzinfo (~> 2.0)
addressable (2.8.4)
public_suffix (>= 2.0.2, < 6.0)
ast (2.4.2)
bcrypt (3.1.19)
bindex (0.8.1)
bootsnap (1.16.0)
msgpack (~> 1.2)
Expand All @@ -87,6 +89,12 @@ GEM
debug (1.8.0)
irb (>= 1.5.0)
reline (>= 0.3.1)
devise (4.9.2)
bcrypt (~> 3.0)
orm_adapter (~> 0.1)
railties (>= 4.1.0)
responders
warden (~> 1.2.3)
erubi (1.12.0)
globalid (1.1.0)
activesupport (>= 5.0)
Expand All @@ -101,6 +109,12 @@ GEM
jbuilder (2.11.5)
actionview (>= 5.0.0)
activesupport (>= 5.0.0)
json (2.6.3)
language_server-protocol (3.17.0.3)
launchy (2.5.2)
addressable (~> 2.8)
letter_opener (1.8.1)
launchy (>= 2.2, < 3)
loofah (2.21.3)
crass (~> 1.0.2)
nokogiri (>= 1.12.0)
Expand All @@ -125,8 +139,15 @@ GEM
net-smtp (0.3.3)
net-protocol
nio4r (2.5.9)
nokogiri (1.15.3-x86_64-darwin)
racc (~> 1.4)
nokogiri (1.15.3-x86_64-linux)
racc (~> 1.4)
orm_adapter (0.5.0)
parallel (1.23.0)
parser (3.2.2.3)
ast (~> 2.4.1)
racc
pg (1.5.3)
public_suffix (5.0.3)
puma (5.6.6)
Expand Down Expand Up @@ -163,11 +184,29 @@ GEM
rake (>= 12.2)
thor (~> 1.0)
zeitwerk (~> 2.5)
rainbow (3.1.1)
rake (13.0.6)
regexp_parser (2.8.1)
reline (0.3.7)
io-console (~> 0.5)
responders (3.1.0)
actionpack (>= 5.2)
railties (>= 5.2)
rexml (3.2.6)
rubocop (1.55.1)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.2.2.3)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.28.1, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.29.0)
parser (>= 3.2.1.0)
ruby-progressbar (1.13.0)
rubyzip (2.3.2)
selenium-webdriver (4.10.0)
rexml (~> 3.2, >= 3.2.5)
Expand All @@ -182,6 +221,8 @@ GEM
sprockets (>= 3.0.0)
stimulus-rails (1.2.1)
railties (>= 6.0.0)
tailwindcss-rails (2.0.30-x86_64-darwin)
railties (>= 6.0.0)
tailwindcss-rails (2.0.30-x86_64-linux)
railties (>= 6.0.0)
thor (1.2.2)
Expand All @@ -192,6 +233,9 @@ GEM
railties (>= 6.0.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
unicode-display_width (2.4.2)
warden (1.2.9)
rack (>= 2.0.9)
web-console (4.2.0)
actionview (>= 6.0.0)
activemodel (>= 6.0.0)
Expand All @@ -210,17 +254,21 @@ GEM
zeitwerk (2.6.10)

PLATFORMS
x86_64-darwin-22
x86_64-linux

DEPENDENCIES
bootsnap
capybara
debug
devise
importmap-rails
jbuilder
letter_opener
pg (~> 1.1)
puma (~> 5.0)
rails (~> 7.0.6)
rubocop (>= 1.0, < 2.0)
selenium-webdriver
sprockets-rails
stimulus-rails
Expand Down
Loading
Loading