Sha256: 3d0fc16527eb02934f255618aced9c7d8aee0c0d98f6ed9da1d452d71644113e

Contents?: true

Size: 858 Bytes

Versions: 14

Compression:

Stored size: 858 Bytes

Contents

module Kaya
  module Commands
    def self.reset
      $K_LOG.debug "#{self}:#{__method__}" if $K_LOG
      begin

        Kaya::Support::Configuration.get
        Kaya::Database::MongoConnector.new(Kaya::Support::Configuration.db_connection_data)

        print "\nCleanning database..."

        Kaya::Database::MongoConnector.drop_collections
        print "Done!\n\n"

        print "\nCleanning project..."

        Kaya::Support::FilesCleanner.start!
        print "Done!\n\n"

        if Kaya::Support::Configuration.use_git?

            Kaya::Support::Git.pull

            Kaya::Suites.update_suites

        else # NO GIT USAGE

          Kaya::Suites.update_suites

        end

        puts "PROFILES LOADED CORRECTLY \n\nRun `kaya start`"

      rescue => e
        puts "CANNOT CLEAN SYSTEM\n#{e}\n\n#{e.backtrace}"
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
kaya-0.0.14 lib/kaya/commands/reset.rb
kaya-0.0.13 lib/kaya/commands/reset.rb
kaya-0.0.12 lib/kaya/commands/reset.rb
kaya-0.0.11 lib/kaya/commands/reset.rb
kaya-0.0.10 lib/kaya/commands/reset.rb
kaya-0.0.9 lib/kaya/commands/reset.rb
kaya-0.0.8 lib/kaya/commands/reset.rb
kaya-0.0.7 lib/kaya/commands/reset.rb
kaya-0.0.6 lib/kaya/commands/reset.rb
kaya-0.0.5 lib/kaya/commands/reset.rb
kaya-0.0.4 lib/kaya/commands/reset.rb
kaya-0.0.3 lib/kaya/commands/reset.rb
kaya-0.0.2 lib/kaya/commands/reset.rb
kaya-0.0.1 lib/kaya/commands/reset.rb