Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

secret_token => secret_key_base #89

Closed
jrochkind opened this issue Apr 18, 2018 · 3 comments
Closed

secret_token => secret_key_base #89

jrochkind opened this issue Apr 18, 2018 · 3 comments

Comments

@jrochkind
Copy link
Contributor

Running Combustion under 5.2 results in:

DEPRECATION WARNING: `secrets.secret_token` is deprecated in favor of `secret_key_base` and will be removed in Rails 6.0. (called from env_config at /Users/jrochkind/.gem/ruby/2.4.2/gems/railties-5.2.0/lib/rails/application.rb:252)
@jrochkind
Copy link
Contributor Author

In my own app, which runs CI in multiple rails versions (not using appraisal, just my own hack, appraisal probably has it's own way...), I get rid of deprecation message like this:

Combustion.initialize! :all do
  case "#{Rails::VERSION::MAJOR}.#{Rails::VERSION::MINOR}"
  when "5.0"
    # avoid deprecation notice
    config.active_record.time_zone_aware_types = [:datetime]
  when "5.2"
    config.secret_key_base = config.secret_token
    config.secret_token = nil
  end
end

@pat
Copy link
Owner

pat commented Apr 18, 2018

I've just pushed a commit to avoid setting secret_token for Rails 5.2 onwards (d22798d). Also, secret_key_base is already being set, so for your temporary workaround, you don't need to worry about that.

Thanks for reporting the issue :) I'll push a gem release out in the next week or so.

@pat
Copy link
Owner

pat commented Apr 25, 2018

0.9.1 is now released with this fix :)

@pat pat closed this as completed Apr 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants