Skip to content

Commit

Permalink
Ignore rdoc, and make features run from rake
Browse files Browse the repository at this point in the history
  • Loading branch information
ianwhite committed Mar 5, 2012
1 parent 8e71965 commit d427383
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 12 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Expand Up @@ -3,4 +3,5 @@ log/*.log
pkg/
tmp/
.rvmrc
Gemfile.lock
Gemfile.lock
rdoc/
7 changes: 5 additions & 2 deletions History.txt
@@ -1,6 +1,9 @@
* 0.0.1
== 0.0.1


* gem release
* Updated for latest rspec, cucumber, and ActiveRecord (3.x)

== Prior to gem release

* Improvements made while using for http://www.distinctivedoors.co.uk, (Ian White & Nick Rutherford)

Expand Down
24 changes: 16 additions & 8 deletions README.rdoc
Expand Up @@ -12,21 +12,22 @@ definition is included as is the schema_migrations table.

# drop-in replacement for mysqldump

rake db:dump DUMP_PATH=some/path
# just like mysqldump -u <user> -p<pass> <app>_development > some/path.sql
rake db:dump DUMP_PATH=some/path
# just like mysqldump -u <user> -p<pass> <app>_development > some/path.sql

rake db:load DUMP_PATH=some/path
# just like script/dbconsole -p < some/path.sql
rake db:load DUMP_PATH=some/path
# just like script/dbconsole -p < some/path.sql

# without schema information, just the data

rake db:data:dump DUMP_PATH=some/path # dump the data without touching the structure
rale db:data:load DUMP_PATH=some/path # load the data without touching the structure
rake db:data:dump DUMP_PATH=some/path # dump the data without touching the structure
rake db:data:load DUMP_PATH=some/path # load the data without touching the structure

# just load particular table data
rake db:data:load DUMP_PATH=some/path TABLES=users,things

rake db:data:load DUMP_PATH=some/path TABLES=users,things
See `lib/tasks/git_friendly_dumper_tasks.rake` and the features for more info

== Notes

It's probably a bad idea to check your dump into the same repo as your app.
Expand All @@ -37,4 +38,11 @@ containing many binary columns, this resulted in a massive saving in bandwidth.
Basically, we have the db backup inside the app, but ignored by the main app, the db/dump
has it's own git repo.

== Run the specs and features

Grab the last known good set of deps and run the specs and features

cp Gemfile.lock.development Gemfile.lock
bundle
rake

8 changes: 7 additions & 1 deletion Rakefile
Expand Up @@ -23,8 +23,9 @@ end
Bundler::GemHelper.install_tasks

require 'rspec/core/rake_task'
require "cucumber/rake/task"

task :default => [:spec]
task :default => [:spec, :features]

desc "Set up tmp stuff for running specs etc"
file "tmp/db" do
Expand All @@ -34,4 +35,9 @@ end
desc "Run the specs"
RSpec::Core::RakeTask.new(:spec => ['tmp/db']) do |t|
t.pattern = "./spec/**/*_spec.rb"
end

desc "Run the features"
Cucumber::Rake::Task.new(:features) do |task|
task.cucumber_opts = ["features"]
end

0 comments on commit d427383

Please sign in to comment.