Skip to content

v3.0.0

Compare
Choose a tag to compare
@briri briri released this 06 Nov 21:55
· 1130 commits to master since this release
1d80bb4

Researchers

No major changes to report.

Administrators

  • Introduction of API v1. This new API conforms to the new [common standard metadata format for DMPs](RDA Common Standard Metadata schema v1.0) that was defined an RDA working group. It currently supports: retrieving the list of your DMPs (and any public DMPs), retrieving the metadata for a single DMP, and creating DMPs. All of the JSON that this new API consumes and produces follows the metadata standard. You should continue using API v0 if you need access to a plan's full text or any other features that have not yet been ported over to v1.

Developers

  • Fixed a bug that was preventing users from creating a plan by clicking the icon on the Public Plans page and from the organizational plans table on the My Dashaboard page - Issue 2580
  • Soft launch of the new APIClients section (introduced in v2.2 but worth re-mentioning) that allows you to define systems that will integrate with your installation (as opposed to organizational admins). These new API clients can only API v1 and have very restricted access to DMPs. The functionality available for these clients will continue to grow over the coming years. Please refer to our development roadmap for details.

Upgrade to Rails 5.2

This upgrade brings the codebase from Rails 4.2.x to Rails 5.2.x. This was a major version upgrade and we advise you to review Rails' official upgrade guide to see what has changed. If you have customized the code in any way, you may need to make changes to work with this new version. We have highlighted some of the major changes below along with some changes we've made to consolidate the application's configuration.

The upgrade guides can be found here:

  • Dependencies - This release includes an upgrade to Rails 5.2, Ruby 2.6.3, Node 10.x+ and Yarn 1.22+
    • Upgraded most Gems and Yarn dependencies (see the Gemfile.lock and yarn.lock for details). The primary exceptions are TinyMCE and Bootstrap.
  • Credentials - The application's sensitive credentials have moved from the various YAML files and initializers ito Rails' new encrypted credentials system.
    • Run EDITOR=vi rails credentials:edit (Note: you can use editors other than vi) and copy the content of the config/credentials.yml.example.
    • Update any custom code you have that references those old values (e.g. Rails.application.credentials.devise[:secret_key])
  • Configuration - All custom configuration has been moved from config/application.rb, config/branding.yml and various config/initializers/*.rb into a single config/initializers/_dmproadmap.rb file. This was done to consolidate the applications configuration and make it easier for installations to manage their config.
    • You will need to evaluate your existing configuration and update this new file accordingly.
    • You will also need to evaluate any custom code you may have to use these new files. For example: Rails.configuration.branding[:organisation][:name] becomes Rails.configuration.x.organisation[:name]
  • Strong Parameters - Rails 5.2 no longer passes request parameters around as a Hash. They have instead moved to ActionController::StrongParemeters. This is a breaking change so you will need to review any customizations you have made to controllers.
  • Rake - You no longer run any 'rake' commands. You should instead use 'rails' (e.g. rails db:migrate RAILS_ENV=production)
  • Warning -- check your customized code! If you have placed any customizations to the base DMPRoadmap code in the lib/ directory, you will need to move them into the app/ directory. Rails 5+ has disabled the autoload feature in the production environment. You will need to move your code into the app/ directory and update the module/class hierarchies accordingly (e.g. MyApp::Controllers::PublicPages which was in lib/my_app/controllers/public_pages.rb would become MyApp::PublicPages if moved to app/controllers/my_app/public_pages.rb)
  • Enabled Rubocop for verification that our Ruby code follows the latest community standards
  • The timeago JS strings are now translatable. The 'updated by [email protected] - 2 days ago' messages are now part of the translation ecosystem - issue 1974

Introduction of Translation.io

We're moving our translation backend to Translation.io. Previously, we were using a combination of FastGetText and I18n for translation. The translation gem simplifies the management of these two transation systems, and provides a web-based service to allow translators to collaborate. This approach allows us to retain the Gettext style translations (full strings in the code and the _("") markup for translation), and gives the flexibility to separately maintain translations for the open-source DMPRoadmap codebase, along with your customization to the codebase and to static-pages.

For more details on how the translations will be managed, along with instructions for translating your customization, see the wiki page on translations

Upgrade guide

Please review the following changes and back up your DB before upgrading!

  • Install the latest versions of Ruby, Node and Yarn (See above for specific version info)
  • Merge in the latest changes (resolving any conflicts it may have with your customizations)
  • Run EDITOR=vi rails credentials:edit (swap 'vi' with your favorite editor) and copy the contents of config/credentials.yml.example into the editor. Replace all of the values with the ones appropriate for your installation. This will generate a config/master.key and config/credentials.yml.enc file. DO NOT commit your master.key into GitHub! See the Rails 5.2 docs for more info on the new approach to managing credentials.
  • Run rails db:migrate
  • Run rails v3:upgrade_3_0_0. This will run scripts that sets your orgs.language_id, users.language_id, orgs.feedback_email_subject and orgs.feedback_email_msg values to the default.
  • Update your customizations to comply with Rails 5.2 (see notes above)
  • Thoroughly test your application