lib/mascherano/tasks/token.cap in mascherano-1.1.0 vs lib/mascherano/tasks/token.cap in mascherano-1.2.0
- old
+ new
@@ -6,18 +6,18 @@
end
namespace :token do
desc 'Generate random token'
task :generate do
- on roles(fetch(:token_roles)) do
+ on fetch(:token_servers) do
info generate_token(fetch(:token_length))
end
end
desc 'Upload random token as a file on remote server'
task :upload do
- on roles(fetch(:token_roles)) do
+ on fetch(:token_servers) do
token = generate_token(fetch(:token_length))
io = StringIO.new(token)
upload! io, fetch(:token_target)
end
end
@@ -26,8 +26,9 @@
namespace :load do
task :defaults do
set :token_length, 64
set :token_target, -> { shared_path.join('.token') }
set :token_roles, :app
+ set :token_servers, -> { release_roles(fetch(:token_roles)) }
end
end