Sha256: 43d18e7f53de5342bb184f224ba5e87254f0bc14c24390e9955401b7fc76d1a7

Contents?: true

Size: 874 Bytes

Versions: 14

Compression:

Stored size: 874 Bytes

Contents

module Kaya
  module Commands
    def self.reset_suites
      $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 suites from 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_suites.rb
kaya-0.0.13 lib/kaya/commands/reset_suites.rb
kaya-0.0.12 lib/kaya/commands/reset_suites.rb
kaya-0.0.11 lib/kaya/commands/reset_suites.rb
kaya-0.0.10 lib/kaya/commands/reset_suites.rb
kaya-0.0.9 lib/kaya/commands/reset_suites.rb
kaya-0.0.8 lib/kaya/commands/reset_suites.rb
kaya-0.0.7 lib/kaya/commands/reset_suites.rb
kaya-0.0.6 lib/kaya/commands/reset_suites.rb
kaya-0.0.5 lib/kaya/commands/reset_suites.rb
kaya-0.0.4 lib/kaya/commands/reset_suites.rb
kaya-0.0.3 lib/kaya/commands/reset_suites.rb
kaya-0.0.2 lib/kaya/commands/reset_suites.rb
kaya-0.0.1 lib/kaya/commands/reset_suites.rb