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: 9063a648e09ffaf652d7d00d7213e654f8dc5025
4
- data.tar.gz: c8838c695ad6796bb5192fd9d4c3e86cabab45af
3
+ metadata.gz: 943984d8ce5d131f06921104850e97defd44613d
4
+ data.tar.gz: d33b774d8f9df3ba11fc3f5218a97533f97aa781
5
5
  SHA512:
6
- metadata.gz: a28c9df0f7e4e8b5f38fdb5363a5a8943d87c842fa82acfcbf339cc73bc4664c3e69c6f639674fc58662c256d1db316370c4dcad3b1e3614b99ba87c6d087543
7
- data.tar.gz: 41955c5cc6713531928e0b26751d011481c0db1a7c71ff3c5abf6c043ed8215ccc4a82efd10ece7e2cbeb0a297bff6b0d0ee4fdb37358612f928cedd447bbcf1
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
+ }
@@ -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 = /([=\'\"\(,] *)([^\s\'\"\)>]+(#{Regexp.union(exts)}))/
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
 
@@ -1,5 +1,5 @@
1
1
  module Middleman
2
2
  # Current Version
3
3
  # @return [String]
4
- VERSION = '4.0.0.rc.3' unless const_defined?(:VERSION)
4
+ VERSION = '4.0.0' unless const_defined?(:VERSION)
5
5
  end
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.rc.3
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-14 00:00:00.000000000 Z
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: 1.3.1
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