This file contains hidden or 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
# Sync files from webpacker manifest.json to S3 asset bucket. | |
# Based on asset_sync but much simplified for this case. | |
# | |
# Requirements | |
# | |
# Add fog to Gemfile. | |
# | |
# Environment variables: | |
# - AWS_S3_ASSETS_BUCKET_NAME | |
# - AWS_S3_REGION |
This file contains hidden or 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
#!/bin/sh | |
rvmdir="$HOME/.rvm" | |
rubyversion=$(${rvmdir}/bin/rvm-auto-ruby -e 'puts ENV.fetch("RUBY_VERSION")') | |
export PATH="${rvmdir}/gems/${rubyversion}/bin"\ | |
":${rvmdir}/gems/${rubyversion}@global/bin"\ | |
":${rvmdir}/rubies/${rubyversion}/bin"\ | |
":${rvmdir}/bin"\ | |
":$PATH" |
This file contains hidden or 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
# config/initializers/devise_safe_store_location.rb | |
module SafeStoreLocation | |
MAX_LOCATION_SIZE = ActionDispatch::Cookies::MAX_COOKIE_SIZE / 2 | |
def store_location_for(resource_or_scope, location) | |
super unless location && location.size > MAX_LOCATION_SIZE | |
end | |
end |