{"id":16060325,"url":"https://github.com/andyatkinson/bookshop","last_synced_at":"2026-01-30T08:05:07.511Z","repository":{"id":242104200,"uuid":"808693967","full_name":"andyatkinson/bookshop","owner":"andyatkinson","description":null,"archived":false,"fork":false,"pushed_at":"2024-08-09T19:01:04.000Z","size":7,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-17T04:11:57.583Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/andyatkinson.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-05-31T15:59:02.000Z","updated_at":"2025-03-17T22:18:01.000Z","dependencies_parsed_at":"2024-10-23T00:29:49.096Z","dependency_job_id":null,"html_url":"https://github.com/andyatkinson/bookshop","commit_stats":null,"previous_names":["andyatkinson/bookshop"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/andyatkinson/bookshop","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andyatkinson%2Fbookshop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andyatkinson%2Fbookshop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andyatkinson%2Fbookshop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andyatkinson%2Fbookshop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andyatkinson","download_url":"https://codeload.github.com/andyatkinson/bookshop/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andyatkinson%2Fbookshop/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28908861,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-30T06:42:00.998Z","status":"ssl_error","status_checked_at":"2026-01-30T06:41:58.659Z","response_time":66,"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":[],"created_at":"2024-10-09T04:03:04.225Z","updated_at":"2026-01-30T08:05:07.497Z","avatar_url":"https://github.com/andyatkinson.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bookshop\nI started from Greg Molnar's example, and swapped out SQLite for PostgreSQL.\n\u003chttps://greg.molnar.io/blog/a-single-file-rails-application/\u003e\n\n## Postgres\nCreate the database manually.\n\nI'll use the postgres user which is a built-in superuser.\n\nWarning: For real applications, do not use a superuser as the creator (and owner) of your application database. Instead, choose a user with fewer privileges.\n```sh\ncreatedb bookshop_development\n```\n\n## Start Rails Console\n```rb\nruby console.rb\n```\n\nTo start over run:\n```sh\ndropdb --if-exists bookshop_development\n```\n\n## Active Record\nFrom the [Rails Guide](https://guides.rubyonrails.org/association_basics.html):\n\nFrom a rails console:\n```rb\nauthor = Author.create!(first_name: \"Jane\", last_name: \"Doe\")\nbook = author.books.create!(title: \"A Cool Book\")\n```\n\n## Dev Containers\nA new Rails app \"myapp\" can be generated using the commands below. The app will be within this repository and exists only to try out generating dev container configuration.\n\nThis command generates a Rails 7.2 app called \"myapp\" with PostgreSQL. Configuration will be within the `.devcontainer` directory.\n```sh\nrails new myapp --database=postgresql --devcontainer\n```\n\nOnce generated, open \"myapp\" in VS Code either from the application or from your terminal.\n\nTo configure command line integration in VS Code, run `Command-Shift-P` (macOS) and choose \"Install 'code' command in PATH\". Refer to these instructions for more info: [configure your shell](https://code.visualstudio.com/docs/setup/mac).\n\nOnce installed in your `PATH`, run `code --version` to verify it's reachable.\n\nWith that in place, running `code myapp` will open \"myapp\" in VS Code. The devcontainers should be auto detected.\n\nChoose \"Dev Containers: Rebuild in Container\" which launches Docker and all the app dependencies, including PostgreSQL.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandyatkinson%2Fbookshop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandyatkinson%2Fbookshop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandyatkinson%2Fbookshop/lists"}