rack-handler-apache 0.0.0 → 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/README.md +39 -0
  2. data/lib/rack/handler/apache.rb +6 -2
  3. metadata +51 -2
data/README.md ADDED
@@ -0,0 +1,39 @@
1
+ rack-handler-apache
2
+ ===================
3
+
4
+ A rack-handler like gem for apache/passenger.
5
+
6
+ By default, when developing rails, or other rack based applications, Webrick is used as the web server.
7
+ However sometimes, you want to quickly check that things are working with Apache/Passenger.
8
+
9
+ Now you can just type:
10
+
11
+ rails server apache
12
+
13
+ or
14
+
15
+ rails s apache
16
+
17
+ or
18
+
19
+ rackup -s apache config.ru
20
+
21
+ This will run a minimally configures apached instance as the current user. When you control-c your app,
22
+ the server will shutdown too.
23
+
24
+ Yes, this is not the right way to run your production rails apps!
25
+
26
+ Yes, this is running as you, so there are the usual security issues!
27
+
28
+ But it might be handy!!
29
+
30
+
31
+ Things to document:
32
+
33
+ * Everything!
34
+ * Default configurations
35
+ * How SSL support works
36
+
37
+ Things todo:
38
+
39
+ * Better config customisation
@@ -1,7 +1,11 @@
1
1
  require "phusion_passenger"
2
+ require "ttyname"
2
3
 
3
4
  module Rack
4
5
  module Handler
6
+
7
+ register 'apache', 'Rack::Handler::Apache'
8
+
5
9
  class Apache
6
10
 
7
11
  def self.valid_options
@@ -35,7 +39,7 @@ module Rack
35
39
  User #{Etc.getlogin}
36
40
  Listen #{@port}
37
41
  PidFile #{@pid_file}
38
- ErrorLog #{@root}/log/rack-helper-apache_error.log
42
+ ErrorLog #{$stdout.ttyname}
39
43
  LockFile #{@root}/tmp/rack-helper-apache.lock
40
44
  ServerName localhost
41
45
  <VirtualHost *:#{@port}>
@@ -58,7 +62,7 @@ module Rack
58
62
  EOD
59
63
  end
60
64
 
61
-
65
+ ::Dir.mkdir("tmp") unless ::Dir.exists? "tmp"
62
66
 
63
67
  kill_httpd()
64
68
  ::File.open(@conf_file, 'w') { |f| f.write(config) }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-handler-apache
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.0
4
+ version: 0.0.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,55 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
  date: 2010-04-28 00:00:00.000000000 Z
13
- dependencies: []
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rack
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
30
+ - !ruby/object:Gem::Dependency
31
+ name: ttyname
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ type: :runtime
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
46
+ - !ruby/object:Gem::Dependency
47
+ name: passenger
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ type: :runtime
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
14
62
  description: A rack-handler like gem for apache/passenger
15
63
  email: gavin@brock-family.org
16
64
  executables: []
@@ -19,6 +67,7 @@ extra_rdoc_files: []
19
67
  files:
20
68
  - lib/rack/handler/apache.rb
21
69
  - lib/rack-handler-apache.rb
70
+ - README.md
22
71
  homepage: https://github.com/brockgr/rack-handler-apache
23
72
  licenses: []
24
73
  post_install_message: