Skip to content

Blog app: add API endpoints #419

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 42 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
436b15b
Initial setup
mugberto Apr 5, 2021
2b49d12
Add image containing ERD chart
mugberto Apr 6, 2021
e5704f2
Add image_link and change author_id to user_id
mugberto Apr 6, 2021
4f1af07
Change all primary keys to id
mugberto Apr 6, 2021
84cc025
Fix a spelling error
mugberto Apr 6, 2021
46a1191
Add FriendshipInvitation model
mugberto Apr 7, 2021
d02b21f
Add create and destroy action on FriendshipInvitations
mugberto Apr 8, 2021
b8e213b
Add #friends method to User model
mugberto Apr 20, 2021
0e26461
Add #pending_invitations and #friendship_requests
mugberto Apr 20, 2021
316f69e
Add #confirm_friend and #frind? methods
mugberto Apr 20, 2021
cc51370
Fix #friends method
mugberto Apr 20, 2021
ebfc7a2
Add invite to friendship button
mugberto Apr 21, 2021
34283fc
Add invitations page
mugberto Apr 22, 2021
d84c3d2
Add buttons to reject friendship
mugberto Apr 22, 2021
773851b
Fix linter errors
mugberto Apr 22, 2021
fc71a59
Modify #timeline_posts method
mugberto Apr 23, 2021
f60a3af
Move sign in and sign out logic to helpers
mugberto Apr 23, 2021
106a95b
Move notifications logic in the helpers' module
mugberto Apr 23, 2021
68b9ad1
Install and configure gems
mugberto May 5, 2021
a2146d5
Add tests for user, post, and like models
mugberto May 5, 2021
5661203
Add tests for sign in and sign up functionalities
mugberto May 9, 2021
5373b7c
Fix reject friendship link
mugberto May 9, 2021
32b853e
Add reject and confirm friendship to all users
mugberto May 9, 2021
315b2ef
Rename FriendshipInvitation model to Friendship
mugberto May 11, 2021
c9fdf6e
Fix associations
mugberto May 11, 2021
29c8450
Refactor friendships#update method
mugberto May 11, 2021
01669b9
Refactore user#confirm_friend method
mugberto May 11, 2021
12873ef
Fix user#confirm_friend method
mugberto May 11, 2021
e37082b
Fix #invite_to_priendship_btn helper method
mugberto May 11, 2021
2bb50f3
Add user#friends_and_own_posts method
mugberto May 11, 2021
56b529c
Fix undo friendship
mugberto May 12, 2021
08c0630
Add confirmed_friendships and friends associations
mugberto May 12, 2021
e308180
Add pending_friendships and pending_friends assoctions
mugberto May 12, 2021
5af8a83
Add inverted_friendships and friend_requests assoctions
mugberto May 12, 2021
db762cd
Fix reject friendship button
mugberto May 16, 2021
98cf792
Add user associtation tests
mugberto May 16, 2021
2e8f49a
Update readme
mugberto May 16, 2021
4d31207
Update readme
mugberto May 16, 2021
1386544
Update and clean up readme
mugberto May 17, 2021
7354411
Merge pull request #4 from mugberto/development
mugberto May 17, 2021
b1fccfe
Add live demo link
mugberto May 17, 2021
7ba14ec
changing an existing app
elyor-doniyorov Nov 2, 2021
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,6 @@

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

# VScode configurations
/.vscode
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.7.0
2.7.1
16 changes: 12 additions & 4 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

ruby '2.7.0'
ruby '2.7.1'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.2.4'
gem 'rails', '~> 6.0.3.5'
# Use postgresql as the database for Active Record
gem 'pg', '>= 0.18', '< 2.0'
# Use Puma as the app server
Expand Down Expand Up @@ -40,20 +40,28 @@ gem 'bootsnap', '>= 1.1.0', require: false
gem 'devise'

group :development, :test do
# install rspec rails
gem 'rspec-rails', '~> 5.0', '>= 5.0.1'
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug', platforms: %i[mri mingw x64_mingw]
end

group :test do
gem 'rspec'
# Adds support for Capybara system testing and selenium driver
gem 'capybara', '>= 2.15'
# Strategies for cleaning databases to ensure a clean slate for testing.
gem 'database_cleaner-active_record'
gem 'selenium-webdriver'
# Easy installation and use of web drivers to run system tests with browsers
gem 'shoulda-matchers', '~> 3.1', '>= 3.1.1'
end

group :development do
# Access an interactive console on exception pages or by calling 'console' anywhere in the code.
gem 'listen', '>= 3.0.5', '< 3.2'
gem 'web-console', '>= 3.3.0'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'rubocop'
gem 'rubocop', '~> 0.92.0'
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
end
Expand Down
Loading