fontello_rails_converter 0.4.4 → 0.4.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 982b6baa3ceb53883accd712437d1f2f84ca6562
4
- data.tar.gz: 8b49d6a8dc12ee79798c0cf2373e8a809f1d641d
3
+ metadata.gz: e1ffcba90c308427abde64ffabd37fc72b39c555
4
+ data.tar.gz: 7b2292e0122adfbc695039f20558e1f2cd5ec05d
5
5
  SHA512:
6
- metadata.gz: 5295f63e754144187333a0f248b3c28bf7310875f7f68fba28edd4965c5d16f1a9ea257d17d225509730302cacefae42f0229c0d692a85b1f49bdcb888ca6d86
7
- data.tar.gz: 40019fbdc489b51b1e964391c9743da7bc5607662f5c6e71140031d6e771842586381cb2deb20777f82fe2dd4f085dac4eeb46693d5da72efaaeb68e5fe7f082
6
+ metadata.gz: 42ab2f6280d8460addcb86bf702dcf257b304056b1b1e475f2679ae92a6309bde3ae68557ec082f64c43abcc45f487357fb097e0c6a2407be481e7476a56506f
7
+ data.tar.gz: 28bb7cbdf35d770864090aa6a53400834cf0128c9dcfa3c586d5deeaafb22a3d7f7d16517345e670a099205d071c2bf9823c5db2d8fdd43a069d68dd54d53464
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 0.4.5
2
+
3
+ * [bugfix] embedded base64 fonts (using `url()`) were not decoded correctly #43
4
+
1
5
  # 0.4.4
2
6
 
3
7
  * added .woff2 support #41
@@ -96,7 +96,9 @@ module FontelloRailsConverter
96
96
  def convert_for_asset_pipeline(content)
97
97
  # asset URLs
98
98
  content.gsub! /\.\.\/font\//, ""
99
- content.gsub!(/url\(([^\(]+)\)/) { |m| "font-url(#{$1})" }
99
+ content.gsub!(/url\(([^\(]+)\)/) do |m|
100
+ $1.include?("application/octet-stream") ? "url(#{$1})" : "font-url(#{$1})"
101
+ end
100
102
  end
101
103
 
102
104
  def sass_enhance(content)
@@ -1,3 +1,3 @@
1
1
  module FontelloRailsConverter
2
- VERSION = "0.4.4"
2
+ VERSION = "0.4.5"
3
3
  end
data/spec/cli_spec.rb CHANGED
@@ -34,6 +34,17 @@ describe FontelloRailsConverter::Cli do
34
34
  end
35
35
  end
36
36
 
37
+ describe '#convert_for_asset_pipeline' do
38
+ specify do
39
+ expect(cli.send(:convert_for_asset_pipeline, "url(/this/is/a/link)")).to eql 'font-url(/this/is/a/link)'
40
+ end
41
+
42
+ specify do
43
+ expect(cli.send(:convert_for_asset_pipeline, "url(data:application/octet-stream;base64,FFF)")).to eql 'url(data:application/octet-stream;base64,FFF)'
44
+ end
45
+ end
46
+
47
+
37
48
  describe '#fontello_name' do
38
49
  context 'no config_file specified' do
39
50
  let(:cli) { described_class.new({}) }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fontello_rails_converter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.4
4
+ version: 0.4.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jakob Hilden
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-02 00:00:00.000000000 Z
11
+ date: 2016-09-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubyzip
@@ -148,7 +148,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
148
148
  version: '0'
149
149
  requirements: []
150
150
  rubyforge_project:
151
- rubygems_version: 2.4.7
151
+ rubygems_version: 2.5.1
152
152
  signing_key:
153
153
  specification_version: 4
154
154
  summary: CLI gem for comfortably working with custom icon fonts from fontello.com