Class: CommitLeaderboardStage

Inherits:
Object
  • Object
show all
Defined in:
lib/renuo/cli/app/commit_leaderboard_stage.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#auhor_avatar_urlObject

Returns the value of attribute auhor_avatar_url.



4
5
6
# File 'lib/renuo/cli/app/commit_leaderboard_stage.rb', line 4

def auhor_avatar_url
  @auhor_avatar_url
end

#author_usernameObject

Returns the value of attribute author_username.



4
5
6
# File 'lib/renuo/cli/app/commit_leaderboard_stage.rb', line 4

def author_username
  @author_username
end

#optionsObject

Returns the value of attribute options.



4
5
6
# File 'lib/renuo/cli/app/commit_leaderboard_stage.rb', line 4

def options
  @options
end

#queue_file_pathObject

Returns the value of attribute queue_file_path.



4
5
6
# File 'lib/renuo/cli/app/commit_leaderboard_stage.rb', line 4

def queue_file_path
  @queue_file_path
end

Instance Method Details

#run(args, options) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/renuo/cli/app/commit_leaderboard_stage.rb', line 6

def run(args, options)
  abort "No author username given." if args[0].nil?
  abort "No author avatar url given." if args[1].nil?

  process_params(args, options)

  check_required_tools
  check_if_repository_is_present
  check_if_commit_is_present

  append_to_queue(build_commit_payload)
end