middleman-core 4.0.0.rc.3 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 943984d8ce5d131f06921104850e97defd44613d
|
|
4
|
+
data.tar.gz: d33b774d8f9df3ba11fc3f5218a97533f97aa781
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 933d5babdb56a3bf292c5e2c6503fc2932f9cf6c38592ce7456ed8e2f574b2f59f495cbe050701d5c8e9d71c607d61d41c53fa81b5c371a55f94578cfa56f159
|
|
7
|
+
data.tar.gz: 867ddaef10a672e7b027fc033217975caccc1b713a0a37c67f5cba9709d8ef5350ae2dadf07b5df6622a7ac609847c4e0abf42222d08f541016246817ccc3d0a
|
|
@@ -41,6 +41,11 @@ Feature: Relative Assets
|
|
|
41
41
|
And I should see 'url(../fonts/roboto/roboto-regular-webfont.woff'
|
|
42
42
|
And I should see 'url(../fonts/roboto/roboto-regular-webfont.ttf'
|
|
43
43
|
And I should see 'url(../fonts/roboto/roboto-regular-webfont.svg'
|
|
44
|
+
When I go to "/stylesheets/fonts2.css"
|
|
45
|
+
Then I should see 'url(../fonts/roboto/roboto-regular-webfont.eot'
|
|
46
|
+
And I should see 'url(../fonts/roboto/roboto-regular-webfont.woff'
|
|
47
|
+
And I should see 'url(../fonts/roboto/roboto-regular-webfont.ttf'
|
|
48
|
+
And I should see 'url(../fonts/roboto/roboto-regular-webfont.svg'
|
|
44
49
|
|
|
45
50
|
Scenario: Building css with the feature enabled
|
|
46
51
|
Given a fixture app "relative-assets-app"
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
@font-face {
|
|
2
|
+
font-family: 'Roboto';
|
|
3
|
+
src: url(/fonts/roboto/roboto-regular-webfont.eot);
|
|
4
|
+
src: url(/fonts/roboto/roboto-regular-webfont.eot?#iefix) format('embedded-opentype'),
|
|
5
|
+
url(/fonts/roboto/roboto-regular-webfont.woff) format('woff'),
|
|
6
|
+
url(/fonts/roboto/roboto-regular-webfont.ttf) format('truetype'),
|
|
7
|
+
url(/fonts/roboto/roboto-regular-webfont.svg#robotoregular) format('svg');
|
|
8
|
+
font-weight: normal;
|
|
9
|
+
font-style: normal;
|
|
10
|
+
}
|
data/lib/middleman-core/util.rb
CHANGED
|
@@ -332,12 +332,19 @@ module Middleman
|
|
|
332
332
|
|
|
333
333
|
Contract String, String, ArrayOf[String], Proc => String
|
|
334
334
|
def rewrite_paths(body, _path, exts, &_block)
|
|
335
|
-
matcher = /([=\'\"\(,]
|
|
335
|
+
matcher = /([=\'\"\(,]\s*)([^\s\'\"\)>]+(#{Regexp.union(exts)}))/
|
|
336
|
+
|
|
337
|
+
url_fn_prefix = 'url('
|
|
336
338
|
|
|
337
339
|
body.dup.gsub(matcher) do |match|
|
|
338
340
|
opening_character = $1
|
|
339
341
|
asset_path = $2
|
|
340
342
|
|
|
343
|
+
if asset_path.start_with?(url_fn_prefix)
|
|
344
|
+
opening_character << url_fn_prefix
|
|
345
|
+
asset_path = asset_path[url_fn_prefix.length..-1]
|
|
346
|
+
end
|
|
347
|
+
|
|
341
348
|
begin
|
|
342
349
|
uri = ::Addressable::URI.parse(asset_path)
|
|
343
350
|
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: middleman-core
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 4.0.0
|
|
4
|
+
version: 4.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Thomas Reynolds
|
|
@@ -10,7 +10,7 @@ authors:
|
|
|
10
10
|
autorequire:
|
|
11
11
|
bindir: bin
|
|
12
12
|
cert_chain: []
|
|
13
|
-
date: 2015-12-
|
|
13
|
+
date: 2015-12-16 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: bundler
|
|
@@ -1217,6 +1217,7 @@ files:
|
|
|
1217
1217
|
- fixtures/relative-assets-app/source/relative_image.html.erb
|
|
1218
1218
|
- fixtures/relative-assets-app/source/relative_image_absolute_css.html.erb
|
|
1219
1219
|
- fixtures/relative-assets-app/source/stylesheets/fonts.css
|
|
1220
|
+
- fixtures/relative-assets-app/source/stylesheets/fonts2.css.scss
|
|
1220
1221
|
- fixtures/relative-assets-app/source/stylesheets/relative_assets.css.sass
|
|
1221
1222
|
- fixtures/sass-assets-path-app/assets/stylesheets/_shared-asset-sass.sass
|
|
1222
1223
|
- fixtures/sass-assets-path-app/assets/stylesheets/_shared-asset.scss
|
|
@@ -1410,9 +1411,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
1410
1411
|
version: 2.0.0
|
|
1411
1412
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
1412
1413
|
requirements:
|
|
1413
|
-
- - "
|
|
1414
|
+
- - ">="
|
|
1414
1415
|
- !ruby/object:Gem::Version
|
|
1415
|
-
version:
|
|
1416
|
+
version: '0'
|
|
1416
1417
|
requirements: []
|
|
1417
1418
|
rubyforge_project:
|
|
1418
1419
|
rubygems_version: 2.4.8
|
|
@@ -2350,6 +2351,7 @@ test_files:
|
|
|
2350
2351
|
- fixtures/relative-assets-app/source/relative_image.html.erb
|
|
2351
2352
|
- fixtures/relative-assets-app/source/relative_image_absolute_css.html.erb
|
|
2352
2353
|
- fixtures/relative-assets-app/source/stylesheets/fonts.css
|
|
2354
|
+
- fixtures/relative-assets-app/source/stylesheets/fonts2.css.scss
|
|
2353
2355
|
- fixtures/relative-assets-app/source/stylesheets/relative_assets.css.sass
|
|
2354
2356
|
- fixtures/sass-assets-path-app/assets/stylesheets/_shared-asset-sass.sass
|
|
2355
2357
|
- fixtures/sass-assets-path-app/assets/stylesheets/_shared-asset.scss
|