{"_id":"easy-fixture","_rev":"30-33a1126095d7794d88a53ac0f98e9e19","name":"easy-fixture","description":"This module will help you to manage you fixtures","dist-tags":{"latest":"1.0.0"},"versions":{"0.0.0":{"name":"easy-fixture","version":"0.0.0","description":"This module will help you to manage you fixtures","main":"index.js","scripts":{"test":"mocha"},"repository":{"type":"git","url":"git://github.com/ivpusic/easy-fixture.git"},"keywords":["fixture","test","data","node","easy","fixtures"],"author":{"name":"Ivan Pusic"},"license":"MIT","bugs":{"url":"https://github.com/ivpusic/easy-fixture/issues"},"homepage":"https://github.com/ivpusic/easy-fixture","_id":"easy-fixture@0.0.0","dist":{"shasum":"4969c339265f355d1b122d413abc417e7cd3873b","tarball":"https://registry.npmjs.org/easy-fixture/-/easy-fixture-0.0.0.tgz","integrity":"sha512-DUmn90e7VCfJmjXy+VUSF2uaTMz0vwciEzIg7zialD199+FIqE+XJ5DhUuEYuxJJ+QP/WdkbGAd8MhPLj+KCCg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD63Oe40RIanP9hhbQuJEsTKPxWEOdEKtRtuM8B0i6pFQIhAJUXNyVfSbBTEJKN5JCMa0oogd1LkPeluEg1WxkT7bch"}]},"_from":".","_npmVersion":"1.3.15","_npmUser":{"name":"ivpusic","email":"pusic007@gmail.com"},"maintainers":[{"name":"ivpusic","email":"pusic007@gmail.com"}]},"0.1.0":{"name":"easy-fixture","version":"0.1.0","description":"This module will help you to manage you fixtures","main":"index.js","scripts":{"test":"mocha"},"repository":{"type":"git","url":"git://github.com/ivpusic/easy-fixture.git"},"keywords":["fixture","test","data","node","easy","fixtures"],"author":{"name":"Ivan Pusic"},"license":"MIT","bugs":{"url":"https://github.com/ivpusic/easy-fixture/issues"},"homepage":"https://github.com/ivpusic/easy-fixture","_id":"easy-fixture@0.1.0","dist":{"shasum":"10bceba4d159c7a503322acfbfd92fb0ecbccefc","tarball":"https://registry.npmjs.org/easy-fixture/-/easy-fixture-0.1.0.tgz","integrity":"sha512-TdCs4KwatcuydMTfUj8NETWlSqlA8iw8u8UT6qjWVXQcgwuYdIOoeDdsjshjzRQq/B5MRuUHdPmCUtHYQSHJGQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDf3V7rDb+B2TjJu3MgTb+DL+bfvX4MJpxaellt+cgHzQIhAJOLCaX4x5Mio5aGAgPFTYqKAN386eTsq+z72dDkpYEd"}]},"_from":".","_npmVersion":"1.3.15","_npmUser":{"name":"ivpusic","email":"pusic007@gmail.com"},"maintainers":[{"name":"ivpusic","email":"pusic007@gmail.com"}]},"0.1.1":{"name":"easy-fixture","version":"0.1.1","description":"This module will help you to manage you fixtures","main":"index.js","scripts":{"test":"mocha"},"repository":{"type":"git","url":"git://github.com/ivpusic/easy-fixture.git"},"keywords":["fixture","test","data","node","easy","fixtures"],"author":{"name":"Ivan Pusic"},"license":"MIT","bugs":{"url":"https://github.com/ivpusic/easy-fixture/issues"},"homepage":"https://github.com/ivpusic/easy-fixture","_id":"easy-fixture@0.1.1","dist":{"shasum":"0eb0bd7e43b37dbf90c3788dc78471424799aeaf","tarball":"https://registry.npmjs.org/easy-fixture/-/easy-fixture-0.1.1.tgz","integrity":"sha512-18UXm6vidbfn5kiHnZ+MJIUdNiWAgsgHtWi2e3pgxwnE71yC+e9sfLuLIIpAHN4Z5/IFt7btgEXoLauHUpA4SA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGrJwpazRS14MPlgkqmKP1QT5H51Yxk5lFlQzAT0JKqlAiEAzKwHYBSUrgFI7e5iCixvlIrmTxS0UbGNNd1jhE/CXew="}]},"_from":".","_npmVersion":"1.3.15","_npmUser":{"name":"ivpusic","email":"pusic007@gmail.com"},"maintainers":[{"name":"ivpusic","email":"pusic007@gmail.com"}]},"0.1.2":{"name":"easy-fixture","version":"0.1.2","description":"This module will help you to manage you fixtures","main":"index.js","scripts":{"test":"mocha"},"repository":{"type":"git","url":"git://github.com/ivpusic/easy-fixture.git"},"keywords":["fixture","test","data","node","easy","fixtures"],"author":{"name":"Ivan Pusic"},"license":"MIT","bugs":{"url":"https://github.com/ivpusic/easy-fixture/issues"},"homepage":"https://github.com/ivpusic/easy-fixture","_id":"easy-fixture@0.1.2","dist":{"shasum":"784dbf008a4d72d50958922e74f36dd9fa31393c","tarball":"https://registry.npmjs.org/easy-fixture/-/easy-fixture-0.1.2.tgz","integrity":"sha512-hYW3RU2RscE/sRlrb11/drqPhSG5Awhifn5f1kSaEHbovmk4ngkp3peRRmVjnuj0gwLkWhuRZGmV4Dc9qQk97Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBqFLyvY6xE47hTkw4mGygS4G9ehOx8blHh0dpvGUozOAiAmdhA/xPW99Wme9dfOCf/xjAhxR3E9CXYakKNm9IxzMw=="}]},"_from":".","_npmVersion":"1.3.15","_npmUser":{"name":"ivpusic","email":"pusic007@gmail.com"},"maintainers":[{"name":"ivpusic","email":"pusic007@gmail.com"}]},"0.1.3":{"name":"easy-fixture","version":"0.1.3","description":"This module will help you to manage you fixtures","main":"index.js","scripts":{"test":"mocha"},"repository":{"type":"git","url":"git://github.com/ivpusic/easy-fixture.git"},"keywords":["fixture","test","data","node","easy","fixtures"],"author":{"name":"Ivan Pusic"},"license":"MIT","bugs":{"url":"https://github.com/ivpusic/easy-fixture/issues"},"homepage":"https://github.com/ivpusic/easy-fixture","dependencies":{"q":"~1.0.1"},"_id":"easy-fixture@0.1.3","dist":{"shasum":"9bd915b9674ceb4ef85786341087ab59b6d8421f","tarball":"https://registry.npmjs.org/easy-fixture/-/easy-fixture-0.1.3.tgz","integrity":"sha512-KtdkIX8WyZgWSe4lwGfu8sBepM5Yxv5E44vaemolOP6yrYvCEkYgjWkDcOhHsYf/lyOSl6XqdrqeBvuXr1KREA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC9orhnU377HJf7HTztJ9RSutR2z+izpM72bkbP1E7xhwIhALPgh0uKcGyhlOw3FSZ2zjtOZBLOwN1Glfij/rbdPCfy"}]},"_from":".","_npmVersion":"1.3.15","_npmUser":{"name":"ivpusic","email":"pusic007@gmail.com"},"maintainers":[{"name":"ivpusic","email":"pusic007@gmail.com"}]},"0.1.4":{"name":"easy-fixture","version":"0.1.4","description":"This module will help you to manage you fixtures","main":"index.js","scripts":{"test":"mocha"},"repository":{"type":"git","url":"git://github.com/ivpusic/easy-fixture.git"},"keywords":["fixture","test","data","node","easy","fixtures"],"author":{"name":"Ivan Pusic"},"license":"MIT","bugs":{"url":"https://github.com/ivpusic/easy-fixture/issues"},"homepage":"https://github.com/ivpusic/easy-fixture","dependencies":{"q":"~1.0.1"},"_id":"easy-fixture@0.1.4","dist":{"shasum":"6cd8a15c1b88d486a76d5690ab5a1321c56e6416","tarball":"https://registry.npmjs.org/easy-fixture/-/easy-fixture-0.1.4.tgz","integrity":"sha512-YAsUwDbAqS47vnHrvQx60BaUDWu9oKcCw2w3mP9BVDkQ9SGC1H7CxirEpeww32pg45QRd5tVaaASI2W3dwrDMA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA8OcTXlpYh76amVZu1Top/hfApGIVP9Y7wzguDJKX5EAiBW431dW8AcSK1KzwF+uG0eEqXh9hAkoHQi6TtIGhuxig=="}]},"_from":".","_npmVersion":"1.3.15","_npmUser":{"name":"ivpusic","email":"pusic007@gmail.com"},"maintainers":[{"name":"ivpusic","email":"pusic007@gmail.com"}]},"1.0.0":{"name":"easy-fixture","version":"1.0.0","description":"This module will help you to manage you fixtures","main":"index.js","scripts":{"test":"mocha"},"repository":{"type":"git","url":"git://github.com/ivpusic/easy-fixture.git"},"keywords":["fixture","test","data","node","easy","fixtures"],"author":{"name":"Ivan Pusic"},"license":"MIT","bugs":{"url":"https://github.com/ivpusic/easy-fixture/issues"},"homepage":"https://github.com/ivpusic/easy-fixture","dependencies":{"q":"~1.0.1"},"_id":"easy-fixture@1.0.0","dist":{"shasum":"976a245532b73816086d6f26138f3034033e8b0e","tarball":"https://registry.npmjs.org/easy-fixture/-/easy-fixture-1.0.0.tgz","integrity":"sha512-wnhCuPSR69nnbewNSwWWda5LfkSIJCN+HO18oQgEgjkjAesyxNbiL06hW+/pgx1KVmTHi3HeAh3uBw1tB+DG2A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAlb/qrJ5bZT1c4dFxtHNnhCxzTAJTBJjnKXMVAqJsemAiAtAMOKnG/Qe7ThaVv8O/QoIugXqfC2kttC6Sn3L3cZ+w=="}]},"_from":".","_npmVersion":"1.3.15","_npmUser":{"name":"ivpusic","email":"pusic007@gmail.com"},"maintainers":[{"name":"ivpusic","email":"pusic007@gmail.com"}]}},"readme":"easy-fixture\n============\n\n### Motivation\n\nIf you have database with only few simple tables/collections things are simple. You can easiliy manage your fixture files. But trouble starts if you have complex tables/collections in database, and also relationships between them. In that case it is not easy to write fixture files, and also it is time wasting task.\n\nWith this module you can use current database state -> data added from your UI or on some other way.\nIdea is to have fixture manager which will `freeze` your current database state and save it into some local file.\nAfter that you will be able to load fixtures from that file into your database.\n\nTo make things easier, for each fixture manager there should be `grunt`/`gulp` task which makes this task even easier.\n\n### Available managers:\n- [easy-mongo-fixture](https://github.com/ivpusic/easy-mongo-fixture)\n\n### Available Grunt tasks:\n- [grunt-easy-mongo-fixture](https://github.com/ivpusic/grunt-easy-mongo-fixture)\n\n### Making custom fixture manager\n\nAll you have to do is to extend `Base` object of `easy-fixture`. \n\n#### Example\n```\nBase = require('easy-fixture').Base;\n\nfunction CustomFixtureManager(opts) {\n  Base.call(this);\n\n  // your init logic here\n}\n\nutil.inherits(CustomFixtureManager, Base);\n\n/*\n * THIS METHOD SHOULD RETURN PROMISE\n */\nCustomFixtureManager.prototype._load = function () {\n  // implementation of method for loading data from local file, \n  // and saving it into corresponing database destination\n};\n\n/*\n * THIS METHOD SHOULD RETURN PROMISE\n */\nCustomFixtureManager.prototype._save = function () {\n  // implementation of method for collectiong data from database source, \n  // and saving it into local file(s).\n};\n```\n\nAfter you create your ``CustomFixtureManager``, you can use it on following way with `easy-fixture`:\n```\nvar fixture = require('easy-fixture');\n\nvar fixtureManager = new CustomFixtureManager();\n\n// you can use multiple fixture managers. It will append each manager to array\nfixture.use(fixtureManager);\n\n// save method will run _save action on each fixture manager\nfixture.save().then(function () {\n  console.log('saved');\n});\n\n// load method will run _load action on each fixture manager\nfixture.load().then(function () {\n  console.log('loaded');\n});\n\n```\n\n# License\n**MIT**\n","maintainers":[{"name":"ivpusic","email":"pusic007@gmail.com"}],"time":{"modified":"2022-06-16T03:37:34.140Z","created":"2014-04-24T21:12:44.815Z","0.0.0":"2014-04-24T21:12:46.643Z","0.1.0":"2014-04-25T00:55:35.921Z","0.1.1":"2014-04-25T01:10:36.724Z","0.1.2":"2014-04-25T01:18:34.302Z","0.1.3":"2014-04-25T22:07:42.236Z","0.1.4":"2014-04-26T11:35:37.322Z","1.0.0":"2014-04-26T13:28:23.195Z"},"readmeFilename":"README.md","homepage":"https://github.com/ivpusic/easy-fixture","keywords":["fixture","test","data","node","easy","fixtures"],"repository":{"type":"git","url":"git://github.com/ivpusic/easy-fixture.git"},"author":{"name":"Ivan Pusic"},"bugs":{"url":"https://github.com/ivpusic/easy-fixture/issues"},"license":"MIT"}