Sha256: 7828229e5216d7fd97234ae9e336bf5114d63ae7c3b00c1d82e5908ae5683ab1

Contents?: true

Size: 558 Bytes

Versions: 19

Compression:

Stored size: 558 Bytes

Contents

Execute.define_task do
  desc "reset", "Reset the rhoconnect database (you will need to run rhoconnect:get_token afterwards)"
  def reset
    invoke :config
    confirm = ask " Are you sure? Resetting will remove all data!\n" + 
                  " It will also return an error code to all\n" + 
                  " existing devices when they connect! (yes/no):"

    if confirm == 'yes'
      RestClient.post("#{$url}/api/admin/reset", { :api_token => $token })
      puts "Database reset."
    else
      puts "Cancelling."
    end #if
  end #reset
end #do

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
rhoconnect-3.4.5 commands/rhoconnect/reset.rb
rhoconnect-3.4.4 commands/rhoconnect/reset.rb
rhoconnect-3.4.3 commands/rhoconnect/reset.rb
rhoconnect-3.4.2 commands/rhoconnect/reset.rb
rhoconnect-3.3.6 commands/commands/rhoconnect/reset.rb
rhoconnect-3.3.5 commands/commands/rhoconnect/reset.rb
rhoconnect-3.3.4 commands/commands/rhoconnect/reset.rb
rhoconnect-3.3.3 commands/commands/rhoconnect/reset.rb
rhoconnect-3.3.2 commands/commands/rhoconnect/reset.rb
rhoconnect-3.3.1 commands/commands/rhoconnect/reset.rb
rhoconnect-3.3.1.beta4 commands/commands/rhoconnect/reset.rb
rhoconnect-3.3.1.beta3 commands/commands/rhoconnect/reset.rb
rhoconnect-3.3.1.beta2 commands/commands/rhoconnect/reset.rb
rhoconnect-3.2.1 commands/commands/rhoconnect/reset.rb
rhoconnect-3.2.0 commands/commands/rhoconnect/reset.rb
rhoconnect-3.2.0.beta5 commands/commands/rhoconnect/reset.rb
rhoconnect-3.2.0.beta4 commands/commands/rhoconnect/reset.rb
rhoconnect-3.2.0.beta3 commands/commands/rhoconnect/reset.rb
rhoconnect-3.2.0.beta2 commands/commands/rhoconnect/reset.rb