Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Allow overriding of test output path

  • Loading branch information...
commit 3075ffe77c4a456eff410a428c249939b96694ca 1 parent d9131c5
Joshua Clayton authored May 19, 2011

Showing 1 changed file with 4 additions and 2 deletions. Show diff stats Hide diff stats

  1. 6  lib/blueprint/compressor.rb
6  lib/blueprint/compressor.rb
@@ -8,7 +8,7 @@ class Compressor
8 8
                   "parts/grid.html",
9 9
                   "parts/sample.html"]
10 10
 
11  
-    attr_accessor :namespace, :custom_css, :custom_layout, :semantic_classes, :project_name, :plugins
  11
+    attr_accessor :namespace, :custom_css, :custom_layout, :semantic_classes, :project_name, :plugins, :custom_tests_path
12 12
     attr_reader   :custom_path, :loaded_from_settings, :destination_path, :script_name
13 13
 
14 14
     # overridden setter method for destination_path
@@ -66,6 +66,8 @@ def options #:nodoc:#
66 66
               "Set a new gutter width (in pixels) for the output grid") {|gw| self.custom_layout.gutter_width = gw }
67 67
         o.on( "--column_count=COLUMN_COUNT", Integer,
68 68
               "Set a new column count for the output grid") {|cc| self.custom_layout.column_count = cc }
  69
+        o.on( "--custom_tests_path=TESTS_OUTPUT_PATH", String,
  70
+              "Define a different path to output generated test files to") {|test_path| self.custom_tests_path = test_path }
69 71
         #o.on("-v", "--verbose", "Turn on verbose output.") { |$verbose| }
70 72
         o.on("-h", "--help", "Show this help message.") { puts o; exit }
71 73
       end
@@ -229,7 +231,7 @@ def append_semantic_classes
229 231
     def generate_tests
230 232
       puts "\n    Updating namespace to \"#{namespace}\" in test files:"
231 233
       test_files = Compressor::TEST_FILES.map do |file|
232  
-        File.join(Blueprint::TEST_PATH, *file.split(/\//))
  234
+        File.join(self.custom_tests_path || Blueprint::TEST_PATH, *file.split(/\//))
233 235
       end
234 236
 
235 237
       test_files.each do |file|

0 notes on commit 3075ffe

Please sign in to comment.
Something went wrong with that request. Please try again.