-
Notifications
You must be signed in to change notification settings - Fork 91
Description
Hi Lee,
I hope you are doing great.
I needed small help regarding: https://rubygems.org/gems/time_difference/versions/0.4.2
I was trying to use “time_difference” in my ruby script, however was getting below error:
ghe_premerge_onboard.rb:47:in block in <main>': uninitialized constant TimeDifference (NameError) from ghe_premerge_onboard.rb:41:ineach'
from ghe_premerge_onboard.rb:41:in `
Btw,
I added following require statement in my ruby script:
require ‘time_difference’
But it throws the error for that as well? Is that correct require statement to use it in ruby script?
Also I was trying to use following way:
pom_repo.each do |repos|
commit_date = client.repository("#{orgname}/#{repos}").pushed_at
date_now = Time.now
today_date = date_now.utc
puts TimeDifference.between(commit_date, today_date).in_months
end
Please help
Thanks,
Giriraj