def match_associations(commit_sha, files)
        new_lines = lines_added(commit_sha)

        files = files.split("\n").group_by { |f| f.split('.').pop }

        associations.each do |ext, related|
          files[ext] ||= []
          related.each do |child|
            next if files[child].blank?

            files[child].each do |c|
              # hack to ignore deleted files
              files[child] = new_lines[c].blank? ? [] : [ filename: File.join(@config.working_dir, c), changes: new_lines[c] ]
            end
            files[ext].concat(files[child])
            files.delete(child)
          end
        end

        files.delete_if { |k,v| v.blank? || k.nil? }
        files
      end
def match_associations(commit_sha, files)
        new_lines = lines_added(commit_sha)

        files = files.split("\n").group_by { |f| f.split('.').pop }

        associations.each do |ext, related|
          files[ext] ||= []
          related.each do |child|
            next if files[child].blank?

            files[child].each do |c|
              # hack to ignore deleted files
              files[child] = new_lines[c].blank? ? [] : [ filename: File.join(@config.working_dir, c), changes: new_lines[c] ]
            end
            files[ext].concat(files[child])
            files.delete(child)
          end
        end

        files.delete_if { |k,v| v.blank? || k.nil? }
        files
      end
Associate files by extension and match their changes
 @since 0.1.5
 @param commit_sha [String]
 @param files [String] list of files from git
 @return [Hash] files with matched extensions and changes