Module: Chicanery::Repos
Instance Method Summary collapse
- #check_repos(current_state, previous_state) ⇒ Object
- #compare_repo_state(name, current, previous) ⇒ Object
Methods included from Debug
Instance Method Details
#check_repos(current_state, previous_state) ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'lib/chicanery/repos.rb', line 9 def check_repos current_state, previous_state current_state[:repos] = {} repos.each do |repo| repo_state = repo.state compare_repo_state repo.name, repo_state, previous_state[:repos][repo.name] if previous_state[:repos] current_state[:repos][repo.name] = repo_state end end |
#compare_repo_state(name, current, previous) ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/chicanery/repos.rb', line 18 def compare_repo_state name, current, previous return unless previous current.each do |branch, state| next unless previous[branch] notify_commit_handlers "#{name}/#{branch}", state, previous[branch] if state != previous[branch] end end |