Skip to content

Commit 780c0ee

Browse files
Update to Rails 6.1 (partially done)
This commit *begins* an update from Rails 6.0.X -> 6.1.X. This requires a large number of simultaneous library updates (some took a while to identify). This does *not* complete the update. The biggest problem is the many error reports of this form: > Error: > ProjectsControllerTest#test_should_fail_to_create_project_with_duplicate_repo: > ActiveRecord::StatementInvalid: PG::UndefinedColumn: > ERROR: column users.email does not exist It's true that there is no users.email column in the database, but that's because it's a virtual column that is *supposed* to be managed by the `attr_encrypted` gem. Since it's not being handled, it *appears* that this gem does not work with ActiveRecord 6.1. I went to check out its status, and they are looking for new maintainers: attr-encrypted/attr_encrypted#379 All options are not the desired ones here. In addition, there are at least two kinds of deprecation warnings which will need to be addressed (probably many times): * DEPRECATION WARNING: action_view.raise_on_missing_translations is deprecated and will be removed in Rails 6.2. Set i18n.raise_on_missing_translations instead. Note that this new setting also affects how missing translations are handled in controllers. (called from call at /home/dwheeler/best-practices-badge/config/initializers/canonical_trailing_slash.rb:30) * DEPRECATION WARNING: Rendering actions with '.' in the name is deprecated: static_pages/error_404.html.erb (called from error_404 at /home/dwheeler/best-practices-badge/app/controllers/static_pages_controller.rb:46) Signed-off-by: David A. Wheeler <[email protected]>
1 parent 83e03a5 commit 780c0ee

File tree

5 files changed

+127
-119
lines changed

5 files changed

+127
-119
lines changed

Gemfile

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ ruby File.read('.ruby-version').strip
1515
# sure to upgrade them in sync, *including* railties.
1616
# Loading only what we use reduces memory use & attack surface.
1717
# gem 'actioncable' # Not used. Client/server comm channel.
18-
gem 'actionmailer', '6.0.3.4' # Rails. Send email.
19-
gem 'actionpack', '6.0.3.4' # Rails. MVC framework.
20-
gem 'actionview', '6.0.3.4' # Rails. View.
21-
gem 'activejob', '6.0.3.4' # Rails. Async jobs.
22-
gem 'activemodel', '6.0.3.4' # Rails. Model basics.
23-
gem 'activerecord', '6.0.3.4' # Rails. ORM and query system.
18+
gem 'actionmailer', '6.1.2.1' # Rails. Send email.
19+
gem 'actionpack', '6.1.2.1' # Rails. MVC framework.
20+
gem 'actionview', '6.1.2.1' # Rails. View.
21+
gem 'activejob', '6.1.2.1' # Rails. Async jobs.
22+
gem 'activemodel', '6.1.2.1' # Rails. Model basics.
23+
gem 'activerecord', '6.1.2.1' # Rails. ORM and query system.
2424
# gem 'activestorage' # Not used. Attaches cloud files to ActiveRecord.
25-
gem 'activesupport', '6.0.3.4' # Rails. Underlying library.
25+
gem 'activesupport', '6.1.2.1' # Rails. Underlying library.
2626
# gem 'activetext' # Not used. Text editor that fails to support markdown.
2727
gem 'attr_encrypted', '3.1.0' # Encrypt email addresses
2828
gem 'bcrypt', '3.1.16' # Security - for salted hashed interated passwords
@@ -36,7 +36,7 @@ gem 'chartkick', '3.4.0' # Chart project_stats
3636
# They recommend switching to the "fastly" gem (aka "fastly-ruby"),
3737
# but fastly-ruby is not designed to support multi-threading, so we
3838
# call the Fastly API directly instead.
39-
gem 'font-awesome-rails', '4.7.0.5'
39+
gem 'font-awesome-rails', '4.7.0.7'
4040
gem 'http_accept_language', '2.1.1' # Determine user's preferred locale
4141
gem 'httparty', '0.18.1' # HTTP convenience. rake fix_use_gravatar
4242
gem 'imagesLoaded_rails', '4.1.0' # JavaScript - enable wait for image load
@@ -65,19 +65,19 @@ gem 'omniauth-github', '1.4.0' # Authentication to GitHub (get project info)
6565
gem 'omniauth-rails_csrf_protection', '0.1.2' # Counter CVE-2015-9284
6666
gem 'pagy', '3.10.0' # Paginate some views
6767
gem 'paleta', '0.3.0' # Color manipulation, used for badges
68-
gem 'paper_trail', '10.3.1' # Record previous versions of project data
68+
gem 'paper_trail', '11.1.0' # Record previous versions of project data
6969
gem 'pg', '1.2.3' # PostgreSQL database, used for data storage
7070
gem 'pg_search', '2.3.5' # PostgreSQL full-text search
7171
gem 'puma', '4.3.6' # Faster webserver; recommended by Heroku
7272
gem 'puma_worker_killer', '0.3.1' # Band-aid: Restart to limit memory use
7373
gem 'rack-attack', '6.3.1' # Implement rate limiting
7474
gem 'rack-cors', '1.1.1' # Enable CORS so JavaScript clients can get JSON
7575
gem 'rack-headers_filter', '0.0.1' # Filter out "dangerous" headers
76-
# We no longer say: gem 'rails', '6.0.3.4' # Our web framework
76+
# We no longer say: gem 'rails', '6.1.2.1' # Our web framework
7777
# but instead load only what we use (to reduce memory use and attack surface).
7878
# We load sprockets-rails, but its version number isn't kept in sync.
7979
# Note: Update the gem versions of action* and railties in sync.
80-
gem 'railties', '6.0.3.4' # Rails. Rails core, loads rest of Rails
80+
gem 'railties', '6.1.2.1' # Rails. Rails core, loads rest of Rails
8181
gem 'rails-i18n', '6.0.0' # Localizations for Rails built-ins
8282
gem 'redcarpet', '3.5.1' # Process markdown in form textareas (justifications)
8383
gem 'sass-rails', '5.1.0', require: false # For .scss files (CSS extension)
@@ -96,12 +96,13 @@ group :development, :test do
9696
gem 'json', '2.5.1'
9797
gem 'license_finder', '6.0.0'
9898
gem 'mdl', '0.10.0'
99-
gem 'pronto', '0.10.0'
99+
# NOTE: If you update pronto you may need to update other pronto-* gems
100+
gem 'pronto', '0.11.0'
100101
# TODO: Use pronto-railroader, once there is one.
101102
# gem 'pronto-brakeman', '0.9.1'
102-
gem 'pronto-eslint', '0.10.0'
103-
gem 'pronto-rails_best_practices', '0.10.0'
104-
gem 'pronto-rubocop', '0.10.0'
103+
gem 'pronto-eslint', '0.11.0'
104+
gem 'pronto-rails_best_practices', '0.11.0'
105+
gem 'pronto-rubocop', '0.11.0'
105106
# gem 'railroader', '4.3.8' # Security static analyzer. OSS fork of Brakeman
106107
gem 'rubocop', '0.91.1', require: false # Style checker
107108
gem 'rubocop-performance', '1.8.0', require: false # Performance cops
@@ -123,7 +124,11 @@ group :development do
123124
gem 'bootsnap', '1.4.8' # Speed up boot via caches
124125
# gem 'fasterer', '0.3.2' # Provide speed recommendations - run 'fasterer'
125126
# Waiting for Ruby 2.4 support: https://github.com/seattlerb/ruby_parser/issues/239
126-
gem 'traceroute', '0.8.1' # Adds 'rake traceroute' command to check routes
127+
# gem 'traceroute', '0.8.1' # Adds 'rake traceroute' command to check routes
128+
# We bring in full rails in development in case we need it for debugging;
129+
# this also keeps some gems happy that don't realize that loading
130+
# only *parts* of Rails is fine:
131+
gem 'rails', '6.1.2.1' # Rails (our web framework)
127132
gem 'translation', '1.22' # translation.io - translation service
128133
gem 'web-console', '3.7.0' # Debugging tool for Ruby on Rails apps
129134
end

0 commit comments

Comments
 (0)