Depfu now supports Ruby projects using the appraisal gem.

Appraisal makes it easy to test your library with different versions of a dependency. It is most commonly used for libraries that provide plugin-like functionality for frameworks. For example, you want to make sure your image uploading library works with several major versions of Rails.

From the normal, main gemspec and Gemfile of the library, appraisal generates multiple additional gemfiles, one for each release line of the gem you’re “appraising”.

appraise "4.2" do
  gem "rails", "~> 4.2.0"

appraise "5.0" do
  gem "rails", "~> 5.0.0"

Which results in the following folder structure:

|-- lib
|-- gemfiles
|   |-- 4.2.gemfile
|   |-- 5.0.gemfile
|-- Appraisals
|-- Gemfile
|-- paperclip.gemspec

Depfu did work fine before on the main gemspec and Gemfile of the library, but appraisal projects usually run their CI on the generated gemfiles as a matrix build. Which means Depfu would create a PR with the dependency update, but the CI build for that PR did not include the update and so the test results would be meaningless.

We now autodetect projects using appraisal, continue to update the main gemspec and Gemfile as before and additionally apply the same gem update to all files found in the gemfiles/ folder (with or without lockfiles).

If it’s the actual “appraised” gem that got a new release, we only apply the patch/minor version that would make sense for this release line. Otherwise Depfu would update all generated gemfiles to the latest Rails release, which defeats the purpose of using appraisal in the first place.

If you tried Depfu in the past with a project using appraisal, it would be great if you could give it another go. Any issues or feedback around this, please let us know on Twitter or via email.