{"id":18588124,"url":"https://github.com/peimelo/blog_api","last_synced_at":"2026-03-06T03:32:00.362Z","repository":{"id":84827753,"uuid":"346294101","full_name":"peimelo/blog_api","owner":"peimelo","description":"Ruby on Rails 6 course as API showing authentication via devise_token_auth.","archived":false,"fork":false,"pushed_at":"2023-01-17T11:15:09.000Z","size":161,"stargazers_count":6,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-11T01:41:32.586Z","etag":null,"topics":["api","course","devise","devise-token-auth","rspec","ruby-on-rails","video-course"],"latest_commit_sha":null,"homepage":"https://course-blog-api.fly.dev","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/peimelo.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":"2021-03-10T09:02:57.000Z","updated_at":"2023-10-24T19:11:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"f549b30b-a804-486c-9054-02fb62f89e62","html_url":"https://github.com/peimelo/blog_api","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/peimelo/blog_api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peimelo%2Fblog_api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peimelo%2Fblog_api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peimelo%2Fblog_api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peimelo%2Fblog_api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/peimelo","download_url":"https://codeload.github.com/peimelo/blog_api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peimelo%2Fblog_api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30160861,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-05T22:39:40.138Z","status":"online","status_checked_at":"2026-03-06T02:00:08.268Z","response_time":250,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["api","course","devise","devise-token-auth","rspec","ruby-on-rails","video-course"],"created_at":"2024-11-07T00:44:46.107Z","updated_at":"2026-03-06T03:32:00.308Z","avatar_url":"https://github.com/peimelo.png","language":"Ruby","readme":"# Blog API\n\nRuby on Rails 6 course as API showing authentication via [devise_token_auth](https://github.com/lynndylanhurley/devise_token_auth).\n\nThis repository is part of the [Ruby on Rails 6 - Autenticação via API](https://www.youtube.com/watch?v=i6vul6MqylE\u0026list=PLqsayW8DhUmsuvK17gwSI_rKbAlmxFIw5) on YouTube.\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eRuby version\u003c/td\u003e\n    \u003ctd\u003e\n      3.0.3\n    \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eRails version\u003c/td\u003e\n    \u003ctd\u003e\n      6.1.5\n    \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eDatabase\u003c/td\u003e\n    \u003ctd\u003e\n      PostgreSQL\n    \u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n## Configuration\n\n```bash\ngit clone https://github.com/peimelo/blog_api.git\ncd blog_api\n\n# installation of dependencies\nbundle install\n\n# creation of database and tables\nrails db:create\nrails db:migrate\nrails db:migrate RAILS_ENV=test\n\n# run the project\nrails s\n```\n\nThe backend is available at `http://localhost:3000`.\n\n## Configuration for Production\n\n```bash\n# delete the config/credentials.yml.enc file\nrm config/credentials.yml.enc\n\n# run the command to create credentials and master key (replace 'code' if you don't use VS Code)\nEDITOR=\"code --wait\" bin/rails credentials:edit\n```\n\nAdd the information below in the [credentials](https://guides.rubyonrails.org/security.html#custom-credentials) to configure the email used by the Devise\ngem (replace with the values ​​you want):\n\n```yml\n# ... your content above\n\ngmail:\n  user_name: your@email.com\n  password: your_password\n\nexception_recipients: exceptions@example.com\n```\n\nSave and close the `config/credentials.yml.enc` file.\n\nIf you want to use another email provider, change it in the file\n`config/environments/production.rb`.\n\nTo configure `default_confirm_success_url`, change it in the file\n`config/initializers/devise_token_auth.rb`.\n\nTo configure [CORS](https://github.com/cyu/rack-cors) `origins`, change it in the file\n`config/initializers/cors.rb`.\n\nTo configure [Exception Notification](https://github.com/smartinez87/exception_notification), change it in the file\n`config/initializers/exception_notification.rb`.\n\n## Tests\n\n![Tests](https://github.com/peimelo/blog_api/actions/workflows/ruby.yml/badge.svg)\n\nTo run the tests:\n\n```bash\nbundle exec rspec\n```\n\n### Using Insomnia to test the API\n\nIf you want to import the requests into [Insomnia](https://insomnia.rest/download), use the file `Insomnia.json` at the root of this project.\n\nIt will be necessary to install the plugin [insomnia-plugin-dotenv](https://insomnia.rest/plugins/insomnia-plugin-dotenv).\n\nCreate an environment variable file at the root of the project to add sensitive data:\n\n```bash\ntouch .env.development\n```\n\nAdd the contents below to the file above:\n\n```bash\npassword=your-password\naccess-token=your-access-token\nclient=your-client\n```\n\nIn Insomnia, go to `Manage Environments` and set the `envFilePath` value to the file path `.env.development`:\n\n```json\n{\n  // ... your code above\n  \"envFilePath\": \"/path/to/file/your_repo/.env.development\"\n}\n```\n\nAny `.env.*` file is being ignored by this project's GIT.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeimelo%2Fblog_api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpeimelo%2Fblog_api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeimelo%2Fblog_api/lists"}