Skip to content

Instantly share code, notes, and snippets.

@ethnt
Created January 3, 2010 22:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ethnt/268152 to your computer and use it in GitHub Desktop.
Save ethnt/268152 to your computer and use it in GitHub Desktop.
#/usr/bin/env ruby
#===========================
# Finito
# A Sinatra-powered lifestream.
# Revision 0.1
#
# finito.rb
#===========================
# Require ==================
require 'rubygems'
require 'sinatra'
require 'datamapper'
require 'net/http'
require 'rexml/document'
# Models ====================
DataMapper::setup(:default, "sqlite://#{Dir.pwd}/finito.db")
class Feed
include DataMapper::Resource
property :id, Serial
property :url, String
property :title, String
property :image, FilePath
end
Feed.auto_upgrade!
# Controllers ===============
get '/' do
haml :index
end
get '/admin' do
haml :admin
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment