Sha256: dbd908f8c343f94e54539a20d55e967fa6daad6c4375a4905e6aebca189d80c4
Contents?: true
Size: 870 Bytes
Versions: 2
Compression:
Stored size: 870 Bytes
Contents
class Recipes::Paperclip < Rails::AppBuilder def ask paperclip = answer(:paperclip) { Ask.confirm("Do you want to use Paperclip for uploads?") } set(:paperclip, paperclip) end def create add_paperclip if selected?(:paperclip) end def install add_paperclip end def installed? gem_exists?(/paperclip/) end private def add_paperclip gather_gem 'paperclip', '~> 4.3' paperclip_config = <<-RUBY.gsub(/^ {7}/, '') config.paperclip_defaults = { storage: :s3, s3_credentials: { bucket: ENV['AWS_BUCKET'] } } RUBY application paperclip_config.strip, env: 'production' append_to_file '.env.development', 'AWS_BUCKET=' append_to_file '.gitignore', "/public/system/*\n" add_readme_section :internal_dependencies, :paperclip end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
potassium-2.2.0 | lib/potassium/recipes/paperclip.rb |
potassium-2.1.0 | lib/potassium/recipes/paperclip.rb |