0.7.2 -> 0.8.0 #57
Description
Release 0.8.0 mainly focused on fixing some issues with Rake (specifically RSpec core Rake tasks being loaded in the production environment).
However, there are a few other things in addition to this that you might need to change in your application.
-
Remove RSpec core Rake tasks from
Rakefile
Old:
require './app' require 'rspec/core/rake_task' task :default => [:spec] desc "Run the specs" RSpec::Core::RakeTask.new :spec
New:
require './app'
-
Change the CI script in
.travis.yml
frombundle exec rake
tobundle exec rspec spec
This is because the old CI script attempts to use the Rake task that we just removed in the step above.
Old:
language: ruby before_install: gem update --system script: bundle exec rake rvm: 2.5 services: - postgresql addons: postgresql: '10.1'
New:
language: ruby before_install: gem update --system script: bundle exec rspec spec rvm: 2.5 services: - postgresql addons: postgresql: '10.1'
-
Change your logging configuration in the production environment
Currently, console output in the production environment is still stored in the generated log file. In most situations, this isn't desirable, as the console should always print to STDOUT. If you would still like it to be stored in the log file, you can skip this step.
Additionally, if you would like to disable production logging entirely, you can still do this by using
disable :log_file
. This is often desirable on platforms such as Heroku which already handle logging.If you wish for console output to be sent to STDOUT, simply modify your
config/logging.rb
:Old:
configure :production do enable :logging enable :log_file end
New:
configure :production do enable :logging # Output to log file except when running console set :log_file, !Eucalypt.console? end
-
Remove conditional IRB dependency
As IRB is not bundled by default in Ruby versions
>= 2.6
, a quick fix had to be done to include the gem in theGemfile
only if using versions>= 2.6
. This was done in the following way:Old:
source 'https://rubygems.org' gem 'sinatra', '~> 2.0', '>= 2.0.4', require: 'sinatra/base' gem 'eucalypt', '0.7.2' gem 'rake', '~> 12.3' gem 'thin', '~> 1.7' # IRB is not bundled in Ruby >= 2.6 if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('2.6') gem 'irb', require: false end
This should be removed and changed to the following (observe line 3), since this check was unnecessary:
New:
source 'https://rubygems.org' gem 'irb', require: false gem 'sinatra', '~> 2.0', '>= 2.0.4', require: 'sinatra/base' gem 'eucalypt', '0.8.0' gem 'rake', '~> 12.3' gem 'thin', '~> 1.7'