middleman-sprockets 4.0.0.beta.1 → 4.0.0.rc.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (57) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +2 -3
  3. data/Gemfile +15 -16
  4. data/README.md +0 -58
  5. data/Rakefile +1 -16
  6. data/features/asset_hash.feature +5 -6
  7. data/features/bower.feature +6 -6
  8. data/features/sprockets.feature +13 -65
  9. data/features/sprockets_gems.feature +7 -26
  10. data/features/step_definitions/server_steps.rb +0 -4
  11. data/fixtures/asset-paths-app/config.rb +1 -4
  12. data/fixtures/bower-app/config.rb +0 -2
  13. data/fixtures/bower-app/source/javascripts/application.js +1 -1
  14. data/fixtures/bower-app/source/javascripts/import.js +1 -0
  15. data/fixtures/bower-individual-outputdir-app/config.rb +0 -4
  16. data/fixtures/bower-individual-outputdir-app/source/javascripts/application.js +3 -0
  17. data/fixtures/bower-multiple-assets-app/config.rb +1 -7
  18. data/fixtures/{sprockets-app-debug-assets/source/stylesheets/dependency1.css → bower-multiple-assets-app/source/index.html} +0 -0
  19. data/fixtures/bower-multiple-assets-app/source/javascripts/core.js +2 -0
  20. data/fixtures/jquery-mobile-app/source/javascripts/app.js +1 -0
  21. data/fixtures/sprockets-app/config.rb +0 -5
  22. data/fixtures/sprockets-app/source/library/css/bootstrap_include.css.scss +1 -1
  23. data/fixtures/sprockets-app/source/library/css/plain.css +2 -0
  24. data/fixtures/sprockets-app/source/library/css/sprockets_base2.css.scss +1 -1
  25. data/fixtures/sprockets-app/source/library/js/jquery_include.js +1 -1
  26. data/fixtures/sprockets-app/source/library/js/plain.js +3 -0
  27. data/fixtures/sprockets-app2/source/stylesheets/sprockets_base2.css.scss +1 -1
  28. data/fixtures/sprockets-imported-asset-path-conflicts-app/config.rb +1 -1
  29. data/fixtures/sprockets-imported-assets-match-multiple-paths-app/config.rb +1 -1
  30. data/fixtures/sprockets-multiple-extensions-app/config.rb +0 -3
  31. data/fixtures/sprockets-multiple-extensions-app/source/stylesheets/app.css.scss +3 -0
  32. data/fixtures/sprockets-svg-font-app/config.rb +0 -4
  33. data/fixtures/sprockets-svg-font-app/source/stylesheets/app.css.scss +4 -0
  34. data/lib/middleman-sprockets.rb +1 -6
  35. data/lib/middleman-sprockets/extension.rb +197 -113
  36. data/lib/middleman-sprockets/version.rb +1 -1
  37. data/middleman-sprockets.gemspec +2 -4
  38. metadata +29 -74
  39. data/Gemfile-Sprockets3 +0 -36
  40. data/Gemfile-v3 +0 -36
  41. data/features/asset_hash-3.0.feature +0 -105
  42. data/fixtures/sprockets-app-debug-assets/config.rb +0 -1
  43. data/fixtures/sprockets-app-debug-assets/source/index.html.erb +0 -8
  44. data/fixtures/sprockets-app-debug-assets/source/javascripts/dependency1.js +0 -3
  45. data/fixtures/sprockets-app-debug-assets/source/javascripts/dependency2.js +0 -1
  46. data/fixtures/sprockets-app-debug-assets/source/javascripts/main.js +0 -4
  47. data/fixtures/sprockets-app-debug-assets/source/stylesheets/app.css.scss +0 -4
  48. data/fixtures/sprockets-app-debug-assets/source/stylesheets/dependency2.css.scss +0 -0
  49. data/lib/middleman-sprockets/asset.rb +0 -142
  50. data/lib/middleman-sprockets/asset_tag_helpers.rb +0 -54
  51. data/lib/middleman-sprockets/config_only_environment.rb +0 -50
  52. data/lib/middleman-sprockets/environment.rb +0 -293
  53. data/lib/middleman-sprockets/imported_asset.rb +0 -30
  54. data/lib/middleman-sprockets/sass_function_hack.rb +0 -9
  55. data/lib/middleman-sprockets/sass_utils.rb +0 -14
  56. data/spec/asset_spec.rb +0 -118
  57. data/spec/imported_asset_spec.rb +0 -42
@@ -1,5 +1,5 @@
1
1
  module Middleman
2
2
  module Sprockets
3
- VERSION = "4.0.0.beta.1"
3
+ VERSION = "4.0.0.rc.1"
4
4
  end
5
5
  end
@@ -15,8 +15,6 @@ Gem::Specification.new do |s|
15
15
  s.files = `git ls-files -z`.split("\0")
16
16
  s.test_files = `git ls-files -z -- {fixtures,features}/*`.split("\0")
17
17
  s.require_paths = ["lib"]
18
- s.add_dependency("middleman-core", [">= 3.3"])
19
- s.add_dependency("sprockets", [">= 2.12.1"])
20
- s.add_dependency("sprockets-sass", ["~> 1.3.0"])
21
- s.add_dependency("sprockets-helpers", ["~> 1.1.0"])
18
+ s.add_dependency("middleman-core", [">= 4.0.0.rc.1"])
19
+ s.add_dependency("sprockets", ["~> 3.0"])
22
20
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: middleman-sprockets
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0.beta.1
4
+ version: 4.0.0.rc.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas Reynolds
@@ -10,64 +10,36 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2015-05-02 00:00:00.000000000 Z
13
+ date: 2015-09-16 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: middleman-core
17
17
  requirement: !ruby/object:Gem::Requirement
18
18
  requirements:
19
- - - '>='
19
+ - - ">="
20
20
  - !ruby/object:Gem::Version
21
- version: '3.3'
21
+ version: 4.0.0.rc.1
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
- - - '>='
26
+ - - ">="
27
27
  - !ruby/object:Gem::Version
28
- version: '3.3'
28
+ version: 4.0.0.rc.1
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: sprockets
31
31
  requirement: !ruby/object:Gem::Requirement
32
32
  requirements:
33
- - - '>='
33
+ - - "~>"
34
34
  - !ruby/object:Gem::Version
35
- version: 2.12.1
35
+ version: '3.0'
36
36
  type: :runtime
37
37
  prerelease: false
38
38
  version_requirements: !ruby/object:Gem::Requirement
39
39
  requirements:
40
- - - '>='
40
+ - - "~>"
41
41
  - !ruby/object:Gem::Version
42
- version: 2.12.1
43
- - !ruby/object:Gem::Dependency
44
- name: sprockets-sass
45
- requirement: !ruby/object:Gem::Requirement
46
- requirements:
47
- - - ~>
48
- - !ruby/object:Gem::Version
49
- version: 1.3.0
50
- type: :runtime
51
- prerelease: false
52
- version_requirements: !ruby/object:Gem::Requirement
53
- requirements:
54
- - - ~>
55
- - !ruby/object:Gem::Version
56
- version: 1.3.0
57
- - !ruby/object:Gem::Dependency
58
- name: sprockets-helpers
59
- requirement: !ruby/object:Gem::Requirement
60
- requirements:
61
- - - ~>
62
- - !ruby/object:Gem::Version
63
- version: 1.1.0
64
- type: :runtime
65
- prerelease: false
66
- version_requirements: !ruby/object:Gem::Requirement
67
- requirements:
68
- - - ~>
69
- - !ruby/object:Gem::Version
70
- version: 1.1.0
42
+ version: '3.0'
71
43
  description: Sprockets support for Middleman
72
44
  email:
73
45
  - me@tdreyno.com
@@ -77,19 +49,16 @@ executables: []
77
49
  extensions: []
78
50
  extra_rdoc_files: []
79
51
  files:
80
- - .gitignore
81
- - .rspec
82
- - .simplecov
83
- - .travis.yml
52
+ - ".gitignore"
53
+ - ".rspec"
54
+ - ".simplecov"
55
+ - ".travis.yml"
84
56
  - CHANGELOG.md
85
57
  - CONTRIBUTING.md
86
58
  - Gemfile
87
- - Gemfile-Sprockets3
88
- - Gemfile-v3
89
59
  - LICENSE.md
90
60
  - README.md
91
61
  - Rakefile
92
- - features/asset_hash-3.0.feature
93
62
  - features/asset_hash.feature
94
63
  - features/bower.feature
95
64
  - features/jst.feature
@@ -133,6 +102,7 @@ files:
133
102
  - fixtures/bower-app/bower_components/underscore/underscore.js
134
103
  - fixtures/bower-app/config.rb
135
104
  - fixtures/bower-app/source/javascripts/application.js
105
+ - fixtures/bower-app/source/javascripts/import.js
136
106
  - fixtures/bower-individual-outputdir-app/bower.json
137
107
  - fixtures/bower-individual-outputdir-app/bower_components/underscore/bower.json
138
108
  - fixtures/bower-individual-outputdir-app/bower_components/underscore/underscore.js
@@ -149,6 +119,8 @@ files:
149
119
  - fixtures/bower-multiple-assets-app/.bowerrc
150
120
  - fixtures/bower-multiple-assets-app/bower.json
151
121
  - fixtures/bower-multiple-assets-app/config.rb
122
+ - fixtures/bower-multiple-assets-app/source/index.html
123
+ - fixtures/bower-multiple-assets-app/source/javascripts/core.js
152
124
  - fixtures/bower-multiple-assets-app/vendor/assets/components/lightbox2/.bower.json
153
125
  - fixtures/bower-multiple-assets-app/vendor/assets/components/lightbox2/bower.json
154
126
  - fixtures/bower-multiple-assets-app/vendor/assets/components/lightbox2/img/close.png
@@ -162,6 +134,7 @@ files:
162
134
  - fixtures/glob-app/source/stylesheets/shared/3rd-party/bootstrap.sass
163
135
  - fixtures/glob-app/source/stylesheets/shared/shared.scss
164
136
  - fixtures/jquery-mobile-app/config.rb
137
+ - fixtures/jquery-mobile-app/source/javascripts/app.js
165
138
  - fixtures/jquery-mobile-app/source/stylesheets/base.css.scss
166
139
  - fixtures/long-filenames-app/config.rb
167
140
  - fixtures/long-filenames-app/source/images/00000000-0000-0000-0000-000000.svg
@@ -174,14 +147,6 @@ files:
174
147
  - fixtures/preview-app/source/stylesheets/main.css.sass
175
148
  - fixtures/preview-app/source/stylesheets/main2.css.sass
176
149
  - fixtures/preview-app/source/stylesheets/plain.css.sass
177
- - fixtures/sprockets-app-debug-assets/config.rb
178
- - fixtures/sprockets-app-debug-assets/source/index.html.erb
179
- - fixtures/sprockets-app-debug-assets/source/javascripts/dependency1.js
180
- - fixtures/sprockets-app-debug-assets/source/javascripts/dependency2.js
181
- - fixtures/sprockets-app-debug-assets/source/javascripts/main.js
182
- - fixtures/sprockets-app-debug-assets/source/stylesheets/app.css.scss
183
- - fixtures/sprockets-app-debug-assets/source/stylesheets/dependency1.css
184
- - fixtures/sprockets-app-debug-assets/source/stylesheets/dependency2.css.scss
185
150
  - fixtures/sprockets-app/config.rb
186
151
  - fixtures/sprockets-app/source/index.html.erb
187
152
  - fixtures/sprockets-app/source/library/css/bootstrap_include.css.scss
@@ -222,6 +187,7 @@ files:
222
187
  - fixtures/sprockets-multiple-extensions-app/config.rb
223
188
  - fixtures/sprockets-multiple-extensions-app/source/fonts/fontawesome-webfont-source.svg.gz
224
189
  - fixtures/sprockets-multiple-extensions-app/source/images/drawing-source.svg
190
+ - fixtures/sprockets-multiple-extensions-app/source/stylesheets/app.css.scss
225
191
  - fixtures/sprockets-multiple-extensions-app/vendor/assets/components/font-awesome/fonts/fontawesome-webfont-bower.svg.gz
226
192
  - fixtures/sprockets-multiple-extensions-app/vendor/assets/components/jquery/jquery.asdf.asdf.js.min.asdf
227
193
  - fixtures/sprockets-multiple-extensions-app/vendor/assets/components/jquery/jquery.min.js
@@ -230,23 +196,15 @@ files:
230
196
  - fixtures/sprockets-svg-font-app/source/fonts/fontawesome-webfont-source.svg
231
197
  - fixtures/sprockets-svg-font-app/source/fonts/fontawesome-webfont-source.svg.gz
232
198
  - fixtures/sprockets-svg-font-app/source/images/drawing-source.svg
199
+ - fixtures/sprockets-svg-font-app/source/stylesheets/app.css.scss
233
200
  - fixtures/sprockets-svg-font-app/vendor/assets/components/blub/images/drawing-bower.svg
234
201
  - fixtures/sprockets-svg-font-app/vendor/assets/components/font-awesome/fonts/fontawesome-webfont-bower.svg
235
202
  - fixtures/sprockets-svg-font-app/vendor/assets/components/font-awesome/fonts/fontawesome-webfont-bower.svg.gz
236
203
  - fixtures/sprockets-svg-font-app/vendor/assets/components/font-awesome/fonts/fontawesome-webfont-bower.ttf.gz
237
204
  - lib/middleman-sprockets.rb
238
- - lib/middleman-sprockets/asset.rb
239
- - lib/middleman-sprockets/asset_tag_helpers.rb
240
- - lib/middleman-sprockets/config_only_environment.rb
241
- - lib/middleman-sprockets/environment.rb
242
205
  - lib/middleman-sprockets/extension.rb
243
- - lib/middleman-sprockets/imported_asset.rb
244
- - lib/middleman-sprockets/sass_function_hack.rb
245
- - lib/middleman-sprockets/sass_utils.rb
246
206
  - lib/middleman-sprockets/version.rb
247
207
  - middleman-sprockets.gemspec
248
- - spec/asset_spec.rb
249
- - spec/imported_asset_spec.rb
250
208
  - spec/spec_helper.rb
251
209
  - spec/support/aruba.rb
252
210
  - spec/support/rspec.rb
@@ -260,22 +218,21 @@ require_paths:
260
218
  - lib
261
219
  required_ruby_version: !ruby/object:Gem::Requirement
262
220
  requirements:
263
- - - '>='
221
+ - - ">="
264
222
  - !ruby/object:Gem::Version
265
223
  version: '0'
266
224
  required_rubygems_version: !ruby/object:Gem::Requirement
267
225
  requirements:
268
- - - '>'
226
+ - - ">"
269
227
  - !ruby/object:Gem::Version
270
228
  version: 1.3.1
271
229
  requirements: []
272
230
  rubyforge_project:
273
- rubygems_version: 2.2.2
231
+ rubygems_version: 2.4.6
274
232
  signing_key:
275
233
  specification_version: 4
276
234
  summary: Sprockets support for Middleman
277
235
  test_files:
278
- - features/asset_hash-3.0.feature
279
236
  - features/asset_hash.feature
280
237
  - features/bower.feature
281
238
  - features/jst.feature
@@ -319,6 +276,7 @@ test_files:
319
276
  - fixtures/bower-app/bower_components/underscore/underscore.js
320
277
  - fixtures/bower-app/config.rb
321
278
  - fixtures/bower-app/source/javascripts/application.js
279
+ - fixtures/bower-app/source/javascripts/import.js
322
280
  - fixtures/bower-individual-outputdir-app/bower.json
323
281
  - fixtures/bower-individual-outputdir-app/bower_components/underscore/bower.json
324
282
  - fixtures/bower-individual-outputdir-app/bower_components/underscore/underscore.js
@@ -335,6 +293,8 @@ test_files:
335
293
  - fixtures/bower-multiple-assets-app/.bowerrc
336
294
  - fixtures/bower-multiple-assets-app/bower.json
337
295
  - fixtures/bower-multiple-assets-app/config.rb
296
+ - fixtures/bower-multiple-assets-app/source/index.html
297
+ - fixtures/bower-multiple-assets-app/source/javascripts/core.js
338
298
  - fixtures/bower-multiple-assets-app/vendor/assets/components/lightbox2/.bower.json
339
299
  - fixtures/bower-multiple-assets-app/vendor/assets/components/lightbox2/bower.json
340
300
  - fixtures/bower-multiple-assets-app/vendor/assets/components/lightbox2/img/close.png
@@ -348,6 +308,7 @@ test_files:
348
308
  - fixtures/glob-app/source/stylesheets/shared/3rd-party/bootstrap.sass
349
309
  - fixtures/glob-app/source/stylesheets/shared/shared.scss
350
310
  - fixtures/jquery-mobile-app/config.rb
311
+ - fixtures/jquery-mobile-app/source/javascripts/app.js
351
312
  - fixtures/jquery-mobile-app/source/stylesheets/base.css.scss
352
313
  - fixtures/long-filenames-app/config.rb
353
314
  - fixtures/long-filenames-app/source/images/00000000-0000-0000-0000-000000.svg
@@ -360,14 +321,6 @@ test_files:
360
321
  - fixtures/preview-app/source/stylesheets/main.css.sass
361
322
  - fixtures/preview-app/source/stylesheets/main2.css.sass
362
323
  - fixtures/preview-app/source/stylesheets/plain.css.sass
363
- - fixtures/sprockets-app-debug-assets/config.rb
364
- - fixtures/sprockets-app-debug-assets/source/index.html.erb
365
- - fixtures/sprockets-app-debug-assets/source/javascripts/dependency1.js
366
- - fixtures/sprockets-app-debug-assets/source/javascripts/dependency2.js
367
- - fixtures/sprockets-app-debug-assets/source/javascripts/main.js
368
- - fixtures/sprockets-app-debug-assets/source/stylesheets/app.css.scss
369
- - fixtures/sprockets-app-debug-assets/source/stylesheets/dependency1.css
370
- - fixtures/sprockets-app-debug-assets/source/stylesheets/dependency2.css.scss
371
324
  - fixtures/sprockets-app/config.rb
372
325
  - fixtures/sprockets-app/source/index.html.erb
373
326
  - fixtures/sprockets-app/source/library/css/bootstrap_include.css.scss
@@ -408,6 +361,7 @@ test_files:
408
361
  - fixtures/sprockets-multiple-extensions-app/config.rb
409
362
  - fixtures/sprockets-multiple-extensions-app/source/fonts/fontawesome-webfont-source.svg.gz
410
363
  - fixtures/sprockets-multiple-extensions-app/source/images/drawing-source.svg
364
+ - fixtures/sprockets-multiple-extensions-app/source/stylesheets/app.css.scss
411
365
  - fixtures/sprockets-multiple-extensions-app/vendor/assets/components/font-awesome/fonts/fontawesome-webfont-bower.svg.gz
412
366
  - fixtures/sprockets-multiple-extensions-app/vendor/assets/components/jquery/jquery.asdf.asdf.js.min.asdf
413
367
  - fixtures/sprockets-multiple-extensions-app/vendor/assets/components/jquery/jquery.min.js
@@ -416,6 +370,7 @@ test_files:
416
370
  - fixtures/sprockets-svg-font-app/source/fonts/fontawesome-webfont-source.svg
417
371
  - fixtures/sprockets-svg-font-app/source/fonts/fontawesome-webfont-source.svg.gz
418
372
  - fixtures/sprockets-svg-font-app/source/images/drawing-source.svg
373
+ - fixtures/sprockets-svg-font-app/source/stylesheets/app.css.scss
419
374
  - fixtures/sprockets-svg-font-app/vendor/assets/components/blub/images/drawing-bower.svg
420
375
  - fixtures/sprockets-svg-font-app/vendor/assets/components/font-awesome/fonts/fontawesome-webfont-bower.svg
421
376
  - fixtures/sprockets-svg-font-app/vendor/assets/components/font-awesome/fonts/fontawesome-webfont-bower.svg.gz
data/Gemfile-Sprockets3 DELETED
@@ -1,36 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- gem "middleman-core", :github => "middleman/middleman", :branch => "v3-stable"
4
-
5
- # Specify your gem's dependencies in middleman-sprockets.gemspec
6
- gemspec
7
-
8
- gem "rake", "~> 10.0.3", :require => false
9
- gem "yard", "~> 0.8.0", :require => false
10
-
11
- gem "sprockets", "3.0.0.beta.10"
12
- gem 'sprockets-helpers', path: '~/Sites/sprockets-helpers'
13
- gem 'sprockets-sass', path: '~/Sites/sprockets-sass'
14
-
15
- # Test tools
16
- gem "cucumber"
17
- gem "fivemat", "~> 1.2.1"
18
- gem "aruba"
19
- gem "rspec", "~> 3.0"
20
- gem "builder", "~> 3.0"
21
- gem "simplecov"
22
-
23
- # For actual tests
24
- # Make sure to lock down the versions of the asset gems
25
- # so they don't cause asset hashes to change.
26
- gem "railties", "~> 4.1"
27
- gem "jquery-rails", "3.1.0", :require => false
28
- gem "bootstrap-sass", "3.1.1.0", :require => false
29
- gem "jquery_mobile_rails", "1.4.1", :require => false
30
-
31
- gem "ejs", "~> 1.1.1"
32
- gem "eco", "~> 1.0.0"
33
- gem "erubis", "~> 2.7.0"
34
-
35
- # Code Quality
36
- gem "cane", :platforms => [:mri_19, :mri_20], :require => false
data/Gemfile-v3 DELETED
@@ -1,36 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- gem "middleman-core", :github => "middleman/middleman", :branch => "v3-stable"
4
-
5
- # Specify your gem's dependencies in middleman-sprockets.gemspec
6
- gemspec
7
-
8
- gem "rake", "~> 10.0.3", :require => false
9
- gem "yard", "~> 0.8.0", :require => false
10
-
11
- # gem "sprockets", "3.0.0.beta.3"
12
- # gem 'sprockets-helpers', path: '~/Sites/sprockets-helpers'
13
- # gem 'sprockets-sass', path: '~/Sites/sprockets-sass'
14
-
15
- # Test tools
16
- gem "cucumber"
17
- gem "fivemat", "~> 1.2.1"
18
- gem "aruba"
19
- gem "rspec", "~> 3.0"
20
- gem "builder", "~> 3.0"
21
- gem "simplecov"
22
-
23
- # For actual tests
24
- # Make sure to lock down the versions of the asset gems
25
- # so they don't cause asset hashes to change.
26
- gem "railties", "~> 4.1"
27
- gem "jquery-rails", "3.1.0", :require => false
28
- gem "bootstrap-sass", "3.1.1.0", :require => false
29
- gem "jquery_mobile_rails", "1.4.1", :require => false
30
-
31
- gem "ejs", "~> 1.1.1"
32
- gem "eco", "~> 1.0.0"
33
- gem "erubis", "~> 2.7.0"
34
-
35
- # Code Quality
36
- gem "cane", :platforms => [:mri_19, :mri_20], :require => false
@@ -1,105 +0,0 @@
1
- @old
2
- Feature: Assets get a file hash appended to their URL and references to them are updated
3
- Scenario: Hashed-asset files are produced, and HTML, CSS, and JavaScript gets rewritten to reference the new files
4
- Given a successfully built app at "asset-hash-app"
5
- When I cd to "build"
6
- Then the following files should exist:
7
- | index.html |
8
- | images/100px-1242c368.png |
9
- | images/100px-5fd6fb90.jpg |
10
- | images/100px-5fd6fb90.gif |
11
- | javascripts/application-df677242.js |
12
- | stylesheets/site-570b0b7d.css |
13
- | index.html |
14
- | subdir/index.html |
15
- | other/index.html |
16
- And the following files should not exist:
17
- | images/100px.png |
18
- | images/100px.jpg |
19
- | images/100px.gif |
20
- | javascripts/application.js |
21
- | stylesheets/site.css |
22
-
23
- And the file "javascripts/application-df677242.js" should contain "img.src = '/images/100px-5fd6fb90.jpg'"
24
- And the file "stylesheets/site-570b0b7d.css" should contain 'background-image: url("../images/100px-5fd6fb90.jpg")'
25
- And the file "index.html" should contain 'href="stylesheets/site-570b0b7d.css"'
26
- And the file "index.html" should contain 'src="javascripts/application-df677242.js"'
27
- And the file "index.html" should contain 'src="images/100px-5fd6fb90.jpg"'
28
- And the file "subdir/index.html" should contain 'href="../stylesheets/site-570b0b7d.css"'
29
- And the file "subdir/index.html" should contain 'src="../javascripts/application-df677242.js"'
30
- And the file "subdir/index.html" should contain 'src="../images/100px-5fd6fb90.jpg"'
31
- And the file "other/index.html" should contain 'href="../stylesheets/site-570b0b7d.css"'
32
- And the file "other/index.html" should contain 'src="../javascripts/application-df677242.js"'
33
- And the file "other/index.html" should contain 'src="../images/100px-5fd6fb90.jpg"'
34
-
35
- Scenario: Hashed assets work in preview server
36
- Given the Server is running at "asset-hash-app"
37
- When I go to "/"
38
- Then I should see 'href="stylesheets/site-570b0b7d.css"'
39
- Then I should see 'href="stylesheets/jquery-mobile-044da59f.css"'
40
- And I should see 'src="javascripts/application-df677242.js"'
41
- And I should see 'src="images/100px-5fd6fb90.jpg"'
42
- When I go to "/subdir/"
43
- Then I should see 'href="../stylesheets/site-570b0b7d.css"'
44
- And I should see 'src="../javascripts/application-df677242.js"'
45
- And I should see 'src="../images/100px-5fd6fb90.jpg"'
46
- When I go to "/other/"
47
- Then I should see 'href="../stylesheets/site-570b0b7d.css"'
48
- And I should see 'src="../javascripts/application-df677242.js"'
49
- And I should see 'src="../images/100px-5fd6fb90.jpg"'
50
- When I go to "/javascripts/application-df677242.js"
51
- Then I should see "img.src = '/images/100px-5fd6fb90.jpg'"
52
- When I go to "/stylesheets/site-570b0b7d.css"
53
- Then I should see 'background-image: url("../images/100px-5fd6fb90.jpg")'
54
- When I go to "/stylesheets/jquery-mobile-044da59f.css"
55
- Then I should see 'background-image: url("../images/jquery-mobile/icons-18-white-1681b2cc.png")'
56
-
57
- Scenario: Enabling an asset host still produces hashed files and references
58
- Given the Server is running at "asset-hash-host-app"
59
- When I go to "/"
60
- Then I should see 'href="http://middlemanapp.com/stylesheets/site-72c69c91.css"'
61
- And I should see 'src="http://middlemanapp.com/images/100px-5fd6fb90.jpg"'
62
- When I go to "/subdir/"
63
- Then I should see 'href="http://middlemanapp.com/stylesheets/site-72c69c91.css"'
64
- And I should see 'src="http://middlemanapp.com/images/100px-5fd6fb90.jpg"'
65
- When I go to "/other/"
66
- Then I should see 'href="http://middlemanapp.com/stylesheets/site-72c69c91.css"'
67
- And I should see 'src="http://middlemanapp.com/images/100px-5fd6fb90.jpg"'
68
-
69
- Scenario: The asset hash should change when a SASS partial changes
70
- Given the Server is running at "asset-hash-app"
71
- And the file "source/stylesheets/_partial.sass" has the contents
72
- """
73
- body
74
- font-size: 14px
75
- """
76
- When I go to "/partials/"
77
- Then I should see 'href="../stylesheets/uses_partials-423a00f7.css'
78
- And wait a second
79
- And the file "source/stylesheets/_partial.sass" has the contents
80
- """
81
- body
82
- font-size: 18px !important
83
- """
84
- When I go to "/partials/"
85
- Then I should see 'href="../stylesheets/uses_partials-e8c3d4eb.css'
86
-
87
- Scenario: The asset hash should change when a Javascript partial changes
88
- Given the Server is running at "asset-hash-app"
89
- And the file "source/javascripts/sprockets_sub.js" has the contents
90
- """
91
- function sprockets_sub_function() { }
92
- """
93
- When I go to "/partials/"
94
- Then I should see 'src="../javascripts/sprockets_base-0252a861.js'
95
- When I go to "/javascripts/sprockets_base-0252a861.js"
96
- Then I should see "sprockets_sub_function"
97
- And wait a second
98
- And the file "source/javascripts/sprockets_sub.js" has the contents
99
- """
100
- function sprockets_sub2_function() { }
101
- """
102
- When I go to "/partials/"
103
- Then I should see 'src="../javascripts/sprockets_base-5121d891.js'
104
- When I go to "/javascripts/sprockets_base-5121d891.js"
105
- Then I should see "sprockets_sub2_function"