rails 3.1 changes
This commit is contained in:
parent
bee988dc54
commit
1a8a6f3eda
19
Gemfile
19
Gemfile
@ -1,6 +1,6 @@
|
||||
source 'http://rubygems.org'
|
||||
|
||||
gem 'rails', '3.0.6'
|
||||
gem 'rails', '3.1.0.rc4'
|
||||
|
||||
# Bundle edge Rails instead:
|
||||
# gem 'rails', :git => 'git://github.com/rails/rails.git'
|
||||
@ -8,8 +8,9 @@ gem 'rails', '3.0.6'
|
||||
gem 'sqlite3'
|
||||
|
||||
# Asset template engines
|
||||
|
||||
gem 'sass'
|
||||
gem 'sass-rails', "~> 3.1.0.rc"
|
||||
gem 'coffee-script'
|
||||
gem 'uglifier'
|
||||
|
||||
gem 'jquery-rails'
|
||||
|
||||
@ -17,10 +18,10 @@ gem 'jquery-rails'
|
||||
# gem 'unicorn'
|
||||
|
||||
# Deploy with Capistrano
|
||||
gem 'capistrano'
|
||||
# gem 'capistrano'
|
||||
|
||||
# To use debugger
|
||||
# gem 'ruby-debug'
|
||||
# gem 'ruby-debug19', :require => 'ruby-debug'
|
||||
|
||||
|
||||
|
||||
@ -43,5 +44,11 @@ gem "cancan"
|
||||
#gem "squeel"
|
||||
gem 'meta_search'
|
||||
|
||||
gem "devise"
|
||||
gem "devise"
|
||||
gem "haml", ">= 3.0.0"
|
||||
|
||||
|
||||
group :test do
|
||||
# Pretty printed test output
|
||||
gem 'turn', :require => false
|
||||
end
|
||||
|
182
Gemfile.lock
182
Gemfile.lock
@ -1,114 +1,132 @@
|
||||
GEM
|
||||
remote: http://rubygems.org/
|
||||
specs:
|
||||
abstract (1.0.0)
|
||||
actionmailer (3.0.6)
|
||||
actionpack (= 3.0.6)
|
||||
mail (~> 2.2.15)
|
||||
actionpack (3.0.6)
|
||||
activemodel (= 3.0.6)
|
||||
activesupport (= 3.0.6)
|
||||
builder (~> 2.1.2)
|
||||
erubis (~> 2.6.6)
|
||||
i18n (~> 0.5.0)
|
||||
rack (~> 1.2.1)
|
||||
rack-mount (~> 0.6.14)
|
||||
rack-test (~> 0.5.7)
|
||||
tzinfo (~> 0.3.23)
|
||||
activemodel (3.0.6)
|
||||
activesupport (= 3.0.6)
|
||||
builder (~> 2.1.2)
|
||||
i18n (~> 0.5.0)
|
||||
activerecord (3.0.6)
|
||||
activemodel (= 3.0.6)
|
||||
activesupport (= 3.0.6)
|
||||
arel (~> 2.0.2)
|
||||
tzinfo (~> 0.3.23)
|
||||
activeresource (3.0.6)
|
||||
activemodel (= 3.0.6)
|
||||
activesupport (= 3.0.6)
|
||||
activesupport (3.0.6)
|
||||
acts_as_list (0.1.2)
|
||||
actionmailer (3.1.0.rc4)
|
||||
actionpack (= 3.1.0.rc4)
|
||||
mail (~> 2.3.0)
|
||||
actionpack (3.1.0.rc4)
|
||||
activemodel (= 3.1.0.rc4)
|
||||
activesupport (= 3.1.0.rc4)
|
||||
builder (~> 3.0.0)
|
||||
erubis (~> 2.7.0)
|
||||
i18n (~> 0.6)
|
||||
rack (~> 1.3.0)
|
||||
rack-cache (~> 1.0.1)
|
||||
rack-mount (~> 0.8.1)
|
||||
rack-test (~> 0.6.0)
|
||||
sprockets (~> 2.0.0.beta.10)
|
||||
tzinfo (~> 0.3.27)
|
||||
activemodel (3.1.0.rc4)
|
||||
activesupport (= 3.1.0.rc4)
|
||||
bcrypt-ruby (~> 2.1.4)
|
||||
builder (~> 3.0.0)
|
||||
i18n (~> 0.6)
|
||||
activerecord (3.1.0.rc4)
|
||||
activemodel (= 3.1.0.rc4)
|
||||
activesupport (= 3.1.0.rc4)
|
||||
arel (~> 2.1.1)
|
||||
tzinfo (~> 0.3.27)
|
||||
activeresource (3.1.0.rc4)
|
||||
activemodel (= 3.1.0.rc4)
|
||||
activesupport (= 3.1.0.rc4)
|
||||
activesupport (3.1.0.rc4)
|
||||
multi_json (~> 1.0)
|
||||
acts_as_list (0.1.3)
|
||||
acts_as_tree (0.1.1)
|
||||
arel (2.0.9)
|
||||
ansi (1.3.0)
|
||||
arel (2.1.3)
|
||||
bcrypt-ruby (2.1.4)
|
||||
builder (2.1.2)
|
||||
cancan (1.6.4)
|
||||
capistrano (2.6.0)
|
||||
highline
|
||||
net-scp (>= 1.0.0)
|
||||
net-sftp (>= 2.0.0)
|
||||
net-ssh (>= 2.0.14)
|
||||
net-ssh-gateway (>= 1.1.0)
|
||||
carrierwave (0.5.3)
|
||||
builder (3.0.0)
|
||||
cancan (1.6.5)
|
||||
carrierwave (0.5.4)
|
||||
activesupport (~> 3.0)
|
||||
devise (1.3.4)
|
||||
coffee-script (2.2.0)
|
||||
coffee-script-source
|
||||
execjs
|
||||
coffee-script-source (1.1.1)
|
||||
devise (1.4.2)
|
||||
bcrypt-ruby (~> 2.1.2)
|
||||
orm_adapter (~> 0.0.3)
|
||||
warden (~> 1.0.3)
|
||||
erubis (2.6.6)
|
||||
abstract (>= 1.0.0)
|
||||
formtastic (1.2.3)
|
||||
erubis (2.7.0)
|
||||
execjs (1.2.0)
|
||||
multi_json (~> 1.0)
|
||||
formtastic (1.2.4)
|
||||
actionpack (>= 2.3.7)
|
||||
activesupport (>= 2.3.7)
|
||||
i18n (~> 0.4)
|
||||
haml (3.1.1)
|
||||
highline (1.6.1)
|
||||
i18n (0.5.0)
|
||||
jquery-rails (1.0.2)
|
||||
haml (3.1.2)
|
||||
hike (1.1.0)
|
||||
i18n (0.6.0)
|
||||
jquery-rails (1.0.12)
|
||||
railties (~> 3.0)
|
||||
thor (~> 0.14)
|
||||
kaminari (0.12.4)
|
||||
rails (>= 3.0.0)
|
||||
mail (2.2.19)
|
||||
activesupport (>= 2.3.6)
|
||||
mail (2.3.0)
|
||||
i18n (>= 0.4.0)
|
||||
mime-types (~> 1.16)
|
||||
treetop (~> 1.4.8)
|
||||
meta_search (1.0.5)
|
||||
actionpack (~> 3.0.2)
|
||||
activerecord (~> 3.0.2)
|
||||
activesupport (~> 3.0.2)
|
||||
arel (~> 2.0.2)
|
||||
meta_search (0.5.4)
|
||||
actionpack (>= 3.0.0.beta4)
|
||||
activerecord (>= 3.0.0.beta4)
|
||||
activesupport (>= 3.0.0.beta4)
|
||||
arel (>= 0.4.0)
|
||||
mime-types (1.16)
|
||||
mimetype-fu (0.1.2)
|
||||
net-scp (1.0.4)
|
||||
net-ssh (>= 1.99.1)
|
||||
net-sftp (2.0.5)
|
||||
net-ssh (>= 2.0.9)
|
||||
net-ssh (2.1.4)
|
||||
net-ssh-gateway (1.1.0)
|
||||
net-ssh (>= 1.99.1)
|
||||
multi_json (1.0.3)
|
||||
orm_adapter (0.0.5)
|
||||
polyglot (0.3.1)
|
||||
rack (1.2.2)
|
||||
rack-mount (0.6.14)
|
||||
rack (1.3.0)
|
||||
rack-cache (1.0.2)
|
||||
rack (>= 0.4)
|
||||
rack-mount (0.8.1)
|
||||
rack (>= 1.0.0)
|
||||
rack-test (0.5.7)
|
||||
rack-ssl (1.3.2)
|
||||
rack
|
||||
rack-test (0.6.0)
|
||||
rack (>= 1.0)
|
||||
rails (3.0.6)
|
||||
actionmailer (= 3.0.6)
|
||||
actionpack (= 3.0.6)
|
||||
activerecord (= 3.0.6)
|
||||
activeresource (= 3.0.6)
|
||||
activesupport (= 3.0.6)
|
||||
rails (3.1.0.rc4)
|
||||
actionmailer (= 3.1.0.rc4)
|
||||
actionpack (= 3.1.0.rc4)
|
||||
activerecord (= 3.1.0.rc4)
|
||||
activeresource (= 3.1.0.rc4)
|
||||
activesupport (= 3.1.0.rc4)
|
||||
bundler (~> 1.0)
|
||||
railties (= 3.0.6)
|
||||
railties (3.0.6)
|
||||
actionpack (= 3.0.6)
|
||||
activesupport (= 3.0.6)
|
||||
railties (= 3.1.0.rc4)
|
||||
railties (3.1.0.rc4)
|
||||
actionpack (= 3.1.0.rc4)
|
||||
activesupport (= 3.1.0.rc4)
|
||||
rack-ssl (~> 1.3.2)
|
||||
rake (>= 0.8.7)
|
||||
thor (~> 0.14.4)
|
||||
rake (0.8.7)
|
||||
rdoc (~> 3.4)
|
||||
thor (~> 0.14.6)
|
||||
rake (0.9.2)
|
||||
rdoc (3.8)
|
||||
rmagick (2.13.1)
|
||||
sass (3.1.1)
|
||||
simple-navigation (3.2.0)
|
||||
sass (3.1.4)
|
||||
sass-rails (3.1.0.rc.4)
|
||||
actionpack (~> 3.1.0.rc1)
|
||||
railties (~> 3.1.0.rc1)
|
||||
sass (>= 3.1.4)
|
||||
sprockets (>= 2.0.0.beta.9)
|
||||
simple-navigation (3.3.3)
|
||||
activesupport (>= 2.3.2)
|
||||
sprockets (2.0.0.beta.10)
|
||||
hike (~> 1.0)
|
||||
rack (~> 1.0)
|
||||
tilt (!= 1.3.0, ~> 1.1)
|
||||
sqlite3 (1.3.3)
|
||||
thor (0.14.6)
|
||||
tilt (1.3.2)
|
||||
treetop (1.4.9)
|
||||
polyglot (>= 0.3.1)
|
||||
tzinfo (0.3.27)
|
||||
turn (0.8.2)
|
||||
ansi (>= 1.2.2)
|
||||
tzinfo (0.3.29)
|
||||
uglifier (1.0.0)
|
||||
execjs (>= 0.3.0)
|
||||
multi_json (>= 1.0.2)
|
||||
warden (1.0.4)
|
||||
rack (>= 1.0)
|
||||
|
||||
@ -119,8 +137,8 @@ DEPENDENCIES
|
||||
acts_as_list
|
||||
acts_as_tree
|
||||
cancan
|
||||
capistrano
|
||||
carrierwave
|
||||
coffee-script
|
||||
devise
|
||||
formtastic
|
||||
haml (>= 3.0.0)
|
||||
@ -128,8 +146,10 @@ DEPENDENCIES
|
||||
kaminari
|
||||
meta_search
|
||||
mimetype-fu
|
||||
rails (= 3.0.6)
|
||||
rails (= 3.1.0.rc4)
|
||||
rmagick
|
||||
sass
|
||||
sass-rails (~> 3.1.0.rc)
|
||||
simple-navigation
|
||||
sqlite3
|
||||
turn
|
||||
uglifier
|
||||
|
15
README
15
README
@ -156,6 +156,10 @@ PostgreSQL and SQLite 3.
|
||||
The default directory structure of a generated Ruby on Rails application:
|
||||
|
||||
|-- app
|
||||
| |-- assets
|
||||
| |-- images
|
||||
| |-- javascripts
|
||||
| `-- stylesheets
|
||||
| |-- controllers
|
||||
| |-- helpers
|
||||
| |-- mailers
|
||||
@ -172,9 +176,6 @@ The default directory structure of a generated Ruby on Rails application:
|
||||
| `-- tasks
|
||||
|-- log
|
||||
|-- public
|
||||
| |-- images
|
||||
| |-- javascripts
|
||||
| `-- stylesheets
|
||||
|-- script
|
||||
|-- test
|
||||
| |-- fixtures
|
||||
@ -188,11 +189,16 @@ The default directory structure of a generated Ruby on Rails application:
|
||||
| |-- sessions
|
||||
| `-- sockets
|
||||
`-- vendor
|
||||
|-- assets
|
||||
`-- stylesheets
|
||||
`-- plugins
|
||||
|
||||
app
|
||||
Holds all the code that's specific to this particular application.
|
||||
|
||||
app/assets
|
||||
Contains subdirectories for images, stylesheets, and JavaScript files.
|
||||
|
||||
app/controllers
|
||||
Holds controllers that should be named like weblogs_controller.rb for
|
||||
automated URL mapping. All controllers should descend from
|
||||
@ -237,8 +243,7 @@ lib
|
||||
the load path.
|
||||
|
||||
public
|
||||
The directory available for the web server. Contains subdirectories for
|
||||
images, stylesheets, and javascripts. Also contains the dispatchers and the
|
||||
The directory available for the web server. Also contains the dispatchers and the
|
||||
default HTML files. This should be set as the DOCUMENT_ROOT of your web
|
||||
server.
|
||||
|
||||
|
2
Rakefile
2
Rakefile
@ -4,4 +4,4 @@
|
||||
|
||||
require File.expand_path('../config/application', __FILE__)
|
||||
|
||||
PharmacieboissierCom::Application.load_tasks
|
||||
Pharma::Application.load_tasks
|
||||
|
@ -1,4 +1,4 @@
|
||||
# This file is used by Rack-based servers to start the application.
|
||||
|
||||
require ::File.expand_path('../config/environment', __FILE__)
|
||||
run PharmacieboissierCom::Application
|
||||
run Pharma::Application
|
||||
|
@ -7,7 +7,7 @@ require 'rails/all'
|
||||
# you've limited to :test, :development, or :production.
|
||||
Bundler.require(:default, Rails.env) if defined?(Bundler)
|
||||
|
||||
module PharmacieboissierCom
|
||||
module Pharma
|
||||
class Application < Rails::Application
|
||||
# Settings in config/environments/* take precedence over those specified here.
|
||||
# Application configuration should go into files in config/initializers
|
||||
@ -31,13 +31,6 @@ module PharmacieboissierCom
|
||||
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
||||
# config.i18n.default_locale = :de
|
||||
|
||||
# Please note that JavaScript expansions are *ignored altogether* if the asset
|
||||
# pipeline is enabled (see config.assets.enabled below). Put your defaults in
|
||||
# app/assets/javascripts/application.js in that case.
|
||||
#
|
||||
# JavaScript files you want as :defaults (application.js is always included).
|
||||
# config.action_view.javascript_expansions[:defaults] = %w(prototype prototype_ujs)
|
||||
|
||||
config.time_zone = 'Paris'
|
||||
|
||||
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
||||
@ -67,8 +60,11 @@ module PharmacieboissierCom
|
||||
|
||||
config.autoload_paths << full_path if File.directory?(full_path)
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
end
|
||||
# Enable the asset pipeline
|
||||
config.assets.enabled = true
|
||||
end
|
||||
end
|
||||
|
@ -1,4 +1,3 @@
|
||||
# -*- encoding : utf-8 -*-
|
||||
require 'rubygems'
|
||||
|
||||
# Set up gems listed in the Gemfile.
|
||||
|
@ -1,8 +1,5 @@
|
||||
|
||||
# Load the rails application
|
||||
require File.expand_path('../application', __FILE__)
|
||||
|
||||
# Initialize the rails application
|
||||
PharmacieboissierCom::Application.initialize!
|
||||
|
||||
|
||||
Pharma::Application.initialize!
|
||||
|
@ -1,5 +1,4 @@
|
||||
# -*- encoding : utf-8 -*-
|
||||
PharmacieboissierCom::Application.configure do
|
||||
Pharma::Application.configure do
|
||||
# Settings specified here will take precedence over those in config/application.rb
|
||||
|
||||
# In the development environment your application's code is reloaded on
|
||||
@ -12,7 +11,6 @@ PharmacieboissierCom::Application.configure do
|
||||
|
||||
# Show full error reports and disable caching
|
||||
config.consider_all_requests_local = true
|
||||
config.action_view.debug_rjs = true
|
||||
config.action_controller.perform_caching = false
|
||||
|
||||
# Don't care if the mailer can't send
|
||||
@ -22,7 +20,10 @@ PharmacieboissierCom::Application.configure do
|
||||
config.active_support.deprecation = :log
|
||||
|
||||
# Only use best-standards-support built into browsers
|
||||
config.action_dispatch.best_standards_support = :builtin
|
||||
config.action_dispatch.best_standards_support = :builtin
|
||||
|
||||
# Do not compress assets
|
||||
config.assets.compress = false
|
||||
|
||||
config.action_mailer.default_url_options = { :host => 'localhost:3000' }
|
||||
|
||||
@ -40,4 +41,3 @@ PharmacieboissierCom::Application.configure do
|
||||
end
|
||||
|
||||
HOSTNAME = "localhost:3000"
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
# -*- encoding : utf-8 -*-
|
||||
PharmacieboissierCom::Application.configure do
|
||||
Pharma::Application.configure do
|
||||
# Settings specified here will take precedence over those in config/application.rb
|
||||
|
||||
# Code is not reloaded between requests
|
||||
@ -12,6 +12,11 @@ PharmacieboissierCom::Application.configure do
|
||||
# Disable Rails's static asset server (Apache or nginx will already do this)
|
||||
config.serve_static_assets = false
|
||||
|
||||
# Compress JavaScripts and CSS
|
||||
config.assets.compress = true
|
||||
|
||||
# Specify the default JavaScript compressor
|
||||
config.assets.js_compressor = :uglifier
|
||||
|
||||
# Specifies the header that your server uses for sending files
|
||||
# (comment out if your front-end server doesn't support this)
|
||||
@ -29,7 +34,7 @@ PharmacieboissierCom::Application.configure do
|
||||
# Use a different cache store in production
|
||||
# config.cache_store = :mem_cache_store
|
||||
|
||||
# Enable serving of images, stylesheets, and javascripts from an asset server
|
||||
# Enable serving of images, stylesheets, and JavaScripts from an asset server
|
||||
# config.action_controller.asset_host = "http://assets.example.com"
|
||||
|
||||
# Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
|
||||
@ -47,9 +52,11 @@ PharmacieboissierCom::Application.configure do
|
||||
|
||||
# Send deprecation notices to registered listeners
|
||||
config.active_support.deprecation = :notify
|
||||
|
||||
config.action_mailer.default_url_options = { :host => "test.pharmacie-boissier.com" }
|
||||
|
||||
config.action_mailer.delivery_method = :sendmail
|
||||
end
|
||||
|
||||
|
||||
|
||||
HOSTNAME = "test.pharmacieboissier.com"
|
||||
|
@ -1,5 +1,4 @@
|
||||
# -*- encoding : utf-8 -*-
|
||||
PharmacieboissierCom::Application.configure do
|
||||
Pharma::Application.configure do
|
||||
# Settings specified here will take precedence over those in config/application.rb
|
||||
|
||||
# The test environment is used exclusively to run your application's
|
||||
|
@ -1,4 +1,3 @@
|
||||
# -*- encoding : utf-8 -*-
|
||||
# Be sure to restart your server when you modify this file.
|
||||
|
||||
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
|
||||
|
@ -1,4 +1,3 @@
|
||||
# -*- encoding : utf-8 -*-
|
||||
# Be sure to restart your server when you modify this file.
|
||||
|
||||
# Add new inflection rules using the following format
|
||||
|
@ -1,4 +1,3 @@
|
||||
# -*- encoding : utf-8 -*-
|
||||
# Be sure to restart your server when you modify this file.
|
||||
|
||||
# Add new mime types for use in respond_to blocks:
|
||||
|
@ -1,8 +1,7 @@
|
||||
# -*- encoding : utf-8 -*-
|
||||
# Be sure to restart your server when you modify this file.
|
||||
|
||||
# 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,
|
||||
# no regular words or you'll be exposed to dictionary attacks.
|
||||
PharmacieboissierCom::Application.config.secret_token = 'fa914363864abe6b6892e6e8043000d9bbe7c1f750bc5875d09010776616b5b7ba14cf7e5870fb804531792830ce9eae1fbcd671260894ba1c94a2d448bd4322'
|
||||
Pharma::Application.config.secret_token = 'a38a51e88d249df9056a06409a1a69fe10870379ee6571369c96d4e2976e32c5453d179ba7f21e5c1dd326de80cc76b1f7554f59a4bcf060eadc2166d535434f'
|
||||
|
@ -1,9 +1,8 @@
|
||||
# -*- encoding : utf-8 -*-
|
||||
# Be sure to restart your server when you modify this file.
|
||||
|
||||
PharmacieboissierCom::Application.config.session_store :cookie_store, :key => '_pharmacieboissier.com_session'
|
||||
Pharma::Application.config.session_store :cookie_store, key: '_pharma_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 "rails generate session_migration")
|
||||
# PharmacieboissierCom::Application.config.session_store :active_record_store
|
||||
# Pharma::Application.config.session_store :active_record_store
|
||||
|
@ -1,9 +1,11 @@
|
||||
# -*- encoding : utf-8 -*-
|
||||
require 'test_helper'
|
||||
require 'rails/performance_test_help'
|
||||
|
||||
# Profiling results for each test method are written to tmp/performance.
|
||||
class BrowsingTest < ActionDispatch::PerformanceTest
|
||||
# Refer to the documentation for all available options
|
||||
# self.profile_options = { :runs => 5, :metrics => [:wall_time, :memory]
|
||||
# :output => 'tmp/performance', :formats => [:flat] }
|
||||
|
||||
def test_homepage
|
||||
get '/'
|
||||
end
|
||||
|
@ -1,4 +1,3 @@
|
||||
# -*- encoding : utf-8 -*-
|
||||
ENV["RAILS_ENV"] = "test"
|
||||
require File.expand_path('../../config/environment', __FILE__)
|
||||
require 'rails/test_help'
|
||||
|
Loading…
x
Reference in New Issue
Block a user