module Webgen::Task::CreateBundle
Creates an extension bundle.
An extension bundle is a collection of webgen extensions. This task can either create a local bundle (in the ext
directory of the current website) or a bundle which can be distributed via Rubygems.
Constants
- TEMPLATE_DIR
Public Class Methods
call(website, name, type, directory = name)
click to toggle source
Create an extension bundle with the given name and of the given type (either :local or :gem).
If the type is :gem, the directory in which the bundle should be created can optionally be specified.
Returns true
if the bundle has been created.
# File lib/webgen/task/create_bundle.rb 25 def self.call(website, name, type, directory = name) 26 dir = if type == :gem 27 create_distribution_bundle(website, directory, name) 28 else 29 create_local_bundle(website, name) 30 end 31 website.logger.info { "Bundle '#{name}' of type '#{type}' created at <#{dir}>" } 32 33 true 34 end