Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
removed accidental tasks, updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick Gauthier committed Oct 23, 2009
1 parent 3f8fa1e commit 28787b2
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 25 deletions.
44 changes: 32 additions & 12 deletions README.rdoc
Original file line number Diff line number Diff line change
@@ -1,17 +1,37 @@
= rails_structure_loading

Description goes here.

== Note on Patches/Pull Requests

* Fork the project.
* Make your feature addition or bug fix.
* Add tests for it. This is important so I don't break it in a
future version unintentionally.
* Commit, do not mess with rakefile, version, or history.
(if you want to have your own version, that is fine but
bump version in a commit by itself I can ignore when I pull)
* Send me a pull request. Bonus points for topic branches.
Rails structure loading patches rails tasks to allow you to
store and retrieve your database in SQL format.

Currently it only supports PostgreSQL

== Installation

From gemcutter:

gem install rails_structure_loading

== Usage

in your Rakefile:

require 'rails_structure_loading'

== What it does

Rails Structure Loading creates the following tasks:

* db:structure:load - loads db/structure.sql into the DB
* db:structure:dump - creates db/structure.sql from the DB
* db:domain:load - loads db/domain.sql into the DB
(this is your app's domain data, not seed data)
* db:domain:dump - dumps the data in the database into db/domain.sql

Rails Structure Loading modifies the following tasks:

* db:reset will load the structure and domain data if the file exists,
otherwise it will use the schema as usual
* db:migrate will dump the structure and domain data after running

== Copyright

Expand Down
13 changes: 0 additions & 13 deletions lib/tasks/rails_structure_loading.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,16 +72,3 @@ def domain
end
end

# The standard test methods wipe the database, which breaks our domain data structure
# so delete all the standard test methods
["functionals", "units", "integration", "all"].each do |tt|
Rake.application.send(:eval, "@tasks.delete('test:#{tt}')")
end

namespace :test do
task :all => 'multitest'
task :units => 'multitest:units'
task :functionals => 'multitest:functionals'
task :integration => 'multitest:integration'
end

0 comments on commit 28787b2

Please sign in to comment.