Ruby on Rails React
A mobile app that allows employed to clock in and out. React front end uses back end API to retrieve and update information regarding their respective entry on the timesheet.
- Rails
- Ruby
- API
- Node.js
- React
- React-DOM
- npm
- CSS
- ES6
- Webpack
This is the GitHub Actions configuration. If you are looking for the Stickler configuration, you can find it here.
If you are not familiar with linters and GitHub Actions, read root level README.
This GitHub Action is going to run ESLint and Stylelint to help you find style issues.
Stylelint is a linter for your stylesheets that helps you avoid errors and enforce conventions.
ESLint is a tool for identifying and reporting on patterns found in ECMAScript/JavaScript code, with the goal of making code more consistent and avoiding bugs.
Please do the following steps in this order:
- In the first commit of your feature branch create a
.github/workflows
folder and add a copy of.github/workflows/linters.yml
to that folder.- Remember to use the file linked above
- Remember that
.github
folder starts with a dot.
- Do not make any changes in config files - they represent style guidelines that you share with your team - which is a group of all Microverse students.
- If you think that change is necessary - open a Pull Request in this repository and let your code reviewer know about it.
- When you open your first pull request you should see the result of the GitHub Actions:
Click on the Details
link to see the full output and the errors that need to be fixed:
Note: The npm
package manager is going to create a node_modules
directory to install all of your dependencies. You shouldn't commit that directory. To avoid that, you can create a .gitignore
file and add node_modules
to it:
# .gitignore
node_modules/
- Add
gem 'rubocop', '~>0.81.0'
toGemfile
(not sure how to use Gemfile? Read this). - Run
bundle install
. - Copy .rubocop.yml to the root directory of your project
- Do not make any changes in config files - they represent style guidelines that you share with your team - which is a group of all Microverse students.
- If you think that change is necessary - open a Pull Request in this repository and let your code reviewer know about it.
- Run
rubocop
. - Fix linter errors.
- IMPORTANT NOTE: feel free to research auto-correct options for Rubocop if you get a flood of errors but keep in mind that correcting style errors manually will help you to make a habit of writing a clean code!
-
Run
npm install --save-dev stylelint@13.3.x stylelint-scss@3.17.x stylelint-config-standard@20.0.x stylelint-csstree-validator
(not sure how to use npm? Read this).
$ npm install --save-dev stylelint@13.3.x stylelint-scss@3.17.x stylelint-config-standard@20.0.x stylelint-csstree-validator
+ stylelint-config-standard@20.0.0
+ stylelint-csstree-validator@1.8.0
+ stylelint-scss@3.17.2
+ stylelint@13.3.3
added 136 packages from 91 contributors, removed 10 packages, updated 6 packages and audited 1987 packages in 67.901s
113 packages are looking for funding
- Copy .stylelintrc.json to the root directory of your project.
- Do not make any changes in config files - they represent style guidelines that you share with your team - which is a group of all Microverse students.
- If you think that change is necessary - open a Pull Request in this repository and let your code reviewer know about it.
- Run
on the root of your directory of your project.
npx stylelint "**/*.{css,scss}"
- Fix linter errors.
- IMPORTANT NOTE: feel free to research auto-correct options for Stylelint if you get a flood of errors but keep in mind that correcting style errors manually will help you to make a habit of writing a clean code!
Feel free to add your own deployment actions which can run your tests and deploy to Heroku.
Make sure that you do not modify the .github/workflows/linters.yml
but that you create a separe GitHub Action workflow file for that.
- GitHub Actions with Ruby on Rails: Setting up Continuous Integration
- Deploying to Heroku from GitHub Actions
- Building a Rails CI pipeline with GitHub Actions
- Github Actions to run Rubocop and RSpec tests on Rails with Postgres
- If you are building an API only Rails application For API only Rails application you can remove the Stylelint config. To do so remove line no. 23 to 36 from the linter.yml file.
- Clone Repo by using this command 'git clone --branch development https://github.com/geraldgsh/time-tracker.git'.
- Follow instruction in this link for DB setup.
- Run 'rails db:migrate' to initialize
- Run 'rails db:seed' to generate one user in DB
- Type
rails server
in terminal within root project folder. - Open http://localhost:3000 to view it in the browser.
Run the following command terminal for root folder
$ bundle exec rspec spec/models
.......
Finished in 0.26756 seconds (files took 2.63 seconds to load)
7 examples, 0 failures
Checkout our wikipage for details on development cycles.
Web browser like Chrome, Mozilla or similar.
https://github.com/geraldgsh/time-tracker
👤 Author
Github: geraldgsh
Twitter: geraldgsh
Linkedin: Gerald Goh
Contributions, issues and feature requests are welcome!
Feel free to check the issues page.
Give a ⭐️ if you like this project!
- Hat tip to anyone whose code was used
- Inspiration
- etc
This project is MIT licensed.