upgraded to rails 3.1.0.rc1

This commit is contained in:
albert
2011-05-24 18:04:25 -04:00
parent 5a668457d2
commit 1c964b5189
11 changed files with 152 additions and 117 deletions

View File

@@ -8,7 +8,7 @@ group :test do
gem "simplecov", :require => false gem "simplecov", :require => false
end end
gem "rails", "3.0.7" gem "rails", "3.1.0.rc1"
gem "pg" gem "pg"
gem "memcache-client", :require => "memcache" gem "memcache-client", :require => "memcache"
gem "imagesize", :require => "image_size" gem "imagesize", :require => "image_size"

View File

@@ -1,8 +1,8 @@
GIT GIT
remote: http://github.com/EmmanuelOga/ffaker.git remote: http://github.com/EmmanuelOga/ffaker.git
revision: 59fb6d76c64fe93a178d3d078cebda5f78eea5cb revision: baf4891a5351ad01775f3e4bb77c78ceed349360
specs: specs:
ffaker (1.5.0) ffaker (1.7.0)
GIT GIT
remote: http://github.com/mislav/will_paginate.git remote: http://github.com/mislav/will_paginate.git
@@ -14,92 +14,106 @@ GIT
GEM GEM
remote: http://gemcutter.org/ remote: http://gemcutter.org/
specs: specs:
abstract (1.0.0) actionmailer (3.1.0.rc1)
actionmailer (3.0.7) actionpack (= 3.1.0.rc1)
actionpack (= 3.0.7) mail (~> 2.3.0)
mail (~> 2.2.15) actionpack (3.1.0.rc1)
actionpack (3.0.7) activemodel (= 3.1.0.rc1)
activemodel (= 3.0.7) activesupport (= 3.1.0.rc1)
activesupport (= 3.0.7) builder (~> 3.0.0)
builder (~> 2.1.2) erubis (~> 2.7.0)
erubis (~> 2.6.6) i18n (~> 0.6.0beta1)
i18n (~> 0.5.0) rack (~> 1.3.0.beta2)
rack (~> 1.2.1) rack-cache (~> 1.0.1)
rack-mount (~> 0.6.14) rack-mount (~> 0.8.1)
rack-test (~> 0.5.7) rack-test (~> 0.6.0)
tzinfo (~> 0.3.23) sprockets (~> 2.0.0.beta.5)
activemodel (3.0.7) tzinfo (~> 0.3.27)
activesupport (= 3.0.7) activemodel (3.1.0.rc1)
builder (~> 2.1.2) activesupport (= 3.1.0.rc1)
i18n (~> 0.5.0) bcrypt-ruby (~> 2.1.4)
activerecord (3.0.7) builder (~> 3.0.0)
activemodel (= 3.0.7) i18n (~> 0.6.0beta1)
activesupport (= 3.0.7) activerecord (3.1.0.rc1)
arel (~> 2.0.2) activemodel (= 3.1.0.rc1)
tzinfo (~> 0.3.23) activesupport (= 3.1.0.rc1)
activeresource (3.0.7) arel (~> 2.1.1)
activemodel (= 3.0.7) tzinfo (~> 0.3.27)
activesupport (= 3.0.7) activeresource (3.1.0.rc1)
activesupport (3.0.7) activemodel (= 3.1.0.rc1)
arel (2.0.9) activesupport (= 3.1.0.rc1)
builder (2.1.2) activesupport (3.1.0.rc1)
multi_json (~> 1.0)
arel (2.1.1)
bcrypt-ruby (2.1.4)
builder (3.0.0)
daemons (1.1.3) daemons (1.1.3)
delayed_job (2.1.4) delayed_job (2.1.4)
activesupport (~> 3.0) activesupport (~> 3.0)
daemons daemons
erubis (2.6.6) erubis (2.7.0)
abstract (>= 1.0.0)
factory_girl (1.3.3) factory_girl (1.3.3)
haml (3.1.1) haml (3.1.1)
i18n (0.5.0) hike (1.0.0)
i18n (0.6.0)
imagesize (0.1.1) imagesize (0.1.1)
mail (2.2.19) mail (2.3.0)
activesupport (>= 2.3.6)
i18n (>= 0.4.0) i18n (>= 0.4.0)
mime-types (~> 1.16) mime-types (~> 1.16)
treetop (~> 1.4.8) treetop (~> 1.4.8)
mechanize (1.0.0) mechanize (1.0.0)
nokogiri (>= 1.2.1) nokogiri (>= 1.2.1)
memcache-client (1.8.5) memcache-client (1.8.5)
meta_search (1.0.4) meta_search (0.5.4)
actionpack (~> 3.0.2) actionpack (>= 3.0.0.beta4)
activerecord (~> 3.0.2) activerecord (>= 3.0.0.beta4)
activesupport (~> 3.0.2) activesupport (>= 3.0.0.beta4)
arel (~> 2.0.2) arel (>= 0.4.0)
mime-types (1.16) mime-types (1.16)
mocha (0.9.12) mocha (0.9.12)
multi_json (1.0.3)
nokogiri (1.4.4) nokogiri (1.4.4)
pg (0.11.0) pg (0.11.0)
polyglot (0.3.1) polyglot (0.3.1)
rack (1.2.2) rack (1.3.0)
rack-mount (0.6.14) rack-cache (1.0.2)
rack (>= 0.4)
rack-mount (0.8.1)
rack (>= 1.0.0) rack (>= 1.0.0)
rack-test (0.5.7) rack-ssl (1.3.2)
rack
rack-test (0.6.0)
rack (>= 1.0) rack (>= 1.0)
rails (3.0.7) rails (3.1.0.rc1)
actionmailer (= 3.0.7) actionmailer (= 3.1.0.rc1)
actionpack (= 3.0.7) actionpack (= 3.1.0.rc1)
activerecord (= 3.0.7) activerecord (= 3.1.0.rc1)
activeresource (= 3.0.7) activeresource (= 3.1.0.rc1)
activesupport (= 3.0.7) activesupport (= 3.1.0.rc1)
bundler (~> 1.0) bundler (~> 1.0)
railties (= 3.0.7) railties (= 3.1.0.rc1)
railties (3.0.7) railties (3.1.0.rc1)
actionpack (= 3.0.7) actionpack (= 3.1.0.rc1)
activesupport (= 3.0.7) activesupport (= 3.1.0.rc1)
rack-ssl (~> 1.3.2)
rake (>= 0.8.7) rake (>= 0.8.7)
thor (~> 0.14.4) thor (~> 0.14.6)
rake (0.8.7) rake (0.9.0)
shoulda (2.11.3) shoulda (2.11.3)
silent-postgres (0.0.8) silent-postgres (0.0.8)
simple_form (1.3.1) simple_form (1.4.0)
simplecov (0.4.2) simplecov (0.4.2)
simplecov-html (~> 0.4.4) simplecov-html (~> 0.4.4)
simplecov-html (0.4.4) simplecov-html (0.4.5)
sprockets (2.0.0.beta.8)
hike (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
super_exception_notifier (3.0.13) super_exception_notifier (3.0.13)
actionmailer actionmailer
rake rake
thor (0.14.6) thor (0.14.6)
tilt (1.3.1)
treetop (1.4.9) treetop (1.4.9)
polyglot (>= 0.3.1) polyglot (>= 0.3.1)
tzinfo (0.3.27) tzinfo (0.3.27)
@@ -119,7 +133,7 @@ DEPENDENCIES
mocha mocha
nokogiri nokogiri
pg pg
rails (= 3.0.7) rails (= 3.1.0.rc1)
shoulda shoulda
silent-postgres silent-postgres
simple_form simple_form

View File

@@ -1,37 +1,40 @@
require File.expand_path('../boot', __FILE__) require File.expand_path('../boot', __FILE__)
require 'rails/all' require 'rails/all'
# 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) Bundler.require(:default, Rails.env) if defined?(Bundler)
module Danbooru module Danbooru
class Application < Rails::Application class Application < Rails::Application
config.encoding = "utf-8"
config.filter_parameters += [:password]
config.assets.enabled = true
config.autoload_paths += %W(#{config.root}/app/presenters #{config.root}/app/logical) config.autoload_paths += %W(#{config.root}/app/presenters #{config.root}/app/logical)
config.plugins = [:all] config.plugins = [:all]
config.time_zone = 'Eastern Time (US & Canada)' config.time_zone = 'Eastern Time (US & Canada)'
config.encoding = "utf-8"
config.active_record.schema_format = :sql config.active_record.schema_format = :sql
config.filter_parameters << :password # config.action_view.javascript_expansions[:defaults] = [
config.action_view.javascript_expansions[:defaults] = [ # "src/lib/jquery-1.6.0.min.js",
"src/lib/jquery-1.6.0.min.js", # "src/lib/jquery-ui-1.8.9.custom.min.js",
"src/lib/jquery-ui-1.8.9.custom.min.js", # "src/lib/jquery.timeout.js",
"src/lib/jquery.timeout.js", # "src/lib/rails.js",
"src/lib/rails.js", # "src/app/common.js",
"src/app/common.js", # "src/app/cookie.js",
"src/app/cookie.js", # "src/app/utility.js",
"src/app/utility.js", # "src/app/posts.js",
"src/app/posts.js", # "src/app/comments.js",
"src/app/comments.js", # "src/app/uploads.js",
"src/app/uploads.js", # "src/app/users.js",
"src/app/users.js", # "src/app/favorites.js",
"src/app/favorites.js", # "src/app/post_flags.js",
"src/app/post_flags.js", # "src/app/post_appeals.js",
"src/app/post_appeals.js", # "src/app/post_moderation.js",
"src/app/post_moderation.js", # "src/app/pools.js",
"src/app/pools.js", # "src/app/wiki_pages.js",
"src/app/wiki_pages.js", # "src/app/forum_posts.js",
"src/app/forum_posts.js", # "src/app/notes.js"
"src/app/notes.js" # ]
]
# config.active_record.observers = :cacher, :garbage_collector, :forum_observer
end end
end end

View File

@@ -1,13 +1,6 @@
require 'rubygems' require 'rubygems'
# Set up gems listed in the Gemfile. # Set up gems listed in the Gemfile.
gemfile = File.expand_path('../../Gemfile', __FILE__) ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
begin
ENV['BUNDLE_GEMFILE'] = gemfile require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
require 'bundler'
Bundler.setup
rescue Bundler::GemNotFound => e
STDERR.puts e.message
STDERR.puts "Try running `bundle install`."
exit!
end if File.exist?(gemfile)

View File

@@ -1,9 +1,9 @@
Danbooru::Application.configure do Danbooru::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 # In the development environment your application's code is reloaded on
# every request. This slows down response time but is perfect for development # every request. This slows down response time but is perfect for development
# since you don't have to restart the webserver when you make code changes. # since you don't have to restart the web server when you make code changes.
config.cache_classes = false config.cache_classes = false
# Log error messages when you accidentally call methods on nil. # Log error messages when you accidentally call methods on nil.
@@ -11,7 +11,6 @@ Danbooru::Application.configure do
# Show full error reports and disable caching # Show full error reports and disable caching
config.consider_all_requests_local = true config.consider_all_requests_local = true
config.action_view.debug_rjs = true
config.action_controller.perform_caching = false config.action_controller.perform_caching = false
# Don't care if the mailer can't send # Don't care if the mailer can't send
@@ -19,4 +18,7 @@ Danbooru::Application.configure do
# Print deprecation notices to the Rails logger # Print deprecation notices to the Rails logger
config.active_support.deprecation = :log config.active_support.deprecation = :log
# Only use best-standards-support built into browsers
config.action_dispatch.best_standards_support = :builtin
end end

View File

@@ -1,7 +1,6 @@
Danbooru::Application.configure do Danbooru::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 # Code is not reloaded between requests
config.cache_classes = true config.cache_classes = true
@@ -9,14 +8,19 @@ Danbooru::Application.configure do
config.consider_all_requests_local = false config.consider_all_requests_local = false
config.action_controller.perform_caching = true config.action_controller.perform_caching = true
# Disable Rails's static asset server (Apache or nginx will already do this)
config.serve_static_assets = false
# Compress both stylesheets and JavaScripts
config.assets.js_compressor = :uglifier
config.assets.css_compressor = :scss
# Specifies the header that your server uses for sending files # Specifies the header that your server uses for sending files
config.action_dispatch.x_sendfile_header = "X-Sendfile" # (comment out if your front-end server doesn't support this)
config.action_dispatch.x_sendfile_header = "X-Sendfile" # Use 'X-Accel-Redirect' for nginx
# For nginx: # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # config.force_ssl = true
# If you have no front-end server that supports something like X-Sendfile,
# just comment this out and Rails will serve the files
# See everything in the log (default is :info) # See everything in the log (default is :info)
# config.log_level = :debug # config.log_level = :debug
@@ -27,13 +31,12 @@ Danbooru::Application.configure do
# Use a different cache store in production # Use a different cache store in production
# config.cache_store = :mem_cache_store # config.cache_store = :mem_cache_store
# Disable Rails's static asset server # Enable serving of images, stylesheets, and JavaScripts from an asset server
# In production, Apache or nginx will already do this
config.serve_static_assets = false
# Enable serving of images, stylesheets, and javascripts from an asset server
# config.action_controller.asset_host = "http://assets.example.com" # config.action_controller.asset_host = "http://assets.example.com"
# Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
# config.assets.precompile += %w( search.js )
# Disable delivery errors, bad email addresses will be ignored # Disable delivery errors, bad email addresses will be ignored
# config.action_mailer.raise_delivery_errors = false # config.action_mailer.raise_delivery_errors = false

View File

@@ -1,5 +1,5 @@
Danbooru::Application.configure do Danbooru::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 # The test environment is used exclusively to run your application's
# test suite. You never need to work with it otherwise. Remember that # test suite. You never need to work with it otherwise. Remember that
@@ -7,7 +7,11 @@ Danbooru::Application.configure do
# and recreated between test runs. Don't rely on the data there! # and recreated between test runs. Don't rely on the data there!
config.cache_classes = true config.cache_classes = true
# Log error messages when you accidentally call methods on nil. # Configure static asset server for tests with Cache-Control for performance
config.serve_static_assets = true
config.static_cache_control = "public, max-age=3600"
# Log error messages when you accidentally call methods on nil
config.whiny_nils = true config.whiny_nils = true
# Show full error reports and disable caching # Show full error reports and disable caching

View File

@@ -1,3 +1,7 @@
# Be sure to restart your server when you modify this file.
# Add new inflection rules using the following format
# (all these examples are active by default):
# ActiveSupport::Inflector.inflections do |inflect| # ActiveSupport::Inflector.inflections do |inflect|
# inflect.plural /^(ox)$/i, '\1en' # inflect.plural /^(ox)$/i, '\1en'
# inflect.singular /^(ox)en/i, '\1' # inflect.singular /^(ox)en/i, '\1'

View File

@@ -1,8 +1,8 @@
# Be sure to restart your server when you modify this file. # Be sure to restart your server when you modify this file.
Danbooru::Application.config.session_store :cookie_store, :key => '_config_session' Danbooru::Application.config.session_store :cookie_store, key: '_danbooru_session'
# Use the database for sessions instead of the cookie-based default, # Use the database for sessions instead of the cookie-based default,
# which shouldn't be used to store highly confidential information # which shouldn't be used to store highly confidential information
# (create the session table with "rake db:sessions:create") # (create the session table with "rails generate session_migration")
# Config::Application.config.session_store :active_record_store # Danbooru::Application.config.session_store :active_record_store

View File

@@ -0,0 +1,12 @@
# Be sure to restart your server when you modify this file.
#
# This file contains the settings for ActionController::ParametersWrapper
# which will be enabled by default in the upcoming version of Ruby on Rails.
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
ActionController::Base.wrap_parameters format: [:json]
# Disable root element in JSON by default.
if defined?(ActiveRecord)
ActiveRecord::Base.include_root_in_json = false
end

View File

@@ -1,5 +1,5 @@
# Sample localization file for English. Add more files in this directory for other locales. # Sample localization file for English. Add more files in this directory for other locales.
# See http://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points. # See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
en: en:
hello: "Hello world" hello: "Hello world"