build_groups: rename to build instead of group
This commit is contained in:
@@ -13,29 +13,29 @@ module Squib
|
||||
class Deck
|
||||
|
||||
# DSL method. See http://squib.readthedocs.org
|
||||
def group grp = :all, &block
|
||||
def build grp = :all, &block
|
||||
raise 'Please provide a block' unless block_given?
|
||||
block.yield if groups.include? grp
|
||||
end
|
||||
|
||||
# DSL method. See http://squib.readthedocs.org
|
||||
def enable_group grp
|
||||
groups # make sure it's initialized
|
||||
def enable_build grp
|
||||
build_groups # make sure it's initialized
|
||||
@build_groups << grp
|
||||
end
|
||||
|
||||
# DSL method. See http://squib.readthedocs.org
|
||||
def disable_group grp
|
||||
groups # make sure it's initialized
|
||||
def disable_build grp
|
||||
build_groups # make sure it's initialized
|
||||
@build_groups.delete grp
|
||||
end
|
||||
|
||||
# DSL method. See http://squib.readthedocs.org
|
||||
def groups
|
||||
def build_groups
|
||||
@build_groups ||= Set.new.add(:all)
|
||||
end
|
||||
|
||||
# DSL method. See http://squib.readthedocs.org
|
||||
# Not a DSL method, but initialized from Deck.new
|
||||
def enable_groups_from_env!
|
||||
return if ENV['SQUIB_BUILD'].nil?
|
||||
ENV['SQUIB_BUILD'].split(',').each do |grp|
|
||||
|
||||
Reference in New Issue
Block a user