lib/autowow/vcs.rb in autowow-0.2.0 vs lib/autowow/vcs.rb in autowow-0.3.0
- old
+ new
@@ -90,10 +90,22 @@
else
logger.error("Github API (#{url.scheme}://#{host}#{path}) could not be reached: #{response.body}")
end
end
+ def self.greet(latest_project_info = nil)
+ logger.info("\nGood morning!\n\n")
+ if is_git?(status_dry)
+ logger.error('Inside repo, cannot show report about all repos.')
+ else
+ latest_project_info ||= get_latest_project_info
+ logger.info(latest_project_info)
+ check_projects_older_than(1, :months)
+ end
+ logger.info("\nThe following Ruby versions are not used by any projects, maybe consider removing them?\n #{Ruby.obsolete_versions.join("\n ")}")
+ end
+
def self.hi
logger.error("In a git repository. Try 1 level higher.") && return if is_git?(status_dry)
latest_project_info = get_latest_project_info
logger.info("\nHang on, updating your local projects and remote forks...\n\n")
git_projects.each do |project|
@@ -101,13 +113,10 @@
logger.info("\nGetting #{project} in shape...")
yield if block_given?
update_project
end
end
- logger.info("\nGood morning!\n\n")
- logger.info(latest_project_info)
- check_projects_older_than(1, :months)
- logger.info("\nThe following Ruby versions are not used by any projects, maybe consider removing them?\n #{Ruby.obsolete_versions.join("\n ")}")
+ greet(latest_project_info)
end
def self.hi!
logger.error("In a git repository. Try 1 level higher.") && return if is_git?(status_dry)
hi do