update gem dependencies + gemspec + liquid tags (stylesheet_tag, ...etc) work with amazon S3
This commit is contained in:
parent
acaf997b6e
commit
a03dd77a65
2
Gemfile
2
Gemfile
@ -20,7 +20,7 @@ gem 'rmagick', '= 2.12.2'
|
|||||||
gem 'locomotive_carrierwave', :require => 'carrierwave'
|
gem 'locomotive_carrierwave', :require => 'carrierwave'
|
||||||
|
|
||||||
gem 'custom_fields', '1.0.0.beta'
|
gem 'custom_fields', '1.0.0.beta'
|
||||||
gem 'aws'
|
gem 'fog'
|
||||||
gem 'mimetype-fu'
|
gem 'mimetype-fu'
|
||||||
gem 'actionmailer-with-request'
|
gem 'actionmailer-with-request'
|
||||||
gem 'heroku'
|
gem 'heroku'
|
||||||
|
77
Gemfile.lock
77
Gemfile.lock
@ -20,13 +20,13 @@ GEM
|
|||||||
specs:
|
specs:
|
||||||
RedCloth (4.2.3)
|
RedCloth (4.2.3)
|
||||||
abstract (1.0.0)
|
abstract (1.0.0)
|
||||||
actionmailer (3.0.0)
|
actionmailer (3.0.1)
|
||||||
actionpack (= 3.0.0)
|
actionpack (= 3.0.1)
|
||||||
mail (~> 2.2.5)
|
mail (~> 2.2.5)
|
||||||
actionmailer-with-request (0.1.1)
|
actionmailer-with-request (0.1.1)
|
||||||
actionpack (3.0.0)
|
actionpack (3.0.1)
|
||||||
activemodel (= 3.0.0)
|
activemodel (= 3.0.1)
|
||||||
activesupport (= 3.0.0)
|
activesupport (= 3.0.1)
|
||||||
builder (~> 2.1.2)
|
builder (~> 2.1.2)
|
||||||
erubis (~> 2.6.6)
|
erubis (~> 2.6.6)
|
||||||
i18n (~> 0.4.1)
|
i18n (~> 0.4.1)
|
||||||
@ -34,28 +34,24 @@ GEM
|
|||||||
rack-mount (~> 0.6.12)
|
rack-mount (~> 0.6.12)
|
||||||
rack-test (~> 0.5.4)
|
rack-test (~> 0.5.4)
|
||||||
tzinfo (~> 0.3.23)
|
tzinfo (~> 0.3.23)
|
||||||
activemodel (3.0.0)
|
activemodel (3.0.1)
|
||||||
activesupport (= 3.0.0)
|
activesupport (= 3.0.1)
|
||||||
builder (~> 2.1.2)
|
builder (~> 2.1.2)
|
||||||
i18n (~> 0.4.1)
|
i18n (~> 0.4.1)
|
||||||
activerecord (3.0.0)
|
activerecord (3.0.1)
|
||||||
activemodel (= 3.0.0)
|
activemodel (= 3.0.1)
|
||||||
activesupport (= 3.0.0)
|
activesupport (= 3.0.1)
|
||||||
arel (~> 1.0.0)
|
arel (~> 1.0.0)
|
||||||
tzinfo (~> 0.3.23)
|
tzinfo (~> 0.3.23)
|
||||||
activeresource (3.0.0)
|
activeresource (3.0.1)
|
||||||
activemodel (= 3.0.0)
|
activemodel (= 3.0.1)
|
||||||
activesupport (= 3.0.0)
|
activesupport (= 3.0.1)
|
||||||
activesupport (3.0.0)
|
activesupport (3.0.1)
|
||||||
arel (1.0.1)
|
arel (1.0.1)
|
||||||
activesupport (~> 3.0.0)
|
activesupport (~> 3.0.0)
|
||||||
autotest (4.4.1)
|
autotest (4.4.1)
|
||||||
aws (2.3.21)
|
|
||||||
http_connection
|
|
||||||
uuidtools
|
|
||||||
xml-simple
|
|
||||||
bcrypt-ruby (2.1.2)
|
bcrypt-ruby (2.1.2)
|
||||||
bson (1.1)
|
bson (1.1.1)
|
||||||
bson_ext (1.1.1)
|
bson_ext (1.1.1)
|
||||||
builder (2.1.2)
|
builder (2.1.2)
|
||||||
capybara (0.3.9)
|
capybara (0.3.9)
|
||||||
@ -100,6 +96,7 @@ GEM
|
|||||||
diff-lcs (1.1.2)
|
diff-lcs (1.1.2)
|
||||||
erubis (2.6.6)
|
erubis (2.6.6)
|
||||||
abstract (>= 1.0.0)
|
abstract (>= 1.0.0)
|
||||||
|
excon (0.2.4)
|
||||||
factory_girl (1.3.2)
|
factory_girl (1.3.2)
|
||||||
factory_girl_rails (1.0)
|
factory_girl_rails (1.0)
|
||||||
factory_girl (~> 1.3)
|
factory_girl (~> 1.3)
|
||||||
@ -107,6 +104,16 @@ GEM
|
|||||||
fastthread (1.0.7)
|
fastthread (1.0.7)
|
||||||
ffi (0.6.3)
|
ffi (0.6.3)
|
||||||
rake (>= 0.8.7)
|
rake (>= 0.8.7)
|
||||||
|
fog (0.3.8)
|
||||||
|
builder
|
||||||
|
excon (>= 0.2.4)
|
||||||
|
formatador (>= 0.0.15)
|
||||||
|
json
|
||||||
|
mime-types
|
||||||
|
net-ssh (~> 2.0.23)
|
||||||
|
nokogiri (~> 1.4.3.1)
|
||||||
|
ruby-hmac
|
||||||
|
formatador (0.0.15)
|
||||||
formtastic (1.1.0)
|
formtastic (1.1.0)
|
||||||
actionpack (>= 2.3.0)
|
actionpack (>= 2.3.0)
|
||||||
activesupport (>= 2.3.0)
|
activesupport (>= 2.3.0)
|
||||||
@ -121,13 +128,13 @@ GEM
|
|||||||
json_pure (>= 1.2.0, < 1.5.0)
|
json_pure (>= 1.2.0, < 1.5.0)
|
||||||
launchy (~> 0.3.2)
|
launchy (~> 0.3.2)
|
||||||
rest-client (>= 1.4.0, < 1.7.0)
|
rest-client (>= 1.4.0, < 1.7.0)
|
||||||
http_connection (1.3.1)
|
|
||||||
httparty (0.6.1)
|
httparty (0.6.1)
|
||||||
crack (= 0.1.8)
|
crack (= 0.1.8)
|
||||||
i18n (0.4.1)
|
i18n (0.4.1)
|
||||||
inherited_resources (1.1.2)
|
inherited_resources (1.1.2)
|
||||||
has_scope (~> 0.5.0)
|
has_scope (~> 0.5.0)
|
||||||
responders (~> 0.6.0)
|
responders (~> 0.6.0)
|
||||||
|
json (1.4.6)
|
||||||
json_pure (1.4.6)
|
json_pure (1.4.6)
|
||||||
launchy (0.3.7)
|
launchy (0.3.7)
|
||||||
configuration (>= 0.0.5)
|
configuration (>= 0.0.5)
|
||||||
@ -157,6 +164,7 @@ GEM
|
|||||||
daemons (>= 1.0.3)
|
daemons (>= 1.0.3)
|
||||||
fastthread (>= 1.0.1)
|
fastthread (>= 1.0.1)
|
||||||
gem_plugin (>= 0.2.3)
|
gem_plugin (>= 0.2.3)
|
||||||
|
net-ssh (2.0.23)
|
||||||
nokogiri (1.4.3.1)
|
nokogiri (1.4.3.1)
|
||||||
polyglot (0.3.1)
|
polyglot (0.3.1)
|
||||||
rack (1.2.1)
|
rack (1.2.1)
|
||||||
@ -164,17 +172,17 @@ GEM
|
|||||||
rack (>= 1.0.0)
|
rack (>= 1.0.0)
|
||||||
rack-test (0.5.6)
|
rack-test (0.5.6)
|
||||||
rack (>= 1.0)
|
rack (>= 1.0)
|
||||||
rails (3.0.0)
|
rails (3.0.1)
|
||||||
actionmailer (= 3.0.0)
|
actionmailer (= 3.0.1)
|
||||||
actionpack (= 3.0.0)
|
actionpack (= 3.0.1)
|
||||||
activerecord (= 3.0.0)
|
activerecord (= 3.0.1)
|
||||||
activeresource (= 3.0.0)
|
activeresource (= 3.0.1)
|
||||||
activesupport (= 3.0.0)
|
activesupport (= 3.0.1)
|
||||||
bundler (~> 1.0.0)
|
bundler (~> 1.0.0)
|
||||||
railties (= 3.0.0)
|
railties (= 3.0.1)
|
||||||
railties (3.0.0)
|
railties (3.0.1)
|
||||||
actionpack (= 3.0.0)
|
actionpack (= 3.0.1)
|
||||||
activesupport (= 3.0.0)
|
activesupport (= 3.0.1)
|
||||||
rake (>= 0.8.4)
|
rake (>= 0.8.4)
|
||||||
thor (~> 0.14.0)
|
thor (~> 0.14.0)
|
||||||
rake (0.8.7)
|
rake (0.8.7)
|
||||||
@ -192,13 +200,14 @@ GEM
|
|||||||
rspec-mocks (2.0.0)
|
rspec-mocks (2.0.0)
|
||||||
rspec-core (= 2.0.0)
|
rspec-core (= 2.0.0)
|
||||||
rspec-expectations (= 2.0.0)
|
rspec-expectations (= 2.0.0)
|
||||||
rspec-rails (2.0.0)
|
rspec-rails (2.0.1)
|
||||||
rspec (= 2.0.0)
|
rspec (~> 2.0.0)
|
||||||
ruby-debug (0.10.3)
|
ruby-debug (0.10.3)
|
||||||
columnize (>= 0.1)
|
columnize (>= 0.1)
|
||||||
ruby-debug-base (~> 0.10.3.0)
|
ruby-debug-base (~> 0.10.3.0)
|
||||||
ruby-debug-base (0.10.3)
|
ruby-debug-base (0.10.3)
|
||||||
linecache (>= 0.3)
|
linecache (>= 0.3)
|
||||||
|
ruby-hmac (0.4.0)
|
||||||
rubyzip (0.9.4)
|
rubyzip (0.9.4)
|
||||||
selenium-webdriver (0.0.29)
|
selenium-webdriver (0.0.29)
|
||||||
childprocess (>= 0.0.7)
|
childprocess (>= 0.0.7)
|
||||||
@ -212,11 +221,9 @@ GEM
|
|||||||
polyglot (>= 0.3.1)
|
polyglot (>= 0.3.1)
|
||||||
trollop (1.16.2)
|
trollop (1.16.2)
|
||||||
tzinfo (0.3.23)
|
tzinfo (0.3.23)
|
||||||
uuidtools (2.1.1)
|
|
||||||
warden (0.10.7)
|
warden (0.10.7)
|
||||||
rack (>= 1.0.0)
|
rack (>= 1.0.0)
|
||||||
will_paginate (3.0.pre2)
|
will_paginate (3.0.pre2)
|
||||||
xml-simple (1.0.12)
|
|
||||||
yard (0.6.1)
|
yard (0.6.1)
|
||||||
|
|
||||||
PLATFORMS
|
PLATFORMS
|
||||||
@ -226,7 +233,6 @@ DEPENDENCIES
|
|||||||
RedCloth
|
RedCloth
|
||||||
actionmailer-with-request
|
actionmailer-with-request
|
||||||
autotest
|
autotest
|
||||||
aws
|
|
||||||
bson_ext (= 1.1.1)
|
bson_ext (= 1.1.1)
|
||||||
capybara
|
capybara
|
||||||
cgi_multipart_eof_fix
|
cgi_multipart_eof_fix
|
||||||
@ -239,6 +245,7 @@ DEPENDENCIES
|
|||||||
devise (= 1.1.3)
|
devise (= 1.1.3)
|
||||||
factory_girl_rails
|
factory_girl_rails
|
||||||
fastthread
|
fastthread
|
||||||
|
fog
|
||||||
formtastic (>= 1.1.0)
|
formtastic (>= 1.1.0)
|
||||||
growl-glue
|
growl-glue
|
||||||
haml (= 3.0.18)
|
haml (= 3.0.18)
|
||||||
|
@ -13,9 +13,7 @@ module Locomotive
|
|||||||
|
|
||||||
filename, folder = segments.pop, segments.join('/')
|
filename, folder = segments.pop, segments.join('/')
|
||||||
|
|
||||||
stylesheet = ThemeAsset.new(:site => @context.registers[:site], :folder => folder)
|
input = asset_url(folder, filename)
|
||||||
|
|
||||||
input = '/' + ThemeAssetUploader.new(stylesheet).store_path(filename)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
input = "#{input}.css" unless input.ends_with?('.css')
|
input = "#{input}.css" unless input.ends_with?('.css')
|
||||||
@ -33,9 +31,10 @@ module Locomotive
|
|||||||
|
|
||||||
filename, folder = segments.pop, segments.join('/')
|
filename, folder = segments.pop, segments.join('/')
|
||||||
|
|
||||||
javascript = ThemeAsset.new(:site => @context.registers[:site], :folder => folder)
|
input = asset_url(folder, filename)
|
||||||
|
# javascript = ThemeAsset.new(:site => @context.registers[:site], :folder => folder)
|
||||||
input = '/' + ThemeAssetUploader.new(javascript).store_path(filename)
|
#
|
||||||
|
# input = '/' + ThemeAssetUploader.new(javascript).store_path(filename)
|
||||||
end
|
end
|
||||||
|
|
||||||
input = "#{input}.js" unless input.ends_with?('.js')
|
input = "#{input}.js" unless input.ends_with?('.js')
|
||||||
@ -52,9 +51,7 @@ module Locomotive
|
|||||||
|
|
||||||
filename, folder = segments.pop, segments.join('/')
|
filename, folder = segments.pop, segments.join('/')
|
||||||
|
|
||||||
image = ThemeAsset.new(:site => @context.registers[:site], :folder => folder)
|
asset_url(folder, filename)
|
||||||
|
|
||||||
'/' + ThemeAssetUploader.new(image).store_path(filename)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# Write an image tag
|
# Write an image tag
|
||||||
@ -142,6 +139,13 @@ module Locomotive
|
|||||||
def get_url_from_asset(input)
|
def get_url_from_asset(input)
|
||||||
input.respond_to?(:url) ? input.url : input
|
input.respond_to?(:url) ? input.url : input
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def asset_url(folder, filename)
|
||||||
|
asset = ThemeAsset.new(:site => @context.registers[:site], :folder => folder)
|
||||||
|
uploader = ThemeAssetUploader.new(asset)
|
||||||
|
uploader.retrieve_from_store!(filename)
|
||||||
|
uploader.url
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
::Liquid::Template.register_filter(Html)
|
::Liquid::Template.register_filter(Html)
|
||||||
|
@ -26,10 +26,10 @@ Gem::Specification.new do |s|
|
|||||||
s.add_dependency "devise", "= 1.1.3"
|
s.add_dependency "devise", "= 1.1.3"
|
||||||
s.add_dependency "haml", "= 3.0.18"
|
s.add_dependency "haml", "= 3.0.18"
|
||||||
s.add_dependency "rmagick", "= 2.12.2"
|
s.add_dependency "rmagick", "= 2.12.2"
|
||||||
s.add_dependency "aws"
|
s.add_dependency "fog"
|
||||||
s.add_dependency "mimetype-fu"
|
s.add_dependency "mimetype-fu"
|
||||||
s.add_dependency "formtastic", ">= 1.1.0"
|
s.add_dependency "formtastic", ">= 1.1.0"
|
||||||
s.add_dependency "carrierwave", "0.5.0.beta2"
|
s.add_dependency "locomotive_carrierwave"
|
||||||
s.add_dependency "actionmailer-with-request"
|
s.add_dependency "actionmailer-with-request"
|
||||||
s.add_dependency "heroku"
|
s.add_dependency "heroku"
|
||||||
s.add_dependency "httparty", ">= 0.6.1"
|
s.add_dependency "httparty", ">= 0.6.1"
|
||||||
|
Loading…
Reference in New Issue
Block a user