Merge branch 'carrierwave'

This commit is contained in:
Christophe Vilayphiou 2012-01-16 08:14:18 +08:00
commit b6eba5ad9d
3 changed files with 17 additions and 18 deletions

View File

@ -3,14 +3,15 @@ gem 'rails'
gem 'yajl-ruby', :require => 'yajl' gem 'yajl-ruby', :require => 'yajl'
gem 'bson_ext' gem 'bson_ext'
gem 'carrierwave', '0.5.4' gem 'carrierwave'
gem 'carrierwave-mongoid', :require => 'carrierwave/mongoid'
gem 'ckeditor' gem 'ckeditor'
gem 'devise' gem 'devise'
gem 'mini_magick' gem 'mini_magick'
gem 'rubyzip' gem 'rubyzip'
gem 'sinatra' gem 'sinatra'
gem 'execjs' gem 'execjs'
gem 'mongoid', :git => 'git://github.com/mongoid/mongoid.git', :ref => '7a915395db50e2bc6071a503a11530e644879e49' gem 'mongoid'
gem 'rake' gem 'rake'
gem 'jquery-rails' gem 'jquery-rails'

View File

@ -1,13 +1,3 @@
GIT
remote: git://github.com/mongoid/mongoid.git
revision: 7a915395db50e2bc6071a503a11530e644879e49
ref: 7a915395db50e2bc6071a503a11530e644879e49
specs:
mongoid (2.4.0)
activemodel (~> 3.1)
mongo (~> 1.3)
tzinfo (~> 0.3.22)
GEM GEM
remote: http://rubygems.org/ remote: http://rubygems.org/
specs: specs:
@ -46,8 +36,11 @@ GEM
bson_ext (1.5.2) bson_ext (1.5.2)
bson (= 1.5.2) bson (= 1.5.2)
builder (3.0.0) builder (3.0.0)
carrierwave (0.5.4) carrierwave (0.5.8)
activesupport (~> 3.0) activesupport (~> 3.0)
carrierwave-mongoid (0.1.3)
carrierwave (>= 0.5.6)
mongoid (~> 2.1)
chronic (0.6.6) chronic (0.6.6)
ckeditor (3.6.3) ckeditor (3.6.3)
mime-types (~> 1.16) mime-types (~> 1.16)
@ -96,6 +89,10 @@ GEM
subexec (~> 0.1.0) subexec (~> 0.1.0)
mongo (1.5.2) mongo (1.5.2)
bson (= 1.5.2) bson (= 1.5.2)
mongoid (2.4.0)
activemodel (~> 3.1)
mongo (~> 1.3)
tzinfo (~> 0.3.22)
multi_json (1.0.4) multi_json (1.0.4)
orm_adapter (0.0.5) orm_adapter (0.0.5)
polyglot (0.3.3) polyglot (0.3.3)
@ -192,7 +189,8 @@ PLATFORMS
DEPENDENCIES DEPENDENCIES
bson_ext bson_ext
carrierwave (= 0.5.4) carrierwave
carrierwave-mongoid
ckeditor ckeditor
coffee-rails coffee-rails
database_cleaner database_cleaner
@ -203,7 +201,7 @@ DEPENDENCIES
factory_girl_rails factory_girl_rails
jquery-rails jquery-rails
mini_magick mini_magick
mongoid! mongoid
radius radius
rails rails
rake rake

View File

@ -1,5 +1,3 @@
require 'carrierwave/orm/mongoid'
begin begin
db_config = YAML::load(File.read(File.join(Rails.root, "/config/mongoid.yml"))) db_config = YAML::load(File.read(File.join(Rails.root, "/config/mongoid.yml")))
rescue rescue
@ -13,3 +11,5 @@ CarrierWave.configure do |config|
config.storage = :grid_fs config.storage = :grid_fs
config.grid_fs_access_url = "/gridfs" config.grid_fs_access_url = "/gridfs"
end end
CarrierWave::SanitizedFile.sanitize_regexp = /[^[:word:]\.\-\+]/