tasks/converter.rb in patternfly-sass-1.2.0 vs tasks/converter.rb in patternfly-sass-1.2.1

- old
+ new

@@ -12,11 +12,11 @@ def initialize(options) defaults = { :branch => 'master', :repo => 'patternfly/patternfly', :cache_path => 'tmp/converter-cache-patternfly', - :test_dir => 'tests/patternfly' + :test_dir => 'spec/html' } options = defaults.merge(options) super(:repo => options[:repo], :cache_path => options[:cache_path], :branch => options[:branch]) @save_to = { :scss => 'assets/stylesheets/patternfly', @@ -119,16 +119,17 @@ when 'mixin_overrides.less' NESTED_MIXINS.each do |selector, prefix| file = flatten_mixins(file, selector, prefix) end when 'variables.less' + file = insert_default_vars(file) file = ['$patternfly-sass-asset-helper: false !default;', file].join("\n") file = replace_all(file, %r{"../img"}, '"../images"') - file = replace_all file, %r{(\$font-path): (\s*)"(.*)";}, '\\1: \\2if($patternfly-sass-asset-helper, "patternfly", "\\3/patternfly");' - file = replace_all file, %r{(\$img-path): (\s*)"(.*)";}, '\\1: \\2if($patternfly-sass-asset-helper, "patternfly", "\\3/patternfly");' - file = replace_all file, %r{(\$icon-font-path): (\s*)"(.*)";\n}, '' - file = replace_all file, %r{(\$fa-font-path): (\s*)"(.*)";\n}, '' + file = replace_all file, %r{(\$font-path): (\s*)"(.*)" (!default);}, '\\1: \\2if($patternfly-sass-asset-helper, "patternfly", "\\3/patternfly") \\4;' + file = replace_all file, %r{(\$img-path): (\s*)"(.*)" (!default);}, '\\1: \\2if($patternfly-sass-asset-helper, "patternfly", "\\3/patternfly") \\4;' + file = replace_all file, %r{(\$icon-font-path): (\s*)"(.*)" (!default);\n}, '' + file = replace_all file, %r{(\$fa-font-path): (\s*)"(.*)" (!default);\n}, '' when 'patternfly.less' file = fix_top_level(file) # This is a hack. We want bootstrap-select to be placed in # the final compiled CSS, but Sass doesn't insert a file's contents @@ -310,13 +311,9 @@ unless File.directory?(File.dirname(save_path)) FileUtils.mkdir_p(File.dirname(save_path)) end save_file(save_path, content) end - # Load external dependencies for testing - `bower install` - # This is a workaround for removing the obsoletely installed bootstrap and jquery - FileUtils.rm_rf 'tests/components/bootstrap' end def fixup_path(hash) Hash[hash.map { |k, v| ["dist/#{k}", v] }] end