rails_pwnerer 0.6.10 → 0.6.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/CHANGELOG CHANGED
@@ -1,3 +1,5 @@
1
+ v0.6.11. Added option for resetting the database.
2
+
1
3
  v0.6.10. Doing svn cleanup in case svn update fails.
2
4
 
3
5
  v0.6.9. Re-keying the database on every update.
data/README CHANGED
@@ -81,6 +81,9 @@ sudp rpwn rekey your_application
81
81
  * Bring down all the applications (panic mode):
82
82
  sudo rpwn go down
83
83
 
84
+ * Reset your database (drops and re-creates, useful in staging instances):
85
+ sudo rpwn db_reset your_application
86
+
84
87
  * Uninstall your application
85
88
  sudo rpwn uninstall your_application
86
89
 
@@ -154,6 +154,10 @@ ENDSQL
154
154
  when :rekey
155
155
  admin_database app_name, instance_name, :rekey
156
156
  configure_rails app_name, instance_name
157
+ when :db_reset
158
+ admin_database app_name, instance_name, :drop
159
+ admin_database app_name, instance_name, :create
160
+ migrate_database app_name, instance_name
157
161
  end
158
162
  end
159
163
 
@@ -95,6 +95,8 @@ module RailsPwnage::App
95
95
  Svn.new.manage app, instance, action
96
96
  when :db_console
97
97
  Svn.new.manage app, instance, action
98
+ when :db_reset
99
+ Database.new.manage app, instance, action
98
100
  end
99
101
  end
100
102
  end
@@ -89,6 +89,10 @@ class RailsPwnage::Executor
89
89
  app_name = args[1]
90
90
  instance_name = args[2] || '.'
91
91
  RailsPwnage::App.manage app_name, instance_name, :db_console
92
+ when 'dbreset', 'db_reset', 'resetdb', 'reset_db'
93
+ app_name = args[1]
94
+ instance_name = args[2] || '.'
95
+ RailsPwnage::App.manage app_name, instance_name, :db_reset
92
96
  when 'rekey'
93
97
  app_name = args[1]
94
98
  instance_name = args[2] || '.'
@@ -1,18 +1,18 @@
1
1
 
2
- # Gem::Specification for Rails_pwnerer-0.6.10
2
+ # Gem::Specification for Rails_pwnerer-0.6.11
3
3
  # Originally generated by Echoe
4
4
 
5
5
  --- !ruby/object:Gem::Specification
6
6
  name: rails_pwnerer
7
7
  version: !ruby/object:Gem::Version
8
- version: 0.6.10
8
+ version: 0.6.11
9
9
  platform: ruby
10
10
  authors:
11
11
  - Victor Costan
12
12
  autorequire:
13
13
  bindir: bin
14
14
 
15
- date: 2008-09-30 00:00:00 -04:00
15
+ date: 2008-10-02 00:00:00 -04:00
16
16
  default_executable:
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_pwnerer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.10
4
+ version: 0.6.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Costan
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-09-30 00:00:00 -04:00
12
+ date: 2008-10-02 00:00:00 -04:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency