- 📖 About the Project
- 💻 Getting Started
- 👥 Authors
- 🔭 Future Features
- 🤝 Contributing
- ⭐️ Show your support
- 🙏 Acknowledgements
- 📝 License
Blog App is the classic example of a blog website. This is a fully functional website that shows the list of posts and empower readers to interact with them by adding comments and liking posts.
Ruby
Rails
Database
RSpec
Linters
-
Migration files that create a database based on a diagram
-
Models for each of the tables in the database
-
Methods that updates counters
-
Methods that alows to select recent comments and posts
-
RSpec unit test for the validations, associations, methods, requests
-
Routes and controllers
-
Views
-
Forms to add a comment and post
-
Add and delete a like
-
Integration specs for the views using Capybara
-
Pagination with kaminari gem
-
Devise gem
-
Letter_opener
This repository includes files with Ruby lenguage.
In order to run this project you need to have install:
Clone this repository to your desired folder:
cd my-folder
git clone https://github.com/AndreaM2429/BlogApp
You need to open the terminal and and navigate to the clone repository, run the commands to create the database and start the app:
rails db:create
rails db:migrate
rails s
Navigate to http://localhost:3000 and see the functional app.
You can test the app from the terminal with:
rails c
Try to run this commands and check the changes into your database.
# Create users
first_user = User.create(name: 'Tom', photo: 'https://unsplash.com/photos/F_-0BxGuVvo', bio: 'Teacher from Mexico.')
second_user = User.create(name: 'Lilly', photo: 'https://unsplash.com/photos/F_-0BxGuVvo', bio: 'Teacher from Poland.')
# Create a post from one user
first_post = Post.create(author: first_user, title: 'Hello', text: 'This is my first post')
# Create a comment for the post
Comment.create(post: first_post, author: second_user, text: 'Hi Tom!' )
# Create a like for the post
Like.create(user: first_user, post: first_post)
To check the linters you can use the command:
rubocop
To fix the linter use:
rubocop --A
To run the test use the command:
bundle exec rspec
Or just rspec
, additional you can specify the path of one specific file if you don't want to run all the tests.
👤 Andrea Manuel
- GitHub: @AndreaM2429
- Twitter: @AndreaManuelOr1
- LinkedIn: Andrea Manuel
👤 Javier Grau
- GitHub: grauJavier
- Twitter: @jgrauchile
- LinkedIn: @javiergrau
- API documentation.
Contributions, issues, and feature requests are welcome!
Feel free to check the issues page.
If you like this project you could clone the repo and work with it or do the changes in a new branch. Also you could let a message with your thoughts.
I would like to thank Microverse for providing the necessary resources for this project.
This project is MIT licensed.