Class: GitReport::BatchSender

Inherits:
GenericSender show all
Defined in:
lib/batch_sender.rb

Class Method Summary collapse

Methods inherited from GenericSender

communicate, configuration, headers, storage

Class Method Details

.send!(option = nil) ⇒ Object

send the given commits chunked



6
7
8
9
10
11
12
13
14
15
16
# File 'lib/batch_sender.rb', line 6

def self.send! option = nil
  puts "Collecting your projects commit data - this can take some time, please be patient!"
  batches(option).each_with_index do |batch, index|
    print "Sending batch #{index + 1} of #{@@num_batches} - #{index*100/@@num_batches}%\r"
    STDOUT.flush
    break unless send_data!(batch)
  end
  print "Sending batch #{@@num_batches} of #{@@num_batches} - 100%\r"
  STDOUT.flush
  print "\n"
end