magic_recipes 0.0.25 → 0.0.26

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 +39 -0
  2. metadata +2 -2
@@ -48,6 +48,45 @@ module MagicRecipes
48
48
  end
49
49
  end
50
50
 
51
+ desc "drop the database"
52
+ task :drop do
53
+ if use_rvm
54
+ run <<-CMD
55
+ #{rvm_cmd} &&
56
+ cd #{latest_release} &&
57
+ #{rake} db:drop RAILS_ENV=#{rails_env}
58
+ CMD
59
+ else
60
+ run "cd #{latest_release} && #{rake} db:drop RAILS_ENV=#{rails_env}"
61
+ end
62
+ end
63
+
64
+ desc "reset the database"
65
+ task :reset do
66
+ if use_rvm
67
+ run <<-CMD
68
+ #{rvm_cmd} &&
69
+ cd #{latest_release} &&
70
+ #{rake} db:reset RAILS_ENV=#{rails_env}
71
+ CMD
72
+ else
73
+ run "cd #{latest_release} && #{rake} db:reset RAILS_ENV=#{rails_env}"
74
+ end
75
+ end
76
+
77
+ desc "create the database"
78
+ task :create do
79
+ if use_rvm
80
+ run <<-CMD
81
+ #{rvm_cmd} &&
82
+ cd #{latest_release} &&
83
+ #{rake} db:create RAILS_ENV=#{rails_env}
84
+ CMD
85
+ else
86
+ run "cd #{latest_release} && #{rake} db:create RAILS_ENV=#{rails_env}"
87
+ end
88
+ end
89
+
51
90
  desc "delete all Tables of the Database!"
52
91
  task :delete_tables do
53
92
  if use_rvm
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.25
4
+ version: 0.0.26
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-11-01 00:00:00.000000000 Z
12
+ date: 2012-11-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails