clean everything before merging it to the master branch
This commit is contained in:
parent
5bf6d46574
commit
f1d8e7c141
8
Gemfile
8
Gemfile
@ -21,13 +21,9 @@ gem 'formtastic', '~> 1.2.3'
|
||||
gem 'inherited_resources', '~> 1.1.2'
|
||||
|
||||
gem 'rmagick', '2.12.2'
|
||||
gem 'carrierwave', :git => 'git://github.com/did/carrierwave.git', :branch => 'mongoid'
|
||||
# gem 'carrierwave', :path => '../gems/carrierwave_did'
|
||||
# gem 'locomotive_carrierwave', '0.5.0.1.beta3', :require => 'carrierwave'
|
||||
gem 'locomotive_carrierwave', '0.5.4.beta1'
|
||||
|
||||
# gem 'custom_fields', '1.0.0.beta.15'
|
||||
# gem 'custom_fields', '1.0.0.beta.15', :path => '../gems/custom_fields'
|
||||
gem 'custom_fields', :git => 'git://github.com/locomotivecms/custom_fields.git'
|
||||
gem 'custom_fields', '1.0.0.beta.17'
|
||||
gem 'fog', '0.8.2'
|
||||
gem 'mimetype-fu'
|
||||
gem 'actionmailer-with-request', :require => 'actionmailer_with_request'
|
||||
|
31
Gemfile.lock
31
Gemfile.lock
@ -5,28 +5,12 @@ GIT
|
||||
bushido_stub (0.0.1)
|
||||
activesupport (>= 3.0.7)
|
||||
|
||||
GIT
|
||||
remote: git://github.com/did/carrierwave.git
|
||||
revision: 00a41fb1952c4d75c8eafa0cf20f3d32712b53e4
|
||||
branch: mongoid
|
||||
specs:
|
||||
carrierwave (0.5.4)
|
||||
activesupport (~> 3.0)
|
||||
|
||||
GIT
|
||||
remote: git://github.com/floehopper/mocha.git
|
||||
revision: 6da1242f26b12a24c4fcf67bf5921a25bc1bc88d
|
||||
revision: d03843e763f4e5ceadb66bcb4c530d6c5d0cb293
|
||||
specs:
|
||||
mocha (0.9.12.20110213002255)
|
||||
|
||||
GIT
|
||||
remote: git://github.com/locomotivecms/custom_fields.git
|
||||
revision: 441e2fc23e9d69b5328c30c3fb75bf6cb3d97950
|
||||
specs:
|
||||
custom_fields (1.0.0.beta.15)
|
||||
activesupport (>= 3.0.7)
|
||||
mongoid (= 2.0.2)
|
||||
|
||||
GIT
|
||||
remote: https://github.com/wunderbread/xpath.git
|
||||
revision: d04da707886287e7dfe82705fda5b3d4f65e94c3
|
||||
@ -109,6 +93,9 @@ GEM
|
||||
cucumber-rails (0.3.2)
|
||||
cucumber (>= 0.8.0)
|
||||
culerity (0.2.15)
|
||||
custom_fields (1.0.0.beta.17)
|
||||
activesupport (>= 3.0.7)
|
||||
mongoid (= 2.0.2)
|
||||
daemons (1.1.3)
|
||||
database_cleaner (0.6.7)
|
||||
delayed_job (2.1.4)
|
||||
@ -152,7 +139,7 @@ GEM
|
||||
heroku (1.19.1)
|
||||
activesupport (>= 2.1.0)
|
||||
launchy (~> 0.3.2)
|
||||
rest-client (< 1.7.0, >= 1.4.0)
|
||||
rest-client (>= 1.4.0, < 1.7.0)
|
||||
highline (1.6.2)
|
||||
httparty (0.7.8)
|
||||
crack (= 0.1.8)
|
||||
@ -171,6 +158,8 @@ GEM
|
||||
linecache (0.43)
|
||||
linecache19 (0.5.12)
|
||||
ruby_core_source (>= 0.1.4)
|
||||
locomotive_carrierwave (0.5.4.beta1)
|
||||
activesupport (~> 3.0)
|
||||
locomotive_jammit-s3 (0.5.4.4)
|
||||
jammit (>= 0.5.4)
|
||||
mimemagic (>= 0.1.7)
|
||||
@ -269,7 +258,7 @@ GEM
|
||||
polyglot (>= 0.3.1)
|
||||
trollop (1.16.2)
|
||||
tzinfo (0.3.27)
|
||||
unicorn (3.6.2)
|
||||
unicorn (3.7.0)
|
||||
kgio (~> 2.3)
|
||||
rack
|
||||
warden (1.0.4)
|
||||
@ -291,10 +280,9 @@ DEPENDENCIES
|
||||
bushido
|
||||
bushido_stub!
|
||||
capybara
|
||||
carrierwave!
|
||||
cucumber (= 0.8.5)
|
||||
cucumber-rails
|
||||
custom_fields!
|
||||
custom_fields (= 1.0.0.beta.17)
|
||||
database_cleaner
|
||||
delayed_job (= 2.1.4)
|
||||
delayed_job_mongoid (= 1.0.2)
|
||||
@ -308,6 +296,7 @@ DEPENDENCIES
|
||||
httparty (>= 0.6.1)
|
||||
inherited_resources (~> 1.1.2)
|
||||
launchy
|
||||
locomotive_carrierwave (= 0.5.4.beta1)
|
||||
locomotive_jammit-s3
|
||||
locomotive_liquid (= 2.2.2)
|
||||
locomotive_mongoid_acts_as_tree (= 0.1.5.7)
|
||||
|
@ -21,57 +21,7 @@ class AssetUploader < CarrierWave::Uploader::Base
|
||||
end
|
||||
|
||||
def store_dir
|
||||
# puts "model = #{model.inspect}"
|
||||
# puts "collection = #{model.collection.inspect}"
|
||||
# puts "====="
|
||||
self.build_store_dir('sites', model.collection.site_id, 'assets', model.id)
|
||||
end
|
||||
|
||||
# process :set_content_type
|
||||
# process :set_size
|
||||
# process :set_width_and_height
|
||||
#
|
||||
# def set_content_type(*args)
|
||||
# value = :other
|
||||
#
|
||||
# content_type = file.content_type == 'application/octet-stream' ? File.mime_type?(original_filename) : file.content_type
|
||||
#
|
||||
# self.class.content_types.each_pair do |type, rules|
|
||||
# rules.each do |rule|
|
||||
# case rule
|
||||
# when String then value = type if content_type == rule
|
||||
# when Regexp then value = type if (content_type =~ rule) == 0
|
||||
# end
|
||||
# end
|
||||
# end
|
||||
#
|
||||
# model.content_type = value
|
||||
# end
|
||||
|
||||
# def set_size(*args)
|
||||
# model.size = file.size
|
||||
# end
|
||||
#
|
||||
# def set_width_and_height
|
||||
# if model.image?
|
||||
# magick = ::Magick::Image.read(current_path).first
|
||||
# model.width, model.height = magick.columns, magick.rows
|
||||
# end
|
||||
# end
|
||||
#
|
||||
# def image?(file)
|
||||
# model.image?
|
||||
# end
|
||||
|
||||
# def self.content_types
|
||||
# {
|
||||
# :image => ['image/jpeg', 'image/pjpeg', 'image/gif', 'image/png', 'image/x-png', 'image/jpg', 'image/x-icon'],
|
||||
# :media => [/^video/, 'application/x-shockwave-flash', 'application/x-swf', /^audio/, 'application/ogg', 'application/x-mp3'],
|
||||
# :pdf => ['application/pdf', 'application/x-pdf'],
|
||||
# :stylesheet => ['text/css'],
|
||||
# :javascript => ['text/javascript', 'text/js', 'application/x-javascript', 'application/javascript'],
|
||||
# :font => ['application/x-font-ttf', 'application/vnd.ms-fontobject', 'image/svg+xml', 'application/x-woff']
|
||||
# }
|
||||
# end
|
||||
|
||||
end
|
||||
|
@ -4,19 +4,10 @@ class ThemeAssetUploader < CarrierWave::Uploader::Base
|
||||
|
||||
include Locomotive::CarrierWave::Uploader::Asset
|
||||
|
||||
# process :set_content_type
|
||||
# process :set_size
|
||||
# process :set_width_and_height
|
||||
|
||||
def store_dir
|
||||
# self.build_store_dir('sites', (model.site_id_was || model.site_id).to_s, 'theme', model.folder_was || model.folder)
|
||||
self.build_store_dir('sites', model.site_id, 'theme', model.folder)
|
||||
end
|
||||
|
||||
# def stale_model?
|
||||
# !model.new_record? && model.folder_changed?
|
||||
# end
|
||||
|
||||
def extension_white_list
|
||||
%w(jpg jpeg gif png css js swf flv eot svg ttf woff otf ico)
|
||||
end
|
||||
|
@ -1,5 +1,4 @@
|
||||
require 'carrierwave/orm/mongoid'
|
||||
# require 'locomotive/carrierwave/base'
|
||||
require 'locomotive/carrierwave/base'
|
||||
require 'locomotive/carrierwave/asset'
|
||||
require 'locomotive/carrierwave/patches'
|
||||
|
||||
|
@ -62,14 +62,6 @@ module Locomotive
|
||||
model.image?
|
||||
end
|
||||
|
||||
def to_liquid
|
||||
{
|
||||
:url => self.url,
|
||||
:filename => (File.basename(self.url) rescue ''),
|
||||
:size => self.size
|
||||
}.stringify_keys
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
@ -25,8 +25,8 @@ Gem::Specification.new do |s|
|
||||
s.add_dependency "locomotive_mongoid_acts_as_tree", "0.1.5.7"
|
||||
s.add_dependency "will_paginate"
|
||||
|
||||
s.add_dependency "haml", "3.1.1"
|
||||
s.add_dependency "sass", "3.1.1"
|
||||
s.add_dependency "haml", "3.1.2"
|
||||
s.add_dependency "sass", "3.1.2"
|
||||
s.add_dependency "locomotive_liquid", "2.2.2"
|
||||
s.add_dependency "formtastic", "~> 1.2.3"
|
||||
s.add_dependency "inherited_resources", "~> 1.1.2"
|
||||
@ -36,10 +36,9 @@ Gem::Specification.new do |s|
|
||||
s.add_dependency "heroku", "1.19.1"
|
||||
|
||||
s.add_dependency "rmagick", "2.12.2"
|
||||
# s.add_dependency "locomotive_carrierwave", "0.5.0.1.beta3"
|
||||
s.add_dependency "carrierwave"
|
||||
s.add_dependency "locomotive_carrierwave", "0.5.4.beta1"
|
||||
|
||||
s.add_dependency "custom_fields", "1.0.0.beta.15"
|
||||
s.add_dependency "custom_fields", "1.0.0.beta.17"
|
||||
s.add_dependency "fog", "0.8.2"
|
||||
s.add_dependency "mimetype-fu"
|
||||
s.add_dependency "actionmailer-with-request"
|
||||
|
Loading…
Reference in New Issue
Block a user