Skip to content
Open
Show file tree
Hide file tree
Changes from 55 commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
f50aa6d
create a new rails app
cherelemma Sep 18, 2023
87f99f2
update database configuration
cherelemma Sep 20, 2023
71221eb
install all required gem
cherelemma Sep 21, 2023
ddd8563
add Github wirkflow and linter config files
cherelemma Sep 21, 2023
bf0f299
install stylelint package
cherelemma Sep 21, 2023
80a9fb2
generate rspec helpers
cherelemma Sep 21, 2023
74c8cb5
craete user model
cherelemma Sep 21, 2023
7d0299d
create category mode
cherelemma Sep 21, 2023
26b9ee5
create entity model
cherelemma Sep 21, 2023
2f30541
run migration and create a schema
cherelemma Sep 21, 2023
69378c9
generate devise install and configure
cherelemma Sep 21, 2023
ee1a799
generate a devise views
cherelemma Sep 21, 2023
0601ae4
ceate a devise user model
cherelemma Sep 21, 2023
0fcd60a
update schema and setup default page
cherelemma Sep 21, 2023
9f5b7b9
create splash screen
cherelemma Sep 21, 2023
36e3b8c
add style and format sign and signup pages
cherelemma Sep 21, 2023
f701028
add model validations
cherelemma Sep 22, 2023
3436f28
update schema
cherelemma Sep 22, 2023
e1cff9e
enable confirmable module
cherelemma Sep 22, 2023
21752f6
permit name attribute for User model
cherelemma Sep 22, 2023
69e4a81
add categories and entities route
cherelemma Sep 22, 2023
6f5133c
create Categories_controller and add actions
cherelemma Sep 22, 2023
f72ebfb
create and format Categories view
cherelemma Sep 22, 2023
4e92ea5
create Entities_controller and add actions
cherelemma Sep 22, 2023
822f347
create Entity views
cherelemma Sep 22, 2023
9dac588
add fontawesome CDN link
cherelemma Sep 22, 2023
006d6e3
fix ruby and style linter errors
cherelemma Sep 22, 2023
ba1b86d
add @media screen for responsivenes
cherelemma Sep 22, 2023
5ba1167
update the font size and weight of categories and entities contenct
cherelemma Sep 22, 2023
f4419bb
add locale error message and display inline with form elment
cherelemma Sep 22, 2023
04ffff2
install testing gem and configure rspec
cherelemma Sep 22, 2023
f834cc7
create factoryBot for user model
cherelemma Sep 22, 2023
a291f23
add a user model unit test
cherelemma Sep 22, 2023
ce3aa8d
add unit test for category model
cherelemma Sep 22, 2023
2fdaf3c
create unit test for Entity model
cherelemma Sep 22, 2023
62acdea
fix linters error wirh rubocop
cherelemma Sep 23, 2023
b8adced
add rails-controller-testing gem
cherelemma Sep 23, 2023
edb348b
create controllers testing
cherelemma Sep 23, 2023
8d85f2c
fix linter errors
cherelemma Sep 23, 2023
969635f
create HomePage feature tests
cherelemma Sep 23, 2023
1262498
create Category feature tests
cherelemma Sep 23, 2023
a09c752
create Entity feature tests
cherelemma Sep 23, 2023
52fa328
Update the default README
cherelemma Sep 23, 2023
5a904e0
create render github action
cherelemma Sep 23, 2023
b6bbcc8
Update README.md
cherelemma Sep 23, 2023
aafaef5
Update README.md
cherelemma Sep 23, 2023
0f0e530
Update README.md
cherelemma Sep 23, 2023
4f7ecc1
add lock file and fix deploy platform
cherelemma Sep 23, 2023
2d49f79
Merge branch 'feature-branch' of github.com:Microverse-Fullstack-Prog…
cherelemma Sep 23, 2023
3a08df3
update database production config
cherelemma Sep 23, 2023
b9e9152
update deployment config
cherelemma Sep 23, 2023
f6d35a1
update render.yml
cherelemma Sep 23, 2023
00203a8
Update production.rb
cherelemma Sep 23, 2023
c9cd680
upgrade the responders version
cherelemma Sep 23, 2023
14c7122
Merge branch 'feature-branch' of github.com:Microverse-Fullstack-Prog…
cherelemma Sep 23, 2023
de80ef8
create new credentials.yml.enc
cherelemma Sep 23, 2023
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
7 changes: 7 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# See https://git-scm.com/docs/gitattributes for more about git attribute files.

# Mark the database schema as having been generated.
db/schema.rb linguist-generated

# Mark any vendored files as having been vendored.
vendor/* linguist-vendored
44 changes: 44 additions & 0 deletions .github/workflows/linters.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
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
- name: Stylelint Report
run: npx stylelint "**/*.{css,scss}"
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
33 changes: 33 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# See https://help.github.com/articles/ignoring-files for more about ignoring files.
#
# If you find yourself ignoring temporary files generated by your text editor
# or operating system, you probably want to add a global ignore instead:
# git config --global core.excludesfile '~/.gitignore_global'

# Ignore bundler config.
/.bundle

# Ignore all logfiles and tempfiles.
/log/*
/tmp/*
!/log/.keep
!/tmp/.keep

# Ignore pidfiles, but keep the directory.
/tmp/pids/*
!/tmp/pids/
!/tmp/pids/.keep

# Ignore uploaded files in development.
/storage/*
!/storage/.keep
/tmp/storage/*
!/tmp/storage/
!/tmp/storage/.keep

/public/assets

# Ignore master key for decrypting credentials and more.
/config/master.key

/node_modules
1 change: 1 addition & 0 deletions .rspec
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--require spec_helper
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: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ruby-3.2.2
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"]
}
86 changes: 86 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

ruby '3.2.2'

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

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

# Use sqlite3 as the database for Active Record
gem 'sqlite3', '~> 1.4'

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

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

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

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

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

# Use Redis adapter to run Action Cable in production
# gem "redis", "~> 4.0"

# Use Kredis to get higher-level data types in Redis [https://github.com/rails/kredis]
# gem "kredis"

# Use Active Model has_secure_password [https://guides.rubyonrails.org/active_model_basics.html#securepassword]
# 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]

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

# Use Sass to process CSS
# gem "sassc-rails"

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

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]
end

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

# Add speed badges [https://github.com/MiniProfiler/rack-mini-profiler]
# gem "rack-mini-profiler"

# Speed up commands on slow machines / big apps [https://github.com/rails/spring]
# gem "spring"
end

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

gem 'rubocop', '>= 1.0', '< 2.0'

gem 'devise', '~> 4.9'

gem 'cancancan', '~> 3.5'

gem 'factory_bot_rails', '~> 6.2'

gem 'faker', '~> 3.2'

gem 'rails-controller-testing', '~> 1.0'
Loading