Class: FlightPlanCli::Initializer
- Inherits:
-
Thor
- Object
- Thor
- FlightPlanCli::Initializer
- Defined in:
- lib/flight_plan_cli/initializer.rb
Constant Summary collapse
- YAML_FILE =
'.flight_plan_cli.yml'.freeze
Instance Method Summary collapse
-
#initialize(*args) ⇒ Initializer
constructor
A new instance of Initializer.
- #ls ⇒ Object
Constructor Details
#initialize(*args) ⇒ Initializer
11 12 13 14 |
# File 'lib/flight_plan_cli/initializer.rb', line 11 def initialize(*args) read_config super end |
Instance Method Details
#ls ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/flight_plan_cli/initializer.rb', line 17 def ls swimlanes = tickets_by_swimlane default_swimlane_ids.each do |swimlane_id| next unless swimlanes.key?(swimlane_id) print_swimlane(swimlanes[swimlane_id]) end rescue 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 |