middleman 3.0.0.alpha.3 → 3.0.0.alpha.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (117) hide show
  1. data/.gitignore +1 -2
  2. data/.yardopts +2 -0
  3. data/CHANGELOG.md +97 -0
  4. data/README.md +84 -13
  5. data/Rakefile +6 -2
  6. data/bin/middleman +5 -4
  7. data/features/builder.feature +7 -0
  8. data/features/clean_build.feature +11 -0
  9. data/features/current_page_request_path_backwards.feature +6 -0
  10. data/features/front-matter.feature +28 -1
  11. data/features/generator.feature +4 -4
  12. data/features/helpers_external.feature +6 -0
  13. data/features/helpers_lorem.feature +5 -0
  14. data/features/instance_vars.feature +20 -0
  15. data/features/markdown.feature +23 -3
  16. data/features/minify_css.feature +6 -1
  17. data/features/minify_javascript.feature +33 -1
  18. data/features/mount_rack.feature +8 -0
  19. data/features/partials.feature +7 -1
  20. data/features/preview_changes.feature +18 -0
  21. data/features/wildcard_page_helper.feature +19 -0
  22. data/fixtures/build-with-errors-app/config.rb +1 -0
  23. data/fixtures/build-with-errors-app/source/index.html.erb +1 -0
  24. data/fixtures/clean-app/source/index.html.haml +1 -6
  25. data/fixtures/clean-dir-app/config.rb +2 -0
  26. data/fixtures/clean-dir-app/source/about.html +1 -0
  27. data/fixtures/different-engine-partial/config.rb +0 -0
  28. data/fixtures/different-engine-partial/source/index.html.erb +1 -0
  29. data/fixtures/different-engine-partial/source/layouts/layout.erb +7 -0
  30. data/fixtures/different-engine-partial/source/shared/_footer.slim +1 -0
  31. data/fixtures/different-engine-partial/source/shared/_header.erb +1 -0
  32. data/fixtures/external-helpers/config.rb +4 -0
  33. data/fixtures/external-helpers/lib/hello_helper.rb +5 -0
  34. data/fixtures/external-helpers/source/index.html.erb +1 -0
  35. data/fixtures/instance-vars-app/config.rb +0 -0
  36. data/fixtures/instance-vars-app/source/_vartial.erb +5 -0
  37. data/fixtures/instance-vars-app/source/instance-var-set.html.erb +2 -0
  38. data/fixtures/instance-vars-app/source/layout.erb +3 -0
  39. data/fixtures/instance-vars-app/source/no-instance-var.html.erb +1 -0
  40. data/fixtures/markdown-app/config.rb +9 -0
  41. data/fixtures/markdown-app/source/autolink.html.markdown +5 -0
  42. data/fixtures/markdown-app/source/fenced_code_blocks.html.markdown +7 -0
  43. data/fixtures/markdown-app/source/index.html.markdown +4 -0
  44. data/fixtures/markdown-app/source/no_intra_emphasis.html.markdown +5 -0
  45. data/fixtures/markdown-app/source/smarty_pants.html.markdown +5 -0
  46. data/fixtures/markdown-app/source/space_after_headers.html.markdown +5 -0
  47. data/fixtures/markdown-app/source/strikethrough.html.markdown +5 -0
  48. data/fixtures/markdown-app/source/superscript.html.markdown +5 -0
  49. data/fixtures/markdown-app/source/tables.html.markdown +8 -0
  50. data/fixtures/passthrough-app/config.rb +17 -0
  51. data/fixtures/passthrough-app/source/.htaccess +1 -0
  52. data/fixtures/passthrough-app/source/inline-coffeescript.html.haml +3 -0
  53. data/fixtures/passthrough-app/source/inline-css.html.haml +4 -0
  54. data/fixtures/passthrough-app/source/inline-js.html.haml +7 -0
  55. data/fixtures/passthrough-app/source/javascripts/coffee_test.js.coffee +3 -0
  56. data/fixtures/passthrough-app/source/javascripts/js_test.js +8 -0
  57. data/fixtures/passthrough-app/source/stylesheets/site.css.sass +1 -0
  58. data/fixtures/preview-app/config.rb +0 -0
  59. data/fixtures/preview-app/source/content.html.erb +1 -0
  60. data/fixtures/preview-app/source/layout.erb +1 -0
  61. data/fixtures/sinatra-app/config.rb +11 -0
  62. data/fixtures/sinatra-app/source/index.html.erb +5 -0
  63. data/fixtures/test-app/config.rb +2 -2
  64. data/fixtures/test-app/source/front-matter-2.php.erb +7 -0
  65. data/fixtures/test-app/source/front-matter-change.html.erb +5 -0
  66. data/fixtures/test-app/source/index.html.slim +9 -0
  67. data/fixtures/test-app/source/javascripts/js_test.js +8 -0
  68. data/fixtures/test-app/source/lorem.html.erb +12 -0
  69. data/fixtures/test-app/source/request-path.html.erb +1 -0
  70. data/fixtures/wildcard-app/config.rb +1 -0
  71. data/fixtures/wildcard-app/source/admin/index.html.erb +1 -0
  72. data/fixtures/wildcard-app/source/admin/page.html.erb +1 -0
  73. data/fixtures/wildcard-app/source/index.html.erb +1 -0
  74. data/fixtures/wildcard-app/source/layouts/admin.erb +2 -0
  75. data/fixtures/wildcard-app/source/layouts/layout.erb +2 -0
  76. data/fixtures/wildcard-directory-index-app/config.rb +2 -0
  77. data/fixtures/wildcard-directory-index-app/source/admin/index.html.erb +1 -0
  78. data/fixtures/wildcard-directory-index-app/source/admin/page.html.erb +1 -0
  79. data/fixtures/wildcard-directory-index-app/source/index.html.erb +1 -0
  80. data/fixtures/wildcard-directory-index-app/source/layouts/admin.erb +2 -0
  81. data/fixtures/wildcard-directory-index-app/source/layouts/layout.erb +2 -0
  82. data/lib/middleman.rb +63 -8
  83. data/lib/middleman/base.rb +56 -12
  84. data/lib/middleman/builder.rb +18 -12
  85. data/lib/middleman/cli.rb +5 -5
  86. data/lib/middleman/core_extensions/assets.rb +12 -0
  87. data/lib/middleman/core_extensions/builder.rb +4 -4
  88. data/lib/middleman/core_extensions/extensions.rb +5 -51
  89. data/lib/middleman/core_extensions/front_matter.rb +30 -11
  90. data/lib/middleman/core_extensions/rendering.rb +18 -12
  91. data/lib/middleman/core_extensions/routing.rb +12 -0
  92. data/lib/middleman/core_extensions/show_exceptions.rb +16 -0
  93. data/lib/middleman/core_extensions/sitemap.rb +10 -4
  94. data/lib/middleman/extensions/minify_css.rb +4 -2
  95. data/lib/middleman/extensions/minify_javascript.rb +8 -6
  96. data/lib/middleman/guard.rb +80 -76
  97. data/lib/middleman/renderers/markdown.rb +8 -13
  98. data/lib/middleman/sitemap/page.rb +3 -2
  99. data/lib/middleman/sitemap/store.rb +3 -1
  100. data/lib/middleman/sitemap/template.rb +19 -5
  101. data/lib/middleman/step_definitions.rb +1 -0
  102. data/lib/middleman/step_definitions/builder_steps.rb +6 -1
  103. data/lib/middleman/step_definitions/generator_steps.rb +9 -13
  104. data/lib/middleman/step_definitions/middleman_steps.rb +13 -0
  105. data/lib/middleman/step_definitions/server_steps.rb +7 -0
  106. data/lib/middleman/templates.rb +42 -21
  107. data/lib/middleman/templates/default.rb +5 -0
  108. data/lib/middleman/templates/html5.rb +6 -0
  109. data/lib/middleman/templates/local.rb +5 -6
  110. data/lib/middleman/templates/mobile.rb +6 -0
  111. data/lib/middleman/version.rb +1 -1
  112. data/middleman-x86-mingw32.gemspec +1 -1
  113. data/middleman.gemspec +3 -2
  114. metadata +531 -242
  115. data/CHANGELOG +0 -98
  116. data/fixtures/test-app/source/index.html.haml +0 -9
  117. data/fixtures/test-app/source/markdown.html.markdown +0 -1
data/.gitignore CHANGED
@@ -7,9 +7,8 @@ pkg
7
7
  .tmp
8
8
  Gemfile.lock
9
9
  docs
10
- .rvmrc
11
10
  .rbenv-version
12
- fixtures/test-app/build
11
+ fixtures/generator-test
13
12
  .*.swp
14
13
  build
15
14
  doc
data/.yardopts CHANGED
@@ -2,4 +2,6 @@ lib/**/*.rb
2
2
  --exclude lib/middleman/vendor
3
3
  --exclude lib/middleman/extensions/automatic_image_sizes/fastimage.rb
4
4
  --exclude lib/middleman/extensions/minify_css/cssmin.rb
5
+ --exclude lib/middleman/step_definitions
6
+ --exclude lib/middleman/step_definitions.rb
5
7
  --no-private
@@ -0,0 +1,97 @@
1
+ 3.0.pre
2
+ ====
3
+ * Rewritten to work directly with Rack (Sinatra apps can still be mounted)
4
+ * Sitemap maintains own state
5
+ * New Extension Registration API
6
+ * Remove old 1.x mm- binaries and messaging
7
+ * New default layout functionality: https://github.com/tdreyno/middleman/issues/165
8
+ * Enable chained templates outside of sprockets (file.html.markdown.erb)
9
+ * Finally support Compass in Sprockets! Thanks to @xdite and @petebrowne
10
+ * Sitemap object representing the known world
11
+ * FileWatcher proxies file change events
12
+ * Unified callback solution
13
+ * Removed Slim and Maruku from base install. Will need to be installed and required by the user (in - config.rb)
14
+ * Activate mobile html5boilerplate template
15
+ * Update to Redcarpet for Markdown (breaks Haml :markdown filter)
16
+
17
+ 2.0.14
18
+ ====
19
+ * Minor fix for i18n
20
+
21
+ 2.0.13.2
22
+ ====
23
+ * Update Windows eventmachine dep
24
+
25
+ 2.0.13.1
26
+ ====
27
+ * build --clean shouldn't remove dotfiles
28
+
29
+ 2.0.13
30
+ ====
31
+ * middleman build --clean keeps the build directory clean of leftover files
32
+ * Padrino 0.10.5 and Rack 1.3.5
33
+
34
+ 2.0.12
35
+ ====
36
+ * Sinatra 1.3.1 and Padrino 0.10.4
37
+
38
+ 2.0.11
39
+ =====
40
+ * Lock Padrino and Sinatra versions (for now)
41
+
42
+ 2.0.9
43
+ =====
44
+ * Added --glob option to build which only builds matching files
45
+ * Allow data/ files to be in JSON format as well
46
+ * Enabled Liquid {% include %} tag
47
+ * RubyInstaller-specific gem
48
+ * Allow access to data/ in config.rb
49
+ * Add mobile html5boilerplate template
50
+
51
+ 2.0.8
52
+ =====
53
+ * Support accessing variables and data objects in ERb Sprockets files (library.js.coffee.erb)
54
+ * Make :markdown_engine support simple symbol names (:maruku instead of ::Tilt::MarkukuTemplate)
55
+ * Update Padrino deps to 0.10.2
56
+ * Include therubyracer on *nix
57
+ * Enable frontmatter for Liquid templates
58
+
59
+ 2.0.7
60
+ =====
61
+ * Updated HTML5 Boilerplate to v2
62
+ * Make Rails 3.1 javascript gems available to Sprockets
63
+
64
+ 2.0.6
65
+ =====
66
+ * Pulled out livereload feature into its own extension, still installed by default.
67
+
68
+ 2.0.5
69
+ =====
70
+ * Vendored Padrino 0.10.0
71
+
72
+ 2.0.4
73
+ =====
74
+ * Pulled out undocumented remote data feature into its own extension
75
+
76
+ 2.0.3
77
+ =====
78
+ * Pulled out undocumented Blog feature into its own extension
79
+
80
+ 2.0.2
81
+ =====
82
+ * Fixed Sprockets circular error
83
+ * Added auto-requiring extensions
84
+
85
+ 2.0.0
86
+ =====
87
+ * Guard-powered auto-reloading of config.rb
88
+ * Guard LiveReload
89
+ * Sprockets JS
90
+ * Refactored Dynamically Reloadable Core
91
+ * Combine views/ and public/ into a single source/ folder.
92
+ * Support YAML front-matter
93
+ * Added callback to run code after Compass is configured
94
+ * Added support for a compass.config file which is passed directly to Compass
95
+ * Blog-aware Feature (and project template)
96
+ * Thor-based, unified `middleman` binary
97
+ * :directory_indexes feature
data/README.md CHANGED
@@ -1,22 +1,93 @@
1
- Middleman [![Build Status](http://travis-ci.org/tdreyno/middleman.png)](http://travis-ci.org/tdreyno/middleman)
2
- =========
1
+ # Middleman
3
2
 
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.
3
+ Middleman makes developing stand-alone websites simple. The last few years has seen an explosion in the amount and variety of tools developers can use to build web applications. Ruby on Rails selects a handful of these tools:
5
4
 
6
- [![Click here to lend your support to Middleman](https://www.pledgie.com/campaigns/15807.png)](http://www.pledgie.com/campaigns/15807)
5
+ * Sass for DRY stylesheets
6
+ * CoffeeScript for safer and less verbose javascript
7
+ * Sprockets for combining and minifying assets
8
+ * ERb & Haml for dynamic pages and simplified HTML syntax
9
+
10
+ Middleman gives the stand-alone developer access to all these tool and many, many more. Why would you use a stand-alone framework instead of Ruby on Rails?
11
+
12
+ These days, many websites are built with an API in mind. Rather than package the frontend and the backend together, both can be built and deployed independently using the public API to pull data from the backend and display it on the frontend. Static websites are incredibly fast and require very little RAM. A front-end built to stand-alone can be deployed directly to the cloud or a CDN. Many designers and developers simply deliver static HTML/JS/CSS to their clients.
13
+
14
+ # Install
15
+
16
+ Middleman is built on Ruby and uses the RubyGems package manager for installation. These are usually pre-installed on Mac OS X and Linux. Windows users can install both using [RubyInstaller].
17
+
18
+ gem install middleman
19
+
20
+ # Getting Started
21
+
22
+ Once Middleman is installed, you will have access to the `middleman` command. First, let's create a new project. From the terminal:
23
+
24
+ middleman init MY_PROJECT
25
+
26
+ This will create a new Middleman project located in the "MY_PROJECT" directory. This project contains a `config.rb` file for configuring Middleman and a `source` directory for storing your pages, stylesheets, javascripts and images.
27
+
28
+ Change directories into your new project and start the preview server:
29
+
30
+ cd MY_PROJECT
31
+ middleman server
32
+
33
+ The preview server allows you to build your site, by modifying the contents of the `source` directory, and see your changes reflected in the browser at: `http://localhost:4567/`
34
+
35
+ To get started, simply develop as you normally would by building HTML, CSS, and Javascript in the `source` directory. When you're ready to use more complex templates, simply add the templating engine's extension to the file and start writing in that format.
36
+
37
+ For example, say I am working on a stylesheet at `source/stylesheets/site.css` and I'd like to start using Compass and Sass. I would rename the file to `source/stylesheets/site.css.scss` and Middleman will automatically begin processing that file as Sass. The same would apply to CoffeeScript (`.js.coffee`), Haml (`.html.haml`) and any other templating engine you might want to use.
38
+
39
+ Finally, you will want to build your project into a stand-alone site. From the project directory:
40
+
41
+ middleman build
7
42
 
8
- ## Getting Started
43
+ This will compile your templates and output a stand-alone site which can be easily hosted or delivered to your client. The build step can also compress images, employ Javascript & CSS dependency management, minify Javascript & CSS and run additional code of your choice. Take a look at the `config.rb` file to see some of the most common extensions which can be activated.
9
44
 
10
- Everything you need to know is on the official site:
11
- http://middlemanapp.com
45
+ # Learn More
12
46
 
13
- ## Mailing List
47
+ A full set of in-depth instructional guides are available on the official website at:
14
48
 
15
- If you have questions, answers can be found on community forum: https://convore.com/middleman/
49
+ http://middlemanapp.com/
50
+
51
+ The community maintains it's own collection of tips and tricks in the GitHub wiki:
52
+
53
+ https://github.com/tdreyno/middleman/wiki
54
+
55
+ Finally, up-to-date generated code documentation is available on RubyDoc:
56
+ http://rubydoc.info/github/tdreyno/middleman
57
+
58
+ # Community
59
+
60
+ The official community forum is available on Convore at:
61
+
62
+ https://convore.com/middleman/
63
+
64
+ # Bug Reports
65
+
66
+ GitHub Issues are used for managing bug reports and feature requests. If you run into issues, please search the issues and submit new problems:
67
+
68
+ https://github.com/tdreyno/middleman/issues
69
+
70
+ The best way to get quick responses to your issues and swift fixes to your bugs is to submit detailed bug reports, include test cases and respond to developer questions in a timely manner. Even better, if you know Ruby, you can submit Pull Requests containing Cucumber Features which describe how your feature should work or exploit the bug you are submitting.
71
+
72
+ # Build & Dependency Status
73
+
74
+ [![Build Status](http://travis-ci.org/tdreyno/middleman.png)](http://travis-ci.org/tdreyno/middleman)
75
+ [![Dependency Status](https://gemnasium.com/tdreyno/middleman.png?travis)](https://gemnasium.com/tdreyno/middleman)
76
+
77
+ # How to Run Cucumber Tests
78
+
79
+ 1. Checkout Repository: `git clone https://tdreyno@github.com/tdreyno/middleman.git`
80
+ 2. Install Bundler: `gem install bundler`
81
+ 3. Run `bundle` inside the project root to install the gem dependencies.
82
+ 4. Run test cases: `bundle exec rake test`
83
+
84
+ # Donate
85
+
86
+ [![Click here to lend your support to Middleman](https://www.pledgie.com/campaigns/15807.png)](http://www.pledgie.com/campaigns/15807)
16
87
 
17
- ## Generated Source Documentation
18
- http://rubydoc.info/github/tdreyno/middleman/master/frames
88
+ # License
19
89
 
20
- ## Copyright
90
+ Copyright (c) 2010 Thomas Reynolds. MIT Licensed, see [LICENSE] for details.
21
91
 
22
- Copyright (c) 2010 Thomas Reynolds. See LICENSE for details.
92
+ [RubyInstaller]: http://rubyinstaller.org/
93
+ [LICENSE]: https://github.com/tdreyno/middleman/blob/master/LICENSE
data/Rakefile CHANGED
@@ -7,7 +7,11 @@ Cucumber::Rake::Task.new(:cucumber, 'Run features that should pass') do |t|
7
7
  t.cucumber_opts = "--color --tags ~@wip --strict --format #{ENV['CUCUMBER_FORMAT'] || 'pretty'}"
8
8
  end
9
9
 
10
- require 'rake/testtask'
11
10
  require 'rake/clean'
12
11
 
13
- task :test => ["cucumber"]
12
+ task :test => ["cucumber"]
13
+
14
+ desc "Build HTML documentation"
15
+ task :doc do
16
+ sh 'bundle exec yard'
17
+ end
@@ -59,10 +59,11 @@ end
59
59
  args = ARGV.dup
60
60
 
61
61
  ARG_ALIASES = {
62
- "s" => "server",
63
- "b" => "build",
64
- "i" => "init",
65
- "w" => "watch"
62
+ "s" => "server",
63
+ "b" => "build",
64
+ "i" => "init",
65
+ "new" => "init",
66
+ "n" => "init"
66
67
  }
67
68
 
68
69
  if ARG_ALIASES.has_key?(args[0])
@@ -13,14 +13,21 @@ Feature: Builder
13
13
  Then "stylesheets/static.css" should exist at "test-app" and include "body"
14
14
  Then "_partial.html" should not exist at "test-app"
15
15
  Then "spaces in file.html" should exist at "test-app" and include "spaces"
16
+ Then "images/blank.gif" should exist at "test-app"
16
17
  Then "images/Read me (example).txt" should exist at "test-app"
17
18
  Then "images/Child folder/regular_file(example).txt" should exist at "test-app"
18
19
  Then ".htaccess" should exist at "test-app"
20
+ Then the last exit code should be "0"
19
21
 
20
22
  Scenario: Build glob
21
23
  Given a built app at "glob-app" with flags "--glob '*.css'"
22
24
  Then "stylesheets/site.css" should exist at "glob-app" and include "html"
23
25
  Then "index.html" should not exist at "glob-app"
26
+ Then the last exit code should be "0"
27
+
28
+ Scenario: Build with errors
29
+ Given a built app at "build-with-errors-app"
30
+ Then the last exit code should be "1"
24
31
 
25
32
  # Scenario: Force relative assets
26
33
  # Given a built app at "relative-app" with flags "--relative"
@@ -7,3 +7,14 @@ Feature: Build Clean
7
7
  Then "should_be_ignored.html" should not exist at "clean-app"
8
8
  And "should_be_ignored2.html" should not exist at "clean-app"
9
9
  And "should_be_ignored3.html" should not exist at "clean-app"
10
+
11
+ Scenario: Clean an app with directory indexes
12
+ Given a built app at "clean-dir-app"
13
+ Then "about/index.html" should exist at "clean-dir-app"
14
+ Given a built app at "clean-dir-app" with flags "--clean"
15
+ Then "about/index.html" should exist at "clean-dir-app"
16
+ Then cleanup built app at "clean-dir-app"
17
+
18
+ Scenario: Clean build an app that's never been built
19
+ Given a built app at "clean-dir-app" with flags "--clean"
20
+ Then "about/index.html" should exist at "clean-dir-app"
@@ -0,0 +1,6 @@
1
+ Feature: Support old request.path object used by many extensions
2
+
3
+ Scenario: Viewing the root path
4
+ Given the Server is running at "test-app"
5
+ When I go to "/request-path.html"
6
+ Then I should see "true"
@@ -5,4 +5,31 @@ Feature: YAML Front Matter
5
5
  Given the Server is running at "test-app"
6
6
  When I go to "/front-matter.html"
7
7
  Then I should see "<h1>This is the title</h1>"
8
- Then I should not see "---"
8
+ Then I should not see "---"
9
+ When I go to "/front-matter-2.php"
10
+ Then I should see "<h1>This is the title</h1>"
11
+ Then I should see "<?php"
12
+ Then I should not see "---"
13
+
14
+ Scenario: A template changes frontmatter during preview
15
+ Given the Server is running at "test-app"
16
+ And the file "source/front-matter-change.html.erb" has the contents
17
+ """
18
+ ---
19
+ title: Hello World
20
+ layout: false
21
+ ---
22
+ <%= data.page.title %>
23
+ """
24
+ When I go to "/front-matter-change.html"
25
+ Then I should see "Hello World"
26
+ And the file "source/front-matter-change.html.erb" has the contents
27
+ """
28
+ ---
29
+ title: Hola Mundo
30
+ layout: false
31
+ ---
32
+ <%= data.page.title %>
33
+ """
34
+ When I go to "/front-matter-change.html"
35
+ Then I should see "Hola Mundo"
@@ -2,7 +2,7 @@ Feature: Generator
2
2
  In order to generate static assets for client
3
3
 
4
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"
5
+ Given a project at "generator-test"
6
+ And the project has been initialized
7
+ Then template files should exist
8
+ And empty directories should exist
@@ -0,0 +1,6 @@
1
+ Feature: Helpers in external files
2
+
3
+ Scenario: Hello Helper
4
+ Given the Server is running at "external-helpers"
5
+ Then going to "/index.html" should not raise an exception
6
+ And I should see "Hello World"
@@ -0,0 +1,5 @@
1
+ Feature: Lorem generating helper
2
+
3
+ Scenario: Lorem Helper
4
+ Given the Server is running at "test-app"
5
+ Then going to "/lorem.html" should not raise an exception
@@ -0,0 +1,20 @@
1
+ Feature: Instance Vars
2
+ In order to share data with layouts and partials via instance variables
3
+
4
+ Scenario: Setting an instance var in a template should be visible in its layout
5
+ Given the Server is running at "instance-vars-app"
6
+ When I go to "/instance-var-set.html"
7
+ Then I should see "Var is 100"
8
+
9
+ Scenario: Setting an instance var in a template should be visible in a partial
10
+ Given the Server is running at "instance-vars-app"
11
+ When I go to "/instance-var-set.html"
12
+ Then I should see "My var is here!"
13
+
14
+ Scenario: Setting an instance var in one file should not be visible in another
15
+ Given the Server is running at "instance-vars-app"
16
+ When I go to "/instance-var-set.html"
17
+ When I go to "/no-instance-var.html"
18
+ Then I should see "No var..."
19
+
20
+
@@ -2,6 +2,26 @@ Feature: Markdown support
2
2
  In order to test included Maruku support
3
3
 
4
4
  Scenario: Rendering html
5
- Given the Server is running at "test-app"
6
- When I go to "/markdown.html"
7
- Then I should see "<p>Hello World</p>"
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
+
@@ -21,4 +21,9 @@ Feature: Minify CSS
21
21
  Given "minify_css" feature is "enabled"
22
22
  And the Server is running at "test-app"
23
23
  When I go to "/stylesheets/site.css"
24
- Then I should see "1" lines
24
+ Then I should see "1" lines
25
+
26
+ Scenario: Rendering external css with passthrough compressor
27
+ Given the Server is running at "passthrough-app"
28
+ When I go to "/stylesheets/site.css"
29
+ Then I should see "55" lines
@@ -9,15 +9,47 @@ Feature: Minify Javascript
9
9
  And the Server is running at "test-app"
10
10
  When I go to "/inline-js.html"
11
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
12
17
 
13
18
  Scenario: Rendering inline js with the feature enabled
14
19
  Given "minify_javascript" feature is "enabled"
15
20
  And the Server is running at "test-app"
16
21
  When I go to "/inline-js.html"
17
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 "test-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
18
34
 
19
35
  Scenario: Rendering inline js (coffeescript) with the feature enabled
20
36
  Given "minify_javascript" feature is "enabled"
21
37
  And the Server is running at "test-app"
22
38
  When I go to "/inline-coffeescript.html"
23
- Then I should see "5" lines
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 "test-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