- Tech Stack
- Key Features
- Getting Started
- 👥 Authors
- 🔭 Future Features
- 🤝 Contributing
- ⭐️ Show your support
- 🙏 Acknowledgements
- ❓ FAQ
- 📝 License
["Blog App"] is a classic example of a blog website. It is a fully functional website that will show the list of posts and empower readers to interact with them by adding comments and liking posts.
1- Ruby
2- Gitflow
3- Rubocop
4- Ruby On Rails
Client
Ruby
- [] [Add migration got post, user, comment and like according the ER]
- [] [Added foreign keys and indexes to ensure data integrity and optimize database queries]
- [] Processing data in models.
- [] Validations and Model specs.
- Setup and controllers.
- Controllers specs.
- Integration specs for Views and fixing n+1 problems.
- Add device.
- Add authorization rules
- Add API end point.
- Ensure you have Ruby installed on your system. You can check your Ruby version in the terminal by running:
ruby -v
If Ruby is not installed, you can download and install it from the official Ruby website.
- Ensure you have Ruby on Rails (RoR) installed on your system. You can check your Rails version in the terminal by running:
rails -v
If Rails is not installed, you can install it using the following command:
gem install rails
- To get a local copy up and running, follow these steps. Choose the directory on your local machine where you want to copy project. For example:
cd /home/user/your-directory
Clone the project :
Using HTTPS:
git clone https://github.com/beteland123/blogapp.git
To run this project locally, follow these steps:
-
Open your terminal or command prompt.
-
Navigate to the directory where you have cloned this repository.
-
Run the following command to install any required dependencies:
bundle install
-
Once the setup is complete, ensure you are still in the directory containing the blogapp files.
-
To set up the database and seed initial data, run the following commands:
rails db:create
rails db:migrate
This will create the database and apply migrations.
If you want to populate the database you can run (this step is not required):
If you want to populate the database you can run (this step is not required):
rails db:seed
- To precompile assets for production deployment, execute the following command:
rails assets:precompile
Precompiling assets is essential for improved performance and loading times in a production environment.
- To run the app in development mode, execute the following command:
rails server
- The app will be accessible at
http://localhost:3000
in your web browser.
To run tests, run the following command:
- Install RSpec:
Find 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
- Run the tests for all the models using the following command:
rspec spec/models
- Alternatively, you could run tests for any specific suit using the following command (an example for Like model):
rspec spec/models/like_spec.rb
👤 Micronaut Betel Andarge
- GitHub: @beteland123
- Twitter: @betelandarge
- LinkedIn: LinkedIn
- Update the CRUD logic to allow editing of comments and posts.
Contributions, issues, and feature requests are welcome!
Feel free to check the issues page.
If you like this project, please give a ⭐️ (Thank you)
-
I would like to thank Microverse for this learning opportunity.
This project is MIT licensed.