rails_pwnerer 0.5.17 → 0.5.18

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,3 +1,5 @@
1
+ v0.5.18. Bugfix: removal scripts are called at the right time too.
2
+
1
3
  v0.5.17. Ability to call custom scripts during an app's lifecycle.
2
4
 
3
5
  v0.5.16. Letter-based database passwords (ruby's mysql doesn't like numbers).
data/README CHANGED
@@ -129,3 +129,31 @@ that you can tweak.
129
129
  Before I forget: don't dots (.) in instance names. Think
130
130
  underscores (_) instead. You can use dots in application names,
131
131
  though.
132
+
133
+
134
+ Hooked on +rails_pwnerer+:
135
+
136
+ You're growing to complex applications which need daemons outside
137
+ rails? +rails_pwnerer+ can invoke the scripts you provide at
138
+ various points in the application lifecycle. Use this to start/stop
139
+ processes, build indexes, or do any other task that doesn't fit in a
140
+ Web request.
141
+
142
+ The following prefixes are searched for in script/rails_pwnerer:
143
+ * install - executed when an application is installed, after it is fully configured
144
+ * pre_start - executed before the application is started
145
+ * post_start - executed after the application is started
146
+ * pre_stop - executed before the application is stopped
147
+ * post_stop - executed after the application is stopped
148
+ * update - executed when the application is updated
149
+ * remove - executed when the application is removed
150
+
151
+ The first script matching the pattern is executed. This means you can
152
+ have an "install.rb", so you can use your favorite language extension.
153
+ You cannot have both an "install.rb" and an "install.sh" executing at
154
+ the same time.
155
+
156
+ Writing your lifecycle scripts in Ruby? You can use the +rails_pwnerer+
157
+ gem to commonly-used chunks of functionality . RailsPwnage::Util
158
+ (including RailsPwnage::Base) is likely to be useful.
159
+
@@ -111,7 +111,6 @@ class RailsPwnage::App::ClusterConfig
111
111
  end
112
112
 
113
113
  def remove(app_name, instance_name)
114
- stop app_name, instance_name
115
114
  remove_mongrels app_name, instance_name
116
115
  manage_ports app_name, instance_name, :free
117
116
  end
@@ -42,8 +42,12 @@ module RailsPwnage::App
42
42
  end
43
43
 
44
44
  # removes an application (and stops its servers)
45
- def self.remove(app_name, instance_name)
46
- instance_magic(app_name, instance_name) do |app, instance|
45
+ def self.remove(app_name, instance_name)
46
+ instance_magic(app_name, instance_name) do |app, instance|
47
+ Scripts.new.pre_stop app, instance
48
+ ClusterConfig.new.stop app, instance
49
+ Scripts.new.post_stop app, instance
50
+
47
51
  [NginxConfig, ClusterConfig, Database, Svn, Config].each do |mod|
48
52
  mod.new.remove app, instance
49
53
  end
@@ -1,18 +1,18 @@
1
1
 
2
- # Gem::Specification for Rails_pwnerer-0.5.17
2
+ # Gem::Specification for Rails_pwnerer-0.5.18
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.5.17
8
+ version: 0.5.18
9
9
  platform: ruby
10
10
  authors:
11
11
  - Victor Costan
12
12
  autorequire:
13
13
  bindir: bin
14
14
 
15
- date: 2008-08-27 00:00:00 -04:00
15
+ date: 2008-08-28 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.5.17
4
+ version: 0.5.18
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-08-27 00:00:00 -04:00
12
+ date: 2008-08-28 00:00:00 -04:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency