Episode 158 - Top 5 Migration Tips After Upgrading to Rails 5.2
Rails 5.2.0 RC2 Notes - http://weblog.rubyonrails.org/2018/3/20/Rails-5-2-RC2/ Rails 5.2.0 Release Notes - http://edgeguides.rubyonrails.org/5_2_release_notes.html
Active Storage
With the new Active Storage framework in Rails 5.2, we’ve solved for the modern approach of uploading files straight to the cloud. Out of the box, there’s support for Amazon’s S3, Google’s Cloud Storage, and Microsoft Azure Cloud File Storage.
If you’re dealing with images, you can create variants on the fly. If you’re dealing with videos or PDFs, you can create previews on the fly. And regardless of the type, you can analyze uploads for metadata extraction asynchronously.
Redis Cache Store
Redis for general partial, fragment, and other Rails caching jobs.
The Redis cache store takes advantage of Redis support for automatic eviction when it reaches max memory, allowing it to behave much like a Memcached cache server.
Deployment note: Redis doesn't expire keys by default, so take care to use a dedicated Redis cache server. Don't fill up your persistent-Redis server with volatile cache data! Read the Redis cache server setup guide in detail.
Encrypted Secrets (Credentials)
Added config/credentials.yml.enc file to store production app secrets. It allows saving any authentication credentials for third-party services directly in repository encrypted with a key in the config/master.key file or the RAILS_MASTER_KEY environment variable. This will eventually replace Rails.application.secrets and the encrypted secrets introduced in Rails 5.1. Furthermore, Rails 5.2 opens API underlying Credentials, so you can easily deal with other encrypted configurations, keys, and files.
Content Security Policy
The HTTP Content-Security-Policy response header allows web site administrators to control resources the user agent is allowed to load for a given page. With a few exceptions, policies mostly involve specifying server origins and script endpoints. This helps guard against cross-site scripting attacks (XSS).
Rails 5.2 ships with a new DSL that allows you to configure a Content Security Policy for your application. You can configure a global default policy and then override it on a per-resource basis and even use lambdas to inject per-request values into the header such as account subdomains in a multi-tenant application. You can read more about this in the Securing Rails Applications guide.
Fix All Deprecation Warnings
Fix them before they become a problem in the future. Now is better than never.
Software
Dropbox (backup and sync software) - https://db.tt/l33vnUkr6L
Dashlane (password storage) - https://www.dashlane.com/en/cs/_FHtTXN3Rkdg
Podcast Gear
Blue Yeti USB Microphone (Silver) - http://amzn.to/2BjKEh9
Blue Yeti USB Microphone (Blackout Edition) - http://amzn.to/2By4byE
Premium 6-inch Pop Filter For Blue Yeti Microphone by Auphonix - http://amzn.to/2DtK2aq
Video Gear
Canon PowerShot G7 X Mark II Digital Camera w/ 1 Inch Sensor and tilt LCD screen - Wi-Fi & NFC Enabled (Black) - http://amzn.to/2Bwd0ZK
Rode smartLav+ Lavalier Microphone for iPhone and Smartphones - http://amzn.to/2Dtt38f
JOBY GorillaPod 3K Kit. Compact Tripod 3K Stand and Ballhead 3K for Compact Mirrorless Cameras or devices up to 3K (6.6lbs). Black/Charcoal. - http://amzn.to/2BOh44L
Computer Gear
Logitech G502 Proteus Core Tunable Gaming Mouse - http://amzn.to/2BYuH3O
Anker PowerCore 10000, One of the Smallest and Lightest 10000mAh External Batteries - http://amzn.to/2CVMohk
Seagate Backup Plus Slim 2TB Portable External Hard Drive - http://amzn.to/2Dr98GL
Recommended Gear
STM Impulse, Backpack for 15-Inch Laptop and Tablet - Black (stm-111-024P-01) - http://amzn.to/2CUxRm3
Bose QuietComfort 35 (Series I) Wireless Headphones, Noise Cancelling - Black (updated and wireless version) - http://amzn.to/2BN3yy0
Other Gear
Kogan - https://www.kogan.com/au/r/TX4FTG/