Permalink
Browse files

initial commit

  • Loading branch information...
0 parents commit 2215c1a63700f21d54d0d16466f5527932ac8df6 @artemave committed Apr 5, 2012
Showing with 132 additions and 0 deletions.
  1. +3 −0 Gemfile
  2. +85 −0 Gemfile.lock
  3. +1 −0 README.md
  4. +43 −0 config.ru
@@ -0,0 +1,3 @@
+source :rubygems
+
+gem 'rails', '~> 3.2.2'
@@ -0,0 +1,85 @@
+GEM
+ remote: http://rubygems.org/
+ specs:
+ actionmailer (3.2.3)
+ actionpack (= 3.2.3)
+ mail (~> 2.4.4)
+ actionpack (3.2.3)
+ activemodel (= 3.2.3)
+ activesupport (= 3.2.3)
+ builder (~> 3.0.0)
+ erubis (~> 2.7.0)
+ journey (~> 1.0.1)
+ rack (~> 1.4.0)
+ rack-cache (~> 1.2)
+ rack-test (~> 0.6.1)
+ sprockets (~> 2.1.2)
+ activemodel (3.2.3)
+ activesupport (= 3.2.3)
+ builder (~> 3.0.0)
+ activerecord (3.2.3)
+ activemodel (= 3.2.3)
+ activesupport (= 3.2.3)
+ arel (~> 3.0.2)
+ tzinfo (~> 0.3.29)
+ activeresource (3.2.3)
+ activemodel (= 3.2.3)
+ activesupport (= 3.2.3)
+ activesupport (3.2.3)
+ i18n (~> 0.6)
+ multi_json (~> 1.0)
+ arel (3.0.2)
+ builder (3.0.0)
+ erubis (2.7.0)
+ hike (1.2.1)
+ i18n (0.6.0)
+ journey (1.0.3)
+ json (1.6.6)
+ mail (2.4.4)
+ i18n (>= 0.4.0)
+ mime-types (~> 1.16)
+ treetop (~> 1.4.8)
+ mime-types (1.18)
+ multi_json (1.2.0)
+ polyglot (0.3.3)
+ rack (1.4.1)
+ rack-cache (1.2)
+ rack (>= 0.4)
+ rack-ssl (1.3.2)
+ rack
+ rack-test (0.6.1)
+ rack (>= 1.0)
+ rails (3.2.3)
+ actionmailer (= 3.2.3)
+ actionpack (= 3.2.3)
+ activerecord (= 3.2.3)
+ activeresource (= 3.2.3)
+ activesupport (= 3.2.3)
+ bundler (~> 1.0)
+ railties (= 3.2.3)
+ railties (3.2.3)
+ actionpack (= 3.2.3)
+ activesupport (= 3.2.3)
+ rack-ssl (~> 1.3.2)
+ rake (>= 0.8.7)
+ rdoc (~> 3.4)
+ thor (~> 0.14.6)
+ rake (0.9.2.2)
+ rdoc (3.12)
+ json (~> 1.4)
+ sprockets (2.1.2)
+ hike (~> 1.2)
+ rack (~> 1.0)
+ tilt (~> 1.1, != 1.3.0)
+ thor (0.14.6)
+ tilt (1.3.3)
+ treetop (1.4.10)
+ polyglot
+ polyglot (>= 0.3.1)
+ tzinfo (0.3.32)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ rails (~> 3.2.2)
@@ -0,0 +1 @@
+The smallest Rails app - http://thesmallestrailsapp.com
@@ -0,0 +1,43 @@
+require "bundler/setup"
+require "rails"
+require "action_controller/railtie"
+
+class TheSmallestRailsApp < Rails::Application
+ routes.append do
+ root to: 'hello#index'
+ end
+
+ config.secret_token = "asdf8sadfas8dlj2342b3bv23bvn23o3u"
+ config.logger = Logger.new STDOUT
+end
+
+require 'net/http'
+require 'uri'
+
+class HelloController < ActionController::Base
+ def index
+ uri = URI.parse('http://hilite.me/api')
+ form = {'lexer' => 'ruby', 'code' => File.read(__FILE__)}
+
+ response = Net::HTTP.post_form uri, form
+
+ render inline: %Q{
+ <!DOCTYPE html>
+ <html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <title>The Smallest Rails App</title>
+ </head>
+ <body>
+ <h3>I am the smallest rails app!</h3>
+ <p>Here is my source code:</p>
+ #{response.body}
+ </body>
+ </html>
+ }
+ end
+end
+
+TheSmallestRailsApp.initialize!
+
+run TheSmallestRailsApp

0 comments on commit 2215c1a

Please sign in to comment.