# \[REL\] Manage Fixtures 2.0.0

**URL:** <https://www.ruby-forum.com/t/rel-manage-fixtures-2-0-0/62982>\
**Category:** Rails\
**Created:** [June 10, 2006, 2:08am UTC](https://www.ruby-forum.com/t/rel-manage-fixtures-2-0-0/62982 "2006-06-10T02:08:37Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![nshb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/df788c/32.png) [@nshb](https://www.ruby-forum.com/u/nshb)\
**Post date:** [June 10, 2006, 2:08am UTC](https://www.ruby-forum.com/t/rel-manage-fixtures-2-0-0/62982/1 "2006-06-10T02:08:37Z")

</div>

Just released a new version of the _Managed Fixtures_ plugin, previously  
known as _Export Fixtures_.

The name change comes with some added functionality for managing the  
fixtures, primarily with two new import tasks for importing specific  
Models  
or all of them within the test/fixtures directory.

Both new import tasks take the exported fixtures, and allow you to  
directly  
import one, or all of them.

= Description

This plugin is a super lightweight tool used to manage all your  
fixtures,  
whether it is exporting or importing them.

So if you want to export all your data from your production server into  
your  
development environment, this will simplify the process without having  
to  
load up your database manager.

Similarly, if you want to import a selected set of Models, you can do  
that  
using the appropriate tasks.

= INSTALLATION

[%] script/plugin discover  
[%] script/plugin install manage\_fixtures

= USAGE

Create YAML test fixtures from data in an existing database. Defaults to  
development database. Set RAILS\_ENV to override.

[%] rake db:fixtures:export\_all

Create YAML test fixtures for a specific table(s) from data in an  
existing  
database. Defaults to development database. Set RAILS\_ENV to override.

[%] rake db:fixtures:export\_for\_tables TABLES=foos[,bars]

Create YAML text fixtures based on a specific SQL query

[%] rake db:fixtures:export\_using\_query SQL=“select \* from foo where  
id=‘bar’” FIXTURE\_NAME=foo

Import the YAML test fixtures for specific models from data in an  
existing  
database. Defaults to development database. Set RAILS\_ENV to override.

[%] rake db:fixtures:import\_for\_models MODELS=Foo[,Bar,Land]

Import all YAML test fixtures for all of the models from data in an  
existing  
database. Defaults to development database. Set RAILS\_ENV to override.

[%] rake db:fixtures:import\_all

---

<div class="post-metadata">

**Author:** ![nshb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/df788c/32.png) [@nshb](https://www.ruby-forum.com/u/nshb)\
**Post date:** [June 10, 2006, 6:25am UTC](https://www.ruby-forum.com/t/rel-manage-fixtures-2-0-0/62982/2 "2006-06-10T06:25:56Z")

</div>

Published at [http://agilewebdevelopment.com/plugins/manage\_fixtures](http://agilewebdevelopment.com/plugins/manage_fixtures) 🙂

–  
Benjamin C.  
[http://www.bencurtis.com/](http://www.bencurtis.com/)  
[http://www.tesly.com/](http://www.tesly.com/) – Collaborative test case management  
[http://www.agilewebdevelopment.com/](http://www.agilewebdevelopment.com/) – Resources for the Rails community

---

<div class="post-metadata">

**Author:** ![nshb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/df788c/32.png) [@nshb](https://www.ruby-forum.com/u/nshb)\
**Post date:** [June 11, 2006, 4:57pm UTC](https://www.ruby-forum.com/t/rel-manage-fixtures-2-0-0/62982/3 "2006-06-11T16:57:51Z")

</div>

On Fri, 9 Jun 2006 21:22:16 -0700, Benjamin C. wrote:

> Published at [http://agilewebdevelopment.com/plugins/manage\_fixtures](http://agilewebdevelopment.com/plugins/manage_fixtures) 🙂

I just wanted to give a hearty thanks to Benjamin for personally keeping  
up  
with all the announcements here and funnelling them into an RSS feed for  
the rest of us. It’s got to be a lot of work, but it’s highly  
appreciated,  
and if he’s going to be at RailsConf, I for one, will buy him a drink.

Jay L.

---

<div class="post-metadata">

**Author:** ![nshb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/df788c/32.png) [@nshb](https://www.ruby-forum.com/u/nshb)\
**Post date:** [June 11, 2006, 5:08pm UTC](https://www.ruby-forum.com/t/rel-manage-fixtures-2-0-0/62982/4 "2006-06-11T17:08:32Z")

</div>

On 6/11/06, Jay L. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> On Fri, 9 Jun 2006 21:22:16 -0700, Benjamin C. wrote:
> 
> > Published at [http://agilewebdevelopment.com/plugins/manage\_fixtures](http://agilewebdevelopment.com/plugins/manage_fixtures) 🙂
> 
> I just wanted to give a hearty thanks to Benjamin for personally keeping up  
> with all the announcements here and funnelling them into an RSS feed for  
> the rest of us. It’s got to be a lot of work, but it’s highly appreciated,  
> and if he’s going to be at RailsConf, I for one, will buy him a drink.

Well… As I am many others can’t exactly jump into planes and fly to  
RailsConf. You should then set up a PayPal donations system to keep  
Benjamin drunk the whole time. 😉

–

---

<div class="post-metadata">

**Author:** ![nshb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/df788c/32.png) [@nshb](https://www.ruby-forum.com/u/nshb)\
**Post date:** [June 11, 2006, 5:07pm UTC](https://www.ruby-forum.com/t/rel-manage-fixtures-2-0-0/62982/5 "2006-06-11T17:07:56Z")

</div>

On Jun 11, 2006, at 7:54 AM, Jay L. wrote:

> appreciated,  
> and if he’s going to be at RailsConf, I for one, will buy him a drink.
> 
> Jay L.

Thanks! It’s a pleasure to provide the resource to the Rails  
community. I will be at RailsConf, and even presenting (http://  
[www.bencurtis.com/archives/2006/03/railsconf/](http://www.bencurtis.com/archives/2006/03/railsconf/)). You don’t need to  
buy me a drink, but do stop by and say ‘hi’. 🙂

–  
Benjamin C.  
[http://www.bencurtis.com/](http://www.bencurtis.com/)  
[http://www.tesly.com/](http://www.tesly.com/) – Collaborative test case management  
[http://www.agilewebdevelopment.com/](http://www.agilewebdevelopment.com/) – Resources for the Rails community

---

<div class="post-metadata">

**Author:** ![nshb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/df788c/32.png) [@nshb](https://www.ruby-forum.com/u/nshb)\
**Post date:** [June 11, 2006, 5:15pm UTC](https://www.ruby-forum.com/t/rel-manage-fixtures-2-0-0/62982/6 "2006-06-11T17:15:17Z")

</div>

On Jun 11, 2006, at 8:06 AM, Jon Gretar B. wrote:

> > the rest of us. It’s got to be a lot of work, but it’s highly  
> > appreciated,  
> > and if he’s going to be at RailsConf, I for one, will buy him a  
> > drink.
> 
> Well… As I am many others can’t exactly jump into planes and fly to  
> RailsConf. You should then set up a PayPal donations system to keep  
> Benjamin drunk the whole time. 😉

Tips always accepted via PayPal: paypal@. 🙂

–  
Benjamin C.  
[http://www.bencurtis.com/](http://www.bencurtis.com/)  
[http://www.tesly.com/](http://www.tesly.com/) – Collaborative test case management  
[http://www.agilewebdevelopment.com/](http://www.agilewebdevelopment.com/) – Resources for the Rails community
