Clean up deprecation warnings in rails 4.2


Clean up deprecation warnings in Rails 4.2 by:

  • upgrading the Cucumber gem

  • changing from a secret token initializer to config/secrets.yml

  • changing to the new variable for configuring how static assets are served

  • changing the only_path syntax for the pseud_link method

Only the last item needs manual testing:

1. Download a work and confirm that following the pseud link in the byline takes you to the site
2. View the page source for a work and confirm that the link in the byline uses a relative URL, e.g. <a rel="author" href="/users/USER/pseuds/PSEUD">pseud</a> and not


June 20, 2017, 4:29 AM

I've created for the chapter byline issue in downloads, and ePubs are working now, so...

On a ePub download:

So that's good! We just need someone to test mobi. (I see that you said it works, but we need someone who didn't write the code to verify it.)

June 14, 2017, 7:18 PM

Just commenting that mobi and epub work in calibre.

June 14, 2017, 6:26 AM

On the site:

  • Link in the work byline: <a rel="author" href="/users/sarken/pseuds/sarken">sarken</a>

  • Link in a chapter byline: <a rel="author" href="/users/sarken/pseuds/sarken">sarken</a>

On an HTML download:

On a PDF download:

On an ePub download: I was going to test this, but epubs will download, but not open in iBooks on iPhone 6 (OS 10.3.2) or iBooks or Sigil on Mac (OS 10.12.5). I suspect it's a Rails 4.2 issue and not related to this, though.

In summary:

  • Works on the site and HTML and PDF downloads all look good!

    • The chapter byline needs to point to the full URL, but that's an existing bug (I checked on production) and I will create an issue for it

  • We still need to check ePubs and mobi files

June 13, 2017, 8:14 PM

So the following shows that the byline should be absolute for downloads:

<div class="byline"><%= ts("by") %> <%= byline(@work, visibility: 'public', only_path: false) %></div>

And the normal byline in a work should be relative.

June 12, 2017, 5:43 AM

I see code changes in the PR – it looks to me like we need to find one place where pseud_link should be relative and one where it should be absolute, and then check that they're right. Can you please find those places and update the issue with testing information?

Other than that, is this resolving deprecation warnings by upgrading the Cucumber gem, changing from a secret token initializer to config/secrets.yml, and changing to the new variable for configuring how static assets are served? This is the kind of information we need in an issue so we can look back at it and know what was changed and why.










Affects versions

Fix versions





Epic Link


Internal 0.9