Compare commits
1 commit
master
...
feature/do
Author | SHA1 | Date | |
---|---|---|---|
|
7efa5e9dd9 |
171 changed files with 1211 additions and 2647 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -1,6 +1,3 @@
|
||||||
.byebug_history
|
|
||||||
npm-debug.log
|
|
||||||
manifest.yaml
|
|
||||||
/.bundle
|
/.bundle
|
||||||
.DS_Store
|
.DS_Store
|
||||||
coverage
|
coverage
|
||||||
|
|
|
@ -39,6 +39,8 @@ AssignmentInCondition:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
CyclomaticComplexity:
|
CyclomaticComplexity:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
AbcSize:
|
||||||
|
Enabled: false
|
||||||
HandleExceptions:
|
HandleExceptions:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
EndAlignment:
|
EndAlignment:
|
||||||
|
@ -52,7 +54,7 @@ FormatString:
|
||||||
CaseIndentation:
|
CaseIndentation:
|
||||||
IndentWhenRelativeTo: end
|
IndentWhenRelativeTo: end
|
||||||
TrivialAccessors:
|
TrivialAccessors:
|
||||||
Enabled: false
|
ExactNameMatch: true
|
||||||
SingleLineBlockParams:
|
SingleLineBlockParams:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
Metrics/AbcSize:
|
Metrics/AbcSize:
|
||||||
|
@ -65,7 +67,3 @@ Style/BlockDelimiters:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
Style/MultilineBlockChain:
|
Style/MultilineBlockChain:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
Style/SpecialGlobalVars:
|
|
||||||
Enabled: false
|
|
||||||
Style/FrozenStringLiteralComment:
|
|
||||||
Enabled: false
|
|
||||||
|
|
|
@ -5,14 +5,17 @@ before_script:
|
||||||
- bundle update
|
- bundle update
|
||||||
rvm:
|
rvm:
|
||||||
- ruby-head
|
- ruby-head
|
||||||
- 2.3.1
|
- 2.3.0
|
||||||
- 2.2.4
|
- 2.2.4
|
||||||
|
- 2.1
|
||||||
|
- 2.0
|
||||||
os:
|
os:
|
||||||
- linux
|
- linux
|
||||||
# - osx
|
# - osx
|
||||||
matrix:
|
matrix:
|
||||||
fast_finish: true
|
fast_finish: true
|
||||||
allow_failures:
|
allow_failures:
|
||||||
|
- rvm: 2.3.0
|
||||||
- rvm: ruby-head
|
- rvm: ruby-head
|
||||||
env:
|
env:
|
||||||
global:
|
global:
|
||||||
|
|
75
CHANGELOG.md
75
CHANGELOG.md
|
@ -1,78 +1,6 @@
|
||||||
master
|
master
|
||||||
===
|
===
|
||||||
|
|
||||||
# 4.1.13
|
|
||||||
|
|
||||||
* Change how config options are passed to Thor. Removes new Thor warnings from #2017
|
|
||||||
|
|
||||||
# 4.1.12
|
|
||||||
|
|
||||||
* Fix broken `ignore { |p| true }` form.
|
|
||||||
|
|
||||||
# 4.1.11
|
|
||||||
|
|
||||||
* Upgrade to Rack 2.
|
|
||||||
|
|
||||||
# 4.1.10
|
|
||||||
|
|
||||||
* Fix unicode issues in URL deeplinks.
|
|
||||||
* Add prefix option to asset_hash (#1949)
|
|
||||||
|
|
||||||
# 4.1.9
|
|
||||||
|
|
||||||
* Fix `--watcher-*` CLI flags.
|
|
||||||
* Allow spaces in paths to work with `link_to`. Fixes #1914
|
|
||||||
* Add support for dotenv
|
|
||||||
* Fix asset_url with asset_hash (#1919)
|
|
||||||
* Allow partial lookups without a current_resource (#1912)
|
|
||||||
|
|
||||||
# 4.1.8
|
|
||||||
|
|
||||||
* Expose `development?` and `production?` helpers to template context.
|
|
||||||
* require the `try` core extension (#1911)
|
|
||||||
* Fix contract for Sitemap::Store.register_resource_list_manipulator (#1907)
|
|
||||||
* Loosen contract on Resource#source_file to Maybe[String] (#1906)
|
|
||||||
* Let collection loops access ConfigContext for helpers. #1879
|
|
||||||
* Use https:// to clone templates (#1901)
|
|
||||||
* Allow numbers to be unique page_ids (#1886)
|
|
||||||
* Prevent infinite loop when encountering files where base filename is a possible templating engine
|
|
||||||
|
|
||||||
# 4.1.7
|
|
||||||
|
|
||||||
* Upgrade fastimage to 2.0
|
|
||||||
* Fix shutdown of external_pipeline commands when config.rb is changed. #1877
|
|
||||||
* Allow calls to `app.` to work as collections after initial config parse. #1876
|
|
||||||
|
|
||||||
|
|
||||||
# 4.1.5-4.1.6
|
|
||||||
|
|
||||||
* Fix file recursion when looking for possible asset dependencies. Major preview server performance improvement.
|
|
||||||
|
|
||||||
# 4.1.4
|
|
||||||
|
|
||||||
* Unify default extensions for all URL processing extensions. #1855
|
|
||||||
* Fix URL regex for `content: ` context of CSS. #1853
|
|
||||||
* Make sure CLI config over-rides `config.rb` order.
|
|
||||||
* Fix relative assets in some contexts. #1842
|
|
||||||
|
|
||||||
# 4.1.3
|
|
||||||
|
|
||||||
* Expose all top-level config options to CLI (flags now match config. latency -> watcher_latency, etc).
|
|
||||||
* Fix directory indexes with `.htm` and `.xhtml` files. #1821
|
|
||||||
|
|
||||||
# 4.1.2
|
|
||||||
|
|
||||||
* Add `page_id` concept. Using the `id` key in frontmatter, proxy or page will set an ID on a resource which can be referenced by `url_for` and `link_to`.
|
|
||||||
* Allow looking for `Gemfile` when setting up a project to fail gracefully.
|
|
||||||
* Send correct exit code when external_pipeline fails during build.
|
|
||||||
* Fix error when customizing `layouts_dir`. #1028
|
|
||||||
* Fix collections (commands in loops) not being processed by `page` command. #1226
|
|
||||||
* Correctly asset_hash sourcemap references.
|
|
||||||
|
|
||||||
# 4.1.1
|
|
||||||
|
|
||||||
* Fix bad code that made `/__middleman/` break.
|
|
||||||
|
|
||||||
# 4.1.0
|
# 4.1.0
|
||||||
|
|
||||||
* Add rewrite_ignore option to asset_hash, asset_host, cache_buster & relative_assets. This proc let's you opt-out of the extension behavior on a per-path basis.
|
* Add rewrite_ignore option to asset_hash, asset_host, cache_buster & relative_assets. This proc let's you opt-out of the extension behavior on a per-path basis.
|
||||||
|
@ -91,9 +19,6 @@ master
|
||||||
* Fix asset_host in combination with Google Analytics snippet. #1751
|
* Fix asset_host in combination with Google Analytics snippet. #1751
|
||||||
* Show an error message when git CLI is not available. #1765
|
* Show an error message when git CLI is not available. #1765
|
||||||
* Correctly show file names of GZIP'ed assets. #1364
|
* Correctly show file names of GZIP'ed assets. #1364
|
||||||
* Build file output is now parallel-ized! Use `middleman build --no-parallel` to disable.
|
|
||||||
* Make template file extensions that get layouts by default configurable via `config[:extensions_with_layout]`
|
|
||||||
* Remove `=` from inline url matcher. This means paths in HTML attributes MUST be quoted. Fixes #1780
|
|
||||||
|
|
||||||
# 4.0.0
|
# 4.0.0
|
||||||
|
|
||||||
|
|
14
Gemfile
14
Gemfile
|
@ -5,16 +5,12 @@ gem 'rake', '~> 10.3', require: false
|
||||||
gem 'yard', '~> 0.8', require: false
|
gem 'yard', '~> 0.8', require: false
|
||||||
|
|
||||||
# Test tools
|
# Test tools
|
||||||
gem 'byebug'
|
gem 'pry', '~> 0.10', group: :development, require: false
|
||||||
|
gem 'pry-byebug'
|
||||||
|
gem 'pry-stack_explorer'
|
||||||
gem 'aruba', '~> 0.7.4', require: false
|
gem 'aruba', '~> 0.7.4', require: false
|
||||||
gem 'rspec', '~> 3.0', require: false
|
gem 'rspec', '~> 3.0', require: false
|
||||||
gem 'cucumber', '~> 2.0', require: false
|
gem 'cucumber', '~> 2.0', require: false
|
||||||
gem 'addressable', '~> 2.4.0', require: false
|
|
||||||
|
|
||||||
# Pry tools
|
|
||||||
gem 'pry'
|
|
||||||
gem 'pry-stack_explorer'
|
|
||||||
gem 'pry-rescue'
|
|
||||||
|
|
||||||
# Optional middleman dependencies, included for tests
|
# Optional middleman dependencies, included for tests
|
||||||
gem 'haml', '>= 4.0.5', require: false
|
gem 'haml', '>= 4.0.5', require: false
|
||||||
|
@ -24,7 +20,7 @@ gem 'kramdown', '~> 1.2', require: false
|
||||||
gem 'slim', '>= 2.0', require: false
|
gem 'slim', '>= 2.0', require: false
|
||||||
gem 'liquid', '>= 2.6', require: false
|
gem 'liquid', '>= 2.6', require: false
|
||||||
gem 'stylus', '>= 1.0', require: false
|
gem 'stylus', '>= 1.0', require: false
|
||||||
gem 'sinatra', '>= 2.0.0.beta2', require: false
|
gem 'sinatra', '>= 1.4', require: false
|
||||||
gem 'redcarpet', '>= 3.1', require: false
|
gem 'redcarpet', '>= 3.1', require: false
|
||||||
|
|
||||||
# Dns server to test preview server
|
# Dns server to test preview server
|
||||||
|
@ -32,7 +28,7 @@ gem 'rubydns', '~> 1.0.1', require: false
|
||||||
|
|
||||||
# To test javascript
|
# To test javascript
|
||||||
gem 'poltergeist', '~> 1.8', require: false
|
gem 'poltergeist', '~> 1.8', require: false
|
||||||
gem 'phantomjs', '~> 2.1.1.0', require: false
|
gem 'phantomjs', '~> 1.9.8.0', require: false
|
||||||
|
|
||||||
# For less, note there is no compatible JS runtime for windows
|
# For less, note there is no compatible JS runtime for windows
|
||||||
gem 'therubyrhino', '>= 2.0', platforms: :jruby
|
gem 'therubyrhino', '>= 2.0', platforms: :jruby
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
## Expected behavior and actual behavior
|
|
||||||
|
|
||||||
## Steps to reproduce the problem (from a clean middleman installation)
|
|
||||||
|
|
||||||
## Additional information
|
|
||||||
|
|
||||||
- Ruby version:
|
|
||||||
- Middleman version:
|
|
||||||
- OS version:
|
|
|
@ -10,7 +10,7 @@ The last few years have seen an explosion in the amount and variety of tools dev
|
||||||
|
|
||||||
* [Sass](http://sass-lang.com/) for DRY stylesheets
|
* [Sass](http://sass-lang.com/) for DRY stylesheets
|
||||||
* [CoffeeScript](http://coffeescript.org/) for safer and less verbose javascript
|
* [CoffeeScript](http://coffeescript.org/) for safer and less verbose javascript
|
||||||
* Multiple asset management solutions, including [Sprockets](https://github.com/rails/sprockets)
|
* Multiple asset management solutions, including [Sprockets](https://github.com/sstephenson/sprockets)
|
||||||
* [ERb](http://ruby-doc.org/stdlib-2.0.0/libdoc/erb/rdoc/ERB.html) & [Haml](http://haml.info/) for dynamic pages and simplified HTML syntax
|
* [ERb](http://ruby-doc.org/stdlib-2.0.0/libdoc/erb/rdoc/ERB.html) & [Haml](http://haml.info/) for dynamic pages and simplified HTML syntax
|
||||||
|
|
||||||
**Middleman** gives the stand-alone developer access to all these tools and many, many more. Why would you use a stand-alone framework instead of Ruby on Rails?
|
**Middleman** gives the stand-alone developer access to all these tools and many, many more. Why would you use a stand-alone framework instead of Ruby on Rails?
|
||||||
|
@ -91,7 +91,7 @@ The best way to get quick responses to your issues and swift fixes to your bugs
|
||||||
|
|
||||||
## Donate
|
## Donate
|
||||||
|
|
||||||
[Click here to lend your support to Middleman](https://plasso.co/s/4dXbHBorC3)
|
[Click here to lend your support to Middleman](https://spacebox.io/s/4dXbHBorC3)
|
||||||
|
|
||||||
## Versioning
|
## Versioning
|
||||||
|
|
||||||
|
@ -121,6 +121,6 @@ Copyright (c) 2010-2015 Thomas Reynolds. MIT Licensed, see [LICENSE] for details
|
||||||
[codeclimate]: https://codeclimate.com/github/middleman/middleman
|
[codeclimate]: https://codeclimate.com/github/middleman/middleman
|
||||||
[gittip]: https://www.gittip.com/middleman/
|
[gittip]: https://www.gittip.com/middleman/
|
||||||
[rubyinstaller]: http://rubyinstaller.org/
|
[rubyinstaller]: http://rubyinstaller.org/
|
||||||
[RubyInstaller-Devkit]: http://rubyinstaller.org/add-ons/devkit/
|
[RubyInstaller-Devkit]: http:rubyinstaller.org/add-ons/devkit/
|
||||||
[rubydoc]: http://rubydoc.info/github/middleman/middleman
|
[rubydoc]: http://rubydoc.info/github/middleman/middleman
|
||||||
[LICENSE]: https://github.com/middleman/middleman/blob/master/LICENSE.md
|
[LICENSE]: https://github.com/middleman/middleman/blob/master/LICENSE.md
|
||||||
|
|
|
@ -4,37 +4,11 @@ require 'middleman-core/profiling'
|
||||||
if ARGV.include? '--profile'
|
if ARGV.include? '--profile'
|
||||||
Middleman::Profiling.profiler = Middleman::Profiling::RubyProfProfiler.new
|
Middleman::Profiling.profiler = Middleman::Profiling::RubyProfProfiler.new
|
||||||
end
|
end
|
||||||
# Middleman::Profiling.start
|
Middleman::Profiling.start
|
||||||
|
|
||||||
require "middleman-core/load_paths"
|
require "middleman-core/load_paths"
|
||||||
Middleman.setup_load_paths
|
Middleman.setup_load_paths
|
||||||
|
|
||||||
require 'dotenv'
|
|
||||||
::Dotenv.load
|
|
||||||
|
|
||||||
require 'middleman-core'
|
|
||||||
require 'middleman-core/logger'
|
|
||||||
|
|
||||||
module Middleman::Cli
|
|
||||||
class << self
|
|
||||||
attr_accessor :config
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.import_config(base)
|
|
||||||
::Middleman::Cli.config.all_settings.each do |setting|
|
|
||||||
if setting.default.is_a?(String) || setting.default.is_a?(NilClass)
|
|
||||||
base.class_option setting.key,
|
|
||||||
type: :string,
|
|
||||||
desc: setting.description
|
|
||||||
elsif setting.default.is_a?(TrueClass) || setting.default.is_a?(FalseClass)
|
|
||||||
base.class_option setting.key,
|
|
||||||
type: :boolean,
|
|
||||||
desc: setting.description
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
require "middleman-cli"
|
require "middleman-cli"
|
||||||
|
|
||||||
# Change directory to the root
|
# Change directory to the root
|
||||||
|
@ -45,26 +19,5 @@ if ARGV[0] != 'help' && (ARGV.length < 1 || ARGV.first.include?('-'))
|
||||||
ARGV.unshift('server')
|
ARGV.unshift('server')
|
||||||
end
|
end
|
||||||
|
|
||||||
::Middleman::Logger.singleton(3)
|
|
||||||
::Middleman::Cli.config = ::Middleman::Application.new do
|
|
||||||
#
|
|
||||||
config[:environment] = (ENV['MM_ENV'] || ENV['RACK_ENV'] || 'development').to_sym
|
|
||||||
config[:mode] = :config
|
|
||||||
config[:exit_before_ready] = true
|
|
||||||
config[:watcher_disable] = true
|
|
||||||
config[:disable_sitemap] = true
|
|
||||||
end.config
|
|
||||||
|
|
||||||
# Require the Middleman version
|
|
||||||
require 'middleman-core/version'
|
|
||||||
|
|
||||||
# Include the core CLI items
|
|
||||||
require 'middleman-cli/init'
|
|
||||||
require 'middleman-cli/extension'
|
|
||||||
require 'middleman-cli/server'
|
|
||||||
require 'middleman-cli/build'
|
|
||||||
require 'middleman-cli/console'
|
|
||||||
require 'middleman-cli/config'
|
|
||||||
|
|
||||||
# Start the CLI
|
# Start the CLI
|
||||||
Middleman::Cli::Base.start(ARGV)
|
Middleman::Cli::Base.start(ARGV)
|
||||||
|
|
|
@ -21,3 +21,14 @@ module Middleman::Cli
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Require the Middleman version
|
||||||
|
require 'middleman-core/version'
|
||||||
|
|
||||||
|
# Include the core CLI items
|
||||||
|
require 'middleman-cli/init'
|
||||||
|
require 'middleman-cli/extension'
|
||||||
|
require 'middleman-cli/server'
|
||||||
|
require 'middleman-cli/build'
|
||||||
|
require 'middleman-cli/console'
|
||||||
|
require 'middleman-cli/config'
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
require 'middleman-core/application'
|
|
||||||
|
|
||||||
# CLI Module
|
# CLI Module
|
||||||
module Middleman::Cli
|
module Middleman::Cli
|
||||||
# The CLI Build class
|
# The CLI Build class
|
||||||
|
@ -10,15 +8,12 @@ module Middleman::Cli
|
||||||
|
|
||||||
class_option :environment,
|
class_option :environment,
|
||||||
aliases: '-e',
|
aliases: '-e',
|
||||||
default: ENV['MM_ENV'] || ENV['RACK_ENV'] || :production
|
default: ENV['MM_ENV'] || ENV['RACK_ENV'] || 'production',
|
||||||
|
desc: 'The environment Middleman will run under'
|
||||||
class_option :clean,
|
class_option :clean,
|
||||||
type: :boolean,
|
type: :boolean,
|
||||||
default: true,
|
default: true,
|
||||||
desc: 'Remove orphaned files from build (--no-clean to disable)'
|
desc: 'Remove orphaned files from build (--no-clean to disable)'
|
||||||
class_option :parallel,
|
|
||||||
type: :boolean,
|
|
||||||
default: true,
|
|
||||||
desc: 'Output files in parallel (--no-parallel to disable)'
|
|
||||||
class_option :glob,
|
class_option :glob,
|
||||||
type: :string,
|
type: :string,
|
||||||
aliases: '-g',
|
aliases: '-g',
|
||||||
|
@ -29,7 +24,7 @@ module Middleman::Cli
|
||||||
default: false,
|
default: false,
|
||||||
desc: 'Print debug messages'
|
desc: 'Print debug messages'
|
||||||
class_option :instrument,
|
class_option :instrument,
|
||||||
type: :boolean,
|
type: :string,
|
||||||
default: false,
|
default: false,
|
||||||
desc: 'Print instrument messages'
|
desc: 'Print instrument messages'
|
||||||
class_option :profile,
|
class_option :profile,
|
||||||
|
@ -37,8 +32,6 @@ module Middleman::Cli
|
||||||
default: false,
|
default: false,
|
||||||
desc: 'Generate profiling report for the build'
|
desc: 'Generate profiling report for the build'
|
||||||
|
|
||||||
Middleman::Cli.import_config(self)
|
|
||||||
|
|
||||||
# Core build Thor command
|
# Core build Thor command
|
||||||
# @return [void]
|
# @return [void]
|
||||||
def build
|
def build
|
||||||
|
@ -51,21 +44,19 @@ module Middleman::Cli
|
||||||
require 'middleman-core/builder'
|
require 'middleman-core/builder'
|
||||||
require 'fileutils'
|
require 'fileutils'
|
||||||
|
|
||||||
|
env = options['environment'].to_sym
|
||||||
verbose = options['verbose'] ? 0 : 1
|
verbose = options['verbose'] ? 0 : 1
|
||||||
instrument = options['instrument']
|
instrument = options['instrument']
|
||||||
|
|
||||||
builder = nil
|
builder = nil
|
||||||
cli_options = options
|
|
||||||
|
|
||||||
::Middleman::Logger.singleton(verbose, instrument)
|
::Middleman::Logger.singleton(verbose, instrument)
|
||||||
|
|
||||||
::Middleman::Util.instrument 'builder.setup' do
|
::Middleman::Util.instrument 'builder_setup' do
|
||||||
@app = ::Middleman::Application.new do
|
@app = ::Middleman::Application.new do
|
||||||
config[:mode] = :build
|
config[:mode] = :build
|
||||||
|
config[:environment] = env
|
||||||
config[:show_exceptions] = false
|
config[:show_exceptions] = false
|
||||||
config[:cli_options] = cli_options.each_with_object({}) do |(k, v), sum|
|
|
||||||
sum[k] = v
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
builder = Middleman::Builder.new(@app,
|
builder = Middleman::Builder.new(@app,
|
||||||
|
@ -76,7 +67,7 @@ module Middleman::Cli
|
||||||
builder.on_build_event(&method(:on_event))
|
builder.on_build_event(&method(:on_event))
|
||||||
end
|
end
|
||||||
|
|
||||||
::Middleman::Util.instrument 'builder.run' do
|
::Middleman::Util.instrument 'builder_run' do
|
||||||
if builder.run!
|
if builder.run!
|
||||||
clean_directories! if options['clean']
|
clean_directories! if options['clean']
|
||||||
shell.say 'Project built successfully.'
|
shell.say 'Project built successfully.'
|
||||||
|
|
|
@ -23,9 +23,6 @@ module Middleman::Cli
|
||||||
::Middleman::Logger.singleton(2, false)
|
::Middleman::Logger.singleton(2, false)
|
||||||
|
|
||||||
app = ::Middleman::Application.new do
|
app = ::Middleman::Application.new do
|
||||||
config[:mode] = :config
|
|
||||||
config[:disable_sitemap] = true
|
|
||||||
config[:watcher_disable] = true
|
|
||||||
config[:exit_before_ready] = true
|
config[:exit_before_ready] = true
|
||||||
config[:environment] = opts[:environment].to_sym if opts[:environment]
|
config[:environment] = opts[:environment].to_sym if opts[:environment]
|
||||||
end
|
end
|
||||||
|
|
|
@ -113,7 +113,7 @@ module Middleman::Cli
|
||||||
end
|
end
|
||||||
|
|
||||||
def repository_path(repo)
|
def repository_path(repo)
|
||||||
repo.include?('://') || repo.include?('git@') ? repo : "https://github.com/#{repo}.git"
|
repo.include?('://') || repo.include?('git@') ? repo : "git://github.com/#{repo}.git"
|
||||||
end
|
end
|
||||||
|
|
||||||
# Add to CLI
|
# Add to CLI
|
||||||
|
|
|
@ -5,33 +5,56 @@ module Middleman::Cli
|
||||||
check_unknown_options!
|
check_unknown_options!
|
||||||
|
|
||||||
class_option :environment,
|
class_option :environment,
|
||||||
aliases: '-e'
|
aliases: '-e',
|
||||||
|
default: ENV['MM_ENV'] || ENV['RACK_ENV'] || 'development',
|
||||||
|
desc: 'The environment Middleman will run under'
|
||||||
class_option :port,
|
class_option :port,
|
||||||
aliases: '-p'
|
aliases: '-p',
|
||||||
|
desc: 'The port Middleman will listen on'
|
||||||
class_option :server_name,
|
class_option :server_name,
|
||||||
aliases: '-s'
|
aliases: '-s',
|
||||||
|
desc: 'The server name Middleman will use'
|
||||||
class_option :bind_address,
|
class_option :bind_address,
|
||||||
aliases: '-b'
|
aliases: '-b',
|
||||||
|
desc: 'The bind address Middleman will listen on'
|
||||||
|
class_option :https,
|
||||||
|
type: :boolean,
|
||||||
|
desc: 'Serve the preview server over SSL/TLS'
|
||||||
|
class_option :ssl_certificate,
|
||||||
|
desc: 'Path to an X.509 certificate to use for the preview server'
|
||||||
|
class_option :ssl_private_key,
|
||||||
|
desc: "Path to an RSA private key for the preview server's certificate"
|
||||||
class_option :verbose,
|
class_option :verbose,
|
||||||
type: :boolean,
|
type: :boolean,
|
||||||
default: false,
|
default: false,
|
||||||
desc: 'Print debug messages'
|
desc: 'Print debug messages'
|
||||||
class_option :instrument,
|
class_option :instrument,
|
||||||
type: :boolean,
|
type: :string,
|
||||||
default: false,
|
default: false,
|
||||||
desc: 'Print instrument messages'
|
desc: 'Print instrument messages'
|
||||||
|
class_option :disable_watcher,
|
||||||
|
type: :boolean,
|
||||||
|
default: false,
|
||||||
|
desc: 'Disable the file change and delete watcher process'
|
||||||
class_option :profile,
|
class_option :profile,
|
||||||
type: :boolean,
|
type: :boolean,
|
||||||
default: false,
|
default: false,
|
||||||
desc: 'Generate profiling report for server startup'
|
desc: 'Generate profiling report for server startup'
|
||||||
|
class_option :force_polling,
|
||||||
|
type: :boolean,
|
||||||
|
default: false,
|
||||||
|
desc: 'Force file watcher into polling mode'
|
||||||
|
class_option :latency,
|
||||||
|
type: :numeric,
|
||||||
|
aliases: '-l',
|
||||||
|
default: 0.5,
|
||||||
|
desc: 'Set file watcher latency, in seconds'
|
||||||
class_option :daemon,
|
class_option :daemon,
|
||||||
type: :boolean,
|
type: :boolean,
|
||||||
aliases: '-d',
|
aliases: '-d',
|
||||||
default: false,
|
default: false,
|
||||||
desc: 'Daemonize preview server'
|
desc: 'Daemonize preview server'
|
||||||
|
|
||||||
Middleman::Cli.import_config(self)
|
|
||||||
|
|
||||||
# Start the server
|
# Start the server
|
||||||
def server
|
def server
|
||||||
require 'middleman-core'
|
require 'middleman-core'
|
||||||
|
@ -43,14 +66,24 @@ module Middleman::Cli
|
||||||
end
|
end
|
||||||
|
|
||||||
params = {
|
params = {
|
||||||
|
port: options['port'],
|
||||||
|
bind_address: options['bind_address'],
|
||||||
|
https: options['https'],
|
||||||
|
server_name: options['server_name'],
|
||||||
|
ssl_certificate: options['ssl_certificate'],
|
||||||
|
ssl_private_key: options['ssl_private_key'],
|
||||||
|
environment: options['environment'],
|
||||||
debug: options['verbose'],
|
debug: options['verbose'],
|
||||||
instrumenting: options['instrument'],
|
instrumenting: options['instrument'],
|
||||||
|
disable_watcher: options['disable_watcher'],
|
||||||
reload_paths: options['reload_paths'],
|
reload_paths: options['reload_paths'],
|
||||||
|
force_polling: options['force_polling'],
|
||||||
|
latency: options['latency'],
|
||||||
daemon: options['daemon']
|
daemon: options['daemon']
|
||||||
}
|
}
|
||||||
|
|
||||||
puts '== The Middleman is loading'
|
puts '== The Middleman is loading'
|
||||||
::Middleman::PreviewServer.start(params, options)
|
::Middleman::PreviewServer.start(params)
|
||||||
end
|
end
|
||||||
|
|
||||||
# Add to CLI
|
# Add to CLI
|
||||||
|
|
|
@ -17,7 +17,7 @@ Gem::Specification.new do |s|
|
||||||
s.test_files = `git ls-files -z -- {fixtures,features}/*`.split("\0")
|
s.test_files = `git ls-files -z -- {fixtures,features}/*`.split("\0")
|
||||||
s.executable = 'middleman'
|
s.executable = 'middleman'
|
||||||
s.require_path = 'lib'
|
s.require_path = 'lib'
|
||||||
s.required_ruby_version = '>= 2.2.0'
|
s.required_ruby_version = '>= 2.0.0'
|
||||||
|
|
||||||
# CLI
|
# CLI
|
||||||
s.add_dependency('thor', ['>= 0.17.0', '< 2.0'])
|
s.add_dependency('thor', ['>= 0.17.0', '< 2.0'])
|
||||||
|
|
|
@ -63,8 +63,8 @@ Feature: Assets get file hashes appended to them and references to them are upda
|
||||||
Given the Server is running at "asset-hash-app"
|
Given the Server is running at "asset-hash-app"
|
||||||
When I go to "/"
|
When I go to "/"
|
||||||
Then I should see 'href="apple-touch-icon.png"'
|
Then I should see 'href="apple-touch-icon.png"'
|
||||||
And I should see 'href="stylesheets/site-d1a750ca.css"'
|
And I should see 'href="stylesheets/site-d2959d87.css"'
|
||||||
And I should see 'href="stylesheets/fragment-99b76247.css"'
|
And I should see 'href="stylesheets/fragment-a06f0dfc.css"'
|
||||||
And I should see 'src="javascripts/application-1d8d5276.js"'
|
And I should see 'src="javascripts/application-1d8d5276.js"'
|
||||||
And I should see 'src="images/100px-5fd6fb90.jpg"'
|
And I should see 'src="images/100px-5fd6fb90.jpg"'
|
||||||
And I should see 'srcset="images/100px-5fd6fb90.jpg 1x, images/200px-c11eb203.jpg 2x, images/300px-59adce76.jpg 3x"'
|
And I should see 'srcset="images/100px-5fd6fb90.jpg 1x, images/200px-c11eb203.jpg 2x, images/300px-59adce76.jpg 3x"'
|
||||||
|
@ -72,11 +72,11 @@ Feature: Assets get file hashes appended to them and references to them are upda
|
||||||
And I should see 'src="images/100px-5fd6fb90.jpg?#test"'
|
And I should see 'src="images/100px-5fd6fb90.jpg?#test"'
|
||||||
And I should see 'src="images/100px-5fd6fb90.jpg#test"'
|
And I should see 'src="images/100px-5fd6fb90.jpg#test"'
|
||||||
When I go to "/subdir/"
|
When I go to "/subdir/"
|
||||||
Then I should see 'href="../stylesheets/site-d1a750ca.css"'
|
Then I should see 'href="../stylesheets/site-d2959d87.css"'
|
||||||
And I should see 'src="../javascripts/application-1d8d5276.js"'
|
And I should see 'src="../javascripts/application-1d8d5276.js"'
|
||||||
And I should see 'src="../images/100px-5fd6fb90.jpg"'
|
And I should see 'src="../images/100px-5fd6fb90.jpg"'
|
||||||
When I go to "/other/"
|
When I go to "/other/"
|
||||||
Then I should see 'href="../stylesheets/site-d1a750ca.css"'
|
Then I should see 'href="../stylesheets/site-d2959d87.css"'
|
||||||
And I should see 'src="../javascripts/application-1d8d5276.js"'
|
And I should see 'src="../javascripts/application-1d8d5276.js"'
|
||||||
And I should see 'src="../images/100px-5fd6fb90.jpg"'
|
And I should see 'src="../images/100px-5fd6fb90.jpg"'
|
||||||
And I should see 'src="../images/100px-5fd6fb90.jpg?test"'
|
And I should see 'src="../images/100px-5fd6fb90.jpg?test"'
|
||||||
|
@ -84,8 +84,8 @@ Feature: Assets get file hashes appended to them and references to them are upda
|
||||||
And I should see 'src="../images/100px-5fd6fb90.jpg#test"'
|
And I should see 'src="../images/100px-5fd6fb90.jpg#test"'
|
||||||
When I go to "/javascripts/application-1d8d5276.js"
|
When I go to "/javascripts/application-1d8d5276.js"
|
||||||
Then I should see "img.src = '/images/100px-5fd6fb90.jpg'"
|
Then I should see "img.src = '/images/100px-5fd6fb90.jpg'"
|
||||||
When I go to "/stylesheets/site-d1a750ca.css"
|
When I go to "/stylesheets/site-d2959d87.css"
|
||||||
Then I should see 'background-image: url("../images/100px-5fd6fb90.jpg");'
|
Then I should see 'background-image: url("../images/100px-5fd6fb90.jpg")'
|
||||||
When I go to "/api.json"
|
When I go to "/api.json"
|
||||||
Then I should see 'images/100px-5fd6fb90.gif'
|
Then I should see 'images/100px-5fd6fb90.gif'
|
||||||
And I should see 'images/100px-5fd6fb90.jpg'
|
And I should see 'images/100px-5fd6fb90.jpg'
|
||||||
|
@ -94,11 +94,11 @@ Feature: Assets get file hashes appended to them and references to them are upda
|
||||||
Then I should see 'images/100px-5fd6fb90.gif'
|
Then I should see 'images/100px-5fd6fb90.gif'
|
||||||
And I should see 'images/100px-5fd6fb90.jpg'
|
And I should see 'images/100px-5fd6fb90.jpg'
|
||||||
And I should see 'images/100px-1242c368.png'
|
And I should see 'images/100px-1242c368.png'
|
||||||
When I go to "/stylesheets/fragment-99b76247.css"
|
When I go to "/stylesheets/fragment-a06f0dfc.css"
|
||||||
And I should see 'url("../images/100px-5fd6fb90.jpg");'
|
And I should see 'url("../images/100px-5fd6fb90.jpg")'
|
||||||
And I should see 'url("../images/100px-5fd6fb90.jpg?test");'
|
And I should see 'url("../images/100px-5fd6fb90.jpg?test")'
|
||||||
And I should see 'url("../images/100px-5fd6fb90.jpg?#test");'
|
And I should see 'url("../images/100px-5fd6fb90.jpg?#test")'
|
||||||
And I should see 'url("../images/100px-5fd6fb90.jpg#test");'
|
And I should see 'url("../images/100px-5fd6fb90.jpg#test")'
|
||||||
|
|
||||||
Scenario: Hashed assets work with Slim
|
Scenario: Hashed assets work with Slim
|
||||||
Given the Server is running at "asset-hash-app"
|
Given the Server is running at "asset-hash-app"
|
||||||
|
@ -111,61 +111,59 @@ Feature: Assets get file hashes appended to them and references to them are upda
|
||||||
Given a fixture app "asset-hash-host-app"
|
Given a fixture app "asset-hash-host-app"
|
||||||
And a file named "config.rb" with:
|
And a file named "config.rb" with:
|
||||||
"""
|
"""
|
||||||
set :sass_source_maps, false
|
|
||||||
activate :asset_hash
|
activate :asset_hash
|
||||||
activate :directory_indexes
|
activate :directory_indexes
|
||||||
activate :asset_host, host: 'http://middlemanapp.com'
|
activate :asset_host, host: 'http://middlemanapp.com'
|
||||||
"""
|
"""
|
||||||
Given the Server is running at "asset-hash-host-app"
|
Given the Server is running at "asset-hash-host-app"
|
||||||
When I go to "/"
|
When I go to "/"
|
||||||
Then I should see 'href="http://middlemanapp.com/stylesheets/site-7474cadd.css"'
|
Then I should see 'href="http://middlemanapp.com/stylesheets/site-4b64a653.css"'
|
||||||
Then I should see 'href="http://middlemanapp.com/stylesheets/fragment-2902933e.css"'
|
Then I should see 'href="http://middlemanapp.com/stylesheets/fragment-a772891f.css"'
|
||||||
And I should see 'src="http://middlemanapp.com/images/100px-5fd6fb90.jpg"'
|
And I should see 'src="http://middlemanapp.com/images/100px-5fd6fb90.jpg"'
|
||||||
And I should see 'src="http://middlemanapp.com/images/100px-5fd6fb90.jpg?test"'
|
And I should see 'src="http://middlemanapp.com/images/100px-5fd6fb90.jpg?test"'
|
||||||
And I should see 'src="http://middlemanapp.com/images/100px-5fd6fb90.jpg?#test"'
|
And I should see 'src="http://middlemanapp.com/images/100px-5fd6fb90.jpg?#test"'
|
||||||
And I should see 'src="http://middlemanapp.com/images/100px-5fd6fb90.jpg#test"'
|
And I should see 'src="http://middlemanapp.com/images/100px-5fd6fb90.jpg#test"'
|
||||||
When I go to "/subdir/"
|
When I go to "/subdir/"
|
||||||
Then I should see 'href="http://middlemanapp.com/stylesheets/site-7474cadd.css"'
|
Then I should see 'href="http://middlemanapp.com/stylesheets/site-4b64a653.css"'
|
||||||
And I should see 'src="http://middlemanapp.com/images/100px-5fd6fb90.jpg"'
|
And I should see 'src="http://middlemanapp.com/images/100px-5fd6fb90.jpg"'
|
||||||
When I go to "/other/"
|
When I go to "/other/"
|
||||||
Then I should see 'href="http://middlemanapp.com/stylesheets/site-7474cadd.css"'
|
Then I should see 'href="http://middlemanapp.com/stylesheets/site-4b64a653.css"'
|
||||||
And I should see 'src="http://middlemanapp.com/images/100px-5fd6fb90.jpg"'
|
And I should see 'src="http://middlemanapp.com/images/100px-5fd6fb90.jpg"'
|
||||||
And I should see 'src="http://middlemanapp.com/images/100px-5fd6fb90.jpg?test"'
|
And I should see 'src="http://middlemanapp.com/images/100px-5fd6fb90.jpg?test"'
|
||||||
And I should see 'src="http://middlemanapp.com/images/100px-5fd6fb90.jpg?#test"'
|
And I should see 'src="http://middlemanapp.com/images/100px-5fd6fb90.jpg?#test"'
|
||||||
And I should see 'src="http://middlemanapp.com/images/100px-5fd6fb90.jpg#test"'
|
And I should see 'src="http://middlemanapp.com/images/100px-5fd6fb90.jpg#test"'
|
||||||
When I go to "/stylesheets/fragment-2902933e.css"
|
When I go to "/stylesheets/fragment-a772891f.css"
|
||||||
And I should see 'url("http://middlemanapp.com/images/100px-5fd6fb90.jpg");'
|
And I should see 'url("http://middlemanapp.com/images/100px-5fd6fb90.jpg")'
|
||||||
And I should see 'url("http://middlemanapp.com/images/100px-5fd6fb90.jpg?test");'
|
And I should see 'url("http://middlemanapp.com/images/100px-5fd6fb90.jpg?test")'
|
||||||
And I should see 'url("http://middlemanapp.com/images/100px-5fd6fb90.jpg?#test");'
|
And I should see 'url("http://middlemanapp.com/images/100px-5fd6fb90.jpg?#test")'
|
||||||
And I should see 'url("http://middlemanapp.com/images/100px-5fd6fb90.jpg#test");'
|
And I should see 'url("http://middlemanapp.com/images/100px-5fd6fb90.jpg#test")'
|
||||||
|
|
||||||
Scenario: Enabling an asset host still produces hashed files and references (host first)
|
Scenario: Enabling an asset host still produces hashed files and references (host first)
|
||||||
Given a fixture app "asset-hash-host-app"
|
Given a fixture app "asset-hash-host-app"
|
||||||
And a file named "config.rb" with:
|
And a file named "config.rb" with:
|
||||||
"""
|
"""
|
||||||
set :sass_source_maps, false
|
|
||||||
activate :asset_host, host: 'http://middlemanapp.com'
|
activate :asset_host, host: 'http://middlemanapp.com'
|
||||||
activate :directory_indexes
|
activate :directory_indexes
|
||||||
activate :asset_hash
|
activate :asset_hash
|
||||||
"""
|
"""
|
||||||
Given the Server is running at "asset-hash-host-app"
|
Given the Server is running at "asset-hash-host-app"
|
||||||
When I go to "/"
|
When I go to "/"
|
||||||
Then I should see 'href="http://middlemanapp.com/stylesheets/site-7474cadd.css"'
|
Then I should see 'href="http://middlemanapp.com/stylesheets/site-4b64a653.css"'
|
||||||
Then I should see 'href="http://middlemanapp.com/stylesheets/fragment-2902933e.css"'
|
Then I should see 'href="http://middlemanapp.com/stylesheets/fragment-a772891f.css"'
|
||||||
And I should see 'src="http://middlemanapp.com/images/100px-5fd6fb90.jpg"'
|
And I should see 'src="http://middlemanapp.com/images/100px-5fd6fb90.jpg"'
|
||||||
And I should see 'src="http://middlemanapp.com/images/100px-5fd6fb90.jpg?test"'
|
And I should see 'src="http://middlemanapp.com/images/100px-5fd6fb90.jpg?test"'
|
||||||
And I should see 'src="http://middlemanapp.com/images/100px-5fd6fb90.jpg?#test"'
|
And I should see 'src="http://middlemanapp.com/images/100px-5fd6fb90.jpg?#test"'
|
||||||
And I should see 'src="http://middlemanapp.com/images/100px-5fd6fb90.jpg#test"'
|
And I should see 'src="http://middlemanapp.com/images/100px-5fd6fb90.jpg#test"'
|
||||||
When I go to "/subdir/"
|
When I go to "/subdir/"
|
||||||
Then I should see 'href="http://middlemanapp.com/stylesheets/site-7474cadd.css"'
|
Then I should see 'href="http://middlemanapp.com/stylesheets/site-4b64a653.css"'
|
||||||
And I should see 'src="http://middlemanapp.com/images/100px-5fd6fb90.jpg"'
|
And I should see 'src="http://middlemanapp.com/images/100px-5fd6fb90.jpg"'
|
||||||
When I go to "/other/"
|
When I go to "/other/"
|
||||||
Then I should see 'href="http://middlemanapp.com/stylesheets/site-7474cadd.css"'
|
Then I should see 'href="http://middlemanapp.com/stylesheets/site-4b64a653.css"'
|
||||||
And I should see 'src="http://middlemanapp.com/images/100px-5fd6fb90.jpg"'
|
And I should see 'src="http://middlemanapp.com/images/100px-5fd6fb90.jpg"'
|
||||||
And I should see 'src="http://middlemanapp.com/images/100px-5fd6fb90.jpg?test"'
|
And I should see 'src="http://middlemanapp.com/images/100px-5fd6fb90.jpg?test"'
|
||||||
And I should see 'src="http://middlemanapp.com/images/100px-5fd6fb90.jpg?#test"'
|
And I should see 'src="http://middlemanapp.com/images/100px-5fd6fb90.jpg?#test"'
|
||||||
And I should see 'src="http://middlemanapp.com/images/100px-5fd6fb90.jpg#test"'
|
And I should see 'src="http://middlemanapp.com/images/100px-5fd6fb90.jpg#test"'
|
||||||
When I go to "/stylesheets/fragment-2902933e.css"
|
When I go to "/stylesheets/fragment-a772891f.css"
|
||||||
And I should see 'url("http://middlemanapp.com/images/100px-5fd6fb90.jpg")'
|
And I should see 'url("http://middlemanapp.com/images/100px-5fd6fb90.jpg")'
|
||||||
And I should see 'url("http://middlemanapp.com/images/100px-5fd6fb90.jpg?test")'
|
And I should see 'url("http://middlemanapp.com/images/100px-5fd6fb90.jpg?test")'
|
||||||
And I should see 'url("http://middlemanapp.com/images/100px-5fd6fb90.jpg?#test")'
|
And I should see 'url("http://middlemanapp.com/images/100px-5fd6fb90.jpg?#test")'
|
||||||
|
@ -179,14 +177,14 @@ Feature: Assets get file hashes appended to them and references to them are upda
|
||||||
font-size: 14px
|
font-size: 14px
|
||||||
"""
|
"""
|
||||||
When I go to "/partials/"
|
When I go to "/partials/"
|
||||||
Then I should see 'href="../stylesheets/uses_partials-4d4e34e6.css'
|
Then I should see 'href="../stylesheets/uses_partials-44fb2764.css'
|
||||||
And the file "source/stylesheets/_partial.sass" has the contents
|
And the file "source/stylesheets/_partial.sass" has the contents
|
||||||
"""
|
"""
|
||||||
body
|
body
|
||||||
font-size: 18px !important
|
font-size: 18px !important
|
||||||
"""
|
"""
|
||||||
When I go to "/partials/"
|
When I go to "/partials/"
|
||||||
Then I should see 'href="../stylesheets/uses_partials-ec347271.css'
|
Then I should see 'href="../stylesheets/uses_partials-10d8ae33.css'
|
||||||
|
|
||||||
Scenario: The asset hash should change when a Rack-based filter changes
|
Scenario: The asset hash should change when a Rack-based filter changes
|
||||||
Given a fixture app "asset-hash-app"
|
Given a fixture app "asset-hash-app"
|
||||||
|
@ -200,10 +198,12 @@ Feature: Assets get file hashes appended to them and references to them are upda
|
||||||
"""
|
"""
|
||||||
Given the Server is running at "asset-hash-app"
|
Given the Server is running at "asset-hash-app"
|
||||||
When I go to "/"
|
When I go to "/"
|
||||||
Then I should see 'href="stylesheets/site-5ad7def0.css'
|
Then I should see 'href="stylesheets/site-30784643.css'
|
||||||
When I go to "stylesheets/site-5ad7def0.css"
|
When I go to "stylesheets/site-30784643.css"
|
||||||
Then I should see 'background-image: url("../images/100px-5fd6fb90.jpg")'
|
Then I should see 'background-image'
|
||||||
Then I should see 'Added by Rack filter'
|
Then I should see 'Added by Rack filter'
|
||||||
|
When I go to "stylesheets/site-7474cadd.css"
|
||||||
|
Then I should see 'Not Found'
|
||||||
|
|
||||||
Scenario: Hashed-asset files are not produced for ignored paths
|
Scenario: Hashed-asset files are not produced for ignored paths
|
||||||
Given a fixture app "asset-hash-app"
|
Given a fixture app "asset-hash-app"
|
||||||
|
@ -285,40 +285,5 @@ Feature: Assets get file hashes appended to them and references to them are upda
|
||||||
When I cd to "build"
|
When I cd to "build"
|
||||||
Then the following files should exist:
|
Then the following files should exist:
|
||||||
| javascripts/jquery.min-276c87ff.js |
|
| javascripts/jquery.min-276c87ff.js |
|
||||||
| stylesheets/test-7de2ad06.css |
|
|
||||||
And the following files should not exist:
|
And the following files should not exist:
|
||||||
| javascripts/jquery.min.js |
|
| javascripts/jquery.min.js |
|
||||||
And the file "stylesheets/test-7de2ad06.css" should contain:
|
|
||||||
"""
|
|
||||||
.no-bug{background-image:url(/images/100px-5fd6fb90.jpg)}
|
|
||||||
.bug{content:"";background-image:url(/images/100px-5fd6fb90.jpg)}
|
|
||||||
.no-bug{content:""; background-image:url(/images/100px-5fd6fb90.jpg)}
|
|
||||||
"""
|
|
||||||
|
|
||||||
Scenario: Source map paths include the hash
|
|
||||||
Given a successfully built app at "asset-hash-source-map"
|
|
||||||
When I cd to "build"
|
|
||||||
Then the following files should exist:
|
|
||||||
| index.html |
|
|
||||||
| javascripts/application-4553338c.js |
|
|
||||||
| javascripts/application.js-22cc2b5f.map |
|
|
||||||
| index.html |
|
|
||||||
And the following files should not exist:
|
|
||||||
| javascripts/application.js |
|
|
||||||
| javascripts/application.js.map |
|
|
||||||
|
|
||||||
And the file "javascripts/application-4553338c.js" should contain "//# sourceMappingURL=application.js-22cc2b5f.map"
|
|
||||||
|
|
||||||
Scenario: Hashes can contain a prefix
|
|
||||||
Given a successfully built app at "asset-hash-prefix"
|
|
||||||
When I cd to "build"
|
|
||||||
Then the following files should exist:
|
|
||||||
| index.html |
|
|
||||||
| javascripts/application-myprefix-4553338c.js |
|
|
||||||
| javascripts/application.js-myprefix-22cc2b5f.map |
|
|
||||||
| index.html |
|
|
||||||
And the following files should not exist:
|
|
||||||
| javascripts/application.js |
|
|
||||||
| javascripts/application.js.map |
|
|
||||||
|
|
||||||
And the file "javascripts/application-myprefix-4553338c.js" should contain "//# sourceMappingURL=application.js-myprefix-22cc2b5f.map"
|
|
||||||
|
|
|
@ -17,16 +17,13 @@ Feature: Alternate between multiple asset hosts
|
||||||
When I go to "/stylesheets/asset_host.css"
|
When I go to "/stylesheets/asset_host.css"
|
||||||
Then I should see content matching %r{http://assets1.example.com/}
|
Then I should see content matching %r{http://assets1.example.com/}
|
||||||
Then I should not see content matching %r{http://assets1.example.com//}
|
Then I should not see content matching %r{http://assets1.example.com//}
|
||||||
When I go to "/javascripts/asset_host.js"
|
|
||||||
Then I should not see content matching %r{http://assets1.example.com/}
|
|
||||||
|
|
||||||
Scenario: Set proc host with inline-option
|
Scenario: Set proc host with inline-option
|
||||||
Given a fixture app "asset-host-app"
|
Given a fixture app "asset-host-app"
|
||||||
And a file named "config.rb" with:
|
And a file named "config.rb" with:
|
||||||
"""
|
"""
|
||||||
activate :asset_host, host: Proc.new { |asset|
|
activate :asset_host, host: Proc.new { |asset|
|
||||||
hash = Digest::MD5.digest(asset).bytes.map!(&:ord).reduce(&:+)
|
"http://assets%d.example.com" % (asset.hash % 4)
|
||||||
"http://assets%d.example.com" % (hash % 4)
|
|
||||||
}
|
}
|
||||||
"""
|
"""
|
||||||
And the Server is running
|
And the Server is running
|
||||||
|
|
|
@ -43,10 +43,6 @@ Feature: Builder
|
||||||
Given a built app at "empty-app"
|
Given a built app at "empty-app"
|
||||||
Then the exit status should be 1
|
Then the exit status should be 1
|
||||||
|
|
||||||
Scenario: Build external_pipeline errors
|
|
||||||
Given a built app at "external-pipeline-error"
|
|
||||||
Then the exit status should be 1
|
|
||||||
|
|
||||||
Scenario: Build alias (b)
|
Scenario: Build alias (b)
|
||||||
Given a fixture app "large-build-app"
|
Given a fixture app "large-build-app"
|
||||||
When I run `middleman b`
|
When I run `middleman b`
|
||||||
|
|
|
@ -144,33 +144,6 @@ Feature: Collections
|
||||||
And I should see 'Article: Blog3 Another Article'
|
And I should see 'Article: Blog3 Another Article'
|
||||||
And I should see 'Article: Blog2 Yet Another Article'
|
And I should see 'Article: Blog2 Yet Another Article'
|
||||||
|
|
||||||
Scenario: Work with local helpers
|
|
||||||
Given a fixture app "collections-app"
|
|
||||||
And a file named "config.rb" with:
|
|
||||||
"""
|
|
||||||
module TestHelper
|
|
||||||
def help_me
|
|
||||||
"ok"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
include TestHelper
|
|
||||||
|
|
||||||
data.articles.each_with_index do |a, i|
|
|
||||||
proxy "/#{i}-#{help_me}.html", a
|
|
||||||
end
|
|
||||||
"""
|
|
||||||
And a file named "data/articles.yaml" with:
|
|
||||||
"""
|
|
||||||
---
|
|
||||||
- "/blog1/2011-01-01-new-article.html"
|
|
||||||
- "/blog2/2011-01-02-another-article.html"
|
|
||||||
"""
|
|
||||||
Given the Server is running at "collections-app"
|
|
||||||
When I go to "0-ok.html"
|
|
||||||
Then I should see 'Newer Article Content'
|
|
||||||
When I go to "1-ok.html"
|
|
||||||
Then I should see 'Another Article Content'
|
|
||||||
|
|
||||||
Scenario: Collected data update with file changes
|
Scenario: Collected data update with file changes
|
||||||
Given a fixture app "collections-app"
|
Given a fixture app "collections-app"
|
||||||
|
|
|
@ -11,22 +11,6 @@ Feature: Custom layouts
|
||||||
When I go to "/custom-layout.html"
|
When I go to "/custom-layout.html"
|
||||||
Then I should see "Custom Layout"
|
Then I should see "Custom Layout"
|
||||||
|
|
||||||
Scenario: Using custom :layout attribute with proxy
|
|
||||||
Given a fixture app "custom-layout-app2"
|
|
||||||
And a file named "config.rb" with:
|
|
||||||
"""
|
|
||||||
page '/test/*', layout: :custom
|
|
||||||
proxy "/test/me.html", "/custom-layout.html"
|
|
||||||
live { %w(you) }.each do |who|
|
|
||||||
proxy "/test/#{who}.html", "/custom-layout.html"
|
|
||||||
end
|
|
||||||
"""
|
|
||||||
And the Server is running at "custom-layout-app2"
|
|
||||||
When I go to "/test/me.html"
|
|
||||||
Then I should see "Custom Layout"
|
|
||||||
When I go to "/test/you.html"
|
|
||||||
Then I should see "Custom Layout"
|
|
||||||
|
|
||||||
Scenario: Using custom :layout attribute with folders
|
Scenario: Using custom :layout attribute with folders
|
||||||
Given a fixture app "custom-layout-app2"
|
Given a fixture app "custom-layout-app2"
|
||||||
And a file named "config.rb" with:
|
And a file named "config.rb" with:
|
||||||
|
|
|
@ -31,7 +31,6 @@ Feature: Dynamic Pages
|
||||||
| should_be_ignored6.html |
|
| should_be_ignored6.html |
|
||||||
| should_be_ignored7.html |
|
| should_be_ignored7.html |
|
||||||
| should_be_ignored8.html |
|
| should_be_ignored8.html |
|
||||||
| should_be_ignored9.html |
|
|
||||||
|
|
||||||
Scenario: Preview basic proxy
|
Scenario: Preview basic proxy
|
||||||
Given the Server is running at "dynamic-pages-app"
|
Given the Server is running at "dynamic-pages-app"
|
||||||
|
@ -132,5 +131,3 @@ Feature: Dynamic Pages
|
||||||
Then I should see "File Not Found"
|
Then I should see "File Not Found"
|
||||||
When I go to "/should_be_ignored8.html"
|
When I go to "/should_be_ignored8.html"
|
||||||
Then I should see "File Not Found"
|
Then I should see "File Not Found"
|
||||||
When I go to "/should_be_ignored9.html"
|
|
||||||
Then I should see "File Not Found"
|
|
||||||
|
|
|
@ -35,7 +35,7 @@ Feature: Neighboring YAML Front Matter
|
||||||
Given the Server is running at "frontmatter-neighbor-app"
|
Given the Server is running at "frontmatter-neighbor-app"
|
||||||
And the file "source/front-matter-change.html.erb" has the contents
|
And the file "source/front-matter-change.html.erb" has the contents
|
||||||
"""
|
"""
|
||||||
FileA <%= current_page.data.title %>
|
<%= current_page.data.title %>
|
||||||
"""
|
"""
|
||||||
And the file "source/front-matter-change.html.erb.frontmatter" has the contents
|
And the file "source/front-matter-change.html.erb.frontmatter" has the contents
|
||||||
"""
|
"""
|
||||||
|
@ -43,8 +43,6 @@ Feature: Neighboring YAML Front Matter
|
||||||
title: Hello World
|
title: Hello World
|
||||||
layout: false
|
layout: false
|
||||||
---
|
---
|
||||||
|
|
||||||
FileB
|
|
||||||
"""
|
"""
|
||||||
When I go to "/front-matter-change.html"
|
When I go to "/front-matter-change.html"
|
||||||
Then I should see "Hello World"
|
Then I should see "Hello World"
|
||||||
|
@ -54,8 +52,6 @@ Feature: Neighboring YAML Front Matter
|
||||||
title: Hola Mundo
|
title: Hola Mundo
|
||||||
layout: false
|
layout: false
|
||||||
---
|
---
|
||||||
|
|
||||||
FileC
|
|
||||||
"""
|
"""
|
||||||
When I go to "/front-matter-change.html"
|
When I go to "/front-matter-change.html"
|
||||||
Then I should see "Hola Mundo"
|
Then I should see "Hola Mundo"
|
||||||
|
|
|
@ -22,7 +22,7 @@ Feature: GZIP assets during build
|
||||||
Given a fixture app "gzip-app"
|
Given a fixture app "gzip-app"
|
||||||
And a file named "config.rb" with:
|
And a file named "config.rb" with:
|
||||||
"""
|
"""
|
||||||
activate :gzip, exts: %w(.htm .html .js .xhtml)
|
activate :gzip, exts: %w(.js .html .htm)
|
||||||
"""
|
"""
|
||||||
And a successfully built app at "gzip-app"
|
And a successfully built app at "gzip-app"
|
||||||
Then the following files should exist:
|
Then the following files should exist:
|
||||||
|
|
|
@ -40,29 +40,19 @@ Feature: link_to helper
|
||||||
"""
|
"""
|
||||||
absolute: <%= link_to "Needs Index", "/needs_index.html", relative: true %>
|
absolute: <%= link_to "Needs Index", "/needs_index.html", relative: true %>
|
||||||
relative: <%= link_to "Relative", "needs_index.html", relative: true %>
|
relative: <%= link_to "Relative", "needs_index.html", relative: true %>
|
||||||
|
|
||||||
absolute spaces: <%= link_to "Spaces Index", "/evil spaces.html", relative: true %>
|
|
||||||
relative spaces: <%= link_to "Spaces Relative", "evil spaces.html", relative: true %>
|
|
||||||
"""
|
"""
|
||||||
And a file named "source/link_to/sub.html.erb" with:
|
And a file named "source/link_to/sub.html.erb" with:
|
||||||
"""
|
"""
|
||||||
absolute: <%= link_to "Needs Index", "/needs_index.html", relative: true %>
|
absolute: <%= link_to "Needs Index", "/needs_index.html", relative: true %>
|
||||||
relative: <%= link_to "Relative", "../needs_index.html", relative: true %>
|
relative: <%= link_to "Relative", "../needs_index.html", relative: true %>
|
||||||
|
|
||||||
absolute spaces: <%= link_to "Spaces Index", "/evil spaces.html", relative: true %>
|
|
||||||
relative spaces: <%= link_to "Spaces Relative", "../evil spaces.html", relative: true %>
|
|
||||||
"""
|
"""
|
||||||
And the Server is running at "indexable-app"
|
And the Server is running at "indexable-app"
|
||||||
When I go to "/link_to.html"
|
When I go to "/link_to.html"
|
||||||
Then I should see 'absolute: <a href="needs_index.html">Needs Index</a>'
|
Then I should see 'absolute: <a href="needs_index.html">Needs Index</a>'
|
||||||
Then I should see 'relative: <a href="needs_index.html">Relative</a>'
|
Then I should see 'relative: <a href="needs_index.html">Relative</a>'
|
||||||
Then I should see 'absolute spaces: <a href="evil%20spaces.html">Spaces Index</a>'
|
|
||||||
Then I should see 'relative spaces: <a href="evil%20spaces.html">Spaces Relative</a>'
|
|
||||||
When I go to "/link_to/sub.html"
|
When I go to "/link_to/sub.html"
|
||||||
Then I should see 'absolute: <a href="../needs_index.html">Needs Index</a>'
|
Then I should see 'absolute: <a href="../needs_index.html">Needs Index</a>'
|
||||||
Then I should see 'relative: <a href="../needs_index.html">Relative</a>'
|
Then I should see 'relative: <a href="../needs_index.html">Relative</a>'
|
||||||
Then I should see 'absolute spaces: <a href="../evil%20spaces.html">Spaces Index</a>'
|
|
||||||
Then I should see 'relative spaces: <a href="../evil%20spaces.html">Spaces Relative</a>'
|
|
||||||
|
|
||||||
Scenario: link_to relative works with strip_index_file
|
Scenario: link_to relative works with strip_index_file
|
||||||
Given a fixture app "indexable-app"
|
Given a fixture app "indexable-app"
|
||||||
|
|
|
@ -50,24 +50,24 @@ Feature: i18n Paths
|
||||||
Given the Server is running at "empty-app"
|
Given the Server is running at "empty-app"
|
||||||
When I go to "/hello.html"
|
When I go to "/hello.html"
|
||||||
Then I should see "Page: Hello"
|
Then I should see "Page: Hello"
|
||||||
Then I should see '<a href="/index.html" class="current">Current Home</a>'
|
Then I should see '<a class="current" href="/index.html">Current Home</a>'
|
||||||
Then I should see '<a href="/es/index.html" title="Other Home">Other Home</a>'
|
Then I should see '<a title="Other Home" href="/es/index.html">Other Home</a>'
|
||||||
Then I should see '<a href="/index.html" class="current"><span>Home: Current Block</span></a>'
|
Then I should see '<a class="current" href="/index.html"><span>Home: Current Block</span></a>'
|
||||||
Then I should see '<a href="/es/index.html" title="Other Home"><span>Home: Other Block</span></a>'
|
Then I should see '<a title="Other Home" href="/es/index.html"><span>Home: Other Block</span></a>'
|
||||||
Then I should see '<a href="/hello.html" class="current">Current hello.html</a>'
|
Then I should see '<a class="current" href="/hello.html">Current hello.html</a>'
|
||||||
Then I should see '<a href="/es/hola.html" title="Other hello.html">Other hello.html</a>'
|
Then I should see '<a title="Other hello.html" href="/es/hola.html">Other hello.html</a>'
|
||||||
Then I should see '<a href="/hello.html" class="current"><span>Current Block</span></a>'
|
Then I should see '<a class="current" href="/hello.html"><span>Current Block</span></a>'
|
||||||
Then I should see '<a href="/es/hola.html" title="Other hello.html"><span>Other Block</span></a>'
|
Then I should see '<a title="Other hello.html" href="/es/hola.html"><span>Other Block</span></a>'
|
||||||
When I go to "/es/hola.html"
|
When I go to "/es/hola.html"
|
||||||
Then I should see "Page: Hola"
|
Then I should see "Page: Hola"
|
||||||
Then I should see '<a href="/es/index.html" class="current">Current Home</a>'
|
Then I should see '<a class="current" href="/es/index.html">Current Home</a>'
|
||||||
Then I should see '<a href="/index.html" title="Other Home">Other Home</a>'
|
Then I should see '<a title="Other Home" href="/index.html">Other Home</a>'
|
||||||
Then I should see '<a href="/es/index.html" class="current"><span>Home: Current Block</span></a>'
|
Then I should see '<a class="current" href="/es/index.html"><span>Home: Current Block</span></a>'
|
||||||
Then I should see '<a href="/index.html" title="Other Home"><span>Home: Other Block</span></a>'
|
Then I should see '<a title="Other Home" href="/index.html"><span>Home: Other Block</span></a>'
|
||||||
Then I should see '<a href="/es/hola.html" class="current">Current hello.html</a>'
|
Then I should see '<a class="current" href="/es/hola.html">Current hello.html</a>'
|
||||||
Then I should see '<a href="/hello.html" title="Other hello.html">Other hello.html</a>'
|
Then I should see '<a title="Other hello.html" href="/hello.html">Other hello.html</a>'
|
||||||
Then I should see '<a href="/es/hola.html" class="current"><span>Current Block</span></a>'
|
Then I should see '<a class="current" href="/es/hola.html"><span>Current Block</span></a>'
|
||||||
Then I should see '<a href="/hello.html" title="Other hello.html"><span>Other Block</span></a>'
|
Then I should see '<a title="Other hello.html" href="/hello.html"><span>Other Block</span></a>'
|
||||||
|
|
||||||
Scenario: link_to is i18n aware and supports relative_links
|
Scenario: link_to is i18n aware and supports relative_links
|
||||||
Given a fixture app "empty-app"
|
Given a fixture app "empty-app"
|
||||||
|
@ -124,24 +124,24 @@ Feature: i18n Paths
|
||||||
Then I should see "assets/css/main.css"
|
Then I should see "assets/css/main.css"
|
||||||
When I go to "/hello.html"
|
When I go to "/hello.html"
|
||||||
Then I should see "Page: Hello"
|
Then I should see "Page: Hello"
|
||||||
Then I should see '<a href="index.html" class="current">Current Home</a>'
|
Then I should see '<a class="current" href="index.html">Current Home</a>'
|
||||||
Then I should see '<a href="es/index.html" title="Other Home">Other Home</a>'
|
Then I should see '<a title="Other Home" href="es/index.html">Other Home</a>'
|
||||||
Then I should see '<a href="index.html" class="current"><span>Home: Current Block</span></a>'
|
Then I should see '<a class="current" href="index.html"><span>Home: Current Block</span></a>'
|
||||||
Then I should see '<a href="es/index.html" title="Other Home"><span>Home: Other Block</span></a>'
|
Then I should see '<a title="Other Home" href="es/index.html"><span>Home: Other Block</span></a>'
|
||||||
Then I should see '<a href="hello.html" class="current">Current hello.html</a>'
|
Then I should see '<a class="current" href="hello.html">Current hello.html</a>'
|
||||||
Then I should see '<a href="es/hola.html" title="Other hello.html">Other hello.html</a>'
|
Then I should see '<a title="Other hello.html" href="es/hola.html">Other hello.html</a>'
|
||||||
Then I should see '<a href="hello.html" class="current"><span>Current Block</span></a>'
|
Then I should see '<a class="current" href="hello.html"><span>Current Block</span></a>'
|
||||||
Then I should see '<a href="es/hola.html" title="Other hello.html"><span>Other Block</span></a>'
|
Then I should see '<a title="Other hello.html" href="es/hola.html"><span>Other Block</span></a>'
|
||||||
When I go to "/es/hola.html"
|
When I go to "/es/hola.html"
|
||||||
Then I should see "Page: Hola"
|
Then I should see "Page: Hola"
|
||||||
Then I should see '<a href="index.html" class="current">Current Home</a>'
|
Then I should see '<a class="current" href="index.html">Current Home</a>'
|
||||||
Then I should see '<a href="../index.html" title="Other Home">Other Home</a>'
|
Then I should see '<a title="Other Home" href="../index.html">Other Home</a>'
|
||||||
Then I should see '<a href="index.html" class="current"><span>Home: Current Block</span></a>'
|
Then I should see '<a class="current" href="index.html"><span>Home: Current Block</span></a>'
|
||||||
Then I should see '<a href="../index.html" title="Other Home"><span>Home: Other Block</span></a>'
|
Then I should see '<a title="Other Home" href="../index.html"><span>Home: Other Block</span></a>'
|
||||||
Then I should see '<a href="hola.html" class="current">Current hello.html</a>'
|
Then I should see '<a class="current" href="hola.html">Current hello.html</a>'
|
||||||
Then I should see '<a href="../hello.html" title="Other hello.html">Other hello.html</a>'
|
Then I should see '<a title="Other hello.html" href="../hello.html">Other hello.html</a>'
|
||||||
Then I should see '<a href="hola.html" class="current"><span>Current Block</span></a>'
|
Then I should see '<a class="current" href="hola.html"><span>Current Block</span></a>'
|
||||||
Then I should see '<a href="../hello.html" title="Other hello.html"><span>Other Block</span></a>'
|
Then I should see '<a title="Other hello.html" href="../hello.html"><span>Other Block</span></a>'
|
||||||
|
|
||||||
Scenario: url_for is i18n aware
|
Scenario: url_for is i18n aware
|
||||||
Given a fixture app "empty-app"
|
Given a fixture app "empty-app"
|
||||||
|
|
|
@ -1,41 +0,0 @@
|
||||||
Feature: Markdown support in Slim
|
|
||||||
In order to test support of the Slim markdown filter
|
|
||||||
|
|
||||||
Scenario: Markdown filter in Slim works
|
|
||||||
Given a fixture app "markdown-in-slim-app"
|
|
||||||
And a file named "config.rb" with:
|
|
||||||
"""
|
|
||||||
set :markdown_engine, :redcarpet
|
|
||||||
activate :directory_indexes
|
|
||||||
"""
|
|
||||||
And a file named "source/markdown_filter.html.slim" with:
|
|
||||||
"""
|
|
||||||
markdown:
|
|
||||||
# H1
|
|
||||||
|
|
||||||
paragraph
|
|
||||||
"""
|
|
||||||
Given the Server is running at "markdown-in-slim-app"
|
|
||||||
When I go to "/markdown_filter/"
|
|
||||||
Then I should see ">H1</h1>"
|
|
||||||
Then I should see "<p>paragraph</p>"
|
|
||||||
|
|
||||||
|
|
||||||
Scenario: Markdown filter in Slim uses our link_to and image_tag helpers
|
|
||||||
Given a fixture app "markdown-in-slim-app"
|
|
||||||
And a file named "config.rb" with:
|
|
||||||
"""
|
|
||||||
set :markdown_engine, :redcarpet
|
|
||||||
activate :directory_indexes
|
|
||||||
"""
|
|
||||||
And a file named "source/link_and_image.html.slim" with:
|
|
||||||
"""
|
|
||||||
markdown:
|
|
||||||
[A link](/link_target.html)
|
|
||||||
|
|
||||||
![image](blank.gif)
|
|
||||||
"""
|
|
||||||
Given the Server is running at "markdown-in-slim-app"
|
|
||||||
When I go to "/link_and_image/"
|
|
||||||
Then I should see "/link_target/"
|
|
||||||
Then I should see 'src="/images/blank.gif"'
|
|
|
@ -5,37 +5,37 @@ Feature: Allow nesting of layouts
|
||||||
When I go to "/index.html"
|
When I go to "/index.html"
|
||||||
Then I should see:
|
Then I should see:
|
||||||
"""
|
"""
|
||||||
Master Erb
|
Master
|
||||||
<h1>Index Title</h1>
|
<h1>Index Title</h1>
|
||||||
I am Outer
|
Outer
|
||||||
I am Inner
|
Inner
|
||||||
Template
|
Template
|
||||||
|
|
||||||
"""
|
"""
|
||||||
When I go to "/another.html"
|
When I go to "/another.html"
|
||||||
Then I should see:
|
Then I should see:
|
||||||
"""
|
"""
|
||||||
Master Erb
|
Master
|
||||||
<h1>New Article Title</h1>
|
<h1>New Article Title</h1>
|
||||||
I am Outer
|
Outer
|
||||||
I am Inner
|
Inner
|
||||||
<p>The Article Content</p>
|
<p>The Article Content</p>
|
||||||
"""
|
"""
|
||||||
|
|
||||||
Scenario: A page uses an inner layout when uses an outer layout (slim)
|
Scenario: A page uses an inner layout when uses an outer layout (slim)
|
||||||
Given the Server is running at "nested-layout-app"
|
Given the Server is running at "nested-layout-app"
|
||||||
When I go to "/slim-test.html"
|
When I go to "/slim-test.html"
|
||||||
Then I should see "<h1>Master Slim</h1><p>New Article Title</p><div><h2>I am Outer</h2><h3>I am Inner</h3><p>The Article Content</p>"
|
Then I should see "<h1>Master</h1><p>New Article Title</p><div><h2>Outer</h2><h3>Inner</h3><p>The Article Content</p>"
|
||||||
|
|
||||||
Scenario: A page uses an inner layout when uses an outer layout (haml)
|
Scenario: A page uses an inner layout when uses an outer layout (haml)
|
||||||
Given the Server is running at "nested-layout-app"
|
Given the Server is running at "nested-layout-app"
|
||||||
When I go to "/haml-test.html"
|
When I go to "/haml-test.html"
|
||||||
Then I should see:
|
Then I should see:
|
||||||
"""
|
"""
|
||||||
Master Haml
|
Master
|
||||||
<h1>New Article Title</h1>
|
<h1>New Article Title</h1>
|
||||||
I am Outer
|
Outer
|
||||||
I am Inner
|
Inner
|
||||||
<p>The Article Content</p>
|
<p>The Article Content</p>
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
@ -43,16 +43,13 @@ Feature: Allow nesting of layouts
|
||||||
Given the Server is running at "nested-layout-app"
|
Given the Server is running at "nested-layout-app"
|
||||||
When I go to "/data-one.html"
|
When I go to "/data-one.html"
|
||||||
Then I should see "Page Number One"
|
Then I should see "Page Number One"
|
||||||
And I should see "Page #1"
|
And I should see "Inner"
|
||||||
And I should see "I am Inner"
|
|
||||||
And I should see "I am Outer"
|
|
||||||
And I should see "Master Erb"
|
|
||||||
When I go to "/data-two.html"
|
When I go to "/data-two.html"
|
||||||
Then I should see "Page Number Two"
|
Then I should see "Page Number Two"
|
||||||
And I should not see "I am Inner"
|
And I should not see "Inner"
|
||||||
When I go to "/data-one.html"
|
When I go to "/data-one.html"
|
||||||
Then I should see "Page Number One"
|
Then I should see "Page Number One"
|
||||||
And I should see "I am Inner"
|
And I should see "Inner"
|
||||||
When I go to "/data-two.html"
|
When I go to "/data-two.html"
|
||||||
Then I should see "Page Number Two"
|
Then I should see "Page Number Two"
|
||||||
And I should not see "I am Inner"
|
And I should not see "Inner"
|
||||||
|
|
|
@ -1,72 +0,0 @@
|
||||||
Feature: Page IDs
|
|
||||||
|
|
||||||
Scenario: link_to works with blocks (erb)
|
|
||||||
Given the Server is running at "page-id-app"
|
|
||||||
When I go to "/index.html"
|
|
||||||
Then I should see "I am: index"
|
|
||||||
And I should see "URL1: /fm.html"
|
|
||||||
And I should see "URL2: /2.html"
|
|
||||||
And I should see 'URL3: <a href="/3.html">Hi</a>'
|
|
||||||
And I should see 'URL4: <a href="/overwrites/from-default.html">Sym</a>'
|
|
||||||
And I should see 'URL5: <a href="/implicit.html">Imp</a>'
|
|
||||||
And I should see 'URL6: <a href="/folder/foldern.html">Foldern</a>'
|
|
||||||
And I should see 'URL7: <a href="/feed.xml">Feed</a>'
|
|
||||||
|
|
||||||
When I go to "/fm.html"
|
|
||||||
Then I should see "I am: frontmatter"
|
|
||||||
When I go to "/implicit.html"
|
|
||||||
Then I should see "I am: implicit"
|
|
||||||
When I go to "/feed.xml"
|
|
||||||
Then I should see "I am: feed.xml"
|
|
||||||
When I go to "/folder/foldern.html"
|
|
||||||
Then I should see "I am: folder/foldern"
|
|
||||||
|
|
||||||
When I go to "/1.html"
|
|
||||||
Then I should see "I am: page1"
|
|
||||||
When I go to "/2.html"
|
|
||||||
Then I should see "I am: page2"
|
|
||||||
When I go to "/3.html"
|
|
||||||
Then I should see "I am: page3"
|
|
||||||
|
|
||||||
When I go to "/overwrites/from-default.html"
|
|
||||||
Then I should see "I am: something-else"
|
|
||||||
|
|
||||||
When I go to "/overwrites/from-frontmatter.html"
|
|
||||||
Then I should see "I am: from_frontmatter"
|
|
||||||
|
|
||||||
Scenario: Override page ID derivation with a proc
|
|
||||||
Given a fixture app "page-id-app"
|
|
||||||
And app "page-id-app" is using config "proc"
|
|
||||||
And the Server is running at "page-id-app"
|
|
||||||
|
|
||||||
When I go to "/index.html"
|
|
||||||
Then I should see "I am: index.html-foo"
|
|
||||||
And I should see "URL1: /fm.html"
|
|
||||||
And I should see "URL2: /2.html"
|
|
||||||
And I should see 'URL3: <a href="/3.html">Hi</a>'
|
|
||||||
And I should see 'URL4: <a href="/overwrites/from-default.html">Sym</a>'
|
|
||||||
And I should see 'URL8: <a href="/implicit.html">Imp</a>'
|
|
||||||
And I should see 'URL9: <a href="/folder/foldern.html">Foldern</a>'
|
|
||||||
And I should see 'URL10: <a href="/feed.xml">Feed</a>'
|
|
||||||
|
|
||||||
When I go to "/fm.html"
|
|
||||||
Then I should see "I am: frontmatter"
|
|
||||||
When I go to "/implicit.html"
|
|
||||||
Then I should see "I am: implicit.html-foo"
|
|
||||||
When I go to "/feed.xml"
|
|
||||||
Then I should see "I am: feed.xml-foo"
|
|
||||||
When I go to "/folder/foldern.html"
|
|
||||||
Then I should see "I am: folder/foldern.html-foo"
|
|
||||||
|
|
||||||
When I go to "/1.html"
|
|
||||||
Then I should see "I am: page1"
|
|
||||||
When I go to "/2.html"
|
|
||||||
Then I should see "I am: page2"
|
|
||||||
When I go to "/3.html"
|
|
||||||
Then I should see "I am: page3"
|
|
||||||
|
|
||||||
When I go to "/overwrites/from-default.html"
|
|
||||||
Then I should see "I am: something-else"
|
|
||||||
|
|
||||||
When I go to "/overwrites/from-frontmatter.html"
|
|
||||||
Then I should see "I am: from_frontmatter"
|
|
|
@ -12,11 +12,6 @@ Feature: Provide Sane Defaults for Partial Behavior
|
||||||
Then I should see "Header"
|
Then I should see "Header"
|
||||||
And I should see "Footer"
|
And I should see "Footer"
|
||||||
|
|
||||||
Scenario: Flags error when partial is not found
|
|
||||||
Given the Server is running at "partials-app"
|
|
||||||
When I go to "/index_missing.html"
|
|
||||||
Then I should see "Error: Could not locate partial"
|
|
||||||
|
|
||||||
Scenario: Prefers partials of the same engine type
|
Scenario: Prefers partials of the same engine type
|
||||||
Given the Server is running at "partials-app"
|
Given the Server is running at "partials-app"
|
||||||
When I go to "/index.html"
|
When I go to "/index.html"
|
||||||
|
@ -55,10 +50,3 @@ Feature: Provide Sane Defaults for Partial Behavior
|
||||||
Then I should see "File Not Found"
|
Then I should see "File Not Found"
|
||||||
When I go to "/_code_snippet.html"
|
When I go to "/_code_snippet.html"
|
||||||
Then I should see "File Not Found"
|
Then I should see "File Not Found"
|
||||||
|
|
||||||
Scenario: Works with blocks
|
|
||||||
Given the Server is running at "partials-app"
|
|
||||||
When I go to "/block.html"
|
|
||||||
Then I should see "Start"
|
|
||||||
And I should see "Contents"
|
|
||||||
And I should see "End"
|
|
||||||
|
|
|
@ -120,7 +120,7 @@ Feature: Relative Assets
|
||||||
"""
|
"""
|
||||||
And the Server is running at "relative-assets-app"
|
And the Server is running at "relative-assets-app"
|
||||||
When I go to "/sub/image_tag.html"
|
When I go to "/sub/image_tag.html"
|
||||||
Then I should see '<img src="../img/blank.gif"'
|
Then I should see '<img src="../img/blank.gif" />'
|
||||||
|
|
||||||
Scenario: Relative assets should not break data URIs in image_tag
|
Scenario: Relative assets should not break data URIs in image_tag
|
||||||
Given a fixture app "relative-assets-app"
|
Given a fixture app "relative-assets-app"
|
||||||
|
|
|
@ -1,123 +0,0 @@
|
||||||
Feature: Relative Assets (Helpers Only)
|
|
||||||
|
|
||||||
Scenario: Rendering css with the feature enabled
|
|
||||||
Given a fixture app "relative-assets-app"
|
|
||||||
And a file named "config.rb" with:
|
|
||||||
"""
|
|
||||||
activate :relative_assets, helpers_only: true
|
|
||||||
"""
|
|
||||||
And a file named "source/stylesheets/relative_assets.css.sass.erb" with:
|
|
||||||
"""
|
|
||||||
h1
|
|
||||||
background: url("<%= asset_url('images/blank.gif') %>")
|
|
||||||
h2
|
|
||||||
background: url("<%= asset_url('/images/blank2.gif') %>")
|
|
||||||
"""
|
|
||||||
And a file named "source/javascripts/application.js.erb" with:
|
|
||||||
"""
|
|
||||||
function foo() {
|
|
||||||
var img = document.createElement('img');
|
|
||||||
img.src = '<%= asset_url("images/100px.jpg") %>';
|
|
||||||
var body = document.getElementsByTagName('body')[0];
|
|
||||||
body.insertBefore(img, body.firstChild);
|
|
||||||
}
|
|
||||||
|
|
||||||
window.onload = foo;
|
|
||||||
"""
|
|
||||||
And a file named "source/stylesheets/fonts3.css.erb" with:
|
|
||||||
"""
|
|
||||||
@font-face {
|
|
||||||
font-family: 'Roboto2';
|
|
||||||
src: url(<%= asset_url("/fonts/roboto/roboto-regular-webfont.eot") %>);
|
|
||||||
src: url(<%= asset_url("/fonts/roboto/roboto-regular-webfont.eot?#iefix") %>) format('embedded-opentype'),
|
|
||||||
url(<%= asset_url("/fonts/roboto/roboto-regular-webfont.woff") %>) format('woff'),
|
|
||||||
url(<%= asset_url("/fonts/roboto/roboto-regular-webfont.ttf") %>) format('truetype'),
|
|
||||||
url(<%= asset_url("/fonts/roboto/roboto-regular-webfont.svg#robotoregular") %>) format('svg');
|
|
||||||
font-weight: normal;
|
|
||||||
font-style: normal;
|
|
||||||
}
|
|
||||||
"""
|
|
||||||
And the Server is running at "relative-assets-app"
|
|
||||||
When I go to "/stylesheets/relative_assets.css"
|
|
||||||
Then I should see 'url("../images/blank.gif'
|
|
||||||
And I should see 'url("../images/blank2.gif'
|
|
||||||
When I go to "/javascripts/application.js"
|
|
||||||
Then I should not see "../"
|
|
||||||
When I go to "/stylesheets/fonts3.css"
|
|
||||||
Then I should see 'url(../fonts/roboto/roboto-regular-webfont.eot'
|
|
||||||
And I should see 'url(../fonts/roboto/roboto-regular-webfont.woff'
|
|
||||||
And I should see 'url(../fonts/roboto/roboto-regular-webfont.ttf'
|
|
||||||
And I should see 'url(../fonts/roboto/roboto-regular-webfont.svg'
|
|
||||||
|
|
||||||
Scenario: Relative css reference with directory indexes
|
|
||||||
Given a fixture app "relative-assets-app"
|
|
||||||
And a file named "config.rb" with:
|
|
||||||
"""
|
|
||||||
activate :directory_indexes
|
|
||||||
activate :relative_assets, helpers_only: true
|
|
||||||
"""
|
|
||||||
And the Server is running at "relative-assets-app"
|
|
||||||
When I go to "/relative_image/index.html"
|
|
||||||
Then I should see "../stylesheets/relative_assets.css"
|
|
||||||
|
|
||||||
Scenario: Relative assets via image_tag
|
|
||||||
Given a fixture app "relative-assets-app"
|
|
||||||
And a file named "config.rb" with:
|
|
||||||
"""
|
|
||||||
activate :relative_assets, helpers_only: true
|
|
||||||
"""
|
|
||||||
And a file named "source/sub/image_tag.html.erb" with:
|
|
||||||
"""
|
|
||||||
<%= image_tag '/img/blank.gif' %>
|
|
||||||
"""
|
|
||||||
And the Server is running at "relative-assets-app"
|
|
||||||
When I go to "/sub/image_tag.html"
|
|
||||||
Then I should see '<img src="../img/blank.gif"'
|
|
||||||
|
|
||||||
Scenario: Relative assets should not break data URIs in image_tag
|
|
||||||
Given a fixture app "relative-assets-app"
|
|
||||||
And a file named "config.rb" with:
|
|
||||||
"""
|
|
||||||
activate :relative_assets, helpers_only: true
|
|
||||||
"""
|
|
||||||
And a file named "source/sub/image_tag.html.erb" with:
|
|
||||||
"""
|
|
||||||
<%= image_tag "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" %>
|
|
||||||
"""
|
|
||||||
And the Server is running at "relative-assets-app"
|
|
||||||
When I go to "/sub/image_tag.html"
|
|
||||||
Then I should see '<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" />'
|
|
||||||
|
|
||||||
Scenario: URLs are not rewritten for rewrite ignored paths
|
|
||||||
Given a fixture app "relative-assets-app"
|
|
||||||
And a file named "config.rb" with:
|
|
||||||
"""
|
|
||||||
activate :relative_assets, rewrite_ignore: [
|
|
||||||
'/stylesheets/fonts3.css',
|
|
||||||
], helpers_only: true
|
|
||||||
"""
|
|
||||||
And a file named "source/stylesheets/relative_assets.css.sass.erb" with:
|
|
||||||
"""
|
|
||||||
h1
|
|
||||||
background: url("<%= asset_url('images/blank.gif') %>")
|
|
||||||
h2
|
|
||||||
background: url("<%= asset_url('/images/blank2.gif') %>")
|
|
||||||
"""
|
|
||||||
And a file named "source/stylesheets/fonts3.css.erb" with:
|
|
||||||
"""
|
|
||||||
@font-face {
|
|
||||||
font-family: 'Roboto2';
|
|
||||||
src: url(<%= asset_url("/fonts/roboto/roboto-regular-webfont.eot") %>);
|
|
||||||
src: url(<%= asset_url("/fonts/roboto/roboto-regular-webfont.eot?#iefix") %>) format('embedded-opentype'),
|
|
||||||
url(<%= asset_url("/fonts/roboto/roboto-regular-webfont.woff") %>) format('woff'),
|
|
||||||
url(<%= asset_url("/fonts/roboto/roboto-regular-webfont.ttf") %>) format('truetype'),
|
|
||||||
url(<%= asset_url("/fonts/roboto/roboto-regular-webfont.svg#robotoregular") %>) format('svg');
|
|
||||||
font-weight: normal;
|
|
||||||
font-style: normal;
|
|
||||||
}
|
|
||||||
"""
|
|
||||||
And the Server is running at "relative-assets-app"
|
|
||||||
When I go to "/stylesheets/relative_assets.css"
|
|
||||||
Then I should see 'url("../images/blank.gif'
|
|
||||||
When I go to "/stylesheets/fonts3.css"
|
|
||||||
Then I should see 'url(/fonts/roboto/roboto-regular-webfont.eot'
|
|
|
@ -1,40 +0,0 @@
|
||||||
Feature: Sass/SCSS support in Slim
|
|
||||||
In order to test support of the Slim sass and scss filters
|
|
||||||
|
|
||||||
Scenario: Sass filter in Slim works
|
|
||||||
Given a fixture app "sass-in-slim-app"
|
|
||||||
And a file named "config.rb" with:
|
|
||||||
"""
|
|
||||||
activate :directory_indexes
|
|
||||||
"""
|
|
||||||
And a file named "source/sass_filter.html.slim" with:
|
|
||||||
"""
|
|
||||||
sass:
|
|
||||||
.sass
|
|
||||||
margin: 0
|
|
||||||
"""
|
|
||||||
Given the Server is running at "sass-in-slim-app"
|
|
||||||
When I go to "/sass_filter/"
|
|
||||||
Then I should see "text/css"
|
|
||||||
Then I should see ".sass"
|
|
||||||
Then I should see "margin:0"
|
|
||||||
|
|
||||||
|
|
||||||
Scenario: SCSS filter in Slim works
|
|
||||||
Given a fixture app "sass-in-slim-app"
|
|
||||||
And a file named "config.rb" with:
|
|
||||||
"""
|
|
||||||
activate :directory_indexes
|
|
||||||
"""
|
|
||||||
And a file named "source/scss_filter.html.slim" with:
|
|
||||||
"""
|
|
||||||
scss:
|
|
||||||
.scss {
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
"""
|
|
||||||
Given the Server is running at "sass-in-slim-app"
|
|
||||||
When I go to "/scss_filter/"
|
|
||||||
Then I should see "text/css"
|
|
||||||
Then I should see ".scss"
|
|
||||||
Then I should see "margin:0"
|
|
|
@ -1,26 +0,0 @@
|
||||||
Feature: Don't allow template locals to overwrite template helpers
|
|
||||||
|
|
||||||
Scenario: Normal Template
|
|
||||||
Given an empty app
|
|
||||||
And a file named "config.rb" with:
|
|
||||||
"""
|
|
||||||
class TestExt < ::Middleman::Extension
|
|
||||||
expose_to_template foo: :foo
|
|
||||||
|
|
||||||
def foo
|
|
||||||
"bar"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
::Middleman::Extensions.register :test, TestExt
|
|
||||||
|
|
||||||
activate :test
|
|
||||||
|
|
||||||
page "/index.html", locals: { foo: false }
|
|
||||||
"""
|
|
||||||
And a file named "source/index.html.erb" with:
|
|
||||||
"""
|
|
||||||
<%= foo %>
|
|
||||||
"""
|
|
||||||
Given a built app at "empty_app"
|
|
||||||
Then the exit status should be 1
|
|
Binary file not shown.
Before Width: | Height: | Size: 334 B |
|
@ -1,3 +0,0 @@
|
||||||
.no-bug{background-image:url(/images/100px.jpg)}
|
|
||||||
.bug{content:"";background-image:url(/images/100px.jpg)}
|
|
||||||
.no-bug{content:""; background-image:url(/images/100px.jpg)}
|
|
|
@ -1,7 +0,0 @@
|
||||||
|
|
||||||
activate :asset_hash,
|
|
||||||
prefix: "myprefix-"
|
|
||||||
|
|
||||||
activate :relative_assets
|
|
||||||
|
|
||||||
activate :directory_indexes
|
|
|
@ -1,16 +0,0 @@
|
||||||
class Middleware
|
|
||||||
def initialize(app)
|
|
||||||
@app = app
|
|
||||||
end
|
|
||||||
|
|
||||||
def call(env)
|
|
||||||
status, headers, response = @app.call(env)
|
|
||||||
body = ''
|
|
||||||
response.each {|part| body += part }
|
|
||||||
if (env["PATH_INFO"] =~ /css$/)
|
|
||||||
body += "\n/* Added by Rack filter */"
|
|
||||||
status, headers, response = Rack::Response.new(body, status, headers).finish
|
|
||||||
end
|
|
||||||
[status, headers, response]
|
|
||||||
end
|
|
||||||
end
|
|
|
@ -1,6 +0,0 @@
|
||||||
<% content_for :head do %>
|
|
||||||
<title>The Middleman!</title>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<h1>Testing the sitemap hashing</h1>
|
|
||||||
<br /><br /><br />
|
|
|
@ -1,2 +0,0 @@
|
||||||
function foo(){var message="HEY THERE FRIEND!";var para=document.createElement("p");para.innerHTML=message;var body=document.getElementsByTagName("body")[0];body.insertBefore(para,body.firstChild)}window.onload=foo;
|
|
||||||
//# sourceMappingURL=application.js.map
|
|
|
@ -1 +0,0 @@
|
||||||
{"version":3,"sources":["source/javascripts/application.js"],"names":["foo","message","para","document","createElement","innerHTML","body","getElementsByTagName","insertBefore","firstChild","window","onload"],"mappings":"AAAA,QAASA,OACP,GAAIC,SAAU,mBACd,IAAIC,MAAOC,SAASC,cAAc,IAClCF,MAAKG,UAAYJ,OACb,IAAIK,MAAOH,SAASI,qBAAqB,QAAQ,EAC/CD,MAAKE,aAAaN,KAAMI,KAAKG,YAGpCC,OAAOC,OAASX"}
|
|
|
@ -1,17 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
|
|
||||||
<%= javascript_include_tag "application" %>
|
|
||||||
<%= yield_content :head %>
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body class="<%= page_classes %>">
|
|
||||||
|
|
||||||
<div id="main" role="main">
|
|
||||||
<%= yield %>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,6 +0,0 @@
|
||||||
|
|
||||||
activate :asset_hash
|
|
||||||
|
|
||||||
activate :relative_assets
|
|
||||||
|
|
||||||
activate :directory_indexes
|
|
|
@ -1,16 +0,0 @@
|
||||||
class Middleware
|
|
||||||
def initialize(app)
|
|
||||||
@app = app
|
|
||||||
end
|
|
||||||
|
|
||||||
def call(env)
|
|
||||||
status, headers, response = @app.call(env)
|
|
||||||
body = ''
|
|
||||||
response.each {|part| body += part }
|
|
||||||
if (env["PATH_INFO"] =~ /css$/)
|
|
||||||
body += "\n/* Added by Rack filter */"
|
|
||||||
status, headers, response = Rack::Response.new(body, status, headers).finish
|
|
||||||
end
|
|
||||||
[status, headers, response]
|
|
||||||
end
|
|
||||||
end
|
|
|
@ -1,6 +0,0 @@
|
||||||
<% content_for :head do %>
|
|
||||||
<title>The Middleman!</title>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<h1>Testing the sitemap hashing</h1>
|
|
||||||
<br /><br /><br />
|
|
|
@ -1,2 +0,0 @@
|
||||||
function foo(){var message="HEY THERE FRIEND!";var para=document.createElement("p");para.innerHTML=message;var body=document.getElementsByTagName("body")[0];body.insertBefore(para,body.firstChild)}window.onload=foo;
|
|
||||||
//# sourceMappingURL=application.js.map
|
|
|
@ -1 +0,0 @@
|
||||||
{"version":3,"sources":["source/javascripts/application.js"],"names":["foo","message","para","document","createElement","innerHTML","body","getElementsByTagName","insertBefore","firstChild","window","onload"],"mappings":"AAAA,QAASA,OACP,GAAIC,SAAU,mBACd,IAAIC,MAAOC,SAASC,cAAc,IAClCF,MAAKG,UAAYJ,OACb,IAAIK,MAAOH,SAASI,qBAAqB,QAAQ,EAC/CD,MAAKE,aAAaN,KAAMI,KAAKG,YAGpCC,OAAOC,OAASX"}
|
|
|
@ -1,17 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
|
|
||||||
<%= javascript_include_tag "application" %>
|
|
||||||
<%= yield_content :head %>
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body class="<%= page_classes %>">
|
|
||||||
|
|
||||||
<div id="main" role="main">
|
|
||||||
<%= yield %>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,2 +0,0 @@
|
||||||
var a = jQuery.css("h1", "font-size");
|
|
||||||
console.log(a);
|
|
|
@ -28,7 +28,3 @@ page "fake/*", locals: { glob_var: "I am one glob" }
|
||||||
page "fake2/*", locals: { glob_var: "I am two glob" }
|
page "fake2/*", locals: { glob_var: "I am two glob" }
|
||||||
page "fake3/*", locals: { glob_var: "I am three glob" }
|
page "fake3/*", locals: { glob_var: "I am three glob" }
|
||||||
page "fake4/*", locals: { glob_var: "I am four glob" }
|
page "fake4/*", locals: { glob_var: "I am four glob" }
|
||||||
|
|
||||||
["tom", "dick", "harry"].each do |name|
|
|
||||||
proxy "/about/#{name}.html", "/should_be_ignored9.html", locals: { person_name: name }, ignore: true
|
|
||||||
end
|
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
<h1>Ignore me! 9</h1>
|
|
|
@ -1,5 +0,0 @@
|
||||||
activate :external_pipeline,
|
|
||||||
name: :failing,
|
|
||||||
command: "mv does-not-exist tmp/file.js",
|
|
||||||
source: "tmp",
|
|
||||||
latency: 2
|
|
|
@ -1,7 +1,4 @@
|
||||||
---
|
|
||||||
inner: true
|
|
||||||
---
|
|
||||||
<% wrap_layout :outer do %>
|
<% wrap_layout :outer do %>
|
||||||
I am Inner
|
Inner
|
||||||
<%= yield %>
|
<%= yield %>
|
||||||
<% end %>
|
<% end %>
|
|
@ -1,7 +1,3 @@
|
||||||
---
|
|
||||||
inner_haml: true
|
|
||||||
---
|
|
||||||
|
|
||||||
= wrap_layout :outer_haml do
|
= wrap_layout :outer_haml do
|
||||||
I am Inner
|
Inner
|
||||||
= yield
|
= yield
|
|
@ -1,7 +1,3 @@
|
||||||
---
|
|
||||||
inner_slim: true
|
|
||||||
---
|
|
||||||
|
|
||||||
= wrap_layout :outer_slim do
|
= wrap_layout :outer_slim do
|
||||||
h3 I am Inner
|
h3 Inner
|
||||||
== yield
|
== yield
|
|
@ -1,9 +1,3 @@
|
||||||
---
|
Master
|
||||||
master: true
|
|
||||||
---
|
|
||||||
|
|
||||||
Master Erb
|
|
||||||
<h1><%= current_page.data.title %></h1>
|
<h1><%= current_page.data.title %></h1>
|
||||||
<%= yield %>
|
<%= yield %>
|
||||||
|
|
||||||
Using Inner: <%= current_page.data.inner ? 'true' : 'false' %>
|
|
||||||
|
|
|
@ -1,7 +1,3 @@
|
||||||
---
|
Master
|
||||||
master_haml: true
|
|
||||||
---
|
|
||||||
|
|
||||||
Master Haml
|
|
||||||
%h1= current_page.data.title
|
%h1= current_page.data.title
|
||||||
= yield
|
= yield
|
||||||
|
|
|
@ -1,7 +1,3 @@
|
||||||
---
|
h1 Master
|
||||||
master_slim: true
|
|
||||||
---
|
|
||||||
|
|
||||||
h1 Master Slim
|
|
||||||
p== current_page.data.title
|
p== current_page.data.title
|
||||||
div== yield
|
div== yield
|
||||||
|
|
|
@ -1,8 +1,4 @@
|
||||||
---
|
|
||||||
outer: true
|
|
||||||
---
|
|
||||||
|
|
||||||
<% wrap_layout :master do %>
|
<% wrap_layout :master do %>
|
||||||
I am Outer
|
Outer
|
||||||
<%= yield %>
|
<%= yield %>
|
||||||
<% end %>
|
<% end %>
|
|
@ -1,7 +1,3 @@
|
||||||
---
|
|
||||||
outer_haml: true
|
|
||||||
---
|
|
||||||
|
|
||||||
= wrap_layout :master_haml do
|
= wrap_layout :master_haml do
|
||||||
I am Outer
|
Outer
|
||||||
= yield
|
= yield
|
||||||
|
|
|
@ -1,7 +1,3 @@
|
||||||
---
|
|
||||||
outer_slim: true
|
|
||||||
---
|
|
||||||
|
|
||||||
= wrap_layout :master_slim do
|
= wrap_layout :master_slim do
|
||||||
h2 I am Outer
|
h2 Outer
|
||||||
== yield
|
== yield
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
%w(1 2 3).each do |n|
|
|
||||||
proxy "/#{n}.html", "/index.html", id: "page#{n}"
|
|
||||||
end
|
|
||||||
|
|
||||||
page "/overwrites/*", id: :"something-else"
|
|
||||||
|
|
||||||
config[:page_id_generator] = ->(path){ path + "-foo" }
|
|
|
@ -1,5 +0,0 @@
|
||||||
%w(1 2 3).each do |n|
|
|
||||||
proxy "/#{n}.html", "/index.html", id: "page#{n}"
|
|
||||||
end
|
|
||||||
|
|
||||||
page "/overwrites/*", id: :"something-else"
|
|
|
@ -1 +0,0 @@
|
||||||
I am: <%= current_resource.page_id %>
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue