{"id":29287356,"url":"https://github.com/hayashima/rh-activerecord-diff","last_synced_at":"2025-10-29T00:06:44.464Z","repository":{"id":45068354,"uuid":"438193449","full_name":"hayashima/rh-activerecord-diff","owner":"hayashima","description":"Simple ActiveRecord diff functionality","archived":false,"fork":false,"pushed_at":"2025-06-19T05:05:28.000Z","size":34,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-07-06T01:07:03.632Z","etag":null,"topics":["activerecord","rails","ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hayashima.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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,"zenodo":null}},"created_at":"2021-12-14T09:32:39.000Z","updated_at":"2025-06-19T05:05:32.000Z","dependencies_parsed_at":"2022-08-26T10:41:55.847Z","dependency_job_id":"18154c33-605c-473e-9a44-ba761dad9c54","html_url":"https://github.com/hayashima/rh-activerecord-diff","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hayashima/rh-activerecord-diff","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hayashima%2Frh-activerecord-diff","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hayashima%2Frh-activerecord-diff/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hayashima%2Frh-activerecord-diff/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hayashima%2Frh-activerecord-diff/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hayashima","download_url":"https://codeload.github.com/hayashima/rh-activerecord-diff/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hayashima%2Frh-activerecord-diff/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263833416,"owners_count":23517374,"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":["activerecord","rails","ruby"],"created_at":"2025-07-06T01:07:01.800Z","updated_at":"2025-10-29T00:06:39.438Z","avatar_url":"https://github.com/hayashima.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rh-activerecord-diff\n\nSimple ActiveRecord diff functionality.\n\nThis gem was created to take over and maintain [activerecord-diff](https://rubygems.org/gems/activerecord-diff).\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'rh-activerecord-diff'\n```\n\nAnd then execute:\n\n    $ bundle install\n\nOr install it yourself as:\n\n    $ gem install rh-activerecord-diff\n\n## Usage\n\n```ruby\nrequire 'active_record/diff'\n\nclass User \u003c ActiveRecord::Base\n  include ActiveRecord::Diff\nend\n\nalice = User.create(:name =\u003e 'alice', :email_address =\u003e 'alice@example.org')\n\nbob = User.create(:name =\u003e 'bob', :email_address =\u003e 'bob@example.org')\n\nalice.diff?(bob)  # =\u003e true\n\nalice.diff(bob)  # =\u003e {:name =\u003e ['alice', 'bob'], :email_address =\u003e ['alice@example.org', 'bob@example.org']}\n\nalice.diff({:name =\u003e 'eve'})  # =\u003e {:name =\u003e ['alice', 'eve']}\n```\n\n## Configuration\n\nBy default, ActiveRecord::Base.content_columns is used to decide which attributes\nto compare. You can include or exclude attributes from this as follows:\n\n```ruby\nclass User \u003c ActiveRecord::Base\n  diff :include =\u003e [:id], :exclude =\u003e [:password_hash]\nend\n```\n\nAlternatively, you can specify exactly which columns to compare:\n\n```ruby\nclass User \u003c ActiveRecord::Base\n  diff :id, :name, :email_address\nend\n```\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/hayashima/rh-activerecord-diff. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/hayashima/rh-activerecord-diff/blob/main/CODE_OF_CONDUCT.md).\n\n\n## License\n\nThe gem is available as open source under the terms of the [CC0 1.0 Universal](https://creativecommons.org/publicdomain/zero/1.0/).\n\n## Code of Conduct\n\nEveryone interacting in the rh-activerecord-diff project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/hayashima/rh-activerecord-diff/blob/main/CODE_OF_CONDUCT.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhayashima%2Frh-activerecord-diff","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhayashima%2Frh-activerecord-diff","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhayashima%2Frh-activerecord-diff/lists"}