def download(to_date = nil)
      url = to_date ? @url + "?to=#{to_date.strftime('%Y-%m-%d')}" : @url
      res = Curl::Easy.perform(url)
      code = res.response_code
      raise("Failed loading data from GitHub: #{url} #{code}") if code != 200
      html = Nokogiri::HTML(res.body_str)
      html.css('.day').map do |x|
        x.attributes.values_at('data-date', 'data-count').map(&:value)
      end
    end
def download(to_date = nil)
      url = to_date ? @url + "?to=#{to_date.strftime('%Y-%m-%d')}" : @url
      res = Curl::Easy.perform(url)
      code = res.response_code
      raise("Failed loading data from GitHub: #{url} #{code}") if code != 200
      html = Nokogiri::HTML(res.body_str)
      html.css('.day').map do |x|
        x.attributes.values_at('data-date', 'data-count').map(&:value)
      end
    end
Downloads new data from Github