{"id":13747493,"url":"https://github.com/tpope/hookup","last_synced_at":"2025-04-08T01:36:38.197Z","repository":{"id":56876627,"uuid":"1588178","full_name":"tpope/hookup","owner":"tpope","description":"Automate the bundle/migration tedium of Rails with Git hooks","archived":false,"fork":false,"pushed_at":"2023-01-24T16:31:59.000Z","size":34,"stargazers_count":479,"open_issues_count":6,"forks_count":24,"subscribers_count":11,"default_branch":"master","last_synced_at":"2024-05-03T01:19:48.982Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tpope.png","metadata":{"files":{"readme":"README.markdown","changelog":null,"contributing":null,"funding":null,"license":"MIT-LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-04-08T16:53:47.000Z","updated_at":"2024-04-22T09:23:02.000Z","dependencies_parsed_at":"2023-02-13T23:31:14.805Z","dependency_job_id":null,"html_url":"https://github.com/tpope/hookup","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tpope%2Fhookup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tpope%2Fhookup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tpope%2Fhookup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tpope%2Fhookup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tpope","download_url":"https://codeload.github.com/tpope/hookup/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247761051,"owners_count":20991531,"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-08-03T06:01:31.146Z","updated_at":"2025-04-08T01:36:38.179Z","avatar_url":"https://github.com/tpope.png","language":"Ruby","funding_links":[],"categories":["Ruby"],"sub_categories":[],"readme":"Hookup\n======\n\nHookup takes care of Rails tedium like bundling and migrating through\nGit hooks.  It fires after events like\n\n* pulling in upstream changes\n* switching branches\n* stepping through a bisect\n* conflict in schema\n\nUsage\n-----\n\n    gem install hookup\n    cd yourproject\n    hookup install\n\n### Bundling\n\nEach time your current HEAD changes, hookup checks to see if your\n`Gemfile`, `Gemfile.lock`, or gem spec has changed.  If so, it runs\n`bundle check`, and if that indicates any dependencies are unsatisfied,\nit runs `bundle install`.\n\n### Migrating\n\nEach time your current HEAD changes, hookup checks to see if any\nmigrations have been added, deleted, or modified.  Deleted and modified\nmigrations are given the `rake db:migrate:down` treatment, then `rake\ndb:migrate` is invoked to bring everything else up to date.\n\nHookup provides a `-C` option to change to a specified directory prior to\nrunning `bundle` or `rake`. This should be used if your `Gemfile` and\n`Rakefile` are in a non-standard location.\n\nTo use a non-standard `db` directory (where `schema.rb` and `migrate/`\nlive), add `--schema-dir=\"database/path\"` to the `hookup post-checkout`\nline in `.git/hooks/post-checkout`.\n\nTo force reloading the database if migrating fails, add\n`--load-schema=\"rake db:reset\"` to the `hookup post-checkout` line in\n`.git/hooks/post-checkout`.\n\n### Schema Resolving\n\nEach time there's a conflict in `db/schema.rb` on the\n`Rails::Schema.define` line, hookup resolves it in favor of the newer of\nthe two versions.\n\n### Skip Hookup\n\nSet the `SKIP_HOOKUP` environment variable to skip hookup.\n\n    SKIP_HOOKUP=1 git checkout master\n    \n### Removing Hookup\n    \n    hookup remove\n\nChangeLog\n---------\n\n[See it on the wiki](https://github.com/tpope/hookup/wiki/ChangeLog)\n\nLicense\n-------\n\nCopyright (c) Tim Pope.  MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftpope%2Fhookup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftpope%2Fhookup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftpope%2Fhookup/lists"}