module Lono::Blueprint::Root

Public Instance Methods

find_blueprint_root(blueprint) click to toggle source
# File lib/lono/blueprint/root.rb, line 20
def find_blueprint_root(blueprint)
  config = Lono::Finder::Blueprint.find(blueprint) # blueprint_root
  config.root if config
end
set_blueprint_root(blueprint) click to toggle source

Switch the lono root

# File lib/lono/blueprint/root.rb, line 6
    def set_blueprint_root(blueprint)
      blueprint_root = find_blueprint_root(blueprint)
      if blueprint_root
        Lono.blueprint_root = blueprint_root
      else
        puts <<~EOL.color(:red)
          ERROR: Unable to find the blueprint #{blueprint.inspect}.
          Are you sure its in your Gemfile or in the blueprints folder with the correct name?
        EOL
        Lono::Finder::Blueprint.list
        ENV['LONO_TEST'] ? raise("Unable to find blueprint: #{blueprint.inspect}") : exit(1)
      end
    end