middleman-more 3.0.0.alpha.7

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.
Files changed (127) hide show
  1. data/Rakefile +5 -0
  2. data/features/asset_host_compass.feature +7 -0
  3. data/features/cache_buster.feature +26 -0
  4. data/features/coffee-script.feature +17 -0
  5. data/features/content_for.feature +11 -0
  6. data/features/fonts.feature +13 -0
  7. data/features/ignore_already_minified.features +12 -0
  8. data/features/liquid.feature +11 -0
  9. data/features/markdown.feature +27 -0
  10. data/features/minify_css.feature +19 -0
  11. data/features/minify_javascript.feature +55 -0
  12. data/features/relative_assets.feature +50 -0
  13. data/features/sass_partials.feature +83 -0
  14. data/features/scss-support.feature +12 -0
  15. data/features/slim.feature +7 -0
  16. data/features/sprockets.feature +52 -0
  17. data/features/sprockets_gems.feature +10 -0
  18. data/features/support/env.rb +7 -0
  19. data/fixtures/already-minified-app/config.rb +2 -0
  20. data/fixtures/already-minified-app/source/javascripts/test.min.js +10 -0
  21. data/fixtures/already-minified-app/source/stylesheets/test.min.css +10 -0
  22. data/fixtures/asset-host-app/config.rb +6 -0
  23. data/fixtures/asset-host-app/source/.htaccess +1 -0
  24. data/fixtures/asset-host-app/source/images/blank.gif +0 -0
  25. data/fixtures/asset-host-app/source/stylesheets/asset_host.css.sass +3 -0
  26. data/fixtures/cache-buster-app/config.rb +0 -0
  27. data/fixtures/cache-buster-app/source/cache-buster.html.erb +2 -0
  28. data/fixtures/cache-buster-app/source/images/blank.gif +0 -0
  29. data/fixtures/cache-buster-app/source/stylesheets/relative_assets.css.sass +3 -0
  30. data/fixtures/cache-buster-app/source/stylesheets/site.css.sass +1 -0
  31. data/fixtures/coffeescript-app/config.rb +1 -0
  32. data/fixtures/coffeescript-app/source/inline-coffeescript.html.haml +3 -0
  33. data/fixtures/coffeescript-app/source/javascripts/broken-coffee.js.coffee +3 -0
  34. data/fixtures/coffeescript-app/source/javascripts/coffee_test.js.coffee +3 -0
  35. data/fixtures/content-for-app/config.rb +6 -0
  36. data/fixtures/content-for-app/source/content_for_haml.html.haml +4 -0
  37. data/fixtures/content-for-app/source/content_for_slim.html.slim +4 -0
  38. data/fixtures/content-for-app/source/layouts/content_for.erb +4 -0
  39. data/fixtures/fonts-app/config.rb +0 -0
  40. data/fixtures/fonts-app/source/fonts/StMarie-Thin.otf +0 -0
  41. data/fixtures/fonts-app/source/stylesheets/fonts.css.sass +3 -0
  42. data/fixtures/liquid-app/config.rb +0 -0
  43. data/fixtures/liquid-app/data/test.yml +4 -0
  44. data/fixtures/liquid-app/data/test2.json +4 -0
  45. data/fixtures/liquid-app/source/_liquid_partial.liquid +1 -0
  46. data/fixtures/liquid-app/source/data2.html.liquid +2 -0
  47. data/fixtures/liquid-app/source/liquid_master.html.liquid +1 -0
  48. data/fixtures/markdown-app/config.rb +9 -0
  49. data/fixtures/markdown-app/source/autolink.html.markdown +5 -0
  50. data/fixtures/markdown-app/source/fenced_code_blocks.html.markdown +7 -0
  51. data/fixtures/markdown-app/source/index.html.markdown +4 -0
  52. data/fixtures/markdown-app/source/no_intra_emphasis.html.markdown +5 -0
  53. data/fixtures/markdown-app/source/smarty_pants.html.markdown +5 -0
  54. data/fixtures/markdown-app/source/space_after_headers.html.markdown +5 -0
  55. data/fixtures/markdown-app/source/strikethrough.html.markdown +5 -0
  56. data/fixtures/markdown-app/source/superscript.html.markdown +5 -0
  57. data/fixtures/markdown-app/source/tables.html.markdown +8 -0
  58. data/fixtures/minify-css-app/config.rb +0 -0
  59. data/fixtures/minify-css-app/source/stylesheets/site.css.sass +1 -0
  60. data/fixtures/minify-js-app/config.rb +1 -0
  61. data/fixtures/minify-js-app/source/inline-coffeescript.html.haml +3 -0
  62. data/fixtures/minify-js-app/source/inline-js.html.haml +7 -0
  63. data/fixtures/minify-js-app/source/javascripts/coffee_test.js.coffee +3 -0
  64. data/fixtures/minify-js-app/source/javascripts/js_test.js +8 -0
  65. data/fixtures/passthrough-app/config.rb +17 -0
  66. data/fixtures/passthrough-app/source/.htaccess +1 -0
  67. data/fixtures/passthrough-app/source/inline-coffeescript.html.haml +3 -0
  68. data/fixtures/passthrough-app/source/inline-css.html.haml +4 -0
  69. data/fixtures/passthrough-app/source/inline-js.html.haml +7 -0
  70. data/fixtures/passthrough-app/source/javascripts/coffee_test.js.coffee +3 -0
  71. data/fixtures/passthrough-app/source/javascripts/js_test.js +8 -0
  72. data/fixtures/passthrough-app/source/stylesheets/site.css.sass +1 -0
  73. data/fixtures/preview-app/config.rb +0 -0
  74. data/fixtures/preview-app/source/content.html.erb +1 -0
  75. data/fixtures/preview-app/source/layout.erb +1 -0
  76. data/fixtures/preview-app/source/stylesheets/_partial.sass +2 -0
  77. data/fixtures/preview-app/source/stylesheets/_partial2.css.sass +2 -0
  78. data/fixtures/preview-app/source/stylesheets/main.css.sass +4 -0
  79. data/fixtures/preview-app/source/stylesheets/main2.css.sass +4 -0
  80. data/fixtures/preview-app/source/stylesheets/plain.css.sass +2 -0
  81. data/fixtures/relative-app/config.rb +0 -0
  82. data/fixtures/relative-app/source/images/blank.gif +0 -0
  83. data/fixtures/relative-app/source/stylesheets/relative_assets.css.sass +3 -0
  84. data/fixtures/relative-assets-app/config.rb +0 -0
  85. data/fixtures/relative-assets-app/source/images/blank.gif +0 -0
  86. data/fixtures/relative-assets-app/source/img/blank.gif +0 -0
  87. data/fixtures/relative-assets-app/source/relative_image.html.erb +1 -0
  88. data/fixtures/relative-assets-app/source/stylesheets/relative_assets.css.sass +3 -0
  89. data/fixtures/scss-app/config.rb +0 -0
  90. data/fixtures/scss-app/source/stylesheets/layout.css.sass +2 -0
  91. data/fixtures/scss-app/source/stylesheets/site_scss.css.scss +1 -0
  92. data/fixtures/slim-app/config.rb +1 -0
  93. data/fixtures/slim-app/source/slim.html.slim +7 -0
  94. data/fixtures/sprockets-app/config.rb +2 -0
  95. data/fixtures/sprockets-app/source/library/css/bootstrap_include.css.scss +1 -0
  96. data/fixtures/sprockets-app/source/library/css/plain.css +3 -0
  97. data/fixtures/sprockets-app/source/library/css/sprockets_base1.css.scss +1 -0
  98. data/fixtures/sprockets-app/source/library/css/sprockets_base2.css.scss +1 -0
  99. data/fixtures/sprockets-app/source/library/css/sprockets_sub.css.scss +1 -0
  100. data/fixtures/sprockets-app/source/library/js/jquery_include.js +1 -0
  101. data/fixtures/sprockets-app/source/library/js/plain.js +3 -0
  102. data/fixtures/sprockets-app/source/library/js/sprockets_base.js +5 -0
  103. data/fixtures/sprockets-app/source/library/js/sprockets_sub.js +3 -0
  104. data/fixtures/sprockets-app2/config.rb +0 -0
  105. data/fixtures/sprockets-app2/data/test.yml +4 -0
  106. data/fixtures/sprockets-app2/data/test2.json +4 -0
  107. data/fixtures/sprockets-app2/source/javascripts/multiple_engines.js.coffee.erb +1 -0
  108. data/fixtures/sprockets-app2/source/javascripts/sprockets_base.js +5 -0
  109. data/fixtures/sprockets-app2/source/javascripts/sprockets_sub.js +3 -0
  110. data/fixtures/sprockets-app2/source/stylesheets/sprockets_base1.css.scss +1 -0
  111. data/fixtures/sprockets-app2/source/stylesheets/sprockets_base2.css.scss +1 -0
  112. data/fixtures/sprockets-app2/source/stylesheets/sprockets_sub.css.scss +1 -0
  113. data/lib/middleman-more.rb +64 -0
  114. data/lib/middleman-more/core_extensions/compass.rb +75 -0
  115. data/lib/middleman-more/core_extensions/sprockets.rb +142 -0
  116. data/lib/middleman-more/extensions/cache_buster.rb +59 -0
  117. data/lib/middleman-more/extensions/minify_css.rb +17 -0
  118. data/lib/middleman-more/extensions/minify_css/cssmin.rb +55 -0
  119. data/lib/middleman-more/extensions/minify_javascript.rb +56 -0
  120. data/lib/middleman-more/extensions/relative_assets.rb +46 -0
  121. data/lib/middleman-more/renderers/haml.rb +13 -0
  122. data/lib/middleman-more/renderers/liquid.rb +21 -0
  123. data/lib/middleman-more/renderers/markdown.rb +28 -0
  124. data/lib/middleman-more/renderers/sass.rb +53 -0
  125. data/lib/middleman-more/renderers/slim.rb +15 -0
  126. data/middleman-more.gemspec +32 -0
  127. metadata +468 -0
data/Rakefile ADDED
@@ -0,0 +1,5 @@
1
+ # coding:utf-8
2
+ RAKE_ROOT = __FILE__
3
+
4
+ require 'rubygems'
5
+ require File.expand_path(File.dirname(__FILE__) + '/../gem_rake_helper')
@@ -0,0 +1,7 @@
1
+ Feature: Alternate between multiple asset hosts
2
+ In order to speed up page loading
3
+
4
+ Scenario: Rendering css with the feature enabled
5
+ Given the Server is running at "asset-host-app"
6
+ When I go to "/stylesheets/asset_host.css"
7
+ Then I should see "http://assets"
@@ -0,0 +1,26 @@
1
+ Feature: Generate mtime-based query string for busting browser caches
2
+ In order to display the most recent content for IE & CDNs and appease YSlow
3
+
4
+ Scenario: Rendering css with the feature disabled
5
+ Given "cache_buster" feature is "disabled"
6
+ And the Server is running at "cache-buster-app"
7
+ When I go to "/stylesheets/relative_assets.css"
8
+ Then I should not see "?"
9
+
10
+ Scenario: Rendering html with the feature disabled
11
+ Given "cache_buster" feature is "disabled"
12
+ And the Server is running at "cache-buster-app"
13
+ When I go to "/cache-buster.html"
14
+ Then I should not see "?"
15
+
16
+ Scenario: Rendering css with the feature enabled
17
+ Given "cache_buster" feature is "enabled"
18
+ And the Server is running at "cache-buster-app"
19
+ When I go to "/stylesheets/relative_assets.css"
20
+ Then I should see "?"
21
+
22
+ Scenario: Rendering html with the feature enabled
23
+ Given "cache_buster" feature is "enabled"
24
+ And the Server is running at "cache-buster-app"
25
+ When I go to "/cache-buster.html"
26
+ Then I should see "?"
@@ -0,0 +1,17 @@
1
+ Feature: Support coffee-script
2
+ In order to offer an alternative when writing Javascript
3
+
4
+ Scenario: Rendering coffee script
5
+ Given the Server is running at "coffeescript-app"
6
+ When I go to "/javascripts/coffee_test.js"
7
+ Then I should see "Array.prototype.slice"
8
+
9
+ Scenario: Rendering coffee-script with :coffeescript haml-filter
10
+ Given the Server is running at "coffeescript-app"
11
+ When I go to "/inline-coffeescript.html"
12
+ Then I should see "Array.prototype.slice"
13
+
14
+ Scenario: Rendering broken coffee
15
+ Given the Server is running at "coffeescript-app"
16
+ When I go to "/javascripts/broken-coffee.js"
17
+ Then I should see "Error"
@@ -0,0 +1,11 @@
1
+ Feature: Support content_for and yield_content helpers
2
+
3
+ Scenario: content_for works as expected in haml
4
+ Given the Server is running at "content-for-app"
5
+ When I go to "/content_for_haml.html"
6
+ Then I should see "In Layout: I am the yielded content haml"
7
+
8
+ Scenario: content_for works as expected in slim
9
+ Given the Server is running at "content-for-app"
10
+ When I go to "/content_for_slim.html"
11
+ Then I should see "In Layout: I am the yielded content slim"
@@ -0,0 +1,13 @@
1
+ Feature: Web Fonts
2
+
3
+ Scenario: Checking built folder for content
4
+ Given a successfully built app at "fonts-app"
5
+ When I cd to "build"
6
+ Then the following files should exist:
7
+ | stylesheets/fonts.css |
8
+ And the file "stylesheets/fonts.css" should contain "/fonts/StMarie-Thin.otf"
9
+
10
+ Scenario: Rendering scss
11
+ Given the Server is running at "fonts-app"
12
+ When I go to "/stylesheets/fonts.css"
13
+ Then I should see "/fonts/StMarie-Thin.otf"
@@ -0,0 +1,12 @@
1
+ Feature: CSS and Javascripts which are minify shouldn't be re-minified
2
+ Scenario: CSS file
3
+
4
+ Scenario: JS files containing ".min" should not be re-compressed
5
+ And the Server is running at "already-minified-app"
6
+ When I go to "/javascripts/test.min.js"
7
+ Then I should see "10" lines
8
+
9
+ Scenario: CSS files containing ".min" should not be re-compressed
10
+ And the Server is running at "already-minified-app"
11
+ When I go to "/stylesheets/test.min.css"
12
+ Then I should see "10" lines
@@ -0,0 +1,11 @@
1
+ Feature: Support liquid partials
2
+
3
+ Scenario: Rendering liquid
4
+ Given the Server is running at "liquid-app"
5
+ When I go to "/liquid_master.html"
6
+ Then I should see "Greetings"
7
+
8
+ Scenario: Rendering liquid
9
+ Given the Server is running at "liquid-app"
10
+ When I go to "/data2.html"
11
+ Then I should see "OneTwo"
@@ -0,0 +1,27 @@
1
+ Feature: Markdown support
2
+ In order to test included Maruku support
3
+
4
+ Scenario: Rendering html
5
+ Given the Server is running at "markdown-app"
6
+ When I go to "/index.html"
7
+ Then I should see "<p>Hello World</p>"
8
+
9
+ Scenario: Redcarpet 2 extensions
10
+ Given the Server is running at "markdown-app"
11
+ When I go to "/smarty_pants.html"
12
+ Then I should see "&ldquo;"
13
+ When I go to "/no_intra_emphasis.html"
14
+ Then I should not see "<em>"
15
+ When I go to "/tables.html"
16
+ Then I should see "<table>"
17
+ When I go to "/fenced_code_blocks.html"
18
+ Then I should see "<code>"
19
+ When I go to "/autolink.html"
20
+ Then I should see "<a href"
21
+ When I go to "/strikethrough.html"
22
+ Then I should see "<del>"
23
+ When I go to "/space_after_headers.html"
24
+ Then I should not see "<h1>"
25
+ When I go to "/superscript.html"
26
+ Then I should see "<sup>"
27
+
@@ -0,0 +1,19 @@
1
+ Feature: Minify CSS
2
+ In order reduce bytes sent to client and appease YSlow
3
+
4
+ Scenario: Rendering external css with the feature disabled
5
+ Given "minify_css" feature is "disabled"
6
+ And the Server is running at "minify-css-app"
7
+ When I go to "/stylesheets/site.css"
8
+ Then I should see "55" lines
9
+
10
+ Scenario: Rendering external css with the feature enabled
11
+ Given "minify_css" feature is "enabled"
12
+ And the Server is running at "minify-css-app"
13
+ When I go to "/stylesheets/site.css"
14
+ Then I should see "1" lines
15
+
16
+ Scenario: Rendering external css with passthrough compressor
17
+ Given the Server is running at "passthrough-app"
18
+ When I go to "/stylesheets/site.css"
19
+ Then I should see "55" lines
@@ -0,0 +1,55 @@
1
+ Feature: Minify Javascript
2
+ In order reduce bytes sent to client and appease YSlow
3
+
4
+ Background:
5
+ Given current environment is "build"
6
+
7
+ Scenario: Rendering inline js with the feature disabled
8
+ Given "minify_javascript" feature is "disabled"
9
+ And the Server is running at "minify-js-app"
10
+ When I go to "/inline-js.html"
11
+ Then I should see "10" lines
12
+
13
+ Scenario: Rendering inline js with a passthrough minifier
14
+ Given the Server is running at "passthrough-app"
15
+ When I go to "/inline-js.html"
16
+ Then I should see "11" lines
17
+
18
+ Scenario: Rendering inline js with the feature enabled
19
+ Given "minify_javascript" feature is "enabled"
20
+ And the Server is running at "minify-js-app"
21
+ When I go to "/inline-js.html"
22
+ Then I should see "5" lines
23
+
24
+ Scenario: Rendering external js with the feature enabled
25
+ Given "minify_javascript" feature is "enabled"
26
+ And the Server is running at "minify-js-app"
27
+ When I go to "/javascripts/js_test.js"
28
+ Then I should see "1" lines
29
+
30
+ Scenario: Rendering external js with a passthrough minifier
31
+ And the Server is running at "passthrough-app"
32
+ When I go to "/javascripts/js_test.js"
33
+ Then I should see "8" lines
34
+
35
+ Scenario: Rendering inline js (coffeescript) with the feature enabled
36
+ Given "minify_javascript" feature is "enabled"
37
+ And the Server is running at "minify-js-app"
38
+ When I go to "/inline-coffeescript.html"
39
+ Then I should see "5" lines
40
+
41
+ Scenario: Rendering external js (coffeescript) with the feature enabled
42
+ Given "minify_javascript" feature is "enabled"
43
+ And the Server is running at "minify-js-app"
44
+ When I go to "/javascripts/coffee_test.js"
45
+ Then I should see "1" lines
46
+
47
+ Scenario: Rendering inline js (coffeescript) with a passthrough minifier
48
+ Given the Server is running at "passthrough-app"
49
+ When I go to "/inline-coffeescript.html"
50
+ Then I should see "17" lines
51
+
52
+ Scenario: Rendering external js (coffeescript) with a passthrough minifier
53
+ And the Server is running at "passthrough-app"
54
+ When I go to "/javascripts/coffee_test.js"
55
+ Then I should see "11" lines
@@ -0,0 +1,50 @@
1
+ Feature: Relative Assets
2
+ In order easily switch between relative and absolute paths
3
+
4
+ Scenario: Rendering css with the feature disabled
5
+ Given "relative_assets" feature is "disabled"
6
+ And the Server is running at "relative-assets-app"
7
+ When I go to "/stylesheets/relative_assets.css"
8
+ Then I should not see "url('../"
9
+ And I should see "/images/blank.gif"
10
+
11
+ Scenario: Rendering html with the feature disabled
12
+ Given "relative_assets" feature is "disabled"
13
+ And the Server is running at "relative-assets-app"
14
+ When I go to "/relative_image.html"
15
+ Then I should see "/images/blank.gif"
16
+
17
+ Scenario: Rendering css with the feature enabled
18
+ Given "relative_assets" feature is "enabled"
19
+ And the Server is running at "relative-assets-app"
20
+ When I go to "/stylesheets/relative_assets.css"
21
+ Then I should see "url('../images/blank.gif"
22
+
23
+ Scenario: Rendering html with the feature enabled
24
+ Given "relative_assets" feature is "enabled"
25
+ And the Server is running at "relative-assets-app"
26
+ When I go to "/relative_image.html"
27
+ Then I should not see "/images/blank.gif"
28
+ And I should see "images/blank.gif"
29
+
30
+ Scenario: Rendering html with a custom images_dir
31
+ Given "relative_assets" feature is "enabled"
32
+ And "images_dir" is set to "img"
33
+ And the Server is running at "relative-assets-app"
34
+ When I go to "/stylesheets/relative_assets.css"
35
+ Then I should see "url('../img/blank.gif"
36
+
37
+ Scenario: Rendering css with a custom images_dir
38
+ Given "relative_assets" feature is "enabled"
39
+ And "images_dir" is set to "img"
40
+ And the Server is running at "relative-assets-app"
41
+ When I go to "/relative_image.html"
42
+ Then I should not see "/images/blank.gif"
43
+ Then I should not see "/img/blank.gif"
44
+ And I should see "img/blank.gif"
45
+
46
+ Scenario: Rendering scss with the feature enabled
47
+ Given "relative_assets" feature is "enabled"
48
+ And the Server is running at "fonts-app"
49
+ When I go to "/stylesheets/fonts.css"
50
+ Then I should see "url('../fonts/StMarie"
@@ -0,0 +1,83 @@
1
+ Feature: Sass Updates and Partials
2
+ Scenario: The preview server should update stylesheets when Sass changes
3
+ Given the Server is running at "preview-app"
4
+ And the file "source/stylesheets/plain.css.sass" has the contents
5
+ """
6
+ red
7
+ color: red
8
+ """
9
+ When I go to "/stylesheets/plain.css"
10
+ Then I should see "color: red;"
11
+ And the file "source/stylesheets/plain.css.sass" has the contents
12
+ """
13
+ red
14
+ color: blue
15
+ """
16
+ When I go to "/stylesheets/plain.css"
17
+ Then I should see "color: blue;"
18
+
19
+ Scenario: The preview server should update stylesheets when Sass partials change
20
+ Given the Server is running at "preview-app"
21
+ And the file "source/stylesheets/main.css.sass" has the contents
22
+ """
23
+ @import partial.sass
24
+
25
+ red
26
+ color: red
27
+ """
28
+ And the file "source/stylesheets/_partial.sass" has the contents
29
+ """
30
+ body
31
+ font-size: 14px
32
+ """
33
+ When I go to "/stylesheets/main.css"
34
+ Then I should see "color: red;"
35
+ And I should see "font-size: 14px;"
36
+ And the file "source/stylesheets/main.css.sass" has the contents
37
+ """
38
+ @import partial.sass
39
+
40
+ red
41
+ color: blue
42
+ """
43
+ And the file "source/stylesheets/_partial.sass" has the contents
44
+ """
45
+ body
46
+ font-size: 18px
47
+ """
48
+ When I go to "/stylesheets/main.css"
49
+ Then I should see "color: blue;"
50
+ And I should see "font-size: 18px"
51
+
52
+ Scenario: The preview server should update stylesheets when Sprockets partials change
53
+ Given the Server is running at "preview-app"
54
+ And the file "source/stylesheets/main2.css.sass" has the contents
55
+ """
56
+ //= require "_partial2.css.sass"
57
+
58
+ red
59
+ color: red
60
+ """
61
+ And the file "source/stylesheets/_partial2.css.sass" has the contents
62
+ """
63
+ body
64
+ font-size: 14px
65
+ """
66
+ When I go to "/stylesheets/main2.css"
67
+ Then I should see "color: red;"
68
+ Then I should see "font-size: 14px"
69
+ And the file "source/stylesheets/main2.css.sass" has the contents
70
+ """
71
+ //= require "_partial2.css.sass"
72
+
73
+ red
74
+ color: blue
75
+ """
76
+ And the file "source/stylesheets/_partial2.css.sass" has the contents
77
+ """
78
+ body
79
+ font-size: 18px
80
+ """
81
+ When I go to "/stylesheets/main2.css"
82
+ Then I should see "color: blue;"
83
+ Then I should see "font-size: 18px"
@@ -0,0 +1,12 @@
1
+ Feature: Support SCSS Syntax
2
+ In order to offer an alternative when writing Sass
3
+
4
+ Scenario: Rendering scss
5
+ Given the Server is running at "scss-app"
6
+ When I go to "/stylesheets/site_scss.css"
7
+ Then I should see "html"
8
+
9
+ Scenario: Rendering scss
10
+ Given the Server is running at "scss-app"
11
+ When I go to "/stylesheets/layout.css"
12
+ Then I should see "html"
@@ -0,0 +1,7 @@
1
+ Feature: Support slim templating language
2
+ In order to offer an alternative to Haml
3
+
4
+ Scenario: Rendering Slim
5
+ Given the Server is running at "slim-app"
6
+ When I go to "/slim.html"
7
+ Then I should see "<h1>Welcome to Slim</h1>"
@@ -0,0 +1,52 @@
1
+ Feature: Sprockets
2
+
3
+ Scenario: Sprockets JS require
4
+ Given the Server is running at "sprockets-app2"
5
+ When I go to "/javascripts/sprockets_base.js"
6
+ Then I should see "sprockets_sub_function"
7
+
8
+ Scenario: Sprockets JS require with custom :js_dir
9
+ Given the Server is running at "sprockets-app"
10
+ When I go to "/library/js/sprockets_base.js"
11
+ Then I should see "sprockets_sub_function"
12
+
13
+ Scenario: Plain JS require with custom :js_dir
14
+ Given the Server is running at "sprockets-app"
15
+ When I go to "/library/css/plain.css"
16
+ Then I should see "helloWorld"
17
+
18
+ Scenario: Sprockets JS should have access to yaml data
19
+ Given the Server is running at "sprockets-app2"
20
+ When I go to "/javascripts/multiple_engines.js"
21
+ Then I should see "Hello One"
22
+
23
+ Scenario: Multiple engine files should build correctly
24
+ Given a successfully built app at "sprockets-app2"
25
+ When I cd to "build"
26
+ Then a file named "javascripts/multiple_engines.js" should exist
27
+ And the file "javascripts/multiple_engines.js" should contain "Hello One"
28
+
29
+ Scenario: Sprockets CSS require //require
30
+ Given the Server is running at "sprockets-app2"
31
+ When I go to "/stylesheets/sprockets_base1.css"
32
+ Then I should see "hello"
33
+
34
+ Scenario: Sprockets CSS require @import
35
+ Given the Server is running at "sprockets-app2"
36
+ When I go to "/stylesheets/sprockets_base2.css"
37
+ Then I should see "hello"
38
+
39
+ Scenario: Sprockets CSS require with custom :css_dir //require
40
+ Given the Server is running at "sprockets-app"
41
+ When I go to "/library/css/sprockets_base1.css"
42
+ Then I should see "hello"
43
+
44
+ Scenario: Plain CSS require with custom :css_dir
45
+ Given the Server is running at "sprockets-app"
46
+ When I go to "/library/css/plain.css"
47
+ Then I should see "helloWorld"
48
+
49
+ Scenario: Sprockets CSS require with custom :css_dir @import
50
+ Given the Server is running at "sprockets-app"
51
+ When I go to "/library/css/sprockets_base2.css"
52
+ Then I should see "hello"
@@ -0,0 +1,10 @@
1
+ Feature: Sprockets Gems
2
+ Scenario: Sprockets can pull jQuery from gem
3
+ Given the Server is running at "sprockets-app"
4
+ When I go to "/library/js/jquery_include.js"
5
+ Then I should see "var jQuery ="
6
+
7
+ # Scenario: Sprockets can pull CSS from gem
8
+ # Given the Server is running at "sprockets-app"
9
+ # When I go to "/library/css/bootstrap_include.css"
10
+ # Then I should see "Bootstrap"