Permalink
Browse files

SHIP IT

  • Loading branch information...
1 parent b0ed506 commit 0f71e8316ce7b302dacd4cbc4e88ecbf29fccd65 @mislav committed Apr 20, 2012
Showing with 4,084 additions and 35 deletions.
  1. +5 −6 Gemfile
  2. +53 −0 Gemfile.lock
  3. +1 −0 Procfile
  4. +18 −2 app.rb
  5. +2 −1 config.ru
  6. +3,672 −0 draft-ietf-oauth-v2-25.xml
  7. +10 −4 rfc.rb
  8. +11 −3 templates/document.erb
  9. +141 −0 views/_print.scss
  10. +21 −0 views/_screen.sass
  11. +54 −0 views/_toc.scss
  12. +13 −0 views/index.erb
  13. +0 −7 views/index.haml
  14. +6 −0 views/layout.erb
  15. +77 −12 views/style.sass
View
11 Gemfile
@@ -1,20 +1,19 @@
source :rubygems
gem 'sinatra'
+gem 'thin'
gem 'activesupport'
gem 'i18n' # stupid activesupport dependency
group :development do
gem 'shotgun'
- gem 'thin'
- gem 'ruby-debug', :platforms => :mri_18
- gem 'ruby-debug19', :require => 'ruby-debug', :platforms => :mri_19
end
-gem 'haml'
-gem 'sass'
-gem 'compass'
+gem 'sass', '> 3.2.0.alpha'
gem 'coffee-script'
# gem 'therubyracer', :group => :development
gem 'therubyracer-heroku', '~> 0.8.1.pre3', :group => :production
gem 'uglifier'
+
+gem 'nokogiri'
+gem 'erubis'
View
@@ -0,0 +1,53 @@
+GEM
+ remote: http://rubygems.org/
+ specs:
+ activesupport (3.2.3)
+ i18n (~> 0.6)
+ multi_json (~> 1.0)
+ coffee-script (2.2.0)
+ coffee-script-source
+ execjs
+ coffee-script-source (1.3.1)
+ daemons (1.1.8)
+ erubis (2.7.0)
+ eventmachine (0.12.10)
+ execjs (1.3.0)
+ multi_json (~> 1.0)
+ i18n (0.6.0)
+ multi_json (1.3.2)
+ nokogiri (1.5.2)
+ rack (1.4.1)
+ rack-protection (1.2.0)
+ rack
+ sass (3.2.0.alpha.96)
+ shotgun (0.9)
+ rack (>= 1.0)
+ sinatra (1.3.2)
+ rack (~> 1.3, >= 1.3.6)
+ rack-protection (~> 1.2)
+ tilt (~> 1.3, >= 1.3.3)
+ therubyracer-heroku (0.8.1.pre3)
+ thin (1.3.1)
+ daemons (>= 1.0.9)
+ eventmachine (>= 0.12.6)
+ rack (>= 1.0.0)
+ tilt (1.3.3)
+ uglifier (1.2.4)
+ execjs (>= 0.3.0)
+ multi_json (>= 1.0.2)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ activesupport
+ coffee-script
+ erubis
+ i18n
+ nokogiri
+ sass (> 3.2.0.alpha)
+ shotgun
+ sinatra
+ therubyracer-heroku (~> 0.8.1.pre3)
+ thin
+ uglifier
View
@@ -0,0 +1 @@
+web: bundle exec rackup config.ru -s thin -p $PORT
View
20 app.rb
@@ -1,13 +1,29 @@
# encoding: utf-8
require 'sinatra'
require 'sinatra_boilerplate'
+require 'rfc'
-set :js_assets, %w[zepto.js underscore.js app.coffee]
+set :sass do
+ options = {
+ style: settings.production? ? :compressed : :nested,
+ load_paths: ['.', File.expand_path('bootstrap/lib', settings.root)]
+ }
+ options[:cache_location] = File.join(ENV['TMPDIR'], 'sass-cache') if ENV['TMPDIR']
+ options
+end
+
+set :js_assets, %w[zepto.js app.coffee]
configure :development do
set :logging, false
end
get "/" do
- haml :index
+ erb :index, {}, title: "Pretty RFCs"
+end
+
+get "/oauth" do
+ doc = RFC::Document.new File.open('draft-ietf-oauth-v2-25.xml')
+ html = RFC::TemplateHelpers.render doc
+ render :str, html, {layout_engine: :erb}, title: "OAuth 2.0"
end
View
@@ -7,7 +7,8 @@ $LOAD_PATH.unshift File.join($LOAD_PATH.first, 'lib')
Encoding.default_external = 'utf-8'
-# require 'ruby-debug' if ENV['RACK_ENV'] == 'development'
+# https://devcenter.heroku.com/articles/ruby#logging
+$stdout.sync = true
require 'app'
run Sinatra::Application
Oops, something went wrong.

0 comments on commit 0f71e83

Please sign in to comment.