magic_recipes 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/magic_recipes/db.rb +13 -0
  2. metadata +1 -1
@@ -32,6 +32,19 @@ module MagicRecipes
32
32
  end
33
33
  end
34
34
 
35
+ desc "delete all tables of the database"
36
+ task :delete_tables do
37
+ if use_rvm
38
+ run <<-CMD
39
+ #{rvm_cmd} &&
40
+ cd #{latest_release} &&
41
+ ActiveRecord::Base.connection.tables.each { |t| ActiveRecord::Base.connection.drop_table t }
42
+ CMD
43
+ else
44
+ run "cd #{latest_release} && ActiveRecord::Base.connection.tables.each { |t| ActiveRecord::Base.connection.drop_table t }"
45
+ end
46
+ end
47
+
35
48
  end
36
49
 
37
50
  # eof
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: magic_recipes
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: