middleman 2.0.9.pre-x86-mswin32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (196) hide show
  1. data/.gemtest +0 -0
  2. data/.gitignore +13 -0
  3. data/.travis.yml +4 -0
  4. data/CHANGELOG +47 -0
  5. data/Gemfile +3 -0
  6. data/LICENSE +20 -0
  7. data/README.md +19 -0
  8. data/Rakefile +15 -0
  9. data/bin/middleman +73 -0
  10. data/bin/mm-build +9 -0
  11. data/bin/mm-init +9 -0
  12. data/bin/mm-server +9 -0
  13. data/features/asset_host.feature +14 -0
  14. data/features/automatic_image_sizes.feature +16 -0
  15. data/features/builder.feature +23 -0
  16. data/features/cache_buster.feature +26 -0
  17. data/features/coffee-script.feature +17 -0
  18. data/features/data.feature +12 -0
  19. data/features/directory_index.feature +29 -0
  20. data/features/dynamic_pages.feature +33 -0
  21. data/features/front-matter.feature +7 -0
  22. data/features/generator.feature +8 -0
  23. data/features/helpers_auto_javascript_include_tag.feature +27 -0
  24. data/features/helpers_auto_stylesheet_link_tag.feature +27 -0
  25. data/features/helpers_page_classes.feature +17 -0
  26. data/features/liquid.feature +6 -0
  27. data/features/markdown.feature +7 -0
  28. data/features/minify_css.feature +24 -0
  29. data/features/minify_javascript.feature +23 -0
  30. data/features/padrino_helpers.feature +10 -0
  31. data/features/page_alias_and_layouts.feature +44 -0
  32. data/features/relative_assets.feature +44 -0
  33. data/features/scss-support.feature +12 -0
  34. data/features/sinatra.feature +6 -0
  35. data/features/slim.feature +7 -0
  36. data/features/sprockets.feature +21 -0
  37. data/features/sprockets_gems.feature +7 -0
  38. data/features/step_definitions/asset_host_steps.rb +8 -0
  39. data/features/step_definitions/builder_steps.rb +40 -0
  40. data/features/step_definitions/generator_steps.rb +30 -0
  41. data/features/step_definitions/middleman_steps.rb +46 -0
  42. data/features/step_definitions/page_layout_steps.rb +13 -0
  43. data/features/support/env.rb +3 -0
  44. data/features/tiny_src.feature +15 -0
  45. data/fixtures/indexable-app/config.rb +2 -0
  46. data/fixtures/indexable-app/source/a_folder/needs_index.html +1 -0
  47. data/fixtures/indexable-app/source/leave_me_alone.html +1 -0
  48. data/fixtures/indexable-app/source/needs_index.html +1 -0
  49. data/fixtures/indexable-app/source/regular/index.html +1 -0
  50. data/fixtures/relative-app/config.rb +0 -0
  51. data/fixtures/relative-app/source/images/blank.gif +0 -0
  52. data/fixtures/relative-app/source/stylesheets/relative_assets.css.sass +3 -0
  53. data/fixtures/sprockets-app/config.rb +1 -0
  54. data/fixtures/sprockets-app/source/jquery_include.js +1 -0
  55. data/fixtures/sprockets-app/source/library/javascripts/sprockets_base.js +5 -0
  56. data/fixtures/sprockets-app/source/library/javascripts/sprockets_sub.js +3 -0
  57. data/fixtures/test-app/config.rb +51 -0
  58. data/fixtures/test-app/data/test.yml +4 -0
  59. data/fixtures/test-app/source/_liquid_partial.liquid +1 -0
  60. data/fixtures/test-app/source/_partial.haml +1 -0
  61. data/fixtures/test-app/source/a_folder/needs_index.html +1 -0
  62. data/fixtures/test-app/source/asset_host.html.haml +1 -0
  63. data/fixtures/test-app/source/auto-css.html.haml +1 -0
  64. data/fixtures/test-app/source/auto-css/auto-css.html.haml +1 -0
  65. data/fixtures/test-app/source/auto-css/index.html.haml +1 -0
  66. data/fixtures/test-app/source/auto-css/sub/auto-css.html.haml +1 -0
  67. data/fixtures/test-app/source/auto-image-sizes.html.haml +1 -0
  68. data/fixtures/test-app/source/auto-js.html.haml +1 -0
  69. data/fixtures/test-app/source/auto-js/auto-js.html.haml +1 -0
  70. data/fixtures/test-app/source/auto-js/index.html.haml +1 -0
  71. data/fixtures/test-app/source/auto-js/sub/auto-js.html.haml +1 -0
  72. data/fixtures/test-app/source/cache-buster.html.haml +2 -0
  73. data/fixtures/test-app/source/custom-layout-dir/index.html.haml +1 -0
  74. data/fixtures/test-app/source/custom-layout.html.haml +1 -0
  75. data/fixtures/test-app/source/data.html.erb +1 -0
  76. data/fixtures/test-app/source/data2.html.liquid +2 -0
  77. data/fixtures/test-app/source/front-matter.html.erb +6 -0
  78. data/fixtures/test-app/source/images/Child folder/regular_file(example).txt +1 -0
  79. data/fixtures/test-app/source/images/Read me (example).txt +1 -0
  80. data/fixtures/test-app/source/images/blank.gif +0 -0
  81. data/fixtures/test-app/source/img/blank.gif +0 -0
  82. data/fixtures/test-app/source/index.html.haml +6 -0
  83. data/fixtures/test-app/source/inline-coffeescript.html.haml +3 -0
  84. data/fixtures/test-app/source/inline-css.html.haml +4 -0
  85. data/fixtures/test-app/source/inline-js.html.haml +7 -0
  86. data/fixtures/test-app/source/javascripts/auto-js.js +1 -0
  87. data/fixtures/test-app/source/javascripts/auto-js/auto-js.js +1 -0
  88. data/fixtures/test-app/source/javascripts/auto-js/index.js +1 -0
  89. data/fixtures/test-app/source/javascripts/auto-js/sub/auto-js.js +1 -0
  90. data/fixtures/test-app/source/javascripts/broken-coffee.js.coffee +3 -0
  91. data/fixtures/test-app/source/javascripts/coffee_test.js.coffee +3 -0
  92. data/fixtures/test-app/source/javascripts/jquery.plugin.with.dots.js +1 -0
  93. data/fixtures/test-app/source/javascripts/jquery_base.js +5 -0
  94. data/fixtures/test-app/source/javascripts/multiple_engines.js.coffee.erb +1 -0
  95. data/fixtures/test-app/source/javascripts/sprockets_base.js +5 -0
  96. data/fixtures/test-app/source/javascripts/sprockets_sub.js +3 -0
  97. data/fixtures/test-app/source/layout.haml +6 -0
  98. data/fixtures/test-app/source/layouts/custom.haml +5 -0
  99. data/fixtures/test-app/source/liquid_master.html.liquid +1 -0
  100. data/fixtures/test-app/source/markdown.html.markdown +1 -0
  101. data/fixtures/test-app/source/needs_index.html +1 -0
  102. data/fixtures/test-app/source/padrino_test.html.haml +5 -0
  103. data/fixtures/test-app/source/page-classes.html.haml +1 -0
  104. data/fixtures/test-app/source/real.html +1 -0
  105. data/fixtures/test-app/source/real/index.html.erb +5 -0
  106. data/fixtures/test-app/source/relative_image.html.erb +1 -0
  107. data/fixtures/test-app/source/services/index.html.haml +1 -0
  108. data/fixtures/test-app/source/should_be_ignored.html +1 -0
  109. data/fixtures/test-app/source/should_be_ignored2.html +1 -0
  110. data/fixtures/test-app/source/should_be_ignored3.html +1 -0
  111. data/fixtures/test-app/source/slim.html.slim +7 -0
  112. data/fixtures/test-app/source/spaces in file.html.erb +1 -0
  113. data/fixtures/test-app/source/static.html +1 -0
  114. data/fixtures/test-app/source/stylesheets/asset_host.css.sass +3 -0
  115. data/fixtures/test-app/source/stylesheets/auto-css.css +3 -0
  116. data/fixtures/test-app/source/stylesheets/auto-css/auto-css.css +3 -0
  117. data/fixtures/test-app/source/stylesheets/auto-css/index.css +0 -0
  118. data/fixtures/test-app/source/stylesheets/auto-css/sub/auto-css.css +3 -0
  119. data/fixtures/test-app/source/stylesheets/layout.css.sass +2 -0
  120. data/fixtures/test-app/source/stylesheets/relative_assets.css.sass +3 -0
  121. data/fixtures/test-app/source/stylesheets/site.css.sass +1 -0
  122. data/fixtures/test-app/source/stylesheets/site_scss.css.scss +1 -0
  123. data/fixtures/test-app/source/stylesheets/static.css +2 -0
  124. data/fixtures/test-app/source/sub1/page-classes.html.haml +1 -0
  125. data/fixtures/test-app/source/sub1/sub2/page-classes.html.haml +1 -0
  126. data/fixtures/test-app/source/tiny_src.html.haml +1 -0
  127. data/lib/middleman.rb +202 -0
  128. data/lib/middleman/base.rb +198 -0
  129. data/lib/middleman/builder.rb +163 -0
  130. data/lib/middleman/cli.rb +87 -0
  131. data/lib/middleman/config.ru +2 -0
  132. data/lib/middleman/core_extensions/assets.rb +57 -0
  133. data/lib/middleman/core_extensions/builder.rb +41 -0
  134. data/lib/middleman/core_extensions/compass.rb +102 -0
  135. data/lib/middleman/core_extensions/data.rb +120 -0
  136. data/lib/middleman/core_extensions/default_helpers.rb +77 -0
  137. data/lib/middleman/core_extensions/features.rb +102 -0
  138. data/lib/middleman/core_extensions/front_matter.rb +116 -0
  139. data/lib/middleman/core_extensions/rack_map.rb +35 -0
  140. data/lib/middleman/core_extensions/rendering.rb +19 -0
  141. data/lib/middleman/core_extensions/routing.rb +87 -0
  142. data/lib/middleman/core_extensions/sprockets.rb +102 -0
  143. data/lib/middleman/features/asset_host.rb +22 -0
  144. data/lib/middleman/features/automatic_image_sizes.rb +31 -0
  145. data/lib/middleman/features/automatic_image_sizes/fastimage.rb +287 -0
  146. data/lib/middleman/features/cache_buster.rb +42 -0
  147. data/lib/middleman/features/directory_indexes.rb +56 -0
  148. data/lib/middleman/features/lorem.rb +126 -0
  149. data/lib/middleman/features/minify_css.rb +10 -0
  150. data/lib/middleman/features/minify_javascript.rb +43 -0
  151. data/lib/middleman/features/relative_assets.rb +38 -0
  152. data/lib/middleman/features/tiny_src.rb +11 -0
  153. data/lib/middleman/guard.rb +71 -0
  154. data/lib/middleman/renderers/coffee_script.rb +8 -0
  155. data/lib/middleman/renderers/haml.rb +31 -0
  156. data/lib/middleman/renderers/liquid.rb +29 -0
  157. data/lib/middleman/renderers/markdown.rb +34 -0
  158. data/lib/middleman/renderers/sass.rb +63 -0
  159. data/lib/middleman/renderers/slim.rb +8 -0
  160. data/lib/middleman/templates.rb +53 -0
  161. data/lib/middleman/templates/default.rb +17 -0
  162. data/lib/middleman/templates/default/source/index.html.erb +5 -0
  163. data/lib/middleman/templates/default/source/layout.erb +19 -0
  164. data/lib/middleman/templates/default/source/stylesheets/site.css.scss +32 -0
  165. data/lib/middleman/templates/html5.rb +16 -0
  166. data/lib/middleman/templates/html5/source/404.html +38 -0
  167. data/lib/middleman/templates/html5/source/README.md +388 -0
  168. data/lib/middleman/templates/html5/source/apple-touch-icon-114x114-precomposed.png +0 -0
  169. data/lib/middleman/templates/html5/source/apple-touch-icon-57x57-precomposed.png +0 -0
  170. data/lib/middleman/templates/html5/source/apple-touch-icon-72x72-precomposed.png +0 -0
  171. data/lib/middleman/templates/html5/source/apple-touch-icon-precomposed.png +0 -0
  172. data/lib/middleman/templates/html5/source/apple-touch-icon.png +0 -0
  173. data/lib/middleman/templates/html5/source/crossdomain.xml +25 -0
  174. data/lib/middleman/templates/html5/source/css/style.css +293 -0
  175. data/lib/middleman/templates/html5/source/favicon.ico +0 -0
  176. data/lib/middleman/templates/html5/source/humans.txt +43 -0
  177. data/lib/middleman/templates/html5/source/img/.gitignore +2 -0
  178. data/lib/middleman/templates/html5/source/index.html +79 -0
  179. data/lib/middleman/templates/html5/source/js/libs/jquery-1.6.2.js +8981 -0
  180. data/lib/middleman/templates/html5/source/js/libs/jquery-1.6.2.min.js +18 -0
  181. data/lib/middleman/templates/html5/source/js/libs/modernizr-2.0.6.min.js +4 -0
  182. data/lib/middleman/templates/html5/source/js/mylibs/.gitignore +2 -0
  183. data/lib/middleman/templates/html5/source/js/plugins.js +20 -0
  184. data/lib/middleman/templates/html5/source/js/script.js +8 -0
  185. data/lib/middleman/templates/html5/source/robots.txt +5 -0
  186. data/lib/middleman/templates/html5/source/test/index.html +31 -0
  187. data/lib/middleman/templates/html5/source/test/qunit/qunit.css +148 -0
  188. data/lib/middleman/templates/html5/source/test/qunit/qunit.js +1265 -0
  189. data/lib/middleman/templates/html5/source/test/tests.js +24 -0
  190. data/lib/middleman/templates/local.rb +20 -0
  191. data/lib/middleman/templates/shared/Gemfile.tt +3 -0
  192. data/lib/middleman/templates/shared/config.ru +4 -0
  193. data/lib/middleman/templates/shared/config.tt +104 -0
  194. data/lib/middleman/version.rb +3 -0
  195. data/middleman.gemspec +79 -0
  196. metadata +826 -0
File without changes
@@ -0,0 +1,13 @@
1
+ .DS_Store
2
+ coverage
3
+ rdoc
4
+ pkg
5
+ .sass-cache
6
+ .sassc
7
+ .tmp
8
+ Gemfile.lock
9
+ docs
10
+ .rvmrc
11
+ .rbenv-version
12
+ fixtures/test-app/build
13
+ .*.swp
@@ -0,0 +1,4 @@
1
+ rvm:
2
+ - 1.8.7
3
+ - 1.9.2
4
+ script: "bundle exec rake test"
@@ -0,0 +1,47 @@
1
+ 2.0.8
2
+ =====
3
+ - Support accessing variables and data objects in ERb Sprockets files (library.js.coffee.erb)
4
+ - Make :markdown_engine support simple symbol names (:maruku instead of ::Tilt::MarkukuTemplate)
5
+ - Update Padrino deps to 0.10.2
6
+ - Include therubyracer on *nix
7
+ - Enable frontmatter for Liquid templates
8
+
9
+ 2.0.7
10
+ =====
11
+ - Updated HTML5 Boilerplate to v2
12
+ - Make Rails 3.1 javascript gems available to Sprockets
13
+
14
+ 2.0.6
15
+ =====
16
+ - Pulled out livereload feature into its own extension, still installed by default.
17
+
18
+ 2.0.5
19
+ =====
20
+ - Vendored Padrino 0.10.0
21
+
22
+ 2.0.4
23
+ =====
24
+ - Pulled out undocumented remote data feature into its own extension
25
+
26
+ 2.0.3
27
+ =====
28
+ - Pulled out undocumented Blog feature into its own extension
29
+
30
+ 2.0.2
31
+ =====
32
+ - Fixed Sprockets circular error
33
+ - Added auto-requiring extensions
34
+
35
+ 2.0.0
36
+ =====
37
+ - Guard-powered auto-reloading of config.rb
38
+ - Guard LiveReload
39
+ - Sprockets JS
40
+ - Refactored Dynamically Reloadable Core
41
+ - Combine views/ and public/ into a single source/ folder.
42
+ - Support YAML front-matter
43
+ - Added callback to run code after Compass is configured
44
+ - Added support for a compass.config file which is passed directly to Compass
45
+ - Blog-aware Feature (and project template)
46
+ - Thor-based, unified `middleman` binary
47
+ - :directory_indexes feature
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source :rubygems
2
+
3
+ gemspec :name => "middleman"
data/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2010 Thomas Reynolds
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,19 @@
1
+ Middleman [![Build Status](http://travis-ci.org/tdreyno/middleman.png)](http://travis-ci.org/tdreyno/middleman)
2
+ =========
3
+
4
+ Middleman is ever-vigilant against tag-soup, unreadable CSS and repetition. He stands-watch over your Haml, Sass, and CoffeeScript producing only the cleanest and most efficient markup.
5
+
6
+ [![Click here to lend your support to Middleman](https://www.pledgie.com/campaigns/15807.png)](http://www.pledgie.com/campaigns/15807)
7
+
8
+ ## Getting Started
9
+
10
+ Everything you need to know is on the official site:
11
+ http://middlemanapp.com
12
+
13
+ ## Mailing List
14
+
15
+ If you have questions, answers can be found on community forum: https://convore.com/middleman/
16
+
17
+ ## Copyright
18
+
19
+ Copyright (c) 2010 Thomas Reynolds. See LICENSE for details.
@@ -0,0 +1,15 @@
1
+ require 'bundler'
2
+ Bundler::GemHelper.install_tasks :name => ENV["NAME"] || "middleman"
3
+
4
+ require 'cucumber/rake/task'
5
+
6
+ Cucumber::Rake::Task.new(:cucumber, 'Run features that should pass') do |t|
7
+ t.cucumber_opts = "--color --tags ~@wip --strict --format #{ENV['CUCUMBER_FORMAT'] || 'pretty'}"
8
+ end
9
+
10
+ #$LOAD_PATH.unshift 'lib'
11
+
12
+ require 'rake/testtask'
13
+ require 'rake/clean'
14
+
15
+ task :test => ["cucumber"]
@@ -0,0 +1,73 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ libdir = File.join(File.dirname(File.dirname(__FILE__)), "lib")
4
+ $LOAD_PATH.unshift(libdir) unless $LOAD_PATH.include?(libdir)
5
+
6
+ require 'pathname'
7
+ require 'rubygems'
8
+
9
+ module Middleman
10
+ module ProjectLocator
11
+ def self.locate_middleman_root!(args)
12
+ cwd = Dir.pwd
13
+
14
+ if !in_middleman_project? && !in_middleman_project_subdirectory?
15
+ $stderr.puts "== Error: Could not find a Middleman project config, perhaps you are in the wrong folder?"
16
+ return
17
+ end
18
+
19
+ if in_middleman_project?
20
+ did_locate_middleman_project(cwd, args)
21
+ return
22
+ end
23
+
24
+ Dir.chdir("..") do
25
+ # Recurse in a chdir block: if the search fails we want to be sure
26
+ # the application is generated in the original working directory.
27
+ locate_middleman_root!(args) unless cwd == Dir.pwd
28
+ end
29
+ rescue SystemCallError
30
+ # could not chdir, no problem just return
31
+ end
32
+
33
+ def self.in_middleman_project?
34
+ File.exists?('config.rb')
35
+ end
36
+
37
+ def self.in_middleman_project_subdirectory?(path = Pathname.new(Dir.pwd))
38
+ File.exists?(File.join(path, 'config.rb')) || !path.root? && in_middleman_project_subdirectory?(path.parent)
39
+ end
40
+
41
+ def self.did_locate_middleman_project(path, args)
42
+ # Set up gems listed in the Gemfile.
43
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('Gemfile', path)
44
+
45
+ require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
46
+
47
+ start_cli!(args)
48
+ end
49
+
50
+ def self.start_cli!(args)
51
+ require 'middleman'
52
+ Middleman::CLI.start(args)
53
+ end
54
+ end
55
+ end
56
+
57
+ args = ARGV.dup
58
+
59
+ ARG_ALIASES = {
60
+ "s" => "server",
61
+ "b" => "build",
62
+ "i" => "init"
63
+ }
64
+
65
+ if ARG_ALIASES.has_key?(args[0])
66
+ args[0] = ARG_ALIASES[args[0]]
67
+ end
68
+
69
+ if args.length < 1 || %w(server build migrate).include?(args.first)
70
+ Middleman::ProjectLocator.locate_middleman_root!(args)
71
+ else
72
+ Middleman::ProjectLocator.start_cli!(args)
73
+ end
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env ruby
2
+ require "rubygems"
3
+
4
+ libdir = File.join(File.dirname(File.dirname(__FILE__)), "lib")
5
+ $LOAD_PATH.unshift(libdir) unless $LOAD_PATH.include?(libdir)
6
+
7
+ require 'middleman'
8
+ args = ARGV.dup.unshift("build")
9
+ Middleman::CLI.start(args)
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env ruby
2
+ require "rubygems"
3
+
4
+ libdir = File.join(File.dirname(File.dirname(__FILE__)), "lib")
5
+ $LOAD_PATH.unshift(libdir) unless $LOAD_PATH.include?(libdir)
6
+
7
+ require 'middleman'
8
+ args = ARGV.dup.unshift("init")
9
+ Middleman::CLI.start(args)
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env ruby
2
+ require "rubygems"
3
+
4
+ libdir = File.join(File.dirname(File.dirname(__FILE__)), "lib")
5
+ $LOAD_PATH.unshift(libdir) unless $LOAD_PATH.include?(libdir)
6
+
7
+ require 'middleman'
8
+ args = ARGV.dup.unshift("server")
9
+ Middleman::CLI.start(args)
@@ -0,0 +1,14 @@
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 I am using an asset host
6
+ And the Server is running at "test-app"
7
+ When I go to "/stylesheets/asset_host.css"
8
+ Then I should see "http://assets"
9
+
10
+ Scenario: Rendering html with the feature enabled
11
+ Given I am using an asset host
12
+ And the Server is running at "test-app"
13
+ When I go to "/asset_host.html"
14
+ Then I should see "http://assets"
@@ -0,0 +1,16 @@
1
+ Feature: Automatically detect and insert image dimensions into tags
2
+ In order to speed up development and appease YSlow
3
+
4
+ Scenario: Rendering an image with the feature disabled
5
+ Given "automatic_image_sizes" feature is "disabled"
6
+ And the Server is running at "test-app"
7
+ When I go to "/auto-image-sizes.html"
8
+ Then I should not see "width="
9
+ And I should not see "height="
10
+
11
+ Scenario: Rendering an image with the feature enabled
12
+ Given "automatic_image_sizes" feature is "enabled"
13
+ And the Server is running at "test-app"
14
+ When I go to "/auto-image-sizes.html"
15
+ Then I should see "width="
16
+ And I should see "height="
@@ -0,0 +1,23 @@
1
+ Feature: Builder
2
+ In order to output static html and css for delivery
3
+
4
+ Scenario: Checking built folder for content
5
+ Given a built app at "test-app"
6
+ Then "index.html" should exist at "test-app" and include "Comment in layout"
7
+ Then "javascripts/coffee_test.js" should exist at "test-app" and include "Array.prototype.slice"
8
+ Then "index.html" should exist at "test-app" and include "<h1>Welcome</h1>"
9
+ Then "static.html" should exist at "test-app" and include "Static, no code!"
10
+ Then "services/index.html" should exist at "test-app" and include "Services"
11
+ Then "stylesheets/site.css" should exist at "test-app" and include "html, body, div, span"
12
+ Then "stylesheets/site_scss.css" should exist at "test-app" and include "html, body, div, span"
13
+ Then "stylesheets/static.css" should exist at "test-app" and include "body"
14
+ Then "_partial.html" should not exist at "test-app"
15
+ Then "spaces in file.html" should exist at "test-app" and include "spaces"
16
+ Then "images/Read me (example).txt" should exist at "test-app"
17
+ Then "images/Child folder/regular_file(example).txt" should exist at "test-app"
18
+ And cleanup built app at "test-app"
19
+
20
+ # Scenario: Force relative assets
21
+ # Given a built app at "relative-app" with flags "--relative"
22
+ # Then "stylesheets/relative_assets.css" should exist at "relative-app" and include "../"
23
+ # And cleanup built app at "relative-app"
@@ -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 "test-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 "test-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 "test-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 "test-app"
25
+ When I go to "/cache-buster.html"
26
+ Then I should not 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 "test-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 "test-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 "test-app"
16
+ When I go to "/javascripts/broken-coffee.js"
17
+ Then I should see "Reserved word"
@@ -0,0 +1,12 @@
1
+ Feature: Local Data API
2
+ In order to abstract content from structure
3
+
4
+ Scenario: Rendering html
5
+ Given the Server is running at "test-app"
6
+ When I go to "/data.html"
7
+ Then I should see "One:Two"
8
+
9
+ Scenario: Rendering liquid
10
+ Given the Server is running at "test-app"
11
+ When I go to "/data2.html"
12
+ Then I should see "OneTwo"
@@ -0,0 +1,29 @@
1
+ Feature: Directory Index
2
+ In order output Apache-friendly directories and indexes
3
+
4
+ Scenario: Checking built folder for content
5
+ Given a built app at "indexable-app"
6
+ Then "needs_index/index.html" should exist at "indexable-app" and include "Indexable"
7
+ Then "a_folder/needs_index/index.html" should exist at "indexable-app" and include "Indexable"
8
+ Then "leave_me_alone.html" should exist at "indexable-app" and include "Stay away"
9
+ Then "regular/index.html" should exist at "indexable-app" and include "Regular"
10
+ Then "regular/index/index.html" should not exist at "indexable-app"
11
+ Then "needs_index.html" should not exist at "indexable-app"
12
+ Then "a_folder/needs_index.html" should not exist at "indexable-app"
13
+ Then "leave_me_alone/index.html" should not exist at "indexable-app"
14
+ And cleanup built app at "indexable-app"
15
+
16
+ Scenario: Preview normal file
17
+ Given the Server is running at "indexable-app"
18
+ When I go to "/needs_index/"
19
+ Then I should see "Indexable"
20
+
21
+ Scenario: Preview normal file subdirectory
22
+ Given the Server is running at "indexable-app"
23
+ When I go to "/a_folder/needs_index/"
24
+ Then I should see "Indexable"
25
+
26
+ Scenario: Preview ignored file
27
+ Given the Server is running at "indexable-app"
28
+ When I go to "/leave_me_alone/"
29
+ Then I should see "File Not Found"
@@ -0,0 +1,33 @@
1
+ Feature: Dynamic Pages
2
+ In order to use a single view to generate multiple output files
3
+
4
+ Scenario: Checking built folder for content
5
+ Given a built app at "test-app"
6
+ Then "fake.html" should exist at "test-app" and include "I am real"
7
+ Then "fake/one.html" should exist at "test-app" and include "I am real: one"
8
+ Then "fake/two.html" should exist at "test-app" and include "I am real: two"
9
+ Then "target_ignore.html" should exist at "test-app" and include "Ignore me"
10
+ Then "should_be_ignored.html" should not exist at "test-app"
11
+ Then "should_be_ignored2.html" should not exist at "test-app"
12
+ Then "should_be_ignored3.html" should not exist at "test-app"
13
+ And cleanup built app at "test-app"
14
+
15
+ Scenario: Preview basic proxy
16
+ Given the Server is running at "test-app"
17
+ When I go to "/fake.html"
18
+ Then I should see "I am real"
19
+
20
+ Scenario: Preview proxy with variable one
21
+ Given the Server is running at "test-app"
22
+ When I go to "/fake/one.html"
23
+ Then I should see "I am real: one"
24
+
25
+ Scenario: Preview proxy with variable two
26
+ Given the Server is running at "test-app"
27
+ When I go to "/fake/two.html"
28
+ Then I should see "I am real: two"
29
+
30
+ Scenario: Preview ignored paths
31
+ Given the Server is running at "test-app"
32
+ When I go to "/should_be_ignored.html"
33
+ Then I should see "File Not Found"
@@ -0,0 +1,7 @@
1
+ Feature: YAML Front Matter
2
+ In order to specific options and data inline
3
+
4
+ Scenario: Rendering html
5
+ Given the Server is running at "test-app"
6
+ When I go to "/front-matter.html"
7
+ Then I should see "<h1>This is the title</h1>"
@@ -0,0 +1,8 @@
1
+ Feature: Generator
2
+ In order to generate static assets for client
3
+
4
+ Scenario: Copying template files
5
+ Given generated directory at "generator-test"
6
+ Then template files should exist at "generator-test"
7
+ And empty directories should exist at "generator-test"
8
+ And cleanup at "generator-test"
@@ -0,0 +1,27 @@
1
+ Feature: Built-in auto_javascript_include_tag view helper
2
+ In order to simplify including javascript files
3
+
4
+ Scenario: Viewing the root path
5
+ Given the Server is running at "test-app"
6
+ When I go to "/auto-js.html"
7
+ Then I should see "javascripts/auto-js.js"
8
+
9
+ Scenario: Viewing a tier-1 path
10
+ Given the Server is running at "test-app"
11
+ When I go to "/auto-js/auto-js.html"
12
+ Then I should see "javascripts/auto-js/auto-js.js"
13
+
14
+ Scenario: Viewing the index file of a tier-1 path, without filename
15
+ Given the Server is running at "test-app"
16
+ When I go to "/auto-js"
17
+ Then I should see "javascripts/auto-js/index.js"
18
+
19
+ Scenario: Viewing the index file of a tier-1 path, without filename, with a trailing slash
20
+ Given the Server is running at "test-app"
21
+ When I go to "/auto-js/"
22
+ Then I should see "javascripts/auto-js/index.js"
23
+
24
+ Scenario: Viewing a tier-2 path
25
+ Given the Server is running at "test-app"
26
+ When I go to "/auto-js/sub/auto-js.html"
27
+ Then I should see "javascripts/auto-js/sub/auto-js.js"