Sha256: 12a5c2e03f61db28e163b64b404ca11319d21aa018a16e2da47578d520adcfc0

Contents?: true

Size: 962 Bytes

Versions: 2

Compression:

Stored size: 962 Bytes

Contents

# frozen_string_literal: true

require "cobra_commander/dependencies"
require "cobra_commander/component"
require "cobra_commander/umbrella"
require "cobra_commander/version"

# Tools for working with Component Based Rails Apps (see https://cbra.info).
# Includes tools for graphing the components of an app and their relationships, as well as selectively
# testing components based on changes made.
module CobraCommander
  UMBRELLA_APP_NAME = "App"

  def self.umbrella(root_path, yarn: false, bundler: false, name: UMBRELLA_APP_NAME)
    umbrella = Umbrella.new(name, root_path)
    umbrella.add_source(:yarn, Dependencies::Yarn.new(root_path)) unless bundler
    umbrella.add_source(:bundler, Dependencies::Bundler.new(root_path)) unless yarn
    umbrella
  end

  def self.umbrella_tree(path)
    CalculatedComponentTree.new(UMBRELLA_APP_NAME, path)
  end

  def self.tree_from_cache(cache_file)
    CachedComponentTree.from_cache_file(cache_file)
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
cobra_commander-0.15.1 lib/cobra_commander.rb
cobra_commander-0.15.0 lib/cobra_commander.rb