Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sofiia-chorna/rails-task
Books service
https://github.com/sofiia-chorna/rails-task
rails
Last synced: 9 days ago
JSON representation
Books service
- Host: GitHub
- URL: https://github.com/sofiia-chorna/rails-task
- Owner: sofiia-chorna
- Created: 2021-09-13T06:45:48.000Z (about 3 years ago)
- Default Branch: develop
- Last Pushed: 2021-09-14T21:34:32.000Z (about 3 years ago)
- Last Synced: 2024-10-08T09:01:11.753Z (about 1 month ago)
- Topics: rails
- Language: Ruby
- Homepage:
- Size: 181 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# README
This README would normally document whatever steps are necessary to get the
application up and running.Things you may want to cover:
* **Database initialization**
rails authors:seed_authors
rails books:seed_books
rails book_authors:seed_book_authors* **How to run the test suite**
bundle exec rspec
**Task**
We're building a service that is able to return you a list of books that are written by a collaboration of authors.
Create two tables, authors and books.
You're required to create a method Books.with_authors(author1Name, author2Name, author3Name)
If there is a book that was written by a given list of authors - return it.
Books example:
Design Patterns by Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides
DummyBook2 by Richard Helm, Ralph Johnson
DummyBook3 by John Vlissides, Richard Helm
Example of usage:
Books.with_authors('Erich Gamma') -> returns relation of books(Design Patterns)
Books.with_authors('Erich Gamma', 'Richard Helm') -> returns relation of books(Design Patterns)
Books.with_authors('Erich Gamma', 'Other Person') -> returns empty relation
Books.with_authors('Richard Helm', 'Ralph Johnson') -> returns relation of books(Design Patterns, DummyBook2)
Books.with_authors('Richard Helm', 'John Vlissides') -> returns relation of books(Design Patterns, DummyBook3)
Bonus points for Docker. Bonus points for basic UI.
Specs are required. Tables should be created and seed data should be present. Method should accept infinite number of args
Firstly complete method implementation and only then implement bonus point tasks.