Skip to content

Commit

Permalink
Merge pull request #2355 from tongueroo/master
Browse files Browse the repository at this point in the history
Add Jets Turbine Support
  • Loading branch information
mshibuya authored Dec 23, 2018
2 parents c457194 + 9083325 commit 02d23a7
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions lib/carrierwave.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,26 @@ def tmp_path
Dir.glob(File.join(Merb.load_paths[:uploaders])).each {|f| require f }
end

elsif defined?(Jets)

module CarrierWave
class Turbine < Jets::Turbine
initializer "carrierwave.setup_paths" do |app|
CarrierWave.root = Jets.root.to_s
CarrierWave.tmp_path = "/tmp/carrierwave"
CarrierWave.configure do |config|
config.cache_dir = "/tmp/carrierwave/uploads/tmp"
end
end

initializer "carrierwave.active_record" do
ActiveSupport.on_load :active_record do
require 'carrierwave/orm/activerecord'
end
end
end
end

elsif defined?(Rails)

module CarrierWave
Expand Down

0 comments on commit 02d23a7

Please sign in to comment.