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 +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/fontello_rails_converter/cli.rb +3 -1
- data/lib/fontello_rails_converter/version.rb +1 -1
- data/spec/cli_spec.rb +11 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e1ffcba90c308427abde64ffabd37fc72b39c555
|
4
|
+
data.tar.gz: 7b2292e0122adfbc695039f20558e1f2cd5ec05d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 42ab2f6280d8460addcb86bf702dcf257b304056b1b1e475f2679ae92a6309bde3ae68557ec082f64c43abcc45f487357fb097e0c6a2407be481e7476a56506f
|
7
|
+
data.tar.gz: 28bb7cbdf35d770864090aa6a53400834cf0128c9dcfa3c586d5deeaafb22a3d7f7d16517345e670a099205d071c2bf9823c5db2d8fdd43a069d68dd54d53464
|
data/CHANGELOG.md
CHANGED
@@ -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\(([^\(]+)\)/)
|
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)
|
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
|
+
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-
|
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.
|
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
|