6

rails-5-2-credentials

 3 years ago
source link: http://blog.grayson.org.cn/blog/2018/10/23/rails-5-2-credentials
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

rails-5-2-credentials

Oct 23, 2018

辑编rails的credentials

EDITOR=vim bundle exec rails credentials:edit

系统中使用credentials.yml.enc

vi config/initializers/rollbar.rb

Rollbar.configure do |config|
  # Without configuration, Rollbar is enabled in all environments.
  # To disable in specific environments, set config.enabled=false.

  config.access_token = Rails.application.credentials[:rollbar_token]
... ...
end

rollbar 在cap中使用

set :rollbar_token, YAML.load(`rails credentials:show`)['rollbar_token']
set :rollbar_env, Proc.new { fetch :stage }
set :rollbar_role, Proc.new { :app }

http://dlj.bz/d5Ll3K

https://github.com/rails/rails/pull/30067

此文章 短链接: http://dlj.bz/QEoGTE

Posted by grayson Oct 23, 2018 rails

« mackup configuration_files备份文件的问题

Ruby's Array and Array.wrap的区别»


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK