A Blog app is similar to a classic blog website. With a fully functional website that shows the list of posts and empowers readers to interact with them by adding comments and liking post The project is a repository consisting of the following files:
- Ruby files
- Rails files
- Ruby linters file
- Display Users, posts, comments on posts, likes on posts
- Create a new app
- Processing data in model
- Validations and Model spec.
- Setup and controllers.
- The project has a Postgres database set up
- Create and run the necessary migration files.
- Table and column names match the ERD diagram with developed
In order to run this project you need:
- Ruby installed and running. To get more information, read the installation instructions.
- You should be able to use IRB.
- First of all, make sure you have both
Ruby
&Rails
installed on your machine (else You can installRails
just with this simple commandgem install rails
)
Clone this repository to your desired folder
git clone https://github.com/Benawi/Blog-App.git
cd Blog-App
Install project dependencies with
bundle install
- Then go to the right folder
$ cd Blog-App
$ bundle
and run to install npm package
$ npm install
make sure the database is up and running.
$ rails db: create
When you add a migration file, you can add commands like
$ rails db: migrate
Run this command line to add some dummy data
$ rails db: seed
- Finaly run
rails s
and visit http://localhost:3000/ in your browser!
Go to your gemfile and add the RSpec gem in the development test group:
group : development, test do
gem 'rspec-rails'
end
Then in your terminal run the command:
$ bundle install
To set up RSpec in your app and create the Spec folder run:
$ rails generate rspec: install
To run Request specs locally you need just to run the following command in your terminal:
$ rspec spec/model/
$ rspec spec/models/ --format documentation
π€ : Bwambale
- GitHub: @githubhandle
- Twitter: @twitterhandle
- LinkedIn LinkedIn
- Integration specs for Views and fixing n 1 problems.
- Add Devise.
- Add authorization rules.
- Add API endpoints.
- API documentation.
Contributions, issues, and feature requests are welcome!
Give me βοΈ If you like this project!
- I wanted to take a moment to express my sincere gratitude for the opportunity to work with you all on this project.
- Microverse, thank you for providing the structure, guidance and community to help me level up my skills as a developer. The experiential learning model has been invaluable in improving my coding abilities and collaboration skills. I appreciate the code reviews and feedback to help me write cleaner, more professional code..
This project is MIT licensed.