Class: Gawky::Runner
- Inherits:
-
Object
- Object
- Gawky::Runner
- Defined in:
- lib/gawky/runner.rb
Instance Method Summary collapse
-
#initialize ⇒ Runner
constructor
A new instance of Runner.
- #run ⇒ Object
Constructor Details
#initialize ⇒ Runner
Returns a new instance of Runner.
4 5 6 |
# File 'lib/gawky/runner.rb', line 4 def initialize @date_now = Date.today end |
Instance Method Details
#run ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/gawky/runner.rb', line 8 def run issues = Gawky.github.issues.list(:org => ARGV[0], :filter => 'all', :auto_pagination => true, :sort => 'created') issues.each do |issue| if issue['pull_request'] date = DateTime.parse(issue.created_at) if elapsed_time(date) > Gawky.max_elapsed_days puts Status.new(date, issue).warning else puts Status.new(date, issue).green end end end end |