Permalink
Browse files

Remove Rails 3 incompatible dependencies

  • Loading branch information...
1 parent 3ae06f9 commit b9d2ca631d2bbd8b5e6cb53a9cadf86d9437fc00 @rwdaigle committed Dec 20, 2011
Showing with 48 additions and 254 deletions.
  1. +16 −8 Gemfile
  2. +16 −2 Gemfile.lock
  3. +1 −0 Procfile
  4. +0 −1 config/routes.rb
  5. +2 −0 config/unicorn.rb
  6. +0 −241 public/index.html
  7. +13 −2 vendor/plugins/haml/init.rb
View
24 Gemfile
@@ -1,24 +1,32 @@
source 'http://rubygems.org'
gem 'rails', '~> 3.1'
-gem 'utility_scopes'
+gem 'will_paginate'
+gem 'permalink_fu'
+gem 'pg'
gem 'haml'
gem 'jquery-rails'
-# Gems used only for assets and not required
-# in production environments by default.
-group :assets do
- gem 'sass-rails', '~> 3.1.5'
- gem 'coffee-rails', '~> 3.1.1'
- gem 'uglifier', '>= 1.0.3'
+gem 'unicorn'
+
+group :development do
+ gem 'foreman'
end
group :test do
# Pretty printed test output
gem 'turn', '0.8.2', :require => false
+ gem 'scenarios'
end
group :production do
- gem 'unicorn'
end
+
+# Gems used only for assets and not required
+# in production environments by default.
+group :assets do
+ gem 'sass-rails', '~> 3.1.5'
+ gem 'coffee-rails', '~> 3.1.1'
+ gem 'uglifier', '>= 1.0.3'
+end
View
@@ -42,6 +42,9 @@ GEM
erubis (2.7.0)
execjs (1.2.13)
multi_json (~> 1.0)
+ foreman (0.27.0)
+ term-ansicolor (~> 1.0.5)
+ thor (>= 0.13.6)
haml (3.1.4)
hike (1.2.1)
i18n (0.6.0)
@@ -56,6 +59,9 @@ GEM
treetop (~> 1.4.8)
mime-types (1.17.2)
multi_json (1.0.4)
+ permalink_fu (1.0.0)
+ pg (0.12.0)
+ rake-compiler (~> 0.7)
polyglot (0.3.3)
rack (1.3.5)
rack-cache (1.1)
@@ -83,6 +89,8 @@ GEM
thor (~> 0.14.6)
raindrops (0.8.0)
rake (0.9.2.2)
+ rake-compiler (0.7.9)
+ rake
rdoc (3.12)
json (~> 1.4)
sass (3.1.12)
@@ -91,10 +99,12 @@ GEM
railties (~> 3.1.0)
sass (~> 3.1.10)
tilt (~> 1.3.2)
+ scenarios (0.1.1)
sprockets (2.0.3)
hike (~> 1.2)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
+ term-ansicolor (1.0.7)
thor (0.14.6)
tilt (1.3.3)
treetop (1.4.10)
@@ -110,18 +120,22 @@ GEM
kgio (~> 2.4)
rack
raindrops (~> 0.6)
- utility_scopes (0.3.1)
+ will_paginate (3.0.2)
PLATFORMS
ruby
DEPENDENCIES
coffee-rails (~> 3.1.1)
+ foreman
haml
jquery-rails
+ permalink_fu
+ pg
rails (~> 3.1)
sass-rails (~> 3.1.5)
+ scenarios
turn (= 0.8.2)
uglifier (>= 1.0.3)
unicorn
- utility_scopes
+ will_paginate
View
@@ -0,0 +1 @@
+web: bundle exec unicorn -p $PORT -c ./config/unicorn.rb
View
@@ -20,7 +20,6 @@
# Niceities
match 'login', :to => 'sessions#new'
match 'logout', :to => 'sessions#destroy'
-end
# The priority is based upon order of creation:
# first created -> highest priority.
View
@@ -0,0 +1,2 @@
+ worker_processes ENV['UNICORN_CONCURRENCY'] || 2
+ timeout 45
View
@@ -1,241 +0,0 @@
-<!DOCTYPE html>
-<html>
- <head>
- <title>Ruby on Rails: Welcome aboard</title>
- <style type="text/css" media="screen">
- body {
- margin: 0;
- margin-bottom: 25px;
- padding: 0;
- background-color: #f0f0f0;
- font-family: "Lucida Grande", "Bitstream Vera Sans", "Verdana";
- font-size: 13px;
- color: #333;
- }
-
- h1 {
- font-size: 28px;
- color: #000;
- }
-
- a {color: #03c}
- a:hover {
- background-color: #03c;
- color: white;
- text-decoration: none;
- }
-
-
- #page {
- background-color: #f0f0f0;
- width: 750px;
- margin: 0;
- margin-left: auto;
- margin-right: auto;
- }
-
- #content {
- float: left;
- background-color: white;
- border: 3px solid #aaa;
- border-top: none;
- padding: 25px;
- width: 500px;
- }
-
- #sidebar {
- float: right;
- width: 175px;
- }
-
- #footer {
- clear: both;
- }
-
- #header, #about, #getting-started {
- padding-left: 75px;
- padding-right: 30px;
- }
-
-
- #header {
- background-image: url("/assets/rails.png");
- background-repeat: no-repeat;
- background-position: top left;
- height: 64px;
- }
- #header h1, #header h2 {margin: 0}
- #header h2 {
- color: #888;
- font-weight: normal;
- font-size: 16px;
- }
-
-
- #about h3 {
- margin: 0;
- margin-bottom: 10px;
- font-size: 14px;
- }
-
- #about-content {
- background-color: #ffd;
- border: 1px solid #fc0;
- margin-left: -55px;
- margin-right: -10px;
- }
- #about-content table {
- margin-top: 10px;
- margin-bottom: 10px;
- font-size: 11px;
- border-collapse: collapse;
- }
- #about-content td {
- padding: 10px;
- padding-top: 3px;
- padding-bottom: 3px;
- }
- #about-content td.name {color: #555}
- #about-content td.value {color: #000}
-
- #about-content ul {
- padding: 0;
- list-style-type: none;
- }
-
- #about-content.failure {
- background-color: #fcc;
- border: 1px solid #f00;
- }
- #about-content.failure p {
- margin: 0;
- padding: 10px;
- }
-
-
- #getting-started {
- border-top: 1px solid #ccc;
- margin-top: 25px;
- padding-top: 15px;
- }
- #getting-started h1 {
- margin: 0;
- font-size: 20px;
- }
- #getting-started h2 {
- margin: 0;
- font-size: 14px;
- font-weight: normal;
- color: #333;
- margin-bottom: 25px;
- }
- #getting-started ol {
- margin-left: 0;
- padding-left: 0;
- }
- #getting-started li {
- font-size: 18px;
- color: #888;
- margin-bottom: 25px;
- }
- #getting-started li h2 {
- margin: 0;
- font-weight: normal;
- font-size: 18px;
- color: #333;
- }
- #getting-started li p {
- color: #555;
- font-size: 13px;
- }
-
-
- #sidebar ul {
- margin-left: 0;
- padding-left: 0;
- }
- #sidebar ul h3 {
- margin-top: 25px;
- font-size: 16px;
- padding-bottom: 10px;
- border-bottom: 1px solid #ccc;
- }
- #sidebar li {
- list-style-type: none;
- }
- #sidebar ul.links li {
- margin-bottom: 5px;
- }
-
- .filename {
- font-style: italic;
- }
- </style>
- <script type="text/javascript">
- function about() {
- info = document.getElementById('about-content');
- if (window.XMLHttpRequest)
- { xhr = new XMLHttpRequest(); }
- else
- { xhr = new ActiveXObject("Microsoft.XMLHTTP"); }
- xhr.open("GET","rails/info/properties",false);
- xhr.send("");
- info.innerHTML = xhr.responseText;
- info.style.display = 'block'
- }
- </script>
- </head>
- <body>
- <div id="page">
- <div id="sidebar">
- <ul id="sidebar-items">
- <li>
- <h3>Browse the documentation</h3>
- <ul class="links">
- <li><a href="http://guides.rubyonrails.org/">Rails Guides</a></li>
- <li><a href="http://api.rubyonrails.org/">Rails API</a></li>
- <li><a href="http://www.ruby-doc.org/core/">Ruby core</a></li>
- <li><a href="http://www.ruby-doc.org/stdlib/">Ruby standard library</a></li>
- </ul>
- </li>
- </ul>
- </div>
-
- <div id="content">
- <div id="header">
- <h1>Welcome aboard</h1>
- <h2>You&rsquo;re riding Ruby on Rails!</h2>
- </div>
-
- <div id="about">
- <h3><a href="rails/info/properties" onclick="about(); return false">About your application&rsquo;s environment</a></h3>
- <div id="about-content" style="display: none"></div>
- </div>
-
- <div id="getting-started">
- <h1>Getting started</h1>
- <h2>Here&rsquo;s how to get rolling:</h2>
-
- <ol>
- <li>
- <h2>Use <code>rails generate</code> to create your models and controllers</h2>
- <p>To see all available options, run it without parameters.</p>
- </li>
-
- <li>
- <h2>Set up a default route and remove <span class="filename">public/index.html</span></h2>
- <p>Routes are set up in <span class="filename">config/routes.rb</span>.</p>
- </li>
-
- <li>
- <h2>Create your database</h2>
- <p>Run <code>rake db:create</code> to create your database. If you're not using SQLite (the default), edit <span class="filename">config/database.yml</span> with your username and password.</p>
- </li>
- </ol>
- </div>
- </div>
-
- <div id="footer">&nbsp;</div>
- </div>
- </body>
-</html>
@@ -1,7 +1,18 @@
begin
require File.join(File.dirname(__FILE__), 'lib', 'haml') # From here
rescue LoadError
- require 'haml' # From gem
+ begin
+ require 'haml' # From gem
+ rescue LoadError => e
+ # gems:install may be run to install Haml with the skeleton plugin
+ # but not the gem itself installed.
+ # Don't die if this is the case.
+ raise e unless defined?(Rake) &&
+ (Rake.application.top_level_tasks.include?('gems') ||
+ Rake.application.top_level_tasks.include?('gems:install'))
+ end
end
-Haml.init_rails(binding)
+# Load Haml.
+# Haml may be undefined if we're running gems:install.
+Haml.init_rails(binding) if defined?(Haml)

0 comments on commit b9d2ca6

Please sign in to comment.