-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
initial pass at removing dragonfly references. Also assets are workin…
…g with refile and S3 on the assets page
- Loading branch information
Showing
17 changed files
with
111 additions
and
220 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,3 +14,4 @@ spec/dummy/public/system/ | |
Gemfile.lock | ||
tmp/ | ||
.rbenv-gemsets | ||
.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
require "refile/rails" | ||
require "refile/image_processing" | ||
require "refile/backend/s3" | ||
|
||
# Manually mount Refile before Smithy Engine | ||
Refile.automount = false | ||
Rails.application.routes.prepend do | ||
mount Refile.app, at: Refile.mount_point, as: :refile_app | ||
end | ||
|
||
if ENV['AWS_ACCESS_KEY_ID'].present? && ENV['AWS_SECRET_ACCESS_KEY'].present? && ENV['AWS_S3_BUCKET'].present? | ||
aws = { | ||
access_key_id: ENV['AWS_ACCESS_KEY_ID'], | ||
secret_access_key: ENV['AWS_SECRET_ACCESS_KEY'], | ||
bucket: ENV['AWS_S3_BUCKET'], | ||
} | ||
Refile.cache = Refile::Backend::S3.new(prefix: "cache", **aws) | ||
Refile.store = Refile::Backend::S3.new(prefix: "store", **aws) | ||
else | ||
Refile.store = Refile::Backend::FileSystem.new(Rails.root.join('public/system/refile', Rails.env)) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
spec/dummy/db/migrate/20150409174750_convert_assets_to_refile.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
class ConvertAssetsToRefile < ActiveRecord::Migration | ||
def change | ||
# remove_column :smithy_assets, :uploaded_file_url | ||
# remove_column :smithy_assets, :file_uid | ||
# file_name | ||
# file_size | ||
# file_width | ||
add_column :smithy_assets, :file_id, :string | ||
end | ||
end |
Oops, something went wrong.