Class: Setup

Inherits:
Object
  • Object
show all
Defined in:
lib/jiraquest/quests/setup.rb

Overview

Workspace setup miniquest

Instance Method Summary collapse

Constructor Details

#initializeSetup

Returns a new instance of Setup.



9
10
11
12
13
# File 'lib/jiraquest/quests/setup.rb', line 9

def initialize
  @store = DATA
  @user = @store.transaction { @store[:user] }
  @prompt = TTY::Prompt.new
end

Instance Method Details

#questObject



15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/jiraquest/quests/setup.rb', line 15

def quest
  @prompt.warn("\nQuest 1")
  @prompt.ok("'Set up your Work Environment'")
  puts 'Can you avoid distractions and get your system ready to start collecting jiras?'
  @prompt.warn('Begin:')
  System.new.vpn if System.new.boot
  System.new.ide_update
  @prompt.warn('You updated your IDE, but lost work on 1 jira.')
  sleep 1
  Score.new.update_and_print(-1)
  sleep 1
  Reporter.new.quest_complete('Setup')
end