Permalink
Browse files

Update to newest suspenders

  • Loading branch information...
mike-burns committed Sep 12, 2009
2 parents 12489da + 07f834d commit b79c73ebe7ae60356ee98a02ab851658ac33bda6
Showing 2,886 changed files with 171,177 additions and 61,854 deletions.
View
@@ -7,3 +7,5 @@ public/system
coverage/*
*.sw*
.rake_tasks
+*.swp
+!.keep
View
@@ -8,3 +8,6 @@ require 'rake/testtask'
require 'rake/rdoctask'
require 'tasks/rails'
+
+desc "Run all tests and features"
+task :default => [:test, :features]
@@ -3,12 +3,12 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
- <title><%= PROJECT_NAME.humanize %></title>
- <%= stylesheet_link_tag 'screen', :media => 'all' %>
- <%= javascript_include_tag :defaults %>
+ <title>CHANGEME</title>
+ <%= stylesheet_link_tag 'screen', :media => 'all', :cache => true %>
</head>
<body class="<%= body_class %>">
- <%= render :partial => 'layouts/flashes' -%>
+ <%= render :partial => 'shared/flashes' -%>
<%= yield %>
+ <%= render :partial => 'shared/javascript' %>
</body>
</html>
@@ -0,0 +1,2 @@
+<%= javascript_include_tag :defaults, :cache => true %>
+<%= yield :javascript %>
View
@@ -44,6 +44,7 @@ class VendorBoot < Boot
def load_initializer
require "#{RAILS_ROOT}/vendor/rails/railties/lib/initializer"
Rails::Initializer.run(:install_gem_spec_stubs)
+ Rails::GemDependency.add_frozen_gem_path
end
end
@@ -67,7 +68,7 @@ def load_rails_gem
class << self
def rubygems_version
- Gem::RubyGemsVersion if defined? Gem::RubyGemsVersion
+ Gem::RubyGemsVersion rescue nil
end
def gem_version
@@ -82,7 +83,7 @@ def gem_version
def load_rubygems
require 'rubygems'
- min_version = '1.1.1'
+ min_version = '1.3.1'
unless rubygems_version >= min_version
$stderr.puts %Q(Rails requires RubyGems >= #{min_version} (you have #{rubygems_version}). Please `gem update --system` and try again.)
exit 1
View
@@ -2,32 +2,32 @@
development:
adapter: postgresql
- database: <%= PROJECT_NAME %>_development
+ database: moodswings_development
#username: mike
#password:
#host: localhost
#encoding: utf8
test:
adapter: postgresql
- database: <%= PROJECT_NAME %>_test
+ database: moodswings_test
#username: mike
#password:
#host: localhost
#encoding: utf8
staging:
adapter: postgresql
- database: <%= PROJECT_NAME %>_staging
- username: <%= PROJECT_NAME %>
+ database: moodswings_staging
+ username: moodswings_
password: <%= File.read(PASSWORD_FILE).chomp if File.readable? PASSWORD_FILE %>
host: localhost
encoding: utf8
production:
adapter: postgresql
- database: <%= PROJECT_NAME %>_production
- username: <%= PROJECT_NAME %>
+ database: moodswings_production
+ username: moodswings_
password: <%= File.read(PASSWORD_FILE).chomp if File.readable? PASSWORD_FILE %>
host: localhost
encoding: utf8
View
@@ -29,6 +29,12 @@
task :after_default do
cleanup
end
+
+ before :deploy do
+ if real_revision.empty?
+ raise "The tag, revision, or branch #{revision} does not exist."
+ end
+ end
end
namespace :db do
View
@@ -1,29 +1,51 @@
-PROJECT_NAME = "moodswings"
+# Be sure to restart your server when you modify this file
-throw "The project's name in environment.rb is blank" if PROJECT_NAME.empty?
-throw "Project name (#{PROJECT_NAME}) must_be_like_this" unless PROJECT_NAME =~ /^[a-z_]*$/
+# Specifies gem version of Rails to use when vendor/rails is not present
+RAILS_GEM_VERSION = '2.3.2' unless defined? RAILS_GEM_VERSION
# Bootstrap the Rails environment, frameworks, and default configuration
require File.join(File.dirname(__FILE__), 'boot')
Rails::Initializer.run do |config|
- config.gem 'mislav-will_paginate',
- :lib => 'will_paginate',
- :source => 'http://gems.github.com',
- :version => '~> 2.3.5'
+ # Settings in config/environments/* take precedence over those specified here.
- config.gem "ruby-openid", :lib => 'openid'
+ # Application configuration should go into files in config/initializers
+ # -- all .rb files in that directory are automatically loaded.
+ # See Rails::Configuration for more options.
- config.gem 'thoughtbot-shoulda',
- :lib => 'shoulda',
- :source => 'http://gems.github.com',
- :version => '>= 2.0.5'
- config.gem 'thoughtbot-factory_girl',
- :lib => 'factory_girl',
- :source => 'http://gems.github.com',
- :version => '>= 1.1.3'
- config.gem 'redgreen'
+ # Skip frameworks you're not going to use. To use Rails without a database
+ # you must remove the Active Record framework.
+ # config.frameworks -= [ :active_record, :active_resource, :action_mailer ]
+ # Specify gems that this application depends on.
+ config.gem "ruby-openid", :lib => 'openid'
+ config.gem 'RedCloth',
+ :lib => 'redcloth',
+ :version => '>= 4.2.2'
+ config.gem 'mislav-will_paginate',
+ :lib => 'will_paginate',
+ :source => 'http://gems.github.com',
+ :version => '~> 2.3.11'
+ config.gem 'thoughtbot-clearance',
+ :lib => 'clearance',
+ :source => 'http://gems.github.com',
+ :version => '>= 0.8.2'
+ config.gem 'justinfrench-formtastic',
+ :lib => 'formtastic',
+ :source => 'http://gems.github.com',
+ :version => '~> 0.2.1'
+ config.gem 'thoughtbot-paperclip',
+ :lib => 'paperclip',
+ :source => 'http://gems.github.com',
+ :version => '>= 2.3.0'
+ config.gem 'rack',
+ :version => '>= 1.0.0'
+
+ # Only load the plugins named here, in the order given. By default, all plugins
+ # in vendor/plugins are loaded in alphabetical order.
+ # :all can be used as a placeholder for all plugins not explicitly named
+ # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
+
# Add the vendor/gems/*/lib directories to the LOAD_PATH
config.load_paths += Dir.glob(File.join(RAILS_ROOT, 'vendor', 'gems', '*', 'lib'))
@@ -32,9 +54,11 @@
# Run "rake -D time" for a list of tasks for finding time zone names. Uncomment to use default local time.
config.time_zone = 'UTC'
- SESSION_KEY = "bb64b687bf0cb57289f9161a45f1ebf7"
- config.action_controller.session = {
- :session_key => "_#{PROJECT_NAME}_session",
- :secret => SESSION_KEY
- }
+ # Use SQL instead of Active Record's schema dumper when creating the test database.
+ # This is necessary if your schema can't be completely dumped by the schema dumper,
+ # like if you have constraints or database-specific column types
+ # config.active_record.schema_format = :sql
+
+ # Activate observers that should always be running
+ # config.active_record.observers = :cacher, :garbage_collector
end
@@ -0,0 +1,50 @@
+config.cache_classes = true # This must be true for Cucumber to operate correctly!
+
+# Log error messages when you accidentally call methods on nil.
+config.whiny_nils = true
+
+# Show full error reports and disable caching
+config.action_controller.consider_all_requests_local = true
+config.action_controller.perform_caching = false
+
+# Disable request forgery protection in test environment
+config.action_controller.allow_forgery_protection = false
+
+# Tell Action Mailer not to deliver emails to the real world.
+# The :test delivery method accumulates sent emails in the
+# ActionMailer::Base.deliveries array.
+config.action_mailer.delivery_method = :test
+
+config.gem 'thoughtbot-factory_girl',
+ :lib => 'factory_girl',
+ :source => 'http://gems.github.com',
+ :version => '>= 1.2.0'
+
+# Cucumber and dependencies
+config.gem 'polyglot',
+ :version => '0.2.6',
+ :lib => false
+config.gem 'treetop',
+ :version => '1.2.6',
+ :lib => false
+config.gem 'term-ansicolor',
+ :version => '1.0.3',
+ :lib => false
+config.gem 'diff-lcs',
+ :version => '1.1.2',
+ :lib => false
+config.gem 'builder',
+ :version => '2.1.2',
+ :lib => false
+config.gem 'cucumber',
+ :version => '0.3.11'
+
+# Webrat and dependencies
+# NOTE: don't vendor nokogiri - it's a binary Gem
+config.gem 'nokogiri',
+ :version => '1.3.3',
+ :lib => false
+config.gem 'webrat',
+ :version => '0.4.4'
+
+HOST = 'localhost'
@@ -16,4 +16,4 @@
# Don't care if the mailer can't send
config.action_mailer.raise_delivery_errors = false
-HOST = "localhost"
+HOST = 'localhost'
@@ -21,9 +21,41 @@
# ActionMailer::Base.deliveries array.
config.action_mailer.delivery_method = :test
-HOST = "localhost"
+config.gem 'thoughtbot-factory_girl',
+ :lib => 'factory_girl',
+ :source => 'http://gems.github.com',
+ :version => '>= 1.2.2'
+config.gem 'thoughtbot-shoulda',
+ :lib => 'shoulda',
+ :source => 'http://gems.github.com',
+ :version => '>= 2.10.2'
+config.gem 'jtrupiano-timecop',
+ :version => '0.2.1',
+ :source => 'http://gems.github.com',
+ :lib => 'timecop'
+config.gem 'fakeweb',
+ :lib => 'fakeweb',
+ :version => '>= 1.2.5'
+
+# Webrat and dependencies
+# NOTE: don't vendor nokogiri - it's a binary Gem
+config.gem 'nokogiri',
+ :version => '1.3.3',
+ :lib => false
+config.gem 'webrat',
+ :version => '0.4.4'
+
+# At the bottom due to a loading bug in Rails
+config.gem 'jferris-mocha',
+ :version => '0.9.5.0.1241126838',
+ :source => 'http://gems.github.com',
+ :lib => 'mocha'
+
+HOST = 'localhost'
-require 'quietbacktrace'
require 'factory_girl'
-require 'redgreen'
-require 'mocha'
+begin require 'redgreen'; rescue LoadError; end
+
+config.after_initialize do
+ Timecop.travel(Time.now)
+end
@@ -0,0 +1,11 @@
+SHOULDA_NOISE = %w( shoulda )
+FACTORY_GIRL_NOISE = %w( factory_girl )
+THOUGHTBOT_NOISE = SHOULDA_NOISE + FACTORY_GIRL_NOISE
+
+Rails.backtrace_cleaner.add_silencer do |line|
+ THOUGHTBOT_NOISE.any? { |dir| line.include?(dir) }
+end
+
+# When debugging, uncomment the next line.
+# Rails.backtrace_cleaner.remove_silencers!
+
@@ -0,0 +1,30 @@
+# Copyright (c) 2009 Michael Koziarski <michael@koziarski.com>
+#
+# Permission to use, copy, modify, and/or distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+require 'bigdecimal'
+
+alias BigDecimalUnsafe BigDecimal
+
+
+# This fixes CVE-2009-1904 however it removes legitimate functionality that your
+# application may depend on. You are *strongly* advised to upgrade your ruby
+# rather than relying on this fix for an extended period of time.
+
+def BigDecimal(initial, digits=0)
+ if initial.size > 255 || initial =~ /e/i
+ raise "Invalid big Decimal Value"
+ end
+ BigDecimalUnsafe(initial, digits)
+end
+
@@ -0,0 +1,26 @@
+require 'net/smtp'
+# Example:
+# begin
+# some http call
+# rescue *HTTP_ERRORS => error
+# notify_hoptoad error
+# end
+
+HTTP_ERRORS = [Timeout::Error,
+ Errno::EINVAL,
+ Errno::ECONNRESET,
+ EOFError,
+ Net::HTTPBadResponse,
+ Net::HTTPHeaderSyntaxError,
+ Net::ProtocolError]
+
+SMTP_SERVER_ERRORS = [TimeoutError,
+ IOError,
+ Net::SMTPUnknownError,
+ Net::SMTPServerBusy,
+ Net::SMTPAuthenticationError]
+
+SMTP_CLIENT_ERRORS = [Net::SMTPFatalError,
+ Net::SMTPSyntaxError]
+
+SMTP_ERRORS = SMTP_SERVER_ERRORS + SMTP_CLIENT_ERRORS
@@ -0,0 +1,10 @@
+# Rails 2 doesn't like mocks
+
+# This callback will run before every request to a mock in development mode,
+# or before the first server request in production.
+
+Rails.configuration.to_prepare do
+ Dir[File.join(RAILS_ROOT, 'test', 'mocks', RAILS_ENV, '*.rb')].each do |f|
+ load f
+ end
+end
Oops, something went wrong.

0 comments on commit b79c73e

Please sign in to comment.