Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Allow overriding of test output path

  • Loading branch information...
commit 3075ffe77c4a456eff410a428c249939b96694ca 1 parent d9131c5
@joshuaclayton authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 lib/blueprint/compressor.rb
View
6 lib/blueprint/compressor.rb
@@ -8,7 +8,7 @@ class Compressor
"parts/grid.html",
"parts/sample.html"]
- attr_accessor :namespace, :custom_css, :custom_layout, :semantic_classes, :project_name, :plugins
+ attr_accessor :namespace, :custom_css, :custom_layout, :semantic_classes, :project_name, :plugins, :custom_tests_path
attr_reader :custom_path, :loaded_from_settings, :destination_path, :script_name
# overridden setter method for destination_path
@@ -66,6 +66,8 @@ def options #:nodoc:#
"Set a new gutter width (in pixels) for the output grid") {|gw| self.custom_layout.gutter_width = gw }
o.on( "--column_count=COLUMN_COUNT", Integer,
"Set a new column count for the output grid") {|cc| self.custom_layout.column_count = cc }
+ o.on( "--custom_tests_path=TESTS_OUTPUT_PATH", String,
+ "Define a different path to output generated test files to") {|test_path| self.custom_tests_path = test_path }
#o.on("-v", "--verbose", "Turn on verbose output.") { |$verbose| }
o.on("-h", "--help", "Show this help message.") { puts o; exit }
end
@@ -229,7 +231,7 @@ def append_semantic_classes
def generate_tests
puts "\n Updating namespace to \"#{namespace}\" in test files:"
test_files = Compressor::TEST_FILES.map do |file|
- File.join(Blueprint::TEST_PATH, *file.split(/\//))
+ File.join(self.custom_tests_path || Blueprint::TEST_PATH, *file.split(/\//))
end
test_files.each do |file|
Please sign in to comment.
Something went wrong with that request. Please try again.