powder 0.1.7 → 0.1.8

Sign up to get free protection for your applications and to get access to all the features.
data/Readme.md CHANGED
@@ -34,6 +34,10 @@ powder manages [pow](http://pow.cx/)
34
34
  # look like an app that can be powed it will offer to download
35
35
  # a basic config.ru for Rails 2
36
36
 
37
+ $ powder default
38
+ => Link the current dir to ~/.pow/default
39
+ # Serve this directory for all unhandled domains
40
+
37
41
  $ powder unlink
38
42
  => Unlink current_dir or the symlink defined in .powder
39
43
 
@@ -64,6 +68,10 @@ powder manages [pow](http://pow.cx/)
64
68
  => Opens the pow link in a browser
65
69
  # aliased as powder -o
66
70
 
71
+ $ powder open --xip
72
+ => Opens the xip.io link in a browser
73
+ # aliased as powder -o -x
74
+
67
75
  $ powder open [bacon]
68
76
  => Opens http://bacon.dev in a browser
69
77
  # if you have set up alternative top level domains in .powconfig,
@@ -109,6 +117,9 @@ powder manages [pow](http://pow.cx/)
109
117
  $ powder down
110
118
  => Disable Pow
111
119
 
120
+ $ powder debug
121
+ => Opens a debug shell with your application environment
122
+
112
123
  # Contributors #
113
124
 
114
125
  Built by [rodreegez](https://github.com/Rodreegez) and [philnash](https://github.com/philnash).
@@ -116,6 +127,10 @@ Built by [rodreegez](https://github.com/Rodreegez) and [philnash](https://github
116
127
  Massive thanks to all our great
117
128
  [contributors](https://github.com/Rodreegez/powder/contributors)
118
129
 
130
+ # Related tools #
131
+
132
+ * [Powser](https://github.com/phil-monroe/powser) - Powder for your browser!
133
+
119
134
  ## Copyright ##
120
135
 
121
136
  Copyright (c) 2011 Adam Rogers and Phil Nash. See LICENSE for details.
data/bin/powder CHANGED
@@ -121,6 +121,12 @@ module Powder
121
121
  FileUtils.rm_f Dir.glob('tmp/*restart.txt')
122
122
  end
123
123
 
124
+
125
+ desc "respawn", "Restart the pow process"
126
+ def respawn
127
+ %x{launchctl stop cx.pow.powd}
128
+ end
129
+
124
130
  desc "list", "List current pows"
125
131
  def list
126
132
  pows = Dir[POW_PATH + "/*"].map do |link|
@@ -132,8 +138,23 @@ module Powder
132
138
  end
133
139
 
134
140
  desc "open", "Open a pow in the browser"
141
+ method_option :xip, :type => :boolean, :default => false, :alias => '-x', :desc => "open xip.io instead of .domain"
135
142
  def open(name=nil)
136
- %x{open http://#{name || get_pow_name}.#{domain}}
143
+ if options.xip?
144
+ local_ip = '0.0.0.0'
145
+ begin
146
+ orig, Socket.do_not_reverse_lookup = Socket.do_not_reverse_lookup, true # turn off reverse DNS resolution temporarily
147
+ UDPSocket.open do |s|
148
+ s.connect '64.233.187.99', 1
149
+ local_ip = s.addr.last.to_s
150
+ end
151
+ ensure
152
+ Socket.do_not_reverse_lookup = orig
153
+ end
154
+ %x{open http://#{name || get_pow_name}.#{local_ip}.xip.io}
155
+ else
156
+ %x{open http://#{name || get_pow_name}.#{domain}}
157
+ end
137
158
  end
138
159
 
139
160
  desc "unlink", "Unlink a pow app"
@@ -148,7 +169,7 @@ module Powder
148
169
  end
149
170
  end
150
171
 
151
- desc "remove", "An alias to Unlink (depreciated)"
172
+ desc "remove", "An alias to Unlink (deprecated)"
152
173
  alias :remove :unlink
153
174
 
154
175
  desc "cleanup", "Clean up invalid symbolic link"
@@ -183,6 +204,17 @@ module Powder
183
204
  %x{curl get.pow.cx/uninstall.sh | sh}
184
205
  end
185
206
 
207
+ desc "debug", "Open a debug session"
208
+ def debug
209
+ check_rdebug_initializer
210
+ # Connect to remote rdebug session
211
+ require 'ruby-debug'
212
+ Debugger.settings[:autoeval] = true
213
+ Debugger.settings[:autolist] = 1
214
+ Debugger.settings[:reload_source_on_change] = true
215
+ Debugger.start_client
216
+ end
217
+
186
218
  desc "version", "Shows the version"
187
219
  def version
188
220
  say "powder #{Powder::VERSION}"
@@ -239,6 +271,24 @@ module Powder
239
271
  json = eval results
240
272
  json.each {|k,v| say "#{k.ljust(12, ' ')} #{v}"}
241
273
  end
274
+
275
+ desc "portmap PORT", "Map a port to an app"
276
+ method_option :name, :type => :string, :aliases => '-n', :desc => 'name of the port map'
277
+ method_option :force, :type => :boolean, :default => false, :alias => '-f', :desc => "remove the old configuration, overwrite .powder"
278
+ def portmap(port)
279
+ if File.symlink?(POW_PATH)
280
+ name = options.name ? options.name : get_pow_name
281
+ app_path = "#{POW_PATH}/#{name}"
282
+ FileUtils.rm_f(app_path) if options[:force]
283
+ File.open(app_path, 'w') do |file|
284
+ file.write(port)
285
+ end
286
+ say "Your application is now available at http://#{name}.#{domain}/"
287
+ else
288
+ say "Pow is not installed."
289
+ end
290
+
291
+ end
242
292
 
243
293
  private
244
294
 
@@ -287,7 +337,7 @@ module Powder
287
337
  if File.exists?('config.ru') || File.exists?('public/index.html')
288
338
  true
289
339
  elsif legacy = (is_rails2_app? || is_radiant_app?)
290
- say "This appears to be a #{legacy} applicaton. You need a config.ru file."
340
+ say "This appears to be a #{legacy} application. You need a config.ru file."
291
341
  if yes? "Do you want to autogenerate a basic config.ru for #{legacy}?"
292
342
  uri = URI.parse("https://raw.github.com/gist/909308")
293
343
  http = Net::HTTP.new(uri.host, uri.port)
@@ -327,6 +377,34 @@ module Powder
327
377
  'dev'
328
378
  end
329
379
  end
380
+
381
+ def check_rdebug_initializer
382
+ rails_initializer = %x{pwd}.chomp + "/config/initializers/rdebug.rb"
383
+ rack_initializer = %x{pwd}.chomp + "/rdebug.rb"
384
+ unless File.exists?(rack_initializer) || File.exists?(rails_initializer)
385
+ say "Its appears that the required initializer for rdebug doesn't exists in your application."
386
+ if yes? "Do you want to create it(y/n)?"
387
+ if yes? "This is a Rails/Radiant app(y/n)?"
388
+ create_file rails_initializer, get_gist(1135055)
389
+ else
390
+ create_file rack_initializer, get_gist(1262647)
391
+ append_to_file 'config.ru', "require 'rdebug.rb'"
392
+ end
393
+ restart
394
+ else
395
+ return false
396
+ end
397
+ end
398
+ end
399
+
400
+ def get_gist(id)
401
+ uri = URI.parse("https://raw.github.com/gist/#{id}")
402
+ http = Net::HTTP.new(uri.host, uri.port)
403
+ http.use_ssl = true
404
+ http.verify_mode = OpenSSL::SSL::VERIFY_NONE
405
+ request = Net::HTTP::Get.new(uri.request_uri)
406
+ http.request(request).body
407
+ end
330
408
  end
331
409
  end
332
410
  Powder::CLI.start
@@ -1,3 +1,3 @@
1
1
  module Powder
2
- VERSION = "0.1.7"
2
+ VERSION = "0.1.8"
3
3
  end
@@ -0,0 +1,219 @@
1
+ .\" generated with Ronn/v0.7.3
2
+ .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
+ .
4
+ .TH "POWDER" "1" "November 2011" "" ""
5
+ .
6
+ .SH "NAME"
7
+ \fBpowder\fR \- manage Pow Rack server
8
+ .
9
+ .SH "SYNOPSIS"
10
+ \fBpowder\fR
11
+ .
12
+ .SH "DESCRIPTION"
13
+ Command\-line management utility for 37signals\' Pow zero\-configuration Rack server for OS X (http://pow\.cx/)\.
14
+ .
15
+ .SH "HOMEPAGE"
16
+ https://github\.com/Rodreegez/powder
17
+ .
18
+ .SH "EXAMPLES"
19
+ .
20
+ .SS "Display usage information"
21
+ \fB$ powder [\-h|help]\fR
22
+ .
23
+ .br
24
+ => Display usage information
25
+ .
26
+ .br
27
+ # Lists name and brief descriptions of the tasks available
28
+ .
29
+ .SS "Linking applications in Pow"
30
+ powder will attempt to read \.powder, which names a default symlink for the current project
31
+ .
32
+ .P
33
+ \fB$ powder link\fR
34
+ .
35
+ .br
36
+ => Link the current dir to ~/\.pow/\fIcurrent_directory\fR
37
+ .
38
+ .P
39
+ \fB$ powder link [bacon]\fR
40
+ .
41
+ .br
42
+ => Link the current dir to ~/\.pow/bacon
43
+ .
44
+ .br
45
+ => Create \.powder, contents bacon
46
+ .
47
+ .P
48
+ \fB$ powder link [bacon] \-\-no\-create\fR
49
+ .
50
+ .br
51
+ => Link the current dir to ~/\.pow/bacon
52
+ .
53
+ .P
54
+ \fB$ powder link [bacon] \-\-force\fR
55
+ .
56
+ .br
57
+ => Remove the current pow symlink, and \.powder
58
+ .
59
+ .br
60
+ => Link the current dir to ~/\.pow/bacon
61
+ .
62
+ .br
63
+ => Create \.powder, contents bacon
64
+ .
65
+ .P
66
+ For both forms of link, if the current directory doesn\'t look like an app that can be powed it will offer to download a basic \fBconfig\.ru\fR for Rails 2
67
+ .
68
+ .SS "Unlinking applications"
69
+ \fB$ powder unlink\fR
70
+ .
71
+ .br
72
+ => Unlink current_dir or the symlink defined in \.powder
73
+ .
74
+ .P
75
+ \fB$ powder unlink bacon\fR
76
+ .
77
+ .br
78
+ => Unlink bacon
79
+ .
80
+ .P
81
+ \fB$ powder cleanup\fR
82
+ .
83
+ .br
84
+ => remove all invalid symbolic links
85
+ .
86
+ .SS "Working with Pow"
87
+ \fB$ powder config\fR
88
+ .
89
+ .br
90
+ => Get Pow\'s current configuration information
91
+ .
92
+ .P
93
+ \fB$ powder list\fR
94
+ .
95
+ .br
96
+ => List all the current apps linked in ~/\.pow
97
+ .
98
+ .br
99
+ # aliased as \fBpowder \-l\fR
100
+ .
101
+ .P
102
+ \fB$ powder status\fR
103
+ .
104
+ .br
105
+ => Get Pow\'s current status information
106
+ .
107
+ .P
108
+ \fB$ powder version\fR
109
+ .
110
+ .br
111
+ => Returns the current powder version
112
+ .
113
+ .br
114
+ # aliased as \fBpowder \-v\fR
115
+ .
116
+ .SS "Working with applications"
117
+ \fB$ powder open\fR
118
+ .
119
+ .br
120
+ => Opens the pow link in a browser
121
+ .
122
+ .br
123
+ # aliased as powder \-o
124
+ .
125
+ .P
126
+ \fB$ powder open [bacon]\fR
127
+ .
128
+ .br
129
+ => Opens http://bacon\.dev in a browser
130
+ .
131
+ .br
132
+ # if you have set up alternative top level domains in \.powconfig,
133
+ .
134
+ .br
135
+ # then the first listed domain will be opened\.
136
+ .
137
+ .SS "Managing application restarts"
138
+ \fB$ powder restart\fR
139
+ .
140
+ .br
141
+ => Restart the current app
142
+ .
143
+ .br
144
+ # aliased as \fBpowder \-r\fR
145
+ .
146
+ .P
147
+ \fB$ powder always_restart\fR
148
+ .
149
+ .br
150
+ => Always restart the current app
151
+ .
152
+ .br
153
+ # aliased as powder \-a
154
+ .
155
+ .P
156
+ \fB$ powder no_restarts\fR
157
+ .
158
+ .br
159
+ => don\'t do any automatic restarting of the current app
160
+ .
161
+ .SS "Working with logs"
162
+ \fB$ powder applog\fR
163
+ .
164
+ .br
165
+ => tail the log of the current app
166
+ .
167
+ .P
168
+ \fB$ powder log\fR
169
+ .
170
+ .br
171
+ => Tails the pow log\.
172
+ .
173
+ .br
174
+ # Not the application log, but the pow log, available at
175
+ .
176
+ .br
177
+ # ~/Library/Logs/Pow/apps/#{app\-directory}\.log
178
+ .
179
+ .SS "Installing and uninstalling Pow"
180
+ \fB$ powder install\fR
181
+ .
182
+ .br
183
+ => Installs pow server
184
+ .
185
+ .br
186
+ # (I know, "curl get\.pow\.cx | sh" isn\'t hard, but this is \fIeven\fR easier)
187
+ .
188
+ .P
189
+ \fB$ powder uninstall\fR
190
+ .
191
+ .br
192
+ => Uninstalls pow server
193
+ .
194
+ .P
195
+ \fB$ powder update\fR
196
+ .
197
+ .br
198
+ => Updates pow server
199
+ .
200
+ .br
201
+ # Really this is just an alias to powder install, but it feels more natural
202
+ .
203
+ .br
204
+ # this way\.
205
+ .
206
+ .SS "Enabling and Disabling Pow"
207
+ \fB$ powder up\fR
208
+ .
209
+ .br
210
+ => Enable Pow
211
+ .
212
+ .P
213
+ \fB$ powder down\fR
214
+ .
215
+ .br
216
+ => Disable Pow
217
+ .
218
+ .SH "AUTHOR"
219
+ Built by rodreegez \fIhttps://github\.com/Rodreegez\fR and philnash \fIhttps://github\.com/philnash\fR\.
@@ -0,0 +1,214 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta http-equiv='content-type' value='text/html;charset=utf8'>
5
+ <meta name='generator' value='Ronn/v0.7.3 (http://github.com/rtomayko/ronn/tree/0.7.3)'>
6
+ <title>powder(1) - manage Pow Rack server</title>
7
+ <style type='text/css' media='all'>
8
+ /* style: man */
9
+ body#manpage {margin:0}
10
+ .mp {max-width:100ex;padding:0 9ex 1ex 4ex}
11
+ .mp p,.mp pre,.mp ul,.mp ol,.mp dl {margin:0 0 20px 0}
12
+ .mp h2 {margin:10px 0 0 0}
13
+ .mp > p,.mp > pre,.mp > ul,.mp > ol,.mp > dl {margin-left:8ex}
14
+ .mp h3 {margin:0 0 0 4ex}
15
+ .mp dt {margin:0;clear:left}
16
+ .mp dt.flush {float:left;width:8ex}
17
+ .mp dd {margin:0 0 0 9ex}
18
+ .mp h1,.mp h2,.mp h3,.mp h4 {clear:left}
19
+ .mp pre {margin-bottom:20px}
20
+ .mp pre+h2,.mp pre+h3 {margin-top:22px}
21
+ .mp h2+pre,.mp h3+pre {margin-top:5px}
22
+ .mp img {display:block;margin:auto}
23
+ .mp h1.man-title {display:none}
24
+ .mp,.mp code,.mp pre,.mp tt,.mp kbd,.mp samp,.mp h3,.mp h4 {font-family:monospace;font-size:14px;line-height:1.42857142857143}
25
+ .mp h2 {font-size:16px;line-height:1.25}
26
+ .mp h1 {font-size:20px;line-height:2}
27
+ .mp {text-align:justify;background:#fff}
28
+ .mp,.mp code,.mp pre,.mp pre code,.mp tt,.mp kbd,.mp samp {color:#131211}
29
+ .mp h1,.mp h2,.mp h3,.mp h4 {color:#030201}
30
+ .mp u {text-decoration:underline}
31
+ .mp code,.mp strong,.mp b {font-weight:bold;color:#131211}
32
+ .mp em,.mp var {font-style:italic;color:#232221;text-decoration:none}
33
+ .mp a,.mp a:link,.mp a:hover,.mp a code,.mp a pre,.mp a tt,.mp a kbd,.mp a samp {color:#0000ff}
34
+ .mp b.man-ref {font-weight:normal;color:#434241}
35
+ .mp pre {padding:0 4ex}
36
+ .mp pre code {font-weight:normal;color:#434241}
37
+ .mp h2+pre,h3+pre {padding-left:0}
38
+ ol.man-decor,ol.man-decor li {margin:3px 0 10px 0;padding:0;float:left;width:33%;list-style-type:none;text-transform:uppercase;color:#999;letter-spacing:1px}
39
+ ol.man-decor {width:100%}
40
+ ol.man-decor li.tl {text-align:left}
41
+ ol.man-decor li.tc {text-align:center;letter-spacing:4px}
42
+ ol.man-decor li.tr {text-align:right;float:right}
43
+ </style>
44
+ </head>
45
+ <!--
46
+ The following styles are deprecated and will be removed at some point:
47
+ div#man, div#man ol.man, div#man ol.head, div#man ol.man.
48
+
49
+ The .man-page, .man-decor, .man-head, .man-foot, .man-title, and
50
+ .man-navigation should be used instead.
51
+ -->
52
+ <body id='manpage'>
53
+ <div class='mp' id='man'>
54
+
55
+ <div class='man-navigation' style='display:none'>
56
+ <a href="#NAME">NAME</a>
57
+ <a href="#SYNOPSIS">SYNOPSIS</a>
58
+ <a href="#DESCRIPTION">DESCRIPTION</a>
59
+ <a href="#HOMEPAGE">HOMEPAGE</a>
60
+ <a href="#EXAMPLES">EXAMPLES</a>
61
+ <a href="#AUTHOR">AUTHOR</a>
62
+ </div>
63
+
64
+ <ol class='man-decor man-head man head'>
65
+ <li class='tl'>powder(1)</li>
66
+ <li class='tc'></li>
67
+ <li class='tr'>powder(1)</li>
68
+ </ol>
69
+
70
+ <h2 id="NAME">NAME</h2>
71
+ <p class="man-name">
72
+ <code>powder</code> - <span class="man-whatis">manage Pow Rack server</span>
73
+ </p>
74
+
75
+ <h2 id="SYNOPSIS">SYNOPSIS</h2>
76
+
77
+ <p><code>powder</code></p>
78
+
79
+ <h2 id="DESCRIPTION">DESCRIPTION</h2>
80
+
81
+ <p>Command-line management utility for 37signals' Pow zero-configuration Rack server for OS X (http://pow.cx/).</p>
82
+
83
+ <h2 id="HOMEPAGE">HOMEPAGE</h2>
84
+
85
+ <p>https://github.com/Rodreegez/powder</p>
86
+
87
+ <h2 id="EXAMPLES">EXAMPLES</h2>
88
+
89
+ <h3 id="Display-usage-information">Display usage information</h3>
90
+
91
+ <p> <code>$ powder [-h|help]</code><br />
92
+ => Display usage information<br />
93
+ # Lists name and brief descriptions of the tasks available</p>
94
+
95
+ <h3 id="Linking-applications-in-Pow">Linking applications in Pow</h3>
96
+
97
+ <p>powder will attempt to read .powder, which names a default symlink for the current project</p>
98
+
99
+ <p> <code>$ powder link</code><br />
100
+ => Link the current dir to ~/.pow/<var>current_directory</var></p>
101
+
102
+ <p> <code>$ powder link [bacon]</code><br />
103
+ => Link the current dir to ~/.pow/bacon<br />
104
+ => Create .powder, contents bacon</p>
105
+
106
+ <p> <code>$ powder link [bacon] --no-create</code><br />
107
+ => Link the current dir to ~/.pow/bacon</p>
108
+
109
+ <p> <code>$ powder link [bacon] --force</code><br />
110
+ => Remove the current pow symlink, and .powder<br />
111
+ => Link the current dir to ~/.pow/bacon<br />
112
+ => Create .powder, contents bacon</p>
113
+
114
+ <p>For both forms of link, if the current directory doesn't
115
+ look like an app that can be powed it will offer to download
116
+ a basic <strong>config.ru</strong> for Rails 2</p>
117
+
118
+ <h3 id="Unlinking-applications">Unlinking applications</h3>
119
+
120
+ <p> <code>$ powder unlink</code><br />
121
+ => Unlink current_dir or the symlink defined in .powder</p>
122
+
123
+ <p> <code>$ powder unlink bacon</code><br />
124
+ => Unlink bacon</p>
125
+
126
+ <p> <code>$ powder cleanup</code><br />
127
+ => remove all invalid symbolic links</p>
128
+
129
+ <h3 id="Working-with-Pow">Working with Pow</h3>
130
+
131
+ <p> <code>$ powder config</code><br />
132
+ => Get Pow's current configuration information</p>
133
+
134
+ <p> <code>$ powder list</code><br />
135
+ => List all the current apps linked in ~/.pow<br />
136
+ # aliased as <code>powder -l</code></p>
137
+
138
+ <p> <code>$ powder status</code><br />
139
+ => Get Pow's current status information</p>
140
+
141
+ <p> <code>$ powder version</code><br />
142
+ => Returns the current powder version<br />
143
+ # aliased as <code>powder -v</code></p>
144
+
145
+ <h3 id="Working-with-applications">Working with applications</h3>
146
+
147
+ <p> <code>$ powder open</code><br />
148
+ => Opens the pow link in a browser<br />
149
+ # aliased as powder -o</p>
150
+
151
+ <p> <code>$ powder open [bacon]</code><br />
152
+ => Opens http://bacon.dev in a browser<br />
153
+ # if you have set up alternative top level domains in .powconfig,<br />
154
+ # then the first listed domain will be opened.</p>
155
+
156
+ <h3 id="Managing-application-restarts">Managing application restarts</h3>
157
+
158
+ <p> <code>$ powder restart</code><br />
159
+ => Restart the current app<br />
160
+ # aliased as <code>powder -r</code></p>
161
+
162
+ <p> <code>$ powder always_restart</code><br />
163
+ => Always restart the current app<br />
164
+ # aliased as powder -a</p>
165
+
166
+ <p> <code>$ powder no_restarts</code><br />
167
+ => don't do any automatic restarting of the current app</p>
168
+
169
+ <h3 id="Working-with-logs">Working with logs</h3>
170
+
171
+ <p> <code>$ powder applog</code><br />
172
+ => tail the log of the current app</p>
173
+
174
+ <p> <code>$ powder log</code><br />
175
+ => Tails the pow log.<br />
176
+ # Not the application log, but the pow log, available at<br />
177
+ # ~/Library/Logs/Pow/apps/#{app-directory}.log</p>
178
+
179
+ <h3 id="Installing-and-uninstalling-Pow">Installing and uninstalling Pow</h3>
180
+
181
+ <p> <code>$ powder install</code><br />
182
+ => Installs pow server<br />
183
+ # (I know, "curl get.pow.cx | sh" isn't hard, but this is <em>even</em> easier)</p>
184
+
185
+ <p> <code>$ powder uninstall</code><br />
186
+ => Uninstalls pow server</p>
187
+
188
+ <p> <code>$ powder update</code><br />
189
+ => Updates pow server<br />
190
+ # Really this is just an alias to powder install, but it feels more natural<br />
191
+ # this way.</p>
192
+
193
+ <h3 id="Enabling-and-Disabling-Pow">Enabling and Disabling Pow</h3>
194
+
195
+ <p> <code>$ powder up</code><br />
196
+ => Enable Pow</p>
197
+
198
+ <p> <code>$ powder down</code><br />
199
+ => Disable Pow</p>
200
+
201
+ <h2 id="AUTHOR">AUTHOR</h2>
202
+
203
+ <p>Built by <a href="https://github.com/Rodreegez">rodreegez</a> and <a href="https://github.com/philnash">philnash</a>.</p>
204
+
205
+
206
+ <ol class='man-decor man-foot man foot'>
207
+ <li class='tl'></li>
208
+ <li class='tc'>November 2011</li>
209
+ <li class='tr'>powder(1)</li>
210
+ </ol>
211
+
212
+ </div>
213
+ </body>
214
+ </html>
@@ -0,0 +1,132 @@
1
+ powder(1) -- manage Pow Rack server
2
+ ===================================
3
+
4
+ ## SYNOPSIS
5
+
6
+ `powder`
7
+
8
+ ## DESCRIPTION
9
+
10
+ Command-line management utility for 37signals' Pow zero-configuration Rack server for OS X (http://pow.cx/).
11
+
12
+ ## HOMEPAGE
13
+
14
+ https://github.com/Rodreegez/powder
15
+
16
+ ## EXAMPLES
17
+
18
+ ### Display usage information
19
+
20
+ `$ powder [-h|help]`
21
+ => Display usage information
22
+ # Lists name and brief descriptions of the tasks available
23
+
24
+ ### Linking applications in Pow
25
+
26
+ powder will attempt to read .powder, which names a default symlink for the current project
27
+
28
+ `$ powder link`
29
+ => Link the current dir to ~/.pow/<current_directory>
30
+
31
+ `$ powder link [bacon]`
32
+ => Link the current dir to ~/.pow/bacon
33
+ => Create .powder, contents bacon
34
+
35
+ `$ powder link [bacon] --no-create`
36
+ => Link the current dir to ~/.pow/bacon
37
+
38
+ `$ powder link [bacon] --force`
39
+ => Remove the current pow symlink, and .powder
40
+ => Link the current dir to ~/.pow/bacon
41
+ => Create .powder, contents bacon
42
+
43
+ For both forms of link, if the current directory doesn't
44
+ look like an app that can be powed it will offer to download
45
+ a basic **config.ru** for Rails 2
46
+
47
+ ### Unlinking applications
48
+
49
+ `$ powder unlink`
50
+ => Unlink current_dir or the symlink defined in .powder
51
+
52
+ `$ powder unlink bacon`
53
+ => Unlink bacon
54
+
55
+ `$ powder cleanup`
56
+ => remove all invalid symbolic links
57
+
58
+ ### Working with Pow
59
+
60
+ `$ powder config`
61
+ => Get Pow's current configuration information
62
+
63
+ `$ powder list`
64
+ => List all the current apps linked in ~/.pow
65
+ # aliased as `powder -l`
66
+
67
+ `$ powder status`
68
+ => Get Pow's current status information
69
+
70
+ `$ powder version`
71
+ => Returns the current powder version
72
+ # aliased as `powder -v`
73
+
74
+ ### Working with applications
75
+
76
+ `$ powder open`
77
+ => Opens the pow link in a browser
78
+ # aliased as powder -o
79
+
80
+ `$ powder open [bacon]`
81
+ => Opens http://bacon.dev in a browser
82
+ # if you have set up alternative top level domains in .powconfig,
83
+ # then the first listed domain will be opened.
84
+
85
+ ### Managing application restarts
86
+
87
+ `$ powder restart`
88
+ => Restart the current app
89
+ # aliased as `powder -r`
90
+
91
+ `$ powder always_restart`
92
+ => Always restart the current app
93
+ # aliased as powder -a
94
+
95
+ `$ powder no_restarts`
96
+ => don't do any automatic restarting of the current app
97
+
98
+ ### Working with logs
99
+
100
+ `$ powder applog`
101
+ => tail the log of the current app
102
+
103
+ `$ powder log`
104
+ => Tails the pow log.
105
+ # Not the application log, but the pow log, available at
106
+ # ~/Library/Logs/Pow/apps/#{app-directory}.log
107
+
108
+ ### Installing and uninstalling Pow
109
+
110
+ `$ powder install`
111
+ => Installs pow server
112
+ # (I know, "curl get.pow.cx | sh" isn't hard, but this is _even_ easier)
113
+
114
+ `$ powder uninstall`
115
+ => Uninstalls pow server
116
+
117
+ `$ powder update`
118
+ => Updates pow server
119
+ # Really this is just an alias to powder install, but it feels more natural
120
+ # this way.
121
+
122
+ ### Enabling and Disabling Pow
123
+
124
+ `$ powder up`
125
+ => Enable Pow
126
+
127
+ `$ powder down`
128
+ => Disable Pow
129
+
130
+ ## AUTHOR
131
+
132
+ Built by [rodreegez](https://github.com/Rodreegez) and [philnash](https://github.com/philnash).
@@ -20,4 +20,5 @@ Gem::Specification.new do |s|
20
20
  s.require_paths = ["lib"]
21
21
 
22
22
  s.add_dependency 'thor', '>=0.11.5'
23
+ s.add_development_dependency 'rake'
23
24
  end
metadata CHANGED
@@ -1,40 +1,47 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: powder
3
- version: !ruby/object:Gem::Version
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.8
4
5
  prerelease:
5
- version: 0.1.7
6
6
  platform: ruby
7
- authors:
7
+ authors:
8
8
  - Phil Nash
9
9
  - Adam Rogers
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
-
14
- date: 2011-11-02 00:00:00 +00:00
15
- default_executable:
16
- dependencies:
17
- - !ruby/object:Gem::Dependency
13
+ date: 2012-06-09 00:00:00.000000000 Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
18
16
  name: thor
19
- prerelease: false
20
- requirement: &id001 !ruby/object:Gem::Requirement
17
+ requirement: &70120736475800 !ruby/object:Gem::Requirement
21
18
  none: false
22
- requirements:
23
- - - ">="
24
- - !ruby/object:Gem::Version
19
+ requirements:
20
+ - - ! '>='
21
+ - !ruby/object:Gem::Version
25
22
  version: 0.11.5
26
23
  type: :runtime
27
- version_requirements: *id001
24
+ prerelease: false
25
+ version_requirements: *70120736475800
26
+ - !ruby/object:Gem::Dependency
27
+ name: rake
28
+ requirement: &70120736474600 !ruby/object:Gem::Requirement
29
+ none: false
30
+ requirements:
31
+ - - ! '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: *70120736474600
28
37
  description: Makes Pow even easier. I mean really, really, ridiculously easy.
29
- email:
30
- - "no"
31
- executables:
38
+ email:
39
+ - 'no'
40
+ executables:
32
41
  - powder
33
42
  extensions: []
34
-
35
43
  extra_rdoc_files: []
36
-
37
- files:
44
+ files:
38
45
  - .gitignore
39
46
  - CHANGELOG.md
40
47
  - Gemfile
@@ -44,34 +51,38 @@ files:
44
51
  - bin/powder
45
52
  - lib/powder.rb
46
53
  - lib/powder/version.rb
54
+ - man/powder.1
55
+ - man/powder.1.html
56
+ - man/powder.1.ronn
47
57
  - powder.gemspec
48
- has_rdoc: true
49
58
  homepage: http://github.com/Rodreegez/powder
50
59
  licenses: []
51
-
52
60
  post_install_message:
53
61
  rdoc_options: []
54
-
55
- require_paths:
62
+ require_paths:
56
63
  - lib
57
- required_ruby_version: !ruby/object:Gem::Requirement
64
+ required_ruby_version: !ruby/object:Gem::Requirement
58
65
  none: false
59
- requirements:
60
- - - ">="
61
- - !ruby/object:Gem::Version
62
- version: "0"
63
- required_rubygems_version: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - ! '>='
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
70
+ segments:
71
+ - 0
72
+ hash: 1995833865637283519
73
+ required_rubygems_version: !ruby/object:Gem::Requirement
64
74
  none: false
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- version: "0"
75
+ requirements:
76
+ - - ! '>='
77
+ - !ruby/object:Gem::Version
78
+ version: '0'
79
+ segments:
80
+ - 0
81
+ hash: 1995833865637283519
69
82
  requirements: []
70
-
71
83
  rubyforge_project: powder
72
- rubygems_version: 1.5.2
84
+ rubygems_version: 1.8.11
73
85
  signing_key:
74
86
  specification_version: 3
75
87
  summary: Makes Pow even easier
76
88
  test_files: []
77
-