Sha256: 39c2a1482e0fbdb517783c1e44a59a10c92104e722d96234149040417e8539f4

Contents?: true

Size: 836 Bytes

Versions: 2

Compression:

Stored size: 836 Bytes

Contents

require 'cany/version'
require 'cany/specification'
require 'cany/recipe'
require 'cany/recipes/bundler'
require 'cany/recipes/rails'
require 'cany/recipes/web_server'
require 'cany/recipes/thin'
require 'cany/dpkg'
require 'cany/dpkg/creator'
require 'cany/dpkg/builder'
require 'cany/dpkg/deb_helper_recipe'

module Cany
  class MissingSpecification < Exception
  end

  class MultipleSpecifications < Exception
  end

  def self.setup(directory='.')
    specs = Dir[directory + '/*.' + Specification::EXT]
    raise MissingSpecification, "No #{Specification::EXT} found in #{directory}" if specs.size == 0
    raise MultipleSpecifications, "Multiple #{Specification::EXT} found in #{directory}" if specs.size > 1
    file = specs.first
    spec = eval File::read(file), binding, file
    spec.base_dir = directory
    spec
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
cany-0.0.2 lib/cany.rb
cany-0.0.1 lib/cany.rb