Sha256: 01bbe9d397295bc5b0cf0a1ca4f5fbf10d66a7f017fe8ab8e5d74dc1c7f05879

Contents?: true

Size: 681 Bytes

Versions: 19

Compression:

Stored size: 681 Bytes

Contents

# encoding: utf-8
module Mutx
  module Commands
    def self.reset
      Mutx::Support::Log.debug "#{self}:#{__method__}" if Mutx::Support::Log
      begin

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

        print "\nCleanning database..."

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

        print "\nCleanning project..."

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

        Mutx::Database::MongoConnector.force_close
      rescue => e
        puts "CANNOT CLEAN SYSTEM\n#{e}\n\n#{e.backtrace}"
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
mutx-0.1.38 lib/mutx/commands/reset.rb
mutx-0.1.37 lib/mutx/commands/reset.rb
mutx-0.1.36 lib/mutx/commands/reset.rb
mutx-0.1.35 lib/mutx/commands/reset.rb
mutx-0.1.34 lib/mutx/commands/reset.rb
mutx-0.1.33 lib/mutx/commands/reset.rb
mutx-0.1.32 lib/mutx/commands/reset.rb
mutx-0.1.31 lib/mutx/commands/reset.rb
mutx-0.1.30 lib/mutx/commands/reset.rb
mutx-0.1.29 lib/mutx/commands/reset.rb
mutx-0.1.28 lib/mutx/commands/reset.rb
mutx-0.1.27 lib/mutx/commands/reset.rb
mutx-0.1.26 lib/mutx/commands/reset.rb
mutx-0.1.25 lib/mutx/commands/reset.rb
mutx-0.1.24 lib/mutx/commands/reset.rb
mutx-0.1.23 lib/mutx/commands/reset.rb
mutx-0.1.22 lib/mutx/commands/reset.rb
mutx-0.1.21 lib/mutx/commands/reset.rb
mutx-0.1.20 lib/mutx/commands/reset.rb