middleman-core 4.0.0 → 4.1.0.rc.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (65) hide show
  1. checksums.yaml +4 -4
  2. data/features/asset_hash.feature +63 -0
  3. data/features/asset_host.feature +14 -0
  4. data/features/cache_buster.feature +15 -1
  5. data/features/clean_build.feature +16 -0
  6. data/features/cli/preview_server.feature +6 -4
  7. data/features/cli_extension.feature +1 -1
  8. data/features/directory_index.feature +3 -1
  9. data/features/encoding_option.feature +28 -0
  10. data/features/i18n_mixed_sources.feature +39 -0
  11. data/features/ignore.feature +33 -4
  12. data/features/relative_assets.feature +14 -0
  13. data/features/support/env.rb +1 -1
  14. data/fixtures/asset-hash-app/source/index.html.erb +3 -0
  15. data/fixtures/asset-hash-app/source/layout.erb +3 -3
  16. data/fixtures/asset-hash-app/source/other.html.erb +3 -0
  17. data/fixtures/asset-hash-app/source/stylesheets/fragment.css.scss +7 -0
  18. data/fixtures/asset-hash-host-app/source/index.html.erb +3 -0
  19. data/fixtures/asset-hash-host-app/source/layout.erb +3 -3
  20. data/fixtures/asset-hash-host-app/source/other.html.erb +3 -0
  21. data/fixtures/asset-hash-host-app/source/stylesheets/fragment.css.scss +3 -0
  22. data/fixtures/i-8859-1-app/config.rb +1 -0
  23. data/fixtures/i-8859-1-app/source/index.html.erb +1 -0
  24. data/fixtures/i18n-mixed-sources/config.rb +1 -0
  25. data/fixtures/i18n-mixed-sources/locales/en.yml +4 -0
  26. data/fixtures/i18n-mixed-sources/locales/es.yml +4 -0
  27. data/fixtures/i18n-mixed-sources/source/a/sub.html.erb +9 -0
  28. data/fixtures/i18n-mixed-sources/source/b/index.html.erb +9 -0
  29. data/fixtures/i18n-mixed-sources/source/index.html.erb +9 -0
  30. data/fixtures/i18n-mixed-sources/source/localizable/a/index.html.erb +9 -0
  31. data/fixtures/i18n-mixed-sources/source/localizable/b/sub.html.erb +9 -0
  32. data/fixtures/i18n-mixed-sources/source/localizable/index.html.erb +9 -0
  33. data/fixtures/import-app/config.rb +1 -1
  34. data/fixtures/indexable-app/config.rb +1 -0
  35. data/fixtures/indexable-app/source/regex_leave_me_alone2.html +1 -0
  36. data/lib/middleman-core/application.rb +6 -5
  37. data/lib/middleman-core/builder.rb +7 -3
  38. data/lib/middleman-core/core_extensions/collections.rb +3 -1
  39. data/lib/middleman-core/core_extensions/collections/step_context.rb +6 -7
  40. data/lib/middleman-core/core_extensions/default_helpers.rb +2 -2
  41. data/lib/middleman-core/core_extensions/front_matter.rb +1 -0
  42. data/lib/middleman-core/core_extensions/i18n.rb +16 -9
  43. data/lib/middleman-core/core_extensions/routing.rb +1 -1
  44. data/lib/middleman-core/extension.rb +34 -0
  45. data/lib/middleman-core/extensions/asset_hash.rb +2 -0
  46. data/lib/middleman-core/extensions/asset_host.rb +2 -0
  47. data/lib/middleman-core/extensions/cache_buster.rb +2 -0
  48. data/lib/middleman-core/extensions/external_pipeline.rb +0 -2
  49. data/lib/middleman-core/extensions/gzip.rb +1 -1
  50. data/lib/middleman-core/extensions/relative_assets.rb +2 -0
  51. data/lib/middleman-core/load_paths.rb +1 -1
  52. data/lib/middleman-core/meta_pages/sitemap_resource.rb +1 -1
  53. data/lib/middleman-core/middleware/inline_url_rewriter.rb +10 -2
  54. data/lib/middleman-core/sitemap/extensions/ignores.rb +37 -39
  55. data/lib/middleman-core/sitemap/extensions/import.rb +24 -66
  56. data/lib/middleman-core/sitemap/extensions/move_file.rb +9 -38
  57. data/lib/middleman-core/sitemap/extensions/proxies.rb +20 -52
  58. data/lib/middleman-core/sitemap/extensions/traversal.rb +13 -1
  59. data/lib/middleman-core/sitemap/resource.rb +4 -9
  60. data/lib/middleman-core/sitemap/store.rb +10 -9
  61. data/lib/middleman-core/step_definitions/server_steps.rb +4 -0
  62. data/lib/middleman-core/util.rb +22 -24
  63. data/lib/middleman-core/version.rb +1 -1
  64. data/spec/middleman-core/util_spec.rb +10 -1
  65. metadata +34 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 943984d8ce5d131f06921104850e97defd44613d
4
- data.tar.gz: d33b774d8f9df3ba11fc3f5218a97533f97aa781
3
+ metadata.gz: 404deb8049bbd24929ef1847e8cd92598db4e61e
4
+ data.tar.gz: 758e2ac1ab487d3671e66cf3ac01c9fd5cc80f58
5
5
  SHA512:
6
- metadata.gz: 933d5babdb56a3bf292c5e2c6503fc2932f9cf6c38592ce7456ed8e2f574b2f59f495cbe050701d5c8e9d71c607d61d41c53fa81b5c371a55f94578cfa56f159
7
- data.tar.gz: 867ddaef10a672e7b027fc033217975caccc1b713a0a37c67f5cba9709d8ef5350ae2dadf07b5df6622a7ac609847c4e0abf42222d08f541016246817ccc3d0a
6
+ metadata.gz: 365df7410bf7945f84b566fc061b6b5aa60eada04c1bc2b28ccd1558ac90b04cd6132588212b601b7c89555d4b1bdcb5fb93bf9e7199cd140a3516338db72c52
7
+ data.tar.gz: 56a33ca43a78ca4e2078b77fd57c78c25c2d5badfbfb2c75a764e504d7c3150e51cff954852299d71d3cfc2255763c9feec535320a6e0e31f54bc3e5826cf1d5
@@ -64,9 +64,13 @@ Feature: Assets get file hashes appended to them and references to them are upda
64
64
  When I go to "/"
65
65
  Then I should see 'href="apple-touch-icon.png"'
66
66
  And I should see 'href="stylesheets/site-d2959d87.css"'
67
+ And I should see 'href="stylesheets/fragment-a06f0dfc.css"'
67
68
  And I should see 'src="javascripts/application-1d8d5276.js"'
68
69
  And I should see 'src="images/100px-5fd6fb90.jpg"'
69
70
  And I should see 'srcset="images/100px-5fd6fb90.jpg 1x, images/200px-c11eb203.jpg 2x, images/300px-59adce76.jpg 3x"'
71
+ And I should see 'src="images/100px-5fd6fb90.jpg?test"'
72
+ And I should see 'src="images/100px-5fd6fb90.jpg?#test"'
73
+ And I should see 'src="images/100px-5fd6fb90.jpg#test"'
70
74
  When I go to "/subdir/"
71
75
  Then I should see 'href="../stylesheets/site-d2959d87.css"'
72
76
  And I should see 'src="../javascripts/application-1d8d5276.js"'
@@ -75,6 +79,9 @@ Feature: Assets get file hashes appended to them and references to them are upda
75
79
  Then I should see 'href="../stylesheets/site-d2959d87.css"'
76
80
  And I should see 'src="../javascripts/application-1d8d5276.js"'
77
81
  And I should see 'src="../images/100px-5fd6fb90.jpg"'
82
+ And I should see 'src="../images/100px-5fd6fb90.jpg?test"'
83
+ And I should see 'src="../images/100px-5fd6fb90.jpg?#test"'
84
+ And I should see 'src="../images/100px-5fd6fb90.jpg#test"'
78
85
  When I go to "/javascripts/application-1d8d5276.js"
79
86
  Then I should see "img.src = '/images/100px-5fd6fb90.jpg'"
80
87
  When I go to "/stylesheets/site-d2959d87.css"
@@ -87,6 +94,11 @@ Feature: Assets get file hashes appended to them and references to them are upda
87
94
  Then I should see 'images/100px-5fd6fb90.gif'
88
95
  And I should see 'images/100px-5fd6fb90.jpg'
89
96
  And I should see 'images/100px-1242c368.png'
97
+ When I go to "/stylesheets/fragment-a06f0dfc.css"
98
+ And I should see 'url("../images/100px-5fd6fb90.jpg")'
99
+ And I should see 'url("../images/100px-5fd6fb90.jpg?test")'
100
+ And I should see 'url("../images/100px-5fd6fb90.jpg?#test")'
101
+ And I should see 'url("../images/100px-5fd6fb90.jpg#test")'
90
102
 
91
103
  Scenario: Hashed assets work with Slim
92
104
  Given the Server is running at "asset-hash-app"
@@ -99,13 +111,25 @@ Feature: Assets get file hashes appended to them and references to them are upda
99
111
  Given the Server is running at "asset-hash-host-app"
100
112
  When I go to "/"
101
113
  Then I should see 'href="http://middlemanapp.com/stylesheets/site-e587b659.css"'
114
+ Then I should see 'href="http://middlemanapp.com/stylesheets/fragment-7af0b5ab.css"'
102
115
  And I should see 'src="http://middlemanapp.com/images/100px-5fd6fb90.jpg"'
116
+ And I should see 'src="http://middlemanapp.com/images/100px-5fd6fb90.jpg?test"'
117
+ And I should see 'src="http://middlemanapp.com/images/100px-5fd6fb90.jpg?#test"'
118
+ And I should see 'src="http://middlemanapp.com/images/100px-5fd6fb90.jpg#test"'
103
119
  When I go to "/subdir/"
104
120
  Then I should see 'href="http://middlemanapp.com/stylesheets/site-e587b659.css"'
105
121
  And I should see 'src="http://middlemanapp.com/images/100px-5fd6fb90.jpg"'
106
122
  When I go to "/other/"
107
123
  Then I should see 'href="http://middlemanapp.com/stylesheets/site-e587b659.css"'
108
124
  And I should see 'src="http://middlemanapp.com/images/100px-5fd6fb90.jpg"'
125
+ And I should see 'src="http://middlemanapp.com/images/100px-5fd6fb90.jpg?test"'
126
+ And I should see 'src="http://middlemanapp.com/images/100px-5fd6fb90.jpg?#test"'
127
+ And I should see 'src="http://middlemanapp.com/images/100px-5fd6fb90.jpg#test"'
128
+ When I go to "/stylesheets/fragment-7af0b5ab.css"
129
+ And I should see 'url("http://middlemanapp.com/images/100px-5fd6fb90.jpg")'
130
+ And I should see 'url("http://middlemanapp.com/images/100px-5fd6fb90.jpg?test")'
131
+ And I should see 'url("http://middlemanapp.com/images/100px-5fd6fb90.jpg?#test")'
132
+ And I should see 'url("http://middlemanapp.com/images/100px-5fd6fb90.jpg#test")'
109
133
 
110
134
  Scenario: The asset hash should change when a SASS partial changes
111
135
  Given the Server is running at "asset-hash-app"
@@ -179,6 +203,45 @@ Feature: Assets get file hashes appended to them and references to them are upda
179
203
  | javascripts/application-1d8d5276.js |
180
204
  | stylesheets/site-7474cadd.css |
181
205
 
206
+ Scenario: Hashed-asset files are not replaced for rewrite ignored paths
207
+ Given a fixture app "asset-hash-app"
208
+ And a file named "config.rb" with:
209
+ """
210
+ is_stylesheet = proc { |path| path.start_with? '/stylesheets' }
211
+ activate :asset_hash, rewrite_ignore: [
212
+ %r(javascripts/*),
213
+ '/subdir/*',
214
+ is_stylesheet
215
+ ]
216
+ activate :relative_assets
217
+ activate :directory_indexes
218
+ """
219
+ And a successfully built app at "asset-hash-app"
220
+ When I cd to "build"
221
+ Then the following files should exist:
222
+ | index.html |
223
+ | subdir/index.html |
224
+ | images/100px-5fd6fb90.jpg |
225
+ | javascripts/application-1d8d5276.js |
226
+ | stylesheets/site-8bc55985.css |
227
+ And the following files should not exist:
228
+ | images/100px.jpg |
229
+ | javascripts/application.js |
230
+ | stylesheets/site.css |
231
+ And the file "javascripts/application-1d8d5276.js" should contain "img.src = '/images/100px.jpg'"
232
+ And the file "stylesheets/site-8bc55985.css" should contain:
233
+ """
234
+ background-image: url("../images/100px.jpg")
235
+ """
236
+ And the file "index.html" should contain 'href="stylesheets/site-8bc55985.css"'
237
+ And the file "index.html" should contain 'src="javascripts/application-1d8d5276.js"'
238
+ And the file "index.html" should contain 'src="images/100px-5fd6fb90.jpg"'
239
+ And the file "subdir/index.html" should contain:
240
+ """
241
+ <h2>Image url3:</h2>
242
+ <p><img src="../images/100px.jpg"></p>
243
+ """
244
+
182
245
  Scenario: Already minified files should still be hashed
183
246
  Given a successfully built app at "asset-hash-minified-app"
184
247
  When I cd to "build"
@@ -35,3 +35,17 @@ Feature: Alternate between multiple asset hosts
35
35
  When I go to "/stylesheets/asset_host.css"
36
36
  Then I should see content matching %r{http://assets1.example.com/}
37
37
  Then I should not see content matching %r{http://assets1.example.com//}
38
+
39
+ Scenario: Hosts are not rewritten for rewrite ignored paths
40
+ Given a fixture app "asset-host-app"
41
+ And a file named "config.rb" with:
42
+ """
43
+ activate :asset_host, host: "http://assets1.example.com", rewrite_ignore: [
44
+ '/stylesheets/asset_host.css',
45
+ ]
46
+ """
47
+ And the Server is running
48
+ When I go to "/asset_host.html"
49
+ Then I should see content matching %r{http://assets1.example.com/}
50
+ When I go to "/stylesheets/asset_host.css"
51
+ Then I should not see content matching %r{http://assets1.example.com/}
@@ -39,4 +39,18 @@ Feature: Generate mtime-based query string for busting browser caches
39
39
  And the Server is running at "cache-buster-app"
40
40
  When I go to "/cache-buster.html"
41
41
  Then I should see "site.css?"
42
- Then I should see "blank.gif?"
42
+ Then I should see "blank.gif?"
43
+
44
+ Scenario: URLs are not rewritten for rewrite ignored paths
45
+ Given a fixture app "cache-buster-app"
46
+ And a file named "config.rb" with:
47
+ """
48
+ activate :cache_buster, rewrite_ignore: [
49
+ '/cache-buster.html',
50
+ ]
51
+ """
52
+ And the Server is running at "cache-buster-app"
53
+ When I go to "/cache-buster.html"
54
+ Then I should see 'site.css"'
55
+ Then I should see 'empty-with-include.js"'
56
+ Then I should see 'blank.gif"'
@@ -16,6 +16,22 @@ Feature: Build Clean
16
16
  | build/should_be_ignored3.html |
17
17
  And the file "build/index.html" should contain "Comment in layout"
18
18
 
19
+ Scenario: Clean build has a whitelist
20
+ Given a fixture app "clean-app"
21
+ When a file named "build/.test" with:
22
+ """
23
+ Hello
24
+ """
25
+ When a file named "config.rb" with:
26
+ """
27
+ set :skip_build_clean do |path|
28
+ path =~ /\.test/
29
+ end
30
+ """
31
+ Given a built app at "clean-app"
32
+ Then the following files should exist:
33
+ | build/.test |
34
+
19
35
  Scenario: Clean build an app with newly ignored files and a nested output directory
20
36
  Given a fixture app "clean-nested-app"
21
37
  When a file named "config.rb" with:
@@ -42,7 +42,7 @@ Feature: Run the preview server
42
42
  Inspect your site configuration at "http://
43
43
  """
44
44
 
45
- @ruby-2.1
45
+ @wip
46
46
  Scenario: Start the server with defaults in verbose mode, when a local mdns server resolves the local hostname
47
47
  Given I start a mdns server for the local hostname
48
48
  When I run `middleman server --verbose` interactively
@@ -115,6 +115,7 @@ Feature: Run the preview server
115
115
  Inspect your site configuration at "http://127.0.0.1:4567/__middleman"
116
116
  """
117
117
 
118
+ @wip
118
119
  Scenario: Start the server with bind address 127.0.0.5
119
120
 
120
121
  This will have no hostname attached because the hosts file, the DNS server
@@ -359,7 +360,6 @@ Feature: Run the preview server
359
360
  The Middleman preview server is bound to ":::65432", "0.0.0.0:65432"
360
361
  """
361
362
 
362
- @ruby-2.1
363
363
  @wip
364
364
  Scenario: Start the server when port is blocked by other middleman instance
365
365
  Given `middleman server` is running in background
@@ -469,7 +469,8 @@ Feature: Run the preview server
469
469
  Inspect your site configuration at "http://www.example.com:4567/__middleman", "http://127.0.0.1:4567/__middleman"
470
470
  """
471
471
 
472
- @ruby-2.1
472
+ @ruby-2.1
473
+ @wip
473
474
  Scenario: Start the server with server name "host.local" and the link local name server is used to resolve the server name
474
475
 
475
476
  To make the mdns resolver resolve a name, it needs to end with ".local".
@@ -501,7 +502,8 @@ Feature: Run the preview server
501
502
  Inspect your site configuration at "http://host.local:4567/__middleman", "http://127.0.0.1:4567/__middleman"
502
503
  """
503
504
 
504
- @ruby-2.1
505
+ @ruby-2.1
506
+ @wip
505
507
  Scenario: Start the server with server name "host" and the link local name server is used to resolve the server name
506
508
 
507
509
  To make the mdns resolver resolve a name, it needs to end with ".local". If
@@ -9,6 +9,6 @@ Feature: Middleman New Extension CLI
9
9
  | Rakefile |
10
10
  | my-extension-library.gemspec |
11
11
  | features/support/env.rb |
12
- | lib/middleman_extension.rb |
12
+ | lib/my-extension-library/extension.rb |
13
13
  | lib/my-extension-library.rb |
14
14
  | .gitignore |
@@ -9,6 +9,7 @@ Feature: Directory Index
9
9
  | a_folder/needs_index/index.html |
10
10
  | leave_me_alone.html |
11
11
  | wildcard_leave_me_alone.html |
12
+ | regex_leave_me_alone2.html |
12
13
  | evil spaces/index.html |
13
14
  | regular/index.html |
14
15
  | .htaccess |
@@ -21,12 +22,13 @@ Feature: Directory Index
21
22
  | a_folder/needs_index.html |
22
23
  | leave_me_alone/index.html |
23
24
  | wildcard_leave_me_alone/index.html |
25
+ | regex_leave_me_alone2/index.html |
24
26
  And the file "needs_index/index.html" should contain "Indexable"
25
27
  And the file "a_folder/needs_index/index.html" should contain "Indexable"
26
28
  And the file "leave_me_alone.html" should contain "Stay away"
27
29
  And the file "regular/index.html" should contain "Regular"
28
30
  And the file "evil spaces/index.html" should contain "Filled with Evil Spaces"
29
-
31
+
30
32
  Scenario: Preview normal file
31
33
  Given the Server is running at "indexable-app"
32
34
  When I go to "/needs_index/"
@@ -0,0 +1,28 @@
1
+ # encoding: iso-8859-1
2
+ Feature: encoding option
3
+
4
+ Scenario: No encoding set
5
+ Given a fixture app "clean-app"
6
+ Given the Server is running at "clean-app"
7
+
8
+ When I go to "/index.html"
9
+ Then the "Content-Type" header should contain "text/html"
10
+ Then the "Content-Type" header should contain "charset=utf-8"
11
+
12
+ @wip
13
+ Scenario: Custom encoding set
14
+ Given a fixture app "i-8859-1-app"
15
+ And a file named "config.rb" with:
16
+ """
17
+ set :encoding, "ISO-8859-1"
18
+
19
+ ::Rack::Mime::MIME_TYPES['.html'] = 'text/html; charset=iso-8859-1'
20
+ ::Rack::Mime::MIME_TYPES['.htm'] = 'text/html; charset=iso-8859-1'
21
+ ::Rack::Mime::MIME_TYPES['.map'] = 'application/json; charset=iso-8859-1'
22
+ """
23
+ Given the Server is running at "i-8859-1-app"
24
+
25
+ When I go to "/index.html"
26
+ Then the "Content-Type" header should contain "text/html"
27
+ Then the "Content-Type" header should contain "charset=iso-8859-1"
28
+ Then I should see "äöü"
@@ -0,0 +1,39 @@
1
+ Feature: i18n merging path trees
2
+
3
+ Scenario: Mixing localized and non-localized sources and merging the path trees (see issue #1709)
4
+ Given a fixture app "i18n-test-app"
5
+ And a file named "config.rb" with:
6
+ """
7
+ activate :i18n, mount_at_root: :en, langs: [:en, :es]
8
+ """
9
+ Given the Server is running at "i18n-mixed-sources"
10
+
11
+ When I go to "/"
12
+ Then I should see "Current locale: en"
13
+ Then I should see "path: is-localized Home"
14
+ When I go to "/es"
15
+ Then I should see "Current locale: es"
16
+ Then I should see "path: is-localized Home"
17
+
18
+ When I go to "/a/"
19
+ Then I should see "Current locale: en"
20
+ Then I should see "path: is-localized Home # a/index.html.erb"
21
+ When I go to "/es/a/"
22
+ Then I should see "Current locale: es"
23
+ Then I should see "path: is-localized Home # a/index.html.erb"
24
+
25
+ When I go to "/b/"
26
+ Then I should see "Current locale: en"
27
+ Then I should see "path: is-localized Home # b/index.html.erb"
28
+
29
+ When I go to "/a/sub.html"
30
+ Then I should see "Current locale: en"
31
+ Then I should see "path: is-localized Home # a/index.html.erb # a/sub.html.erb"
32
+
33
+ When I go to "/b/sub.html"
34
+ Then I should see "Current locale: en"
35
+ Then I should see "path: is-localized Home # b/index.html.erb # b/sub.html.erb"
36
+
37
+ When I go to "/es/b/sub.html"
38
+ Then I should see "Current locale: es"
39
+ Then I should see "path: is-localized Home # b/index.html.erb # b/sub.html.erb"
@@ -12,7 +12,7 @@ Feature: Ignoring paths
12
12
  And the following files should not exist:
13
13
  | build/plain.html |
14
14
  | build/about.html |
15
-
15
+
16
16
  Scenario: Ignore a single path (server)
17
17
  Given a fixture app "ignore-app"
18
18
  And a file named "config.rb" with:
@@ -28,6 +28,35 @@ Feature: Ignoring paths
28
28
  When I go to "/about.html"
29
29
  Then I should see "File Not Found"
30
30
 
31
+ Scenario: Ignoring collected values
32
+ Given a fixture app "ignore-app"
33
+ And a file named "data/ignores.yaml" with:
34
+ """
35
+ ---
36
+ - "plain"
37
+ """
38
+ And a file named "config.rb" with:
39
+ """
40
+ data.ignores.each do |name|
41
+ ignore "#{name}.html"
42
+ end
43
+ """
44
+ And the Server is running
45
+ When I go to "/plain.html"
46
+ Then I should see "File Not Found"
47
+ When I go to "/about.html"
48
+ Then I should not see "File Not Found"
49
+
50
+ When the file "data/ignores.yaml" has the contents
51
+ """
52
+ ---
53
+ - "about"
54
+ """
55
+ When I go to "/plain.html"
56
+ Then I should not see "File Not Found"
57
+ When I go to "/about.html"
58
+ Then I should see "File Not Found"
59
+
31
60
  Scenario: Ignore a globbed path (build)
32
61
  Given a fixture app "ignore-app"
33
62
  And a file named "config.rb" with:
@@ -47,7 +76,7 @@ Feature: Ignoring paths
47
76
  | build/reports/index.html |
48
77
  | build/reports/another.html |
49
78
  | build/images/icons/messages.png |
50
-
79
+
51
80
  Scenario: Ignore a globbed path (server)
52
81
  Given a fixture app "ignore-app"
53
82
  And a file named "config.rb" with:
@@ -93,7 +122,7 @@ Feature: Ignoring paths
93
122
  | build/reports/index.html |
94
123
  | build/reports/another.html |
95
124
  | build/images/icons/messages.png |
96
-
125
+
97
126
  Scenario: Ignore a regex (server)
98
127
  Given a fixture app "ignore-app"
99
128
  And a file named "config.rb" with:
@@ -118,4 +147,4 @@ Feature: Ignoring paths
118
147
  When I go to "/reports/another.html"
119
148
  Then I should see "File Not Found"
120
149
  When I go to "/images/icons/messages.png"
121
- Then I should see "File Not Found"
150
+ Then I should see "File Not Found"
@@ -132,3 +132,17 @@ Feature: Relative Assets
132
132
  And the Server is running at "relative-assets-app"
133
133
  When I go to "/sub/image_tag.html"
134
134
  Then I should see '<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" />'
135
+
136
+ Scenario: URLs are not rewritten for rewrite ignored paths
137
+ Given a fixture app "relative-assets-app"
138
+ And a file named "config.rb" with:
139
+ """
140
+ activate :relative_assets, rewrite_ignore: [
141
+ '/stylesheets/fonts.css',
142
+ ]
143
+ """
144
+ And the Server is running at "relative-assets-app"
145
+ When I go to "/stylesheets/relative_assets.css"
146
+ Then I should see 'url("../images/blank.gif'
147
+ When I go to "/stylesheets/fonts.css"
148
+ Then I should see 'url(/fonts/roboto/roboto-regular-webfont.eot'
@@ -5,7 +5,7 @@ require 'sassc'
5
5
  require 'simplecov'
6
6
  SimpleCov.root(File.expand_path(File.dirname(__FILE__) + '/../..'))
7
7
 
8
- require 'capybara/poltergeist'
8
+ require 'phantomjs/poltergeist'
9
9
  Capybara.javascript_driver = :poltergeist
10
10
 
11
11
  require 'coveralls'
@@ -4,6 +4,9 @@
4
4
 
5
5
  <h2>Image url:</h2>
6
6
  <img src="<%= image_path('100px.jpg') %>" srcset="<%= image_path('100px.jpg') %> 1x, <%= image_path('200px.jpg') %> 2x, <%= image_path('300px.jpg') %> 3x">
7
+ <%= image_tag('100px.jpg?test') %>
8
+ <%= image_tag('100px.jpg?#test') %>
9
+ <%= image_tag('100px.jpg#test') %>
7
10
 
8
11
  <h2>Ignored path:</h2>
9
12
  <link rel="apple-touch-icon" href="apple-touch-icon.png">
@@ -3,16 +3,16 @@
3
3
  <head>
4
4
  <meta charset="utf-8">
5
5
 
6
- <%= stylesheet_link_tag "site" %>
6
+ <%= stylesheet_link_tag "site", "fragment" %>
7
7
  <%= javascript_include_tag "application" %>
8
8
  <%= yield_content :head %>
9
9
  </head>
10
-
10
+
11
11
  <body class="<%= page_classes %>">
12
12
 
13
13
  <div id="main" role="main">
14
14
  <%= yield %>
15
15
  </div>
16
-
16
+
17
17
  </body>
18
18
  </html>