Rails 5
and you
Why?
benefits of upgrading
Security & Bug Fixes
Features
- Database Safety
- ActiveStorage
- ActiveRecord::Relation or and left_outer_joins
- ActiveRecord::Enum
- ActiveJob
- ActionCable
- ActionMailer before filters w/ params
- HTTP/2 Early Hints
- Content Security Policy
Performance
- 50% faster boot time with Bootsnap
- 11% faster request speed
- 29% decrease in object allocation (memory)
Experience
&
Community
Why not?
costs of upgrading
Costs
- Developer Time
- Bugs and Instability
- Disruption and extra effort
- Dependency issues with gems
- $$$ running multiple builds
Changes
what you need to know
Controller Request Tests
Versioned Migrations
Request Helpers (Test)
Rails TEST Command
CircleCi Rails NEXT
Timeline
- Rails 5 testing ASAP
- Rails 5.0 master end of Sprint 49
- Rails 5.1 and 5.2 in next sprint
- Rails 6.0.0-beta2 tests Sprint 51
Lessons
what we learned
Update Strategy
- Incremental Compatibility
- Easy switching between versions
- Static Code Analysis (Rubocop)
- Dual Test Builds
🔥 Dependency Hell 🔥
- Locked dependencies
- Relastik
- Internal gems/engines
- Poorly maintained gemsÂ
- Flip
- HerokuRailsDeflate
- Entangled Dependencies
- delayed_job_web, sinatra, rack
✅ Explicit Code ✅
- Meta Programming 😢
- Monkey-patching 😢
- Unconventional Code 😢
The End
deck
By Tony Ta
deck
- 220