middleman-sprockets 3.0.0.rc.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (71) hide show
  1. data/.gitignore +5 -0
  2. data/.travis.yml +10 -0
  3. data/Gemfile +28 -0
  4. data/LICENSE +20 -0
  5. data/README.md +49 -0
  6. data/Rakefile +19 -0
  7. data/features/asset_hash.feature +102 -0
  8. data/features/sass_partials.feature +34 -0
  9. data/features/sprockets.feature +52 -0
  10. data/features/sprockets_gems.feature +15 -0
  11. data/features/support/env.rb +4 -0
  12. data/fixtures/asset-hash-app/config.rb +7 -0
  13. data/fixtures/asset-hash-app/source/images/100px.gif +0 -0
  14. data/fixtures/asset-hash-app/source/images/100px.jpg +0 -0
  15. data/fixtures/asset-hash-app/source/images/100px.png +0 -0
  16. data/fixtures/asset-hash-app/source/index.html.erb +308 -0
  17. data/fixtures/asset-hash-app/source/javascripts/application.js +8 -0
  18. data/fixtures/asset-hash-app/source/javascripts/sprockets_base.js +5 -0
  19. data/fixtures/asset-hash-app/source/javascripts/sprockets_sub.js +3 -0
  20. data/fixtures/asset-hash-app/source/layout.erb +18 -0
  21. data/fixtures/asset-hash-app/source/other.html.erb +2 -0
  22. data/fixtures/asset-hash-app/source/partials.html.erb +2 -0
  23. data/fixtures/asset-hash-app/source/stylesheets/_partial.sass +2 -0
  24. data/fixtures/asset-hash-app/source/stylesheets/site.css.scss +4 -0
  25. data/fixtures/asset-hash-app/source/stylesheets/uses_partials.css.sass +4 -0
  26. data/fixtures/asset-hash-app/source/subdir/index.html.erb +308 -0
  27. data/fixtures/asset-hash-host-app/config.rb +6 -0
  28. data/fixtures/asset-hash-host-app/source/images/100px.gif +0 -0
  29. data/fixtures/asset-hash-host-app/source/images/100px.jpg +0 -0
  30. data/fixtures/asset-hash-host-app/source/images/100px.png +0 -0
  31. data/fixtures/asset-hash-host-app/source/index.html.erb +6 -0
  32. data/fixtures/asset-hash-host-app/source/layout.erb +17 -0
  33. data/fixtures/asset-hash-host-app/source/other.html.erb +2 -0
  34. data/fixtures/asset-hash-host-app/source/stylesheets/site.css.scss +4 -0
  35. data/fixtures/asset-hash-host-app/source/subdir/index.html.erb +6 -0
  36. data/fixtures/preview-app/config.rb +0 -0
  37. data/fixtures/preview-app/source/content.html.erb +1 -0
  38. data/fixtures/preview-app/source/layout.erb +1 -0
  39. data/fixtures/preview-app/source/stylesheets/_partial.sass +2 -0
  40. data/fixtures/preview-app/source/stylesheets/_partial2.css.sass +2 -0
  41. data/fixtures/preview-app/source/stylesheets/main.css.sass +4 -0
  42. data/fixtures/preview-app/source/stylesheets/main2.css.sass +4 -0
  43. data/fixtures/preview-app/source/stylesheets/plain.css.sass +2 -0
  44. data/fixtures/sprockets-app/config.rb +2 -0
  45. data/fixtures/sprockets-app/source/library/css/bootstrap_include.css.scss +1 -0
  46. data/fixtures/sprockets-app/source/library/css/plain.css +3 -0
  47. data/fixtures/sprockets-app/source/library/css/sprockets_base1.css.scss +1 -0
  48. data/fixtures/sprockets-app/source/library/css/sprockets_base2.css.scss +1 -0
  49. data/fixtures/sprockets-app/source/library/css/sprockets_sub.css.scss +1 -0
  50. data/fixtures/sprockets-app/source/library/js/jquery_include.js +1 -0
  51. data/fixtures/sprockets-app/source/library/js/plain.js +3 -0
  52. data/fixtures/sprockets-app/source/library/js/sprockets_base.js +5 -0
  53. data/fixtures/sprockets-app/source/library/js/sprockets_sub.js +3 -0
  54. data/fixtures/sprockets-app/source/library/js/vendored_include.js +1 -0
  55. data/fixtures/sprockets-app/vendor/assets/javascripts/vendored_js.js +1 -0
  56. data/fixtures/sprockets-app2/config.rb +0 -0
  57. data/fixtures/sprockets-app2/data/test.yml +4 -0
  58. data/fixtures/sprockets-app2/data/test2.json +4 -0
  59. data/fixtures/sprockets-app2/source/javascripts/multiple_engines.js.coffee.erb +1 -0
  60. data/fixtures/sprockets-app2/source/javascripts/sprockets_base.js +5 -0
  61. data/fixtures/sprockets-app2/source/javascripts/sprockets_sub.js +3 -0
  62. data/fixtures/sprockets-app2/source/stylesheets/sprockets_base1.css.scss +1 -0
  63. data/fixtures/sprockets-app2/source/stylesheets/sprockets_base2.css.scss +1 -0
  64. data/fixtures/sprockets-app2/source/stylesheets/sprockets_sub.css.scss +1 -0
  65. data/lib/middleman-sprockets.rb +7 -0
  66. data/lib/middleman-sprockets/extension.rb +112 -0
  67. data/lib/middleman-sprockets/sass.rb +77 -0
  68. data/lib/middleman-sprockets/version.rb +5 -0
  69. data/lib/middleman_extension.rb +1 -0
  70. data/middleman-sprockets.gemspec +24 -0
  71. metadata +216 -0
@@ -0,0 +1,8 @@
1
+ function foo() {
2
+ var img = document.createElement('img');
3
+ img.src = '/images/100px.jpg';
4
+ var body = document.getElementsByTagName('body')[0];
5
+ body.insertBefore(img, body.firstChild);
6
+ }
7
+
8
+ window.onload = foo;
@@ -0,0 +1,5 @@
1
+ //= require "sprockets_sub"
2
+
3
+ function base() {
4
+
5
+ }
@@ -0,0 +1,3 @@
1
+ function sprockets_sub_function() {
2
+
3
+ }
@@ -0,0 +1,18 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+
6
+ <%= stylesheet_link_tag "site" %>
7
+ <%= javascript_include_tag "application" %>
8
+ <%= yield_content :head %>
9
+ </head>
10
+
11
+ <body class="<%= page_classes %>">
12
+
13
+ <div id="main" role="main">
14
+ <%= yield %>
15
+ </div>
16
+
17
+ </body>
18
+ </html>
@@ -0,0 +1,2 @@
1
+ <h2>Image url:</h2>
2
+ <img src="<%= image_path('100px.jpg') %>">
@@ -0,0 +1,2 @@
1
+ <%= stylesheet_link_tag 'uses_partials' %>
2
+ <%= javascript_include_tag 'sprockets_base' %>
@@ -0,0 +1,2 @@
1
+ body
2
+ font-size: 18px
@@ -0,0 +1,4 @@
1
+ #main {
2
+ padding: 50px;
3
+ background-image: image-url('100px.jpg');
4
+ }
@@ -0,0 +1,4 @@
1
+ @import partial.sass
2
+
3
+ red
4
+ color: blue
@@ -0,0 +1,308 @@
1
+ <% content_for :head do %>
2
+ <title>The Middleman!</title>
3
+ <% end %>
4
+
5
+ <h2>Image url:</h2>
6
+ <p><%= image_path('100px.jpg') %></p>
7
+
8
+ <h2>Autogenerated tests:</h2>
9
+ <p>images/100px.jpg</p>
10
+ <p>/images/100px.jpg</p>
11
+ <p>../images/100px.jpg</p>
12
+ <p>../../images/100px.jpg</p>
13
+ <p>../../../images/100px.jpg</p>
14
+ <p>http://example.com/images/100px.jpg</p>
15
+ <p>aimages/100px.jpga</p>
16
+ <p>1images/100px.jpg1</p>
17
+ <p>.images/100px.jpg.</p>
18
+ <p>-images/100px.jpg-</p>
19
+ <p>_images/100px.jpg_</p>
20
+ <p>'images/100px.jpg'</p>
21
+ <p>'/images/100px.jpg'</p>
22
+ <p>'../images/100px.jpg'</p>
23
+ <p>'../../images/100px.jpg'</p>
24
+ <p>'../../../images/100px.jpg'</p>
25
+ <p>'http://example.com/images/100px.jpg'</p>
26
+ <p>'aimages/100px.jpga'</p>
27
+ <p>'1images/100px.jpg1'</p>
28
+ <p>'.images/100px.jpg.'</p>
29
+ <p>'-images/100px.jpg-'</p>
30
+ <p>'_images/100px.jpg_'</p>
31
+ <p>"images/100px.jpg"</p>
32
+ <p>"/images/100px.jpg"</p>
33
+ <p>"../images/100px.jpg"</p>
34
+ <p>"../../images/100px.jpg"</p>
35
+ <p>"../../../images/100px.jpg"</p>
36
+ <p>"http://example.com/images/100px.jpg"</p>
37
+ <p>"aimages/100px.jpga"</p>
38
+ <p>"1images/100px.jpg1"</p>
39
+ <p>".images/100px.jpg."</p>
40
+ <p>"-images/100px.jpg-"</p>
41
+ <p>"_images/100px.jpg_"</p>
42
+ <p>&lt;img src=images/100px.jpg /&gt;</p>
43
+ <p>&lt;img src=/images/100px.jpg /&gt;</p>
44
+ <p>&lt;img src=../images/100px.jpg /&gt;</p>
45
+ <p>&lt;img src=../../images/100px.jpg /&gt;</p>
46
+ <p>&lt;img src=../../../images/100px.jpg /&gt;</p>
47
+ <p>&lt;img src=http://example.com/images/100px.jpg /&gt;</p>
48
+ <p>&lt;img src=aimages/100px.jpga /&gt;</p>
49
+ <p>&lt;img src=1images/100px.jpg1 /&gt;</p>
50
+ <p>&lt;img src=.images/100px.jpg. /&gt;</p>
51
+ <p>&lt;img src=-images/100px.jpg- /&gt;</p>
52
+ <p>&lt;img src=_images/100px.jpg_ /&gt;</p>
53
+ <p>&lt;img src='images/100px.jpg' /&gt;</p>
54
+ <p>&lt;img src='/images/100px.jpg' /&gt;</p>
55
+ <p>&lt;img src='../images/100px.jpg' /&gt;</p>
56
+ <p>&lt;img src='../../images/100px.jpg' /&gt;</p>
57
+ <p>&lt;img src='../../../images/100px.jpg' /&gt;</p>
58
+ <p>&lt;img src='http://example.com/images/100px.jpg' /&gt;</p>
59
+ <p>&lt;img src='aimages/100px.jpga' /&gt;</p>
60
+ <p>&lt;img src='1images/100px.jpg1' /&gt;</p>
61
+ <p>&lt;img src='.images/100px.jpg.' /&gt;</p>
62
+ <p>&lt;img src='-images/100px.jpg-' /&gt;</p>
63
+ <p>&lt;img src='_images/100px.jpg_' /&gt;</p>
64
+ <p>&lt;img src="images/100px.jpg" /&gt;</p>
65
+ <p>&lt;img src="/images/100px.jpg" /&gt;</p>
66
+ <p>&lt;img src="../images/100px.jpg" /&gt;</p>
67
+ <p>&lt;img src="../../images/100px.jpg" /&gt;</p>
68
+ <p>&lt;img src="../../../images/100px.jpg" /&gt;</p>
69
+ <p>&lt;img src="http://example.com/images/100px.jpg" /&gt;</p>
70
+ <p>&lt;img src="aimages/100px.jpga" /&gt;</p>
71
+ <p>&lt;img src="1images/100px.jpg1" /&gt;</p>
72
+ <p>&lt;img src=".images/100px.jpg." /&gt;</p>
73
+ <p>&lt;img src="-images/100px.jpg-" /&gt;</p>
74
+ <p>&lt;img src="_images/100px.jpg_" /&gt;</p>
75
+ <p>background-image:url(images/100px.jpg);</p>
76
+ <p>background-image:url(/images/100px.jpg);</p>
77
+ <p>background-image:url(../images/100px.jpg);</p>
78
+ <p>background-image:url(../../images/100px.jpg);</p>
79
+ <p>background-image:url(../../../images/100px.jpg);</p>
80
+ <p>background-image:url(http://example.com/images/100px.jpg);</p>
81
+ <p>background-image:url(aimages/100px.jpga);</p>
82
+ <p>background-image:url(1images/100px.jpg1);</p>
83
+ <p>background-image:url(.images/100px.jpg.);</p>
84
+ <p>background-image:url(-images/100px.jpg-);</p>
85
+ <p>background-image:url(_images/100px.jpg_);</p>
86
+ <p>background-image:url('images/100px.jpg');</p>
87
+ <p>background-image:url('/images/100px.jpg');</p>
88
+ <p>background-image:url('../images/100px.jpg');</p>
89
+ <p>background-image:url('../../images/100px.jpg');</p>
90
+ <p>background-image:url('../../../images/100px.jpg');</p>
91
+ <p>background-image:url('http://example.com/images/100px.jpg');</p>
92
+ <p>background-image:url('aimages/100px.jpga');</p>
93
+ <p>background-image:url('1images/100px.jpg1');</p>
94
+ <p>background-image:url('.images/100px.jpg.');</p>
95
+ <p>background-image:url('-images/100px.jpg-');</p>
96
+ <p>background-image:url('_images/100px.jpg_');</p>
97
+ <p>background-image:url("images/100px.jpg");</p>
98
+ <p>background-image:url("/images/100px.jpg");</p>
99
+ <p>background-image:url("../images/100px.jpg");</p>
100
+ <p>background-image:url("../../images/100px.jpg");</p>
101
+ <p>background-image:url("../../../images/100px.jpg");</p>
102
+ <p>background-image:url("http://example.com/images/100px.jpg");</p>
103
+ <p>background-image:url("aimages/100px.jpga");</p>
104
+ <p>background-image:url("1images/100px.jpg1");</p>
105
+ <p>background-image:url(".images/100px.jpg.");</p>
106
+ <p>background-image:url("-images/100px.jpg-");</p>
107
+ <p>background-image:url("_images/100px.jpg_");</p>
108
+ <br /><br /><br />
109
+ <p>images/100px.png</p>
110
+ <p>/images/100px.png</p>
111
+ <p>../images/100px.png</p>
112
+ <p>../../images/100px.png</p>
113
+ <p>../../../images/100px.png</p>
114
+ <p>http://example.com/images/100px.png</p>
115
+ <p>aimages/100px.pnga</p>
116
+ <p>1images/100px.png1</p>
117
+ <p>.images/100px.png.</p>
118
+ <p>-images/100px.png-</p>
119
+ <p>_images/100px.png_</p>
120
+ <p>'images/100px.png'</p>
121
+ <p>'/images/100px.png'</p>
122
+ <p>'../images/100px.png'</p>
123
+ <p>'../../images/100px.png'</p>
124
+ <p>'../../../images/100px.png'</p>
125
+ <p>'http://example.com/images/100px.png'</p>
126
+ <p>'aimages/100px.pnga'</p>
127
+ <p>'1images/100px.png1'</p>
128
+ <p>'.images/100px.png.'</p>
129
+ <p>'-images/100px.png-'</p>
130
+ <p>'_images/100px.png_'</p>
131
+ <p>"images/100px.png"</p>
132
+ <p>"/images/100px.png"</p>
133
+ <p>"../images/100px.png"</p>
134
+ <p>"../../images/100px.png"</p>
135
+ <p>"../../../images/100px.png"</p>
136
+ <p>"http://example.com/images/100px.png"</p>
137
+ <p>"aimages/100px.pnga"</p>
138
+ <p>"1images/100px.png1"</p>
139
+ <p>".images/100px.png."</p>
140
+ <p>"-images/100px.png-"</p>
141
+ <p>"_images/100px.png_"</p>
142
+ <p>&lt;img src=images/100px.png /&gt;</p>
143
+ <p>&lt;img src=/images/100px.png /&gt;</p>
144
+ <p>&lt;img src=../images/100px.png /&gt;</p>
145
+ <p>&lt;img src=../../images/100px.png /&gt;</p>
146
+ <p>&lt;img src=../../../images/100px.png /&gt;</p>
147
+ <p>&lt;img src=http://example.com/images/100px.png /&gt;</p>
148
+ <p>&lt;img src=aimages/100px.pnga /&gt;</p>
149
+ <p>&lt;img src=1images/100px.png1 /&gt;</p>
150
+ <p>&lt;img src=.images/100px.png. /&gt;</p>
151
+ <p>&lt;img src=-images/100px.png- /&gt;</p>
152
+ <p>&lt;img src=_images/100px.png_ /&gt;</p>
153
+ <p>&lt;img src='images/100px.png' /&gt;</p>
154
+ <p>&lt;img src='/images/100px.png' /&gt;</p>
155
+ <p>&lt;img src='../images/100px.png' /&gt;</p>
156
+ <p>&lt;img src='../../images/100px.png' /&gt;</p>
157
+ <p>&lt;img src='../../../images/100px.png' /&gt;</p>
158
+ <p>&lt;img src='http://example.com/images/100px.png' /&gt;</p>
159
+ <p>&lt;img src='aimages/100px.pnga' /&gt;</p>
160
+ <p>&lt;img src='1images/100px.png1' /&gt;</p>
161
+ <p>&lt;img src='.images/100px.png.' /&gt;</p>
162
+ <p>&lt;img src='-images/100px.png-' /&gt;</p>
163
+ <p>&lt;img src='_images/100px.png_' /&gt;</p>
164
+ <p>&lt;img src="images/100px.png" /&gt;</p>
165
+ <p>&lt;img src="/images/100px.png" /&gt;</p>
166
+ <p>&lt;img src="../images/100px.png" /&gt;</p>
167
+ <p>&lt;img src="../../images/100px.png" /&gt;</p>
168
+ <p>&lt;img src="../../../images/100px.png" /&gt;</p>
169
+ <p>&lt;img src="http://example.com/images/100px.png" /&gt;</p>
170
+ <p>&lt;img src="aimages/100px.pnga" /&gt;</p>
171
+ <p>&lt;img src="1images/100px.png1" /&gt;</p>
172
+ <p>&lt;img src=".images/100px.png." /&gt;</p>
173
+ <p>&lt;img src="-images/100px.png-" /&gt;</p>
174
+ <p>&lt;img src="_images/100px.png_" /&gt;</p>
175
+ <p>background-image:url(images/100px.png);</p>
176
+ <p>background-image:url(/images/100px.png);</p>
177
+ <p>background-image:url(../images/100px.png);</p>
178
+ <p>background-image:url(../../images/100px.png);</p>
179
+ <p>background-image:url(../../../images/100px.png);</p>
180
+ <p>background-image:url(http://example.com/images/100px.png);</p>
181
+ <p>background-image:url(aimages/100px.pnga);</p>
182
+ <p>background-image:url(1images/100px.png1);</p>
183
+ <p>background-image:url(.images/100px.png.);</p>
184
+ <p>background-image:url(-images/100px.png-);</p>
185
+ <p>background-image:url(_images/100px.png_);</p>
186
+ <p>background-image:url('images/100px.png');</p>
187
+ <p>background-image:url('/images/100px.png');</p>
188
+ <p>background-image:url('../images/100px.png');</p>
189
+ <p>background-image:url('../../images/100px.png');</p>
190
+ <p>background-image:url('../../../images/100px.png');</p>
191
+ <p>background-image:url('http://example.com/images/100px.png');</p>
192
+ <p>background-image:url('aimages/100px.pnga');</p>
193
+ <p>background-image:url('1images/100px.png1');</p>
194
+ <p>background-image:url('.images/100px.png.');</p>
195
+ <p>background-image:url('-images/100px.png-');</p>
196
+ <p>background-image:url('_images/100px.png_');</p>
197
+ <p>background-image:url("images/100px.png");</p>
198
+ <p>background-image:url("/images/100px.png");</p>
199
+ <p>background-image:url("../images/100px.png");</p>
200
+ <p>background-image:url("../../images/100px.png");</p>
201
+ <p>background-image:url("../../../images/100px.png");</p>
202
+ <p>background-image:url("http://example.com/images/100px.png");</p>
203
+ <p>background-image:url("aimages/100px.pnga");</p>
204
+ <p>background-image:url("1images/100px.png1");</p>
205
+ <p>background-image:url(".images/100px.png.");</p>
206
+ <p>background-image:url("-images/100px.png-");</p>
207
+ <p>background-image:url("_images/100px.png_");</p>
208
+ <br /><br /><br />
209
+ <p>images/100px.gif</p>
210
+ <p>/images/100px.gif</p>
211
+ <p>../images/100px.gif</p>
212
+ <p>../../images/100px.gif</p>
213
+ <p>../../../images/100px.gif</p>
214
+ <p>http://example.com/images/100px.gif</p>
215
+ <p>aimages/100px.gifa</p>
216
+ <p>1images/100px.gif1</p>
217
+ <p>.images/100px.gif.</p>
218
+ <p>-images/100px.gif-</p>
219
+ <p>_images/100px.gif_</p>
220
+ <p>'images/100px.gif'</p>
221
+ <p>'/images/100px.gif'</p>
222
+ <p>'../images/100px.gif'</p>
223
+ <p>'../../images/100px.gif'</p>
224
+ <p>'../../../images/100px.gif'</p>
225
+ <p>'http://example.com/images/100px.gif'</p>
226
+ <p>'aimages/100px.gifa'</p>
227
+ <p>'1images/100px.gif1'</p>
228
+ <p>'.images/100px.gif.'</p>
229
+ <p>'-images/100px.gif-'</p>
230
+ <p>'_images/100px.gif_'</p>
231
+ <p>"images/100px.gif"</p>
232
+ <p>"/images/100px.gif"</p>
233
+ <p>"../images/100px.gif"</p>
234
+ <p>"../../images/100px.gif"</p>
235
+ <p>"../../../images/100px.gif"</p>
236
+ <p>"http://example.com/images/100px.gif"</p>
237
+ <p>"aimages/100px.gifa"</p>
238
+ <p>"1images/100px.gif1"</p>
239
+ <p>".images/100px.gif."</p>
240
+ <p>"-images/100px.gif-"</p>
241
+ <p>"_images/100px.gif_"</p>
242
+ <p>&lt;img src=images/100px.gif /&gt;</p>
243
+ <p>&lt;img src=/images/100px.gif /&gt;</p>
244
+ <p>&lt;img src=../images/100px.gif /&gt;</p>
245
+ <p>&lt;img src=../../images/100px.gif /&gt;</p>
246
+ <p>&lt;img src=../../../images/100px.gif /&gt;</p>
247
+ <p>&lt;img src=http://example.com/images/100px.gif /&gt;</p>
248
+ <p>&lt;img src=aimages/100px.gifa /&gt;</p>
249
+ <p>&lt;img src=1images/100px.gif1 /&gt;</p>
250
+ <p>&lt;img src=.images/100px.gif. /&gt;</p>
251
+ <p>&lt;img src=-images/100px.gif- /&gt;</p>
252
+ <p>&lt;img src=_images/100px.gif_ /&gt;</p>
253
+ <p>&lt;img src='images/100px.gif' /&gt;</p>
254
+ <p>&lt;img src='/images/100px.gif' /&gt;</p>
255
+ <p>&lt;img src='../images/100px.gif' /&gt;</p>
256
+ <p>&lt;img src='../../images/100px.gif' /&gt;</p>
257
+ <p>&lt;img src='../../../images/100px.gif' /&gt;</p>
258
+ <p>&lt;img src='http://example.com/images/100px.gif' /&gt;</p>
259
+ <p>&lt;img src='aimages/100px.gifa' /&gt;</p>
260
+ <p>&lt;img src='1images/100px.gif1' /&gt;</p>
261
+ <p>&lt;img src='.images/100px.gif.' /&gt;</p>
262
+ <p>&lt;img src='-images/100px.gif-' /&gt;</p>
263
+ <p>&lt;img src='_images/100px.gif_' /&gt;</p>
264
+ <p>&lt;img src="images/100px.gif" /&gt;</p>
265
+ <p>&lt;img src="/images/100px.gif" /&gt;</p>
266
+ <p>&lt;img src="../images/100px.gif" /&gt;</p>
267
+ <p>&lt;img src="../../images/100px.gif" /&gt;</p>
268
+ <p>&lt;img src="../../../images/100px.gif" /&gt;</p>
269
+ <p>&lt;img src="http://example.com/images/100px.gif" /&gt;</p>
270
+ <p>&lt;img src="aimages/100px.gifa" /&gt;</p>
271
+ <p>&lt;img src="1images/100px.gif1" /&gt;</p>
272
+ <p>&lt;img src=".images/100px.gif." /&gt;</p>
273
+ <p>&lt;img src="-images/100px.gif-" /&gt;</p>
274
+ <p>&lt;img src="_images/100px.gif_" /&gt;</p>
275
+ <p>background-image:url(images/100px.gif);</p>
276
+ <p>background-image:url(/images/100px.gif);</p>
277
+ <p>background-image:url(../images/100px.gif);</p>
278
+ <p>background-image:url(../../images/100px.gif);</p>
279
+ <p>background-image:url(../../../images/100px.gif);</p>
280
+ <p>background-image:url(http://example.com/images/100px.gif);</p>
281
+ <p>background-image:url(aimages/100px.gifa);</p>
282
+ <p>background-image:url(1images/100px.gif1);</p>
283
+ <p>background-image:url(.images/100px.gif.);</p>
284
+ <p>background-image:url(-images/100px.gif-);</p>
285
+ <p>background-image:url(_images/100px.gif_);</p>
286
+ <p>background-image:url('images/100px.gif');</p>
287
+ <p>background-image:url('/images/100px.gif');</p>
288
+ <p>background-image:url('../images/100px.gif');</p>
289
+ <p>background-image:url('../../images/100px.gif');</p>
290
+ <p>background-image:url('../../../images/100px.gif');</p>
291
+ <p>background-image:url('http://example.com/images/100px.gif');</p>
292
+ <p>background-image:url('aimages/100px.gifa');</p>
293
+ <p>background-image:url('1images/100px.gif1');</p>
294
+ <p>background-image:url('.images/100px.gif.');</p>
295
+ <p>background-image:url('-images/100px.gif-');</p>
296
+ <p>background-image:url('_images/100px.gif_');</p>
297
+ <p>background-image:url("images/100px.gif");</p>
298
+ <p>background-image:url("/images/100px.gif");</p>
299
+ <p>background-image:url("../images/100px.gif");</p>
300
+ <p>background-image:url("../../images/100px.gif");</p>
301
+ <p>background-image:url("../../../images/100px.gif");</p>
302
+ <p>background-image:url("http://example.com/images/100px.gif");</p>
303
+ <p>background-image:url("aimages/100px.gifa");</p>
304
+ <p>background-image:url("1images/100px.gif1");</p>
305
+ <p>background-image:url(".images/100px.gif.");</p>
306
+ <p>background-image:url("-images/100px.gif-");</p>
307
+ <p>background-image:url("_images/100px.gif_");</p>
308
+ <br /><br /><br />
@@ -0,0 +1,6 @@
1
+
2
+ activate :asset_hash
3
+ activate :directory_indexes
4
+ activate :asset_host
5
+
6
+ set :asset_host, 'http://middlemanapp.com'
@@ -0,0 +1,6 @@
1
+ <% content_for :head do %>
2
+ <title>The Middleman!</title>
3
+ <% end %>
4
+
5
+ <h2>Image url:</h2>
6
+ <%= image_tag('100px.jpg') %>
@@ -0,0 +1,17 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+
6
+ <%= stylesheet_link_tag "site" %>
7
+ <%= yield_content :head %>
8
+ </head>
9
+
10
+ <body class="<%= page_classes %>">
11
+
12
+ <div id="main" role="main">
13
+ <%= yield %>
14
+ </div>
15
+
16
+ </body>
17
+ </html>
@@ -0,0 +1,2 @@
1
+ <h2>Image url:</h2>
2
+ <img src="<%= image_path('100px.jpg') %>">
@@ -0,0 +1,4 @@
1
+ #main {
2
+ padding: 50px;
3
+ background-image: image-url('100px.jpg');
4
+ }
@@ -0,0 +1,6 @@
1
+ <% content_for :head do %>
2
+ <title>The Middleman!</title>
3
+ <% end %>
4
+
5
+ <h2>Image url:</h2>
6
+ <%= image_tag('100px.jpg') %>
File without changes
@@ -0,0 +1 @@
1
+ Hola Mundo
@@ -0,0 +1 @@
1
+ <%= yield %>
@@ -0,0 +1,2 @@
1
+ body
2
+ font-size: 18px