Class: CommitLeaderboardSync
- Inherits:
-
Object
- Object
- CommitLeaderboardSync
- Defined in:
- lib/renuo/cli/app/commit_leaderboard_sync.rb
Instance Attribute Summary collapse
-
#api_secret ⇒ Object
Returns the value of attribute api_secret.
-
#leaderboard_api_url ⇒ Object
Returns the value of attribute leaderboard_api_url.
-
#queue_file_path ⇒ Object
Returns the value of attribute queue_file_path.
Instance Method Summary collapse
Instance Attribute Details
#api_secret ⇒ Object
Returns the value of attribute api_secret.
8 9 10 |
# File 'lib/renuo/cli/app/commit_leaderboard_sync.rb', line 8 def api_secret @api_secret end |
#leaderboard_api_url ⇒ Object
Returns the value of attribute leaderboard_api_url.
8 9 10 |
# File 'lib/renuo/cli/app/commit_leaderboard_sync.rb', line 8 def leaderboard_api_url @leaderboard_api_url end |
#queue_file_path ⇒ Object
Returns the value of attribute queue_file_path.
8 9 10 |
# File 'lib/renuo/cli/app/commit_leaderboard_sync.rb', line 8 def queue_file_path @queue_file_path end |
Instance Method Details
#run(args, options) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/renuo/cli/app/commit_leaderboard_sync.rb', line 10 def run(args, ) process_args(args) print_configuration if .verbose unless File.exist?(@queue_file_path) abort(">> Commit queue file does not exist.") end unless @leaderboard_api_url.match?(URI::DEFAULT_PARSER.make_regexp) abort(">> Invalid API URL.") end commits = JSON.parse(File.read(@queue_file_path)) send_commits(commits) end |