Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Change the world. #1

Merged
merged 3 commits into from over 2 years ago

2 participants

John Barnette Ben Lavender
John Barnette

No description provided.

Ben Lavender bhuga merged commit 6839cd4 into from September 02, 2011
Ben Lavender bhuga closed this September 02, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
3  .gitignore
... ...
@@ -1 +1,2 @@
1  
-.sass-cache
  1
+/.bundle
  2
+/tmp
1  .rvmrc
... ...
@@ -0,0 +1 @@
  1
+rvm use --create ruby-1.9.2@ampblock
15  Gemfile
... ...
@@ -0,0 +1,15 @@
  1
+source :rubygems
  2
+
  3
+gem "coffee-script", "2.2.0"
  4
+gem "haml",          "3.1.2"
  5
+gem "rake",          "0.9.2"
  6
+gem "sass",          "3.1.7"
  7
+gem "sinatra",       "1.2.6"
  8
+
  9
+group :development do
  10
+  gem "heroku", "2.6.1"
  11
+end
  12
+
  13
+group :production do
  14
+  gem "therubyracer", "0.9.4"
  15
+end
46  Gemfile.lock
... ...
@@ -0,0 +1,46 @@
  1
+GEM
  2
+  remote: http://rubygems.org/
  3
+  specs:
  4
+    addressable (2.2.6)
  5
+    coffee-script (2.2.0)
  6
+      coffee-script-source
  7
+      execjs
  8
+    coffee-script-source (1.1.2)
  9
+    execjs (1.2.4)
  10
+      multi_json (~> 1.0)
  11
+    haml (3.1.2)
  12
+    heroku (2.6.1)
  13
+      launchy (>= 0.3.2)
  14
+      rest-client (~> 1.6.1)
  15
+      rubyzip
  16
+      term-ansicolor (~> 1.0.5)
  17
+    launchy (2.0.5)
  18
+      addressable (~> 2.2.6)
  19
+    libv8 (3.3.10.2)
  20
+    mime-types (1.16)
  21
+    multi_json (1.0.3)
  22
+    rack (1.3.2)
  23
+    rake (0.9.2)
  24
+    rest-client (1.6.7)
  25
+      mime-types (>= 1.16)
  26
+    rubyzip (0.9.4)
  27
+    sass (3.1.7)
  28
+    sinatra (1.2.6)
  29
+      rack (~> 1.1)
  30
+      tilt (>= 1.2.2, < 2.0)
  31
+    term-ansicolor (1.0.6)
  32
+    therubyracer (0.9.4)
  33
+      libv8 (~> 3.3.10)
  34
+    tilt (1.3.3)
  35
+
  36
+PLATFORMS
  37
+  ruby
  38
+
  39
+DEPENDENCIES
  40
+  coffee-script (= 2.2.0)
  41
+  haml (= 3.1.2)
  42
+  heroku (= 2.6.1)
  43
+  rake (= 0.9.2)
  44
+  sass (= 3.1.7)
  45
+  sinatra (= 1.2.6)
  46
+  therubyracer (= 0.9.4)
8  Rakefile
... ...
@@ -0,0 +1,8 @@
  1
+task :default do
  2
+  puts "You're a very pretty princess."
  3
+end
  4
+
  5
+desc "Release to Heroku."
  6
+task :release do
  7
+  sh "git", "push", "-f", "git@heroku.com:ampblock.git", "HEAD:master"
  8
+end
7  config.ru
... ...
@@ -1,3 +1,6 @@
1  
-require './lib/app'
  1
+$:.unshift "lib"
2 2
 
3  
-run AmpBlock
  3
+require "bundler/setup"
  4
+require "amp/block"
  5
+
  6
+run Amp::Block
23  lib/amp/block.rb
... ...
@@ -0,0 +1,23 @@
  1
+require 'coffee_script'
  2
+require 'sinatra'
  3
+require 'haml'
  4
+require 'sass'
  5
+
  6
+module Amp
  7
+  class Block < Sinatra::Base
  8
+    set :root, File.expand_path("../../..", __FILE__)
  9
+    set :scss, cache_location: "tmp/sass-cache", style: :compact
  10
+
  11
+    get '/' do
  12
+      haml :index
  13
+    end
  14
+
  15
+    get '/stylesheet.css' do
  16
+      scss :stylesheet
  17
+    end
  18
+
  19
+    get '/ampblock.js' do
  20
+      coffee :ampblock
  21
+    end
  22
+  end
  23
+end
19  lib/app.rb
... ...
@@ -1,19 +0,0 @@
1  
-require 'sinatra'
2  
-require 'haml'
3  
-require 'sass'
4  
-
5  
-class AmpBlock < Sinatra::Base
6  
-  set :public, './public'
7  
-  
8  
-  get '/' do
9  
-    haml :index
10  
-  end
11  
-
12  
-  get '/stylesheet.css' do
13  
-    scss :stylesheet
14  
-  end
15  
-
16  
-  get '/ampblock.js' do
17  
-    coffee :ampblock
18  
-  end
19  
-end
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.