passenger-rails-server 0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 6a67242787862be51e5d01a5410aa79d6538b54d
4
+ data.tar.gz: 50c2df5ad1de79fc0a7926a42a0b1722c4f7d252
5
+ SHA512:
6
+ metadata.gz: 2f071dd6b4b1ecf2835097659b667ce8a724d02d92648794abe64e2b860fc98600b859e5dd88e57c3a024aae036c02c46faa32ccf16ee986b0a3038b14c38525
7
+ data.tar.gz: 0d107225d319e9919abc19826742ed83805d47593c47b3d3d8b122431cf04574d450765d33ddca855d939a2166e8f9f79d84da16b11195ea696cfe726c658bd3
@@ -0,0 +1 @@
1
+ require "passenger_rails_server"
@@ -0,0 +1,43 @@
1
+ module PassengerRailsServer
2
+ require "passenger_rails_server/version"
3
+ end
4
+
5
+ module Rack
6
+ module Handler
7
+ class Passenger
8
+ class << self
9
+ def run(app, options = {})
10
+ begin
11
+ require 'rubygems'
12
+ rescue LoadError
13
+ end
14
+ require 'phusion_passenger'
15
+
16
+ PhusionPassenger.locate_directories
17
+ PhusionPassenger.require_passenger_lib 'standalone/main'
18
+
19
+ STDOUT.sync = STDERR.sync = true
20
+
21
+ # Fixes https://github.com/phusion/passenger-ruby-heroku-demo/issues/11
22
+ STDOUT.binmode
23
+ STDERR.binmode
24
+
25
+ args = ['start']
26
+ args += ['-p', options[:Port].to_s] if options[:Port]
27
+
28
+ PhusionPassenger::Standalone.run!(args)
29
+ end
30
+
31
+ def environment
32
+ ENV['RACK_ENV'] || ENV['RAILS_ENV']
33
+ end
34
+ end
35
+ end
36
+
37
+ register 'phusion_passenger', 'Rack::Handler::Passenger'
38
+
39
+ def self.default(options = {})
40
+ Rack::Handler::Passenger
41
+ end
42
+ end
43
+ end
@@ -0,0 +1,3 @@
1
+ module PassengerRailsServer
2
+ VERSION = "0.1"
3
+ end
metadata ADDED
@@ -0,0 +1,77 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: passenger-rails-server
3
+ version: !ruby/object:Gem::Version
4
+ version: '0.1'
5
+ platform: ruby
6
+ authors:
7
+ - Piero Dotti
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-09-24 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rack
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: passenger
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ description: passenger-rails-server overrides the Rack::Handler.default method to
42
+ return Rack::Handler::Passenger which will cause rack (and rails) to use passenger
43
+ by default.
44
+ email:
45
+ - progiemmeh@gmail.com
46
+ executables: []
47
+ extensions: []
48
+ extra_rdoc_files: []
49
+ files:
50
+ - lib/passenger-rails-server.rb
51
+ - lib/passenger_rails_server.rb
52
+ - lib/passenger_rails_server/version.rb
53
+ homepage: https://github.com/ProGM/passenger-rails-server
54
+ licenses: []
55
+ metadata: {}
56
+ post_install_message:
57
+ rdoc_options: []
58
+ require_paths:
59
+ - lib
60
+ required_ruby_version: !ruby/object:Gem::Requirement
61
+ requirements:
62
+ - - ">="
63
+ - !ruby/object:Gem::Version
64
+ version: 1.8.7
65
+ required_rubygems_version: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - ">="
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
70
+ requirements: []
71
+ rubyforge_project:
72
+ rubygems_version: 2.4.5.1
73
+ signing_key:
74
+ specification_version: 4
75
+ summary: passenger-rails-server is a simple gem that sets the default server for rack
76
+ (and rails) to phusion passenger.
77
+ test_files: []