Sha256: 390913a83423efe2c7d5d5d0780ea171fe00e3dc8f831877ef9268291239e842

Contents?: true

Size: 1.18 KB

Versions: 27

Compression:

Stored size: 1.18 KB

Contents

require 'contracts'

require 'pkgforge/base'
require 'pkgforge/version'
require 'pkgforge/components/build'
require 'pkgforge/components/cflags'
require 'pkgforge/components/configure'
require 'pkgforge/components/deps'
require 'pkgforge/components/dirs'
require 'pkgforge/components/metadata'
require 'pkgforge/components/package'
require 'pkgforge/components/patch'
require 'pkgforge/components/run'
require 'pkgforge/components/source'
require 'pkgforge/components/test'
require 'pkgforge/components/upload'
require 'pkgforge/components/cleanup'
require 'pkgforge/components/state'

##
# DSL engine for compiling Arch packages
module PkgForge
  include Contracts::Core
  include Contracts::Builtin

  DEFAULT_FILE = './.pkgforge'.freeze

  class << self
    ##
    # Insert a helper .new() method for creating a Forge object
    def new(*args)
      self::Forge.new(*args)
    end

    ##
    # Method for loading in DSL file
    Contract Maybe[HashOf[Symbol => Any]] => PkgForge::Forge
    def load_from_file(params = {})
      file = params[:file] || DEFAULT_FILE
      forge = Forge.new(params)
      dsl = DSL::Forge.new(forge)
      dsl.instance_eval(File.read(file), file)
      forge
    end
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
pkgforge-0.29.1 lib/pkgforge.rb
pkgforge-0.29.0 lib/pkgforge.rb
pkgforge-0.28.0 lib/pkgforge.rb
pkgforge-0.27.0 lib/pkgforge.rb
pkgforge-0.26.0 lib/pkgforge.rb
pkgforge-0.25.1 lib/pkgforge.rb
pkgforge-0.25.0 lib/pkgforge.rb
pkgforge-0.24.1 lib/pkgforge.rb
pkgforge-0.24.0 lib/pkgforge.rb
pkgforge-0.23.2 lib/pkgforge.rb
pkgforge-0.23.1 lib/pkgforge.rb
pkgforge-0.23.0 lib/pkgforge.rb
pkgforge-0.22.0 lib/pkgforge.rb
pkgforge-0.21.0 lib/pkgforge.rb
pkgforge-0.20.0 lib/pkgforge.rb
pkgforge-0.19.0 lib/pkgforge.rb
pkgforge-0.18.0 lib/pkgforge.rb
pkgforge-0.17.0 lib/pkgforge.rb
pkgforge-0.16.1 lib/pkgforge.rb
pkgforge-0.16.0 lib/pkgforge.rb