{"id":13878901,"url":"https://github.com/rpush/modis","last_synced_at":"2025-04-06T02:09:51.641Z","repository":{"id":6150261,"uuid":"7379491","full_name":"rpush/modis","owner":"rpush","description":"ActiveModel + Redis","archived":false,"fork":false,"pushed_at":"2024-09-09T12:22:25.000Z","size":244,"stargazers_count":38,"open_issues_count":1,"forks_count":33,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-03-30T00:11:05.413Z","etag":null,"topics":["activemodel-redis","modis","redis","ruby"],"latest_commit_sha":null,"homepage":null,"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/rpush.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","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":"2012-12-30T19:17:29.000Z","updated_at":"2024-09-06T17:20:31.000Z","dependencies_parsed_at":"2023-02-17T07:01:13.187Z","dependency_job_id":"2198743d-674e-4d0d-9c37-c31737652840","html_url":"https://github.com/rpush/modis","commit_stats":{"total_commits":180,"total_committers":13,"mean_commits":"13.846153846153847","dds":0.4666666666666667,"last_synced_commit":"bfe2b160d59541223541e4195532de465513800e"},"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rpush%2Fmodis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rpush%2Fmodis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rpush%2Fmodis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rpush%2Fmodis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rpush","download_url":"https://codeload.github.com/rpush/modis/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247423515,"owners_count":20936626,"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":["activemodel-redis","modis","redis","ruby"],"created_at":"2024-08-06T08:02:03.700Z","updated_at":"2025-04-06T02:09:51.604Z","avatar_url":"https://github.com/rpush.png","language":"Ruby","readme":"[![Code Climate](https://codeclimate.com/github/ileitch/modis/badges/gpa.svg)](https://codeclimate.com/github/ileitch/modis)\n[![Test Coverage](https://codeclimate.com/github/ileitch/modis/badges/coverage.svg)](https://codeclimate.com/github/ileitch/modis)\n\n# Modis\n\nActiveModel + Redis with the aim to mimic ActiveRecord where possible.\n\n## Requirements\n\nModis 4.0+ supports Rails 5.2 and higher, including Rails 6.1, as well as Ruby 2.3 and above, including Ruby 3.0. Tests are also being run with JRuby. For details please check the current CI setup.\n\nFor releases supporting older Rails versions such as 4.2-5.1 please check out the 3.x releases.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'modis'\n```\n\nAnd then execute:\n\n```console\n$ bundle\n```\n\nOr install it yourself as:\n\n```console\n$ gem install modis\n```\n\n## Usage\n\n```ruby\nclass MyModel\n  include Modis::Model\n  attribute :name, :string\n  attribute :age, :integer\nend\n\nMyModel.create!(name: 'Ian', age: 28)\n```\n\n### all index\n\nModis, by default, creates an `all` index in redis in which it stores all the IDs for records created. As a result, a large amount of memory will be consumed if many ids are stored. The `all` index functionality can be turned off by using `enable_all_index`\n\n```ruby\nclass MyModel\n  include Modis::Model\n  enable_all_index false\nend\n```\n\nBy disabling the `all` index functionality, the IDs of each record created won't be saved. As a side effect, using `all` finder method will raise a `IndexError` exception as we would not have enough information to fetch all records. See https://github.com/rpush/modis/pull/7 for more context.\n\n## Supported Features\n\nTODO.\n\n## Contributing\n\n1. Fork it\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new Pull Request\n","funding_links":[],"categories":["Ruby"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frpush%2Fmodis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frpush%2Fmodis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frpush%2Fmodis/lists"}