Sha256: 1950ea57bd23fbb8aa249d39ba96d95301a24c4489a9b97a55a54a84c79c3fe4
Contents?: true
Size: 779 Bytes
Versions: 37
Compression:
Stored size: 779 Bytes
Contents
# frozen_string_literal: true module RailsAppGenerator # XXXX class Dependencies def initialize(addon, context) @addon = addon @context = context @options = context.options end def satisfied? @addon.dependencies.each do |dependency| return false unless dependencies_satisfied?(dependency) end true end private def dependencies_satisfied?(addon, visited = []) return false if @options["skip_#{addon}".to_sym] return true if @context.default_addons.include?(addon) visited << addon dependencies = AddOn.get(addon).dependencies - visited dependencies.each do |dependency| return false unless dependencies_satisfied?(dependency, visited) end end end end
Version data entries
37 entries across 37 versions & 1 rubygems