Sha256: c0df37f934a75085ddf56a4a5ef3eccd956da1508eb719a0d6385498df6bf382

Contents?: true

Size: 630 Bytes

Versions: 14

Compression:

Stored size: 630 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"

      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
mutx-0.1.19 lib/mutx/commands/reset.rb
mutx-0.1.18 lib/mutx/commands/reset.rb
mutx-0.1.17 lib/mutx/commands/reset.rb
mutx-0.1.16 lib/mutx/commands/reset.rb
mutx-0.1.15 lib/mutx/commands/reset.rb
mutx-0.1.14 lib/mutx/commands/reset.rb
mutx-0.1.13 lib/mutx/commands/reset.rb
mutx-0.1.12 lib/mutx/commands/reset.rb
mutx-0.1.11 lib/mutx/commands/reset.rb
mutx-0.1.10 lib/mutx/commands/reset.rb
mutx-0.1.9 lib/mutx/commands/reset.rb
mutx-0.1.8 lib/mutx/commands/reset.rb
mutx-0.1.7 lib/mutx/commands/reset.rb
mutx-0.1.6 lib/mutx/commands/reset.rb