tasks/converter.rb in patternfly-sass-3.6.0 vs tasks/converter.rb in patternfly-sass-3.7.0

- old
+ new

@@ -1,8 +1,9 @@ BOOTSTRAP_GEM_ROOT = Gem::Specification.find_by_name("bootstrap-sass").gem_dir require "#{BOOTSTRAP_GEM_ROOT}/tasks/converter/less_conversion" require 'rugged' +require 'jekyll' class Converter include Converter::LessConversion TEST_DIR = File.join('spec', 'html') @@ -36,10 +37,11 @@ @source = File.join(@cache_path, 'repository') end def convert checkout_upstream + build_tests copy_non_less process_stylesheets store_version FileUtils.rm_rf(@cache_path) # Clean up the repository & the cache end @@ -186,10 +188,20 @@ def generate_top_level less_to_sass('patternfly.less', top_level_files.map { |f| File.read(f) }.join("\n")) end + def build_tests + tsrc = File.join(@source, 'tests', 'pages') + conf = Jekyll.configuration( + 'config' => File.join(tsrc, '_config.yml'), + 'source' => tsrc, + 'destination' => TEST_DIR + ) + Jekyll::Site.new(conf).process + end + def copy_non_less copy_config.each do |asset| FileUtils.rm_rf(asset[:destination]) retrieve_files(asset[:source], asset[:select], asset[:reject]).each do |f| copy_with_path(f, asset[:source], asset[:destination]) @@ -279,15 +291,9 @@ { :source => File.join(@source, 'dist', 'js'), :select => /\.js$/, :reject => nil, :destination => File.join(@destination, 'javascripts') - }, - { - :source => File.join(@source, 'tests'), - :select => /.*/, - :reject => nil, - :destination => TEST_DIR }, { :source => File.join(@source, 'dist', 'css'), :select => /css/, :reject => /styles(-additions)?(\.min)?\.css/,