Skip to content
This repository has been archived by the owner on Apr 6, 2021. It is now read-only.

Commit

Permalink
Extract example rackup
Browse files Browse the repository at this point in the history
  • Loading branch information
Pete Nicholls committed Jun 21, 2014
1 parent 23660b6 commit de2b323
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 15 deletions.
15 changes: 0 additions & 15 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,3 @@ require "rspec/core/rake_task"
RSpec::Core::RakeTask.new(:spec)

task :default => :spec

desc 'Run a dummy server'
task :server do
require "almanack"

today = DateTime.now

Almanack.config.add_events [
{ title: "Hogswatch", start_date: today },
{ title: "Soul Cake Tuesday", start_date: today + 10 },
{ title: "Eve of Small Gods", start_date: today + 30 },
]

Rack::Handler::WEBrick.run(Almanack::Server)
end
13 changes: 13 additions & 0 deletions example.ru
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
require "bundler/setup"
require "rack/reloader"
require "almanack"

today = DateTime.now

Almanack.config.add_events [
{ title: "Hogswatch", start_date: today },
{ title: "Soul Cake Tuesday", start_date: today + 10 },
{ title: "Eve of Small Gods", start_date: today + 30 },
]

run Almanack::Server

0 comments on commit de2b323

Please sign in to comment.