{"id":15101488,"url":"https://github.com/mariocc29/holidays","last_synced_at":"2026-02-03T08:31:28.158Z","repository":{"id":225829528,"uuid":"766985602","full_name":"mariocc29/holidays","owner":"mariocc29","description":"The Holidays API is a RESTful service designed to provide information about holidays for specific countries or regions.","archived":false,"fork":false,"pushed_at":"2024-03-15T10:18:46.000Z","size":66,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-10T09:17:55.280Z","etag":null,"topics":["backend","grape-api","rails","rspec","swagger"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mariocc29.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-04T13:55:23.000Z","updated_at":"2024-03-15T10:46:15.000Z","dependencies_parsed_at":"2024-10-12T00:16:42.630Z","dependency_job_id":null,"html_url":"https://github.com/mariocc29/holidays","commit_stats":{"total_commits":16,"total_committers":2,"mean_commits":8.0,"dds":0.0625,"last_synced_commit":"19b25e8404c7b30a9cafa49a5e90197ce68275da"},"previous_names":["mariocc29/rails_holidays"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/mariocc29/holidays","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mariocc29%2Fholidays","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mariocc29%2Fholidays/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mariocc29%2Fholidays/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mariocc29%2Fholidays/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mariocc29","download_url":"https://codeload.github.com/mariocc29/holidays/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mariocc29%2Fholidays/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29038516,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-03T06:39:36.383Z","status":"ssl_error","status_checked_at":"2026-02-03T06:39:32.787Z","response_time":96,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["backend","grape-api","rails","rspec","swagger"],"created_at":"2024-09-25T18:23:56.661Z","updated_at":"2026-02-03T08:31:28.141Z","avatar_url":"https://github.com/mariocc29.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Holidays API\n\n### Overview\n\nThe Holidays API is a RESTful service designed to provide information about holidays for specific countries or regions (provinces, states, or departments).\n\n## Requirements\n\n* The project is developed as a REST API.\n* The core functionality of the system, separate from the API layer.\n\n### Constraints\n\n1. To initialize the project, use the following command:\n\n```bash\n  rails new holidays --api -T\n```\n\n## Technologies\n\nThe following technologies are used in this project:\n\n||Version|Command for checking\n|-|-:|-|\n|ruby|3.2.3|ruby --version|\n|rails|7.1.3.2|rails --version|\n\n## Deployment\n\nTo deploy the application, follow these steps:\n\n1. Install dependencies:\n\n```bash\n  bundle install\n```\n\n2. Start the server:\n\n```bash\n  bin/rails serve\n```\n\n## API Reference\n\nTo access the API documentation, perform the following steps:\n\n1. Retrieve the documentation:\n\n```bash\ncurl  -X GET \\\n  'localhost:3000/api/docs' \\\n  --header 'Accept: */*'\n```\n\n2. Copy the content and visualize it using [Swagger Editor](https://editor.swagger.io/)\n\n\n## Running Tests\n\nExecute the following command to run the tests:\n\n```bash\n   bundle exec rspec spec/\n```\n\n## Solution Approach\n\nThe solution for building the Holidays API involves the following steps:\n\n1. **Choosing the Framework:** We opted to use the Grape framework for building our RESTful API. Grape provides a lightweight and flexible approach to define API endpoints and manage request handling.\n\n2. **Entity Serialization:** To ensure clean and structured responses from our API, we use Grape Entity for entity serialization. This allows us to define the structure of our API responses in a clear and organized manner.\n\n3. **Documentation Generation:** We integrate Grape Swagger and Grape Swagger Entity to automatically generate Swagger-compliant documentation for our API. This ensures that our API endpoints are well-documented and easy to explore.\n\n4. **Testing Strategy:** We employ RSpec and related gems for behavior-driven development (BDD) and testing. RSpec Rails provides a robust framework for testing Rails applications, while Rack Test allows us to test Rack applications with a simple API. Additionally, we use RSpec JSON Expectations for validating JSON responses in our tests.\n\n5. **Code Quality:** To maintain code quality and adherence to best practices, we utilize RuboCop, a linter for Ruby code. RuboCop helps us enforce consistent coding styles and identify potential issues in our codebase.\n\n6. **Service Objects:** The core functionality of the system is organized using the concept of service objects. The service objects responsible for retrieving holiday data and processing it reside in the `app/services/core` directory. This approach promotes encapsulation and modularity, making our codebase easier to understand and maintain.\n\n## Installed Gems\n\nThe following gems are installed for the project:\n\n- `grape`: REST-like API framework for Ruby.\n- `grape-entity`: Entity serialization for Grape APIs.\n- `grape-swagger`: Adds Swagger-compliant documentation to your Grape API.\n- `grape-swagger-entity`: Swagger documentation for Grape entities.\n- `rspec-rails`: Behavior-driven development for Ruby on Rails applications.\n- `rack-test`: Add the 'rack/test' gem for testing Rack applications with a simple API.\n- `rspec-json_expectations`: Integrate 'rspec/json_expectations' gem for additional JSON-related expectations in RSpec.\n- `byebug`: Debugging tool for Ruby.\n- `rubocop`: Linter for Ruby code.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmariocc29%2Fholidays","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmariocc29%2Fholidays","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmariocc29%2Fholidays/lists"}