{"id":15588435,"url":"https://github.com/solnic/hanami-bookshelf-rom","last_synced_at":"2025-04-24T05:04:28.137Z","repository":{"id":66168165,"uuid":"180831876","full_name":"solnic/hanami-bookshelf-rom","owner":"solnic","description":"Hanami 1.x bookshelf app based on tutorial, tweaked to use rom-rb 4.x standalone","archived":false,"fork":false,"pushed_at":"2019-04-12T07:24:49.000Z","size":36,"stargazers_count":18,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-30T07:11:15.135Z","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/solnic.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":"2019-04-11T16:22:52.000Z","updated_at":"2022-09-13T07:25:07.000Z","dependencies_parsed_at":null,"dependency_job_id":"5c43496e-b8db-41e7-9b37-fe90801a2b2d","html_url":"https://github.com/solnic/hanami-bookshelf-rom","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solnic%2Fhanami-bookshelf-rom","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solnic%2Fhanami-bookshelf-rom/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solnic%2Fhanami-bookshelf-rom/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solnic%2Fhanami-bookshelf-rom/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/solnic","download_url":"https://codeload.github.com/solnic/hanami-bookshelf-rom/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250566453,"owners_count":21451230,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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-02T22:40:19.615Z","updated_at":"2025-04-24T05:04:28.094Z","avatar_url":"https://github.com/solnic.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bookshelf Hanami app using rom-rb standalone\n\nThis is the bookshelf hanami application based on [the official Getting Started guide](https://guides.hanamirb.org/introduction/getting-started/) with the following tweaks:\n\n- hanami-model was replaced with a standalone rom-rb setup\n- entities are under `Bookshelf::Entities` namespace\n- repositories are under `Bookshelf::Repositories` namespace\n- repository instances can be accessed through a convenient method, ie `Bookshelf::Repositories[:Book]`\n- `DELETE /books/:id` was also implemented\n\n## rom-rb setup\n\nThe entire rom-rb configuration is handled by `config/initializers/rom.rb` which defines `Bookshelf::Persistence` module which exposes the following global methods:\n\n- `Bookshelf::Persistence.db` returns a configured `ROM::Container`\n- `Bookshelf::Persistence.relations` relation registry (mostly useful in tests)\n- `Bookshelf::Persistence.configuration` return `ROM::Configuration` that can be useful in rake tasks or scripts that need db connection *without the whole `ROM::Container`*\n\nYou can tweak this initializer if you need to access more databases, need extra plugins to be enabled etc.\n\n## Setup\n\nHow to run tests:\n\n```\n% bundle exec rake\n```\n\nHow to run the development console:\n\n```\n% bundle exec hanami console\n```\n\nHow to run the development server:\n\n```\n% bundle exec hanami server\n```\n\nHow to prepare (create and migrate) DB for `development` and `test` environments:\n\n```\n% bundle exec rake db:migrate\n\n% HANAMI_ENV=test bundle exec rake db:migrate\n```\n\n## Learn more about Hanami\n\nExplore Hanami [guides](http://hanamirb.org/guides/), [API docs](http://docs.hanamirb.org/1.3.1/), or jump in [chat](http://chat.hanamirb.org) for help. Enjoy! 🌸\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolnic%2Fhanami-bookshelf-rom","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsolnic%2Fhanami-bookshelf-rom","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolnic%2Fhanami-bookshelf-rom/lists"}