Allow hidden frameworks.

This commit is contained in:
Chris Eppstein 2010-04-07 09:00:49 -07:00
parent fbeaa1fdff
commit bf34ddb0dd
4 changed files with 5 additions and 2 deletions

View File

@ -24,6 +24,7 @@ To get help on a particular command please specify the command.
banner << "\nAvailable Frameworks & Patterns:\n\n" banner << "\nAvailable Frameworks & Patterns:\n\n"
Compass::Frameworks::ALL.each do |framework| Compass::Frameworks::ALL.each do |framework|
next if framework.name =~ /^_/
banner << " * #{framework.name}\n" banner << " * #{framework.name}\n"
framework.template_directories.each do |pattern| framework.template_directories.each do |pattern|
banner << " - #{framework.name}/#{pattern}" banner << " - #{framework.name}/#{pattern}"

View File

@ -8,7 +8,7 @@ module Compass
def execute def execute
Compass::Frameworks::ALL.each do |framework| Compass::Frameworks::ALL.each do |framework|
puts framework.name puts framework.name unless framework.name =~ /^_/
end end
end end
end end

View File

@ -51,7 +51,8 @@ module Compass
def discover(frameworks_directory) def discover(frameworks_directory)
frameworks_directory = DEFAULT_FRAMEWORKS_PATH if frameworks_directory == :defaults frameworks_directory = DEFAULT_FRAMEWORKS_PATH if frameworks_directory == :defaults
frameworks_directory = Dir.new(frameworks_directory) unless frameworks_directory.is_a?(Dir) frameworks_directory = Dir.new(frameworks_directory) unless frameworks_directory.is_a?(Dir)
frameworks_directory.entries.reject{|e| e[0] == ?.}.each do |framework| dirs = frameworks_directory.entries.reject{|e| e =~ /^\./}.sort_by{|n| n =~ /^_/ ? n[1..-1] : n}
dirs.each do |framework|
register_directory File.join(frameworks_directory.path, framework) register_directory File.join(frameworks_directory.path, framework)
end end
end end

View File

@ -36,6 +36,7 @@ class CommandLineTest < Test::Unit::TestCase
end end
Compass::Frameworks::ALL.each do |framework| Compass::Frameworks::ALL.each do |framework|
next if framework.name =~ /^_/
define_method "test_#{framework.name}_installation" do define_method "test_#{framework.name}_installation" do
within_tmp_directory do within_tmp_directory do
compass *%W(--boring --framework #{framework.name} #{framework.name}_project) compass *%W(--boring --framework #{framework.name} #{framework.name}_project)