Sha256: 8a56ace414eed239d6550294e380c93385109c0ddfa089a108f384daae4c7e0b

Contents?: true

Size: 599 Bytes

Versions: 1

Compression:

Stored size: 599 Bytes

Contents

#!/usr/bin/env ruby

require 'io/console'
require 'codebadges' # for production
# require '../lib/codebadges/badges.rb' # for cmd line testing purposes

abort "Usage:  codebadges [username]\n" if ARGV.count == 0

print 'Login Username: '
username = STDIN.gets.chomp

print 'Login Password: '
password = STDIN.noecho(&:gets).chomp

cadet_name = ARGV[0]
cademy = CodeBadges::GetCodecademyBadges.new(username, password)
badges_found = cademy.call(cadet_name)

puts "#{cadet_name} has collected #{badges_found.size} badges."
badges_found.each do |title, date|
  puts "Earned '#{title}' on #{date}."
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
codebadges-3.0.0 bin/codebadges