Class: GitReport::Sender
- Inherits:
-
GenericSender
- Object
- GenericSender
- GitReport::Sender
- Defined in:
- lib/sender.rb
Class Method Summary collapse
-
.send!(options = nil) ⇒ Object
sends or saves the commits.
Methods inherited from GenericSender
communicate, configuration, headers, storage
Class Method Details
.send!(options = nil) ⇒ Object
sends or saves the commits
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/sender.rb', line 6 def self.send! = nil begin commits = GitReport::Supplier.commits() rescue Exception => e communicate e, nil exit end commits.each do |commit| send_data!(commit) ? commits = commits.inject([]){ |a,i| ( a << i unless i == commit );a } : break end storage.save! commits true end |