Module: TrelloFreestyler

Defined in:
lib/trello_freestyler.rb,
lib/trello_freestyler/cli.rb,
lib/trello_freestyler/main.rb,
lib/trello_freestyler/client.rb,
lib/trello_freestyler/options.rb,
lib/trello_freestyler/version.rb,
lib/trello_freestyler/utils/hash.rb

Defined Under Namespace

Classes: Cli, Client, Main, Options, Utils

Constant Summary collapse

VERSION =
'0.5.0'

Class Method Summary collapse

Class Method Details

.runObject



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/trello_freestyler.rb', line 9

def self.run
  if ARGV.length.positive?
    spinners = TTY::Spinner::Multi.new('[:spinner] Trello Freestyler')
    sp1 = spinners.register '[:spinner] Validate input options'
    sp1.auto_spin

    options = TrelloFreestyler::Cli.parse(ARGV)

    sp1.success

    sp2 = spinners.register '[:spinner] Download and clean trello data'
    sp3 = spinners.register "[:spinner] Output data to: '#{options.output}'"
    sp2.auto_spin
    sp3.auto_spin

    TrelloFreestyler::Main.dump(options)

    sp2.success
    sp3.success
  else
    TrelloFreestyler::Cli.parse %w[--help]
  end
end