Class: CIAgainst::CLI

Inherits:
Object
  • Object
show all
Defined in:
lib/ci_against/cli.rb

Instance Method Summary collapse

Constructor Details

#initialize(argv) ⇒ CLI

Returns a new instance of CLI.



3
4
5
6
7
# File 'lib/ci_against/cli.rb', line 3

def initialize(argv)
  @argv = argv
  @params = {}
  @args = nil
end

Instance Method Details

#runObject



9
10
11
12
13
14
15
16
17
18
19
# File 'lib/ci_against/cli.rb', line 9

def run
  parse_option
  if @params[:all]
    raise NotImplementedError
  else
    @args.each do |repo|
      Runner.new(repo, github_access_token: ENV.fetch('GITHUB_ACCESS_TOKEN')).run(dry_run: @params[:'dry-run'])
    end
  end
  return 0
end