Module: Cany
- Defined in:
- lib/cany.rb,
lib/cany/dpkg.rb,
lib/cany/recipe.rb,
lib/cany/version.rb,
lib/cany/dpkg/builder.rb,
lib/cany/dpkg/creator.rb,
lib/cany/recipes/thin.rb,
lib/cany/recipes/rails.rb,
lib/cany/specification.rb,
lib/cany/recipes/bundler.rb,
lib/cany/specification/dsl.rb,
lib/cany/recipes/web_server.rb,
lib/cany/dpkg/deb_helper_recipe.rb
Defined Under Namespace
Modules: Dpkg, Recipes, VERSION Classes: MissingSpecification, MultipleSpecifications, Recipe, Specification
Class Method Summary collapse
Class Method Details
.setup(directory = '.') ⇒ Object
20 21 22 23 24 25 26 27 28 |
# File 'lib/cany.rb', line 20 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 |