Sha256: fe94f05dd8f964946fecc94b38ba9cbc817139df6c97ea35adc154a8ea141fb4

Contents?: true

Size: 491 Bytes

Versions: 1

Compression:

Stored size: 491 Bytes

Contents

module Brewdler::Commands
  class Install
    def self.run
      begin
        Brewdler::Dsl.new(brewfile).process
      rescue Errno::ENOENT => e
        raise "No Brewfile found"
      rescue NameError
        brewfile.split("\n").each do |name|
          name.chomp!
          Brewdler::BrewInstaller.install(name) if name.length > 0 && name !~ /^ *#/
        end
      end
    end

  private

    def self.brewfile
      File.read(Dir['{*,.*}{B,b}rewfile'].first.to_s)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
brewdler-1.1.1 lib/brewdler/commands/install.rb