Skip to content

Commit

Permalink
woff2 support
Browse files Browse the repository at this point in the history
  • Loading branch information
glebm committed Jan 17, 2015
1 parent 64211e6 commit 3e33c6f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/bootstrap-sass/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class Engine < ::Rails::Engine
%w(stylesheets javascripts fonts images).each do |sub|
app.config.assets.paths << root.join('assets', sub).to_s
end
app.config.assets.precompile << %r(bootstrap/glyphicons-halflings-regular\.(?:eot|svg|ttf|woff)$)
app.config.assets.precompile << %r(bootstrap/glyphicons-halflings-regular\.(?:eot|svg|ttf|woff2?)$)
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion tasks/converter/fonts_conversion.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def process_font_assets
end

def bootstrap_font_files
@bootstrap_font_files ||= get_paths_by_type('fonts', /\.(eot|svg|ttf|woff)$/)
@bootstrap_font_files ||= get_paths_by_type('fonts', /\.(eot|svg|ttf|woff2?)$/)
end
end
end
2 changes: 1 addition & 1 deletion test/sprockets_rails_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def test_sprockets_digest_asset_refs
assert compiled, 'Could not precompile assets'
Dir.glob(File.join(root, 'public', 'assets', 'app*.{css,js}')) do |path|
File.open(path, 'r') do |f|
f.read.scan /url\("?[^"]+\.(?:jpg|png|eot|woff|ttf|svg)[^"]*"?\)/ do |m|
f.read.scan /url\("?[^"]+\.(?:jpg|png|eot|woff2?|ttf|svg)[^"]*"?\)/ do |m|
assert_match /-[0-9a-f]{12,}\./, m
end
end
Expand Down

0 comments on commit 3e33c6f

Please sign in to comment.