Sha256: b6a1caf4bd1d51c51e701069a085a043d2b2a4d9c4c37acd66a38f3694b6f316

Contents?: true

Size: 673 Bytes

Versions: 9

Compression:

Stored size: 673 Bytes

Contents

require 'thor'
require 'pathname'
require 'donjon/commands/base'
require 'donjon/repository'
require 'donjon/settings'
require 'donjon/configurator'
require 'donjon/shell'

module Donjon
  module Commands
    Base.class_eval do
      desc "init", 'Creates a new vault, or connects to an existing vault.'
      
      def init
        if settings.configured?
          say 'This vault is already configured :)', :green
          say 'If you want another one, set DONJONRC to a new configuration file'
          say "(if it doesn't exist I will create one for you)"
          return
        end

        Configurator.new(settings: settings).run
      end


    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
donjon-2.0.1 lib/donjon/commands/vault.rb
donjon-2.0.0 lib/donjon/commands/vault.rb
donjon-1.0.1 lib/donjon/commands/vault.rb
donjon-1.0.0 lib/donjon/commands/vault.rb
donjon-0.0.5 lib/donjon/commands/vault.rb
donjon-0.0.4 lib/donjon/commands/vault.rb
donjon-0.0.3 lib/donjon/commands/vault.rb
donjon-0.0.2 lib/donjon/commands/vault.rb
donjon-0.0.1 lib/donjon/commands/vault.rb