Skip to content
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

Feature/store data #6

Merged
merged 9 commits into from
Sep 7, 2023
Merged

Feature/store data #6

merged 9 commits into from
Sep 7, 2023

Conversation

francksefu
Copy link
Collaborator

Check the documentation for Ruby's JSON library.
On exit from your app save all the data (books, people, and rentals) into JSON files. One per type of data you are storing and named accordingly (e.g. rentals.json) -> done
On startup of your app load all data from files. Remember to handle the case when one or more of the files are missing. -> done

Copy link

@roshan-bajgain roshan-bajgain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @francksefu and @HFG43,

Good job so far!
There are some issues that you still need to work on to go to the next project but you are almost there!

Highlights

  • No linter errors. ✔️
  • GitHub flow is followed. ✔️
  • The data is saving ✔️

Required Changes ♻️

Check the comments under the review.

Optional suggestions

Every comment with the [OPTIONAL] prefix is not crucial enough to stop the approval of this PR. However, I strongly recommend you to take them into account as they can make your code better.

Cheers and Happy coding!👏👏👏

Feel free to leave any questions or comments in the PR thread if something is not 100% clear.
Please, remember to tag me in your question so I can receive the notification.

Please, do not open a new Pull Request for re-reviews. You should use the same Pull Request submitted for the first review, either valid or invalid unless it is requested otherwise.


As described in the Code reviews limits policy you have a limited number of reviews per project (check the exact number in your Dashboard). If you think that the code review was not fair, you can request a second opinion using this form.

main.rb Outdated
Comment on lines 1 to 3
require_relative 'app'
require_relative 'manage_data'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • While running ruby main.rb I am getting the error ``require_relative': cannot load such file --what you can do is that please removerequire_relative 'manage_data'` form main.rb.

main.rb Outdated
Comment on lines 37 to 42
exit if choice == 7
if choice == 7
app.save_people_data
exit
end
handle_menu_choice(choice, app)
Copy link

@roshan-bajgain roshan-bajgain Sep 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • While exiting the app I got the error shown below please fix this error and you are good to go. the problem is app.save_people_data is undefined please make sure that `On exit from the app the data should be saved (all the data.).

Error

Screenshot 2023-09-07 145257

Copy link

@LionRouge1 LionRouge1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @francksefu,

STATUS: APPROVED! 🥇 💯

Great work on making the changes 👏
You've done well implementing the requested changes

done

Your project is complete! There is nothing else to say other than... it's time to merge it :shipit:

Highlights

  • Great job, your project is error free 👍
  • Nice work you meet all the requirements 🥇
  • All linters passed ✔️

Optional suggestions

Every comment with the [OPTIONAL] prefix is not crucial enough to stop the approval of this PR. However, I strongly recommend you to take them into account as they can make your code better.

Good luck! 🎉

Feel free to leave any questions or comments in the PR thread if something is not 100% clear.
Please, remember to tag me in your question so I can receive the notification.


As described in the Code reviews limits policy you have a limited number of reviews per project (check the exact number in your Dashboard). If you think that the code review was not fair, you can request a second opinion using this form.

@HFG43 HFG43 merged commit 003f931 into develop Sep 7, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants