Feature #13244
Upgrade Ruby on Rails to 4.2
Description
This ticket covers the upgrade of core Foreman to Ruby on Rails 4.2 (i.e. Gemfile et al).
Related issues
Associated revisions
fixes #13244 - update Rails to 4.2.6
- Add responders gem to support class-level respond_to usage
- http://edgeguides.rubyonrails.org/4_2_release_notes.html#respond-with-class-level-respond-to
- Replace foreigner with native Rails 4.2 FK support
- uses a patch from Rails 5 to support Foreigner's
`foreign_key_exists?` helper for full compatibility
- `foreign_keys` should be avoided in favour of the higher level
methods as it throws a NotImplementedError on sqlite3
- Update DB adapter versions to match ActiveRecord
- Enable exceptions from after_commit handlers to detect more errors
- Change deprecated application config settings
- Remove test:lib chaining on rake test task
- 4.2 runs lib tasks automatically now, as test:run is redefined
to all _test files within test/ rather than units+functionals.
The task is still needed for the jenkins:* tasks.
- Fix deprecation of mailer #deliver method, change to #deliver_now
- Change CSRF test to use generated, not static tokens
- 4.2 changes CSRF tokens to be different on every request and
validated against the session, so use its generator to test the
controller behaviour instead of hardcoding tokens.
- Change test execution order to random
refs #13244 - update mysql2/sqlite3 dependencies
History
#1
Updated by Dominic Cleal over 6 years ago
- Blocks Tracker #13243: Rails 4.2 upgrade tasks added
#2
Updated by Dominic Cleal over 6 years ago
- Blocked by Feature #12873: Update Rails to 4.1.latest added
#3
Updated by Dominic Cleal over 6 years ago
- Status changed from New to Assigned
- Assignee set to Dominic Cleal
#4
Updated by Dominic Cleal over 6 years ago
- Blocked by Refactor #13440: Replace Host::Base#model_name to prevent Rails 4.2 conflict added
#5
Updated by The Foreman Bot over 6 years ago
- Status changed from Assigned to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/3133 added
#6
Updated by Dominic Cleal over 6 years ago
- Status changed from Ready For Testing to Assigned
- Pull request deleted (
https://github.com/theforeman/foreman/pull/3133)
#7
Updated by Dominic Cleal about 6 years ago
- Blocked by Bug #13878: assets_paths initializer fails calling generate_railtie_name on Rails 4.2 added
#8
Updated by Dominic Cleal about 6 years ago
- Blocked by Refactor #13879: Load mocha/minitest integration explicitly in test_helper added
#9
Updated by Dominic Cleal about 6 years ago
- Blocked by Refactor #13883: Host::Managed.last_report_object association uses deprecated :order parameter added
#10
Updated by Dominic Cleal about 6 years ago
- Blocked by Refactor #13897: Explicitly set :limit on all DB migrations adding string columns added
#11
Updated by Dominic Cleal about 6 years ago
A branch is available at https://github.com/domcleal/foreman/commits/13244-rails42 for anybody wanting to test against it. Apart from a couple of integration tests, it's in good working order.
#12
Updated by Dominic Cleal about 6 years ago
- Blocked by Refactor #13938: Remove reports fixtures added
#13
Updated by Dominic Cleal about 6 years ago
- Blocked by Refactor #13978: Replace AR connection value_to_boolean method with Foreman::Cast added
#14
Updated by Dominic Cleal about 6 years ago
- Blocked by Bug #14064: Puppetclass#hostgroups_count should be excluded from auditing added
#15
Updated by Dominic Cleal about 6 years ago
- Blocked by Refactor #14093: Remove unused roles permissions column added
#16
Updated by Dominic Cleal about 6 years ago
- Blocked by Refactor #14094: Replace DB migration foreign_keys calls with foreign_key_exists? added
#17
Updated by The Foreman Bot about 6 years ago
- Status changed from Assigned to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/3294 added
#18
Updated by Dominic Cleal about 6 years ago
- Related to Refactor #14156: Support Ruby on Rails 4.2 without Foreigner added
#19
Updated by Dominic Cleal about 6 years ago
This has been merged into the rails42
branch and not develop yet (leaving it on RfT until it is merged). Please see https://groups.google.com/forum/#!topic/foreman-dev/6ANhWVGDzNA for details.
#20
Updated by Dominic Cleal about 6 years ago
- Related to Bug #14155: Tests are order dependent, should be runnable with random order added
#21
Updated by Dominic Cleal about 6 years ago
- Related to Bug #14253: Saving dashboard widget positions fails under Rails 4.2 added
#22
Updated by David Davis about 6 years ago
- Related to Refactor #14581: Fix migrations for Rails 4.2 added
#23
Updated by Dominic Cleal about 6 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset 85a971464db95b91ebb3db1070b908f97b9c3e5f.
#24
Updated by Dominic Cleal about 6 years ago
- Legacy Backlogs Release (now unused) set to 136
#25
Updated by Dominic Cleal almost 6 years ago
- Related to Bug #15718: Hashes defined in matchers do not save properly after the first time added
refs #13244 - require Rails 4.2