{"id":15426179,"url":"https://github.com/cmeiklejohn/seedable","last_synced_at":"2025-04-19T17:42:21.533Z","repository":{"id":56894696,"uuid":"1975657","full_name":"cmeiklejohn/seedable","owner":"cmeiklejohn","description":"Allows for quick serialization/deserialization of objects for moving between environments.","archived":false,"fork":false,"pushed_at":"2011-09-23T04:44:28.000Z","size":123,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-04-24T01:41:33.479Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://github.com/cmeiklejohn/seedable","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/cmeiklejohn.png","metadata":{"files":{"readme":"README.rdoc","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-06-30T00:31:03.000Z","updated_at":"2013-10-11T17:26:08.000Z","dependencies_parsed_at":"2022-08-21T01:20:44.687Z","dependency_job_id":null,"html_url":"https://github.com/cmeiklejohn/seedable","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmeiklejohn%2Fseedable","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmeiklejohn%2Fseedable/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmeiklejohn%2Fseedable/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmeiklejohn%2Fseedable/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cmeiklejohn","download_url":"https://codeload.github.com/cmeiklejohn/seedable/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248670532,"owners_count":21142923,"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-01T17:55:06.170Z","updated_at":"2025-04-16T11:31:58.483Z","avatar_url":"https://github.com/cmeiklejohn.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"= Seedable\n\nData import and export for rails, to assist in seeding development\ndatabases from production.\n\n== What is Seedable?\n\nSeedable is a mixin to select groups of objects, and export them via\nserialized JSON, to be reimported later.  The goal, is less to maintain\na consistent database state, but for quick dumping and restoring of data\nbetween environments, to seed your database.\n\n== Usage\n\nUsing Seedable is easy!\n\n=== How do I include it?\n\nAdd the gem.\n\n    gem 'seedable'\n\nInclude the module:\n\n    include Seedable\n\nIn the models you want to export together, place the following:\n\n    seedable\n\n=== Exporting records\n\nTo export, call:\n\n    json = @garage.to_seedable\n\nBy default, seedable will traverse all active\\_record associations and\nexport all of their attributes.  To exclude associations, do the following:\n\n    seedable :include_associations =\u003e [:cars, :bikes]\n\nYou can also call it after the fact:\n\n    Garage.include_associations([:cars])\n\nTo filter attributes:\n\n    seedable :filter_attributes =\u003e [:id]\n\nYou can also call it after the fact:\n\n    Garage.filter_attributes([:id])\n\nYou can also export an array of disperse object types:\n\n    [@garage, @car, @garage2, @bike].to_seedable\n\n=== Importing records\n\nTo import:\n\n    Garage.from_seedable(json)\n\nor, if you have JSON from a unknown object type and want it to return\nthe proper object type:\n\n    Seedable.from_seedable(garage_json) # Returns Garage object.\n\nor, an array of different object types:\n\n    json = [@garage, @car, @garage2, @bike].to_seedable\n    Seedable.from_seedable(json) # Returns array of [Garage, Car, Garage, Bike]\n\n== Caveats\n\nThis is the first release, and yes, there are a bunch of caveats.\n\n=== Compatibility\n\n1. Compatible and tested under rails 3.1 and rails-master.\n2. Compatible and tested under ruby 1.9.2.\n\n=== Exporting with primary keys\n\n1. Importing objects with associated objects by primary key will only\n   work on rails master.  This is because the code relies on mass\n   assignment changes/abstractions destined for rails-3.2.x.\n\n== License\n\nSeedable is Copyright © 2011 Christopher Meiklejohn.  It is free software, and may be redistributed under the terms specified in the LICENSE file.\n\n== About\n\nThe seedable gem was written by {Christopher Meiklejohn}[mailto:cmeiklejohn@swipely.com] from {Swipely, Inc.}[http://www.swipely.com].\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcmeiklejohn%2Fseedable","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcmeiklejohn%2Fseedable","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcmeiklejohn%2Fseedable/lists"}