Skip to content

Commit

Permalink
update merb app generator to work with merb-core
Browse files Browse the repository at this point in the history
  • Loading branch information
Ezra Zygmuntowicz committed Feb 1, 2008
1 parent 322d894 commit a941771
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 7 deletions.
@@ -1 +1,6 @@
puts "Loaded DEVELOPMENT Environment..."
puts "Loaded DEVELOPMENT Environment..."
Merb::Config.use { |c|
c[:exception_details] = true
c[:reload_classes] = true
c[:reload_time] = 0.5
}
@@ -1 +1,5 @@
puts "Loaded PRODUCTION Environment..."
puts "Loaded PRODUCTION Environment..."
Merb::Config.use { |c|
c[:exception_details] = false
c[:reload_classes] = false
}
@@ -1 +1,6 @@
puts "Loaded TEST Environment..."
puts "Loaded TEST Environment..."
Merb::Config.use { |c|
c[:exception_details] = true
c[:reload_classes] = true
c[:reload_time] = 0.5
}
17 changes: 17 additions & 0 deletions merb-gen/app_generators/merb/templates/config/merb.yml
@@ -0,0 +1,17 @@
<% require 'sha1' %>
---
# Hostname or IP address to bind to.
:host: 0.0.0.0

# Port merb runs on or starting port for merb cluster.
:port: "4000"

# Uncomment if you have more than one ORM or if you need to be specific about
# which memory store to use. Built-in options are: memory, cookie, or mem_cache
:session_store: cookie

#:memory_session_ttl: 3600 # one hour

# A secret key is required when using the 'cookie' session store (default),
# change this value to something unique to your application and keep it private
:session_secret_key: <%= SHA1.new(rand(100000000000).to_s).to_s %>
1 change: 1 addition & 0 deletions merb-gen/app_generators/merb/templates/config/rack.rb
@@ -0,0 +1 @@
run Merb::Rack::Application.new
6 changes: 2 additions & 4 deletions merb-gen/app_generators/merb/templates/public/merb.fcgi
@@ -1,6 +1,4 @@
#!/usr/bin/env ruby

ARGV=["-F"]
require 'merb/server'

Merb::Server.run
argv = ARGV + %w[-a fcgi]
Merb.start(argv)

0 comments on commit a941771

Please sign in to comment.