Sha256: 73d027f29600b73ca102141487e9fef750eb6d0909c2d55abaafd624fe5142c0

Contents?: true

Size: 661 Bytes

Versions: 8

Compression:

Stored size: 661 Bytes

Contents

namespace :slosilo do
  desc "Dump a public key"
  task :dump, [:name] => :environment do |t, args|
    args.with_defaults(:name => :own)
    puts Slosilo[args[:name]]
  end
  
  desc "Enroll a key"
  task :enroll, [:name] => :environment do |t, args|
    key = Slosilo::Key.new STDIN.read
    Slosilo[args[:name]] = key
    puts key
  end

  desc "Generate a key pair"
  task :generate, [:name] => :environment do |t, args|
    args.with_defaults(:name => :own)
    key = Slosilo::Key.new
    Slosilo[args[:name]] = key
    puts key
  end

  desc "Migrate to a new database schema"
  task :migrate => :environment do |t|
    Slosilo.adapter.migrate!
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
slosilo-2.2.1 lib/tasks/slosilo.rake
slosilo-2.1.1 lib/tasks/slosilo.rake
slosilo-2.0.1 lib/tasks/slosilo.rake
slosilo-2.0.0 lib/tasks/slosilo.rake
slosilo-1.1.0 lib/tasks/slosilo.rake
slosilo-1.0.0 lib/tasks/slosilo.rake
slosilo-0.4.1 lib/tasks/slosilo.rake
slosilo-0.4.0 lib/tasks/slosilo.rake