Permalink
Browse files

regenerate the test app

  • Loading branch information...
1 parent 9e10162 commit a999abaec09475c6928a97538b3da6eda3e34be0 @mjankowski mjankowski committed Dec 2, 2010
View
@@ -1,14 +1,6 @@
-log/*
-tmp/**/*
-tmp/
-db/schema.rb
-db/*.sqlite3
-test/test.db
-public/system
-*.DS_Store
-coverage/*
-coverage*
-*.swp
-public/announcement.html
-
-!.keep
+.bundle/
+log/*.log
+pkg/
+test/dummy/db/*.sqlite3
+test/dummy/log/*.log
+test/dummy/tmp/
View
13 Gemfile
@@ -0,0 +1,13 @@
+source :rubygems
+
+gem "rails", "3.0.3"
+gem "capybara", ">= 0.4.0"
+gem "sqlite3-ruby", :require => "sqlite3"
+
+platforms :mri_18 do
+ gem "ruby-debug", ">= 0.10.3"
+end
+
+gem 'shoulda'
+gem 'mocha'
+gem 'redgreen'
View
@@ -0,0 +1,114 @@
+GEM
+ remote: http://rubygems.org/
+ specs:
+ abstract (1.0.0)
+ actionmailer (3.0.3)
+ actionpack (= 3.0.3)
+ mail (~> 2.2.9)
+ actionpack (3.0.3)
+ activemodel (= 3.0.3)
+ activesupport (= 3.0.3)
+ builder (~> 2.1.2)
+ erubis (~> 2.6.6)
+ i18n (~> 0.4)
+ rack (~> 1.2.1)
+ rack-mount (~> 0.6.13)
+ rack-test (~> 0.5.6)
+ tzinfo (~> 0.3.23)
+ activemodel (3.0.3)
+ activesupport (= 3.0.3)
+ builder (~> 2.1.2)
+ i18n (~> 0.4)
+ activerecord (3.0.3)
+ activemodel (= 3.0.3)
+ activesupport (= 3.0.3)
+ arel (~> 2.0.2)
+ tzinfo (~> 0.3.23)
+ activeresource (3.0.3)
+ activemodel (= 3.0.3)
+ activesupport (= 3.0.3)
+ activesupport (3.0.3)
+ arel (2.0.6)
+ builder (2.1.2)
+ capybara (0.4.0)
+ celerity (>= 0.7.9)
+ culerity (>= 0.2.4)
+ mime-types (>= 1.16)
+ nokogiri (>= 1.3.3)
+ rack (>= 1.0.0)
+ rack-test (>= 0.5.4)
+ selenium-webdriver (>= 0.0.27)
+ xpath (~> 0.1.2)
+ celerity (0.8.4)
+ childprocess (0.1.4)
+ ffi (~> 0.6.3)
+ columnize (0.3.2)
+ culerity (0.2.12)
+ erubis (2.6.6)
+ abstract (>= 1.0.0)
+ ffi (0.6.3)
+ rake (>= 0.8.7)
+ i18n (0.5.0)
+ json_pure (1.4.6)
+ linecache (0.43)
+ mail (2.2.11)
+ activesupport (>= 2.3.6)
+ i18n (~> 0.5.0)
+ mime-types (~> 1.16)
+ treetop (~> 1.4.8)
+ mime-types (1.16)
+ mocha (0.9.10)
+ rake
+ nokogiri (1.4.4)
+ polyglot (0.3.1)
+ rack (1.2.1)
+ rack-mount (0.6.13)
+ rack (>= 1.0.0)
+ rack-test (0.5.6)
+ rack (>= 1.0)
+ rails (3.0.3)
+ actionmailer (= 3.0.3)
+ actionpack (= 3.0.3)
+ activerecord (= 3.0.3)
+ activeresource (= 3.0.3)
+ activesupport (= 3.0.3)
+ bundler (~> 1.0)
+ railties (= 3.0.3)
+ railties (3.0.3)
+ actionpack (= 3.0.3)
+ activesupport (= 3.0.3)
+ rake (>= 0.8.7)
+ thor (~> 0.14.4)
+ rake (0.8.7)
+ redgreen (1.2.2)
+ ruby-debug (0.10.4)
+ columnize (>= 0.1)
+ ruby-debug-base (~> 0.10.4.0)
+ ruby-debug-base (0.10.4)
+ linecache (>= 0.3)
+ rubyzip (0.9.4)
+ selenium-webdriver (0.1.1)
+ childprocess (= 0.1.4)
+ ffi (~> 0.6.3)
+ json_pure
+ rubyzip
+ shoulda (2.11.3)
+ sqlite3-ruby (1.3.2)
+ thor (0.14.6)
+ treetop (1.4.9)
+ polyglot (>= 0.3.1)
+ tzinfo (0.3.23)
+ xpath (0.1.2)
+ nokogiri (~> 1.3)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ capybara (>= 0.4.0)
+ mocha
+ rails (= 3.0.3)
+ redgreen
+ ruby-debug (>= 0.10.3)
+ shoulda
+ sqlite3-ruby
View
@@ -1,13 +1,29 @@
+# encoding: UTF-8
require 'rubygems'
+begin
+ require 'bundler/setup'
+rescue LoadError
+ puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
+end
+
require 'rake'
-require 'rake/testtask'
+require 'rake/rdoctask'
-desc 'Default: run unit tests'
-task :default => :test
+require 'rake/testtask'
-desc 'Test the pacecar plugin'
-Rake::TestTask.new :test do |t|
+Rake::TestTask.new(:test) do |t|
t.libs << 'lib'
+ t.libs << 'test'
t.pattern = 'test/**/*_test.rb'
- t.verbose = true
+ t.verbose = false
end
+
+task :default => :test
+
+Rake::RDocTask.new(:rdoc) do |rdoc|
+ rdoc.rdoc_dir = 'rdoc'
+ rdoc.title = 'Pacecar'
+ rdoc.options << '--line-numbers' << '--inline-source'
+ rdoc.rdoc_files.include('README.rdoc')
+ rdoc.rdoc_files.include('lib/**/*.rb')
+end
View
@@ -1,4 +0,0 @@
-.bundle
-db/*.sqlite3
-log/*.log
-tmp/**/*
View
@@ -2,9 +2,6 @@
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
require File.expand_path('../config/application', __FILE__)
-
require 'rake'
-require 'rake/testtask'
-require 'rake/rdoctask'
-Rails::Application.load_tasks
+Dummy::Application.load_tasks
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>Dummy</title>
+ <%= stylesheet_link_tag :all %>
+ <%= javascript_include_tag :defaults %>
+ <%= csrf_meta_tag %>
+</head>
+<body>
+
+<%= yield %>
+
+</body>
+</html>
@@ -1,27 +1,28 @@
require File.expand_path('../boot', __FILE__)
-require 'rails/all'
+require "active_model/railtie"
+require "active_record/railtie"
+require "action_controller/railtie"
+require "action_view/railtie"
+require "action_mailer/railtie"
-# If you have a Gemfile, require the gems listed there, including any gems
-# you've limited to :test, :development, or :production.
-Bundler.require(:default, Rails.env) if defined?(Bundler)
-
-require 'pacecar'
+Bundler.require
+require "pacecar"
module Dummy
class Application < Rails::Application
# Settings in config/environments/* take precedence over those specified here.
# Application configuration should go into files in config/initializers
# -- all .rb files in that directory are automatically loaded.
- # Add additional load paths for your own custom dirs
- # config.load_paths += %W( #{config.root}/extras )
+ # Custom directories with classes and modules you want to be autoloadable.
+ # config.autoload_paths += %W(#{config.root}/extras)
# Only load the plugins named here, in the order given (default is alphabetical).
- # :all can be used as a placeholder for all plugins not explicitly named
+ # :all can be used as a placeholder for all plugins not explicitly named.
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
- # Activate observers that should always be running
+ # Activate observers that should always be running.
# config.active_record.observers = :cacher, :garbage_collector, :forum_observer
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
@@ -32,14 +33,13 @@ class Application < Rails::Application
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
# config.i18n.default_locale = :de
- # Configure generators values. Many other options are available, be sure to check the documentation.
- # config.generators do |g|
- # g.orm :active_record
- # g.template_engine :erb
- # g.test_framework :test_unit, :fixture => true
- # end
+ # JavaScript files you want as :defaults (application.js is always included).
+ # config.action_view.javascript_expansions[:defaults] = %w(jquery rails)
+
+ # Configure the default encoding used in templates for Ruby 1.9.
+ config.encoding = "utf-8"
# Configure sensitive parameters which will be filtered from the log file.
- config.filter_parameters << :password
+ config.filter_parameters += [:password]
end
end
View
@@ -1,14 +1,10 @@
-# Use locked gems if present.
-begin
- require File.expand_path('../../.bundle/environment', __FILE__)
+require 'rubygems'
+gemfile = File.expand_path('../../../../Gemfile', __FILE__)
-rescue LoadError
- # Otherwise, use RubyGems.
- require 'rubygems'
-
- # And set up the gems listed in the Gemfile.
- if File.exist?(File.expand_path('../../Gemfile', __FILE__))
- require 'bundler'
- Bundler.setup
- end
+if File.exist?(gemfile)
+ ENV['BUNDLE_GEMFILE'] = gemfile
+ require 'bundler'
+ Bundler.setup
end
+
+$:.unshift File.expand_path('../../../../lib', __FILE__)
@@ -1,5 +1,5 @@
Dummy::Application.configure do
- # Settings specified here will take precedence over those in config/environment.rb
+ # Settings specified here will take precedence over those in config/application.rb
# In the development environment your application's code is reloaded on
# every request. This slows down response time but is perfect for development
@@ -16,4 +16,11 @@
# Don't care if the mailer can't send
config.action_mailer.raise_delivery_errors = false
+
+ # Print deprecation notices to the Rails logger
+ config.active_support.deprecation = :log
+
+ # Only use best-standards-support built into browsers
+ config.action_dispatch.best_standards_support = :builtin
end
+
@@ -1,5 +1,5 @@
Dummy::Application.configure do
- # Settings specified here will take precedence over those in config/environment.rb
+ # Settings specified here will take precedence over those in config/application.rb
# The production environment is meant for finished, "live" apps.
# Code is not reloaded between requests
@@ -39,4 +39,11 @@
# Enable threaded mode
# config.threadsafe!
+
+ # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
+ # the I18n.default_locale when a translation can not be found)
+ config.i18n.fallbacks = true
+
+ # Send deprecation notices to registered listeners
+ config.active_support.deprecation = :notify
end
@@ -1,5 +1,5 @@
Dummy::Application.configure do
- # Settings specified here will take precedence over those in config/environment.rb
+ # Settings specified here will take precedence over those in config/application.rb
# The test environment is used exclusively to run your application's
# test suite. You never need to work with it otherwise. Remember that
@@ -14,6 +14,9 @@
config.consider_all_requests_local = true
config.action_controller.perform_caching = false
+ # Raise exceptions instead of rendering exception templates
+ config.action_dispatch.show_exceptions = false
+
# Disable request forgery protection in test environment
config.action_controller.allow_forgery_protection = false
@@ -26,4 +29,7 @@
# 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
+
+ # Print deprecation notices to the stderr
+ config.active_support.deprecation = :stderr
end
@@ -1,6 +1,6 @@
# Be sure to restart your server when you modify this file.
-# Add new inflection rules using the following format
+# Add new inflection rules using the following format
# (all these examples are active by default):
# ActiveSupport::Inflector.inflections do |inflect|
# inflect.plural /^(ox)$/i, '\1en'
@@ -2,6 +2,6 @@
# Your secret key for verifying the integrity of signed cookies.
# If you change this key, all old signed cookies will become invalid!
-# Make sure the secret is at least 30 characters and all random,
+# Make sure the secret is at least 30 characters and all random,
# no regular words or you'll be exposed to dictionary attacks.
-Rails.application.config.secret_token = 'd7457c7a1642947497f2e01365e1350dddc06bc03b6b5eba61d6bcb5e658836fe9b879392f1ea11d75787af21daeca6ec30d0b143faa9192fe610e25c0a3a41a'
+Dummy::Application.config.secret_token = '513e6767391489274e2294d66792d5d4b13b939227783f15902a64fb647b9fc2781675ac575b454d9c4af6ff400e845ce20204b345280f8218c0510aafa9e3ef'
@@ -1,10 +1,8 @@
# Be sure to restart your server when you modify this file.
-Rails.application.config.session_store :cookie_store, {
- :key => '_dummy_session',
-}
+Dummy::Application.config.session_store :cookie_store, :key => '_dummy_session'
# Use the database for sessions instead of the cookie-based default,
# which shouldn't be used to store highly confidential information
-# (create the session table with "rake db:sessions:create")
-# Rails.application.config.session_store :active_record_store
+# (create the session table with "rails generate session_migration")
+# Dummy::Application.config.session_store :active_record_store
Oops, something went wrong.

0 comments on commit a999aba

Please sign in to comment.