Class: FlightPlanCli::Commands::List

Inherits:
Object
  • Object
show all
Includes:
FlightPlanCli::Clients::FlightPlan, FlightPlanCli::Clients::Git
Defined in:
lib/flight_plan_cli/commands/list.rb

Defined Under Namespace

Modules: Color

Instance Method Summary collapse

Methods included from FlightPlanCli::Clients::FlightPlan

#flight_plan

Methods included from FlightPlanCli::Clients::Git

#git

Instance Method Details

#processObject



14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/flight_plan_cli/commands/list.rb', line 14

def process
  swimlanes = tickets_by_swimlane
  Settings.default_swimlane_ids.each do |swimlane_id|
    next unless swimlanes.key?(swimlane_id)

    print_swimlane(swimlanes[swimlane_id])
  end
rescue ApiUnauthorized
  puts 'Unauthorize. Please ensure your key and secret as setup correctly'.red
rescue Errno::ECONNREFUSED, SocketError => e
  # TODO: caching - low timeout (5s) then fallback to cache
  puts "Network error. #{e.message}".red
end