chaosdorf / mete

Matekasse
MIT License
47 stars 40 forks source link

a few deprecations #67

Open YtvwlD opened 6 years ago

YtvwlD commented 6 years ago

database migrations for booleans (medium)

seems to be done as of c7c1dc0cee70f03f9ded8ecf3c4a88e72b951e95

mete currently uses SQLite databases for testing. In a recent update of ActiveRecord, the representation has been changed:

DEPRECATION WARNING: Leaving `ActiveRecord::ConnectionAdapters::SQLite3Adapter.represent_boolean_as_integer`
set to false is deprecated. SQLite databases have used 't' and 'f' to serialize
boolean values and must have old data converted to 1 and 0 (its native boolean
serialization) before setting this flag to true. Conversion can be accomplished
by setting up a rake task which runs

  ExampleModel.where("boolean_column = 't'").update_all(boolean_column: 1)
  ExampleModel.where("boolean_column = 'f'").update_all(boolean_column: 0)

for all models and all boolean columns, after which the flag must be set to
true by adding the following to your application.rb file:

  Rails.application.config.active_record.sqlite3.represent_boolean_as_integer = true

what needs to be done

  1. write the migrations
  2. test them
  3. uncomment line 32 in config/initializers/new_framework_defaults_5_2.rb

what you need to know / get to learn

~the sass gem is deprecated (very hard)~

(done as of 25c47d9 and 8f8eb88)

Ruby Sass is deprecated and will be unmaintained as of 26 March 2019.

* If you use Sass as a command-line tool, we recommend using Dart Sass, the new
  primary implementation: https://sass-lang.com/install

* If you use Sass as a plug-in for a Ruby web framework, we recommend using the
  sassc gem: https://github.com/sass/sassc-ruby#readme

* For more details, please refer to the Sass blog:
  http://sass.logdown.com/posts/7081811

what needs to be done

  1. read the last two links
  2. replace the sass-rails gem with the sassc-rails gem in Gemfile
  3. bundle install --path vendor/bundle

problems

We're using an outdated version of bootstrap-sass. But updating it changes the layout of a few pages. (Also, updating doesn't yet remove the dependency on sass.)

what you need to know / get to learn

the codeclimate-test-reporter gem is deprecated (easy)

  Code Climate's codeclimate-test-reporter gem has been deprecated in favor of
  our language-agnostic unified test reporter. The new test reporter is faster,
  distributed as a static binary so dependency conflicts never occur, and
  supports parallelized CI builds & multi-language CI configurations.

  Please visit https://docs.codeclimate.com/v1.0/docs/configuring-test-coverage
  for help setting up your CI process with our new test reporter.

what needs to be done

  1. read the docs
  2. modify .travis.yml
  3. confirm that it works

what you need to know / get to learn

remove SyslogLogger gem (very easy)

We're logging to stdout since quite some time, so we don't need this anymore.

what needs to be done

  1. remove the gem from Gemfile
  2. bundle install --path vendor/bundle
  3. confirm that everything works (docker-compose up --build?)

what you need to know / get to learn