diff --git a/README.md b/README.md index a002731..819620b 100644 --- a/README.md +++ b/README.md @@ -164,7 +164,7 @@ The [bridgetown_credentials gem](https://github.com/svoop/bridgetown_credentials ### Hanami 2 -To use credentials in a [Hanami 2](https//hanami.org) app, first add this gem to the gemfile of the app and then create a provider `config/providers/credentials.rb`: +To use credentials in a [Hanami 2](https//hanami.org) app, first add this gem to the Gemfile of the app and then create a provider `config/providers/credentials.rb`: ```ruby # frozen_string_literal: true @@ -182,12 +182,13 @@ Hanami.app.register_provider :credentials do end ``` -You might want to add a Rake task `lib/tasks/credentials.rake` as well: +Next up are Rake tasks `lib/tasks/credentials.rake`: ```ruby namespace :credentials do desc "Edit (or create) the encrypted credentials file" task :edit, [:env] => [:environment] do |_, args| + Hanami.app.root.join(Hanami.app["credentials"][:dir]).mkpath Hanami.app.prepare(:credentials) Hanami.app['credentials'].edit! args[:env] end