Merge pull request #891 from middleman/magic_more

Merge more into core, use gem availability to autoload support
This commit is contained in:
Thomas Reynolds 2013-05-09 22:46:15 -07:00
commit 37e22c040e
476 changed files with 81 additions and 141 deletions

4
.gitmodules vendored
View file

@ -1,3 +1,3 @@
[submodule "middleman-more/lib/middleman-more/templates/smacss"] [submodule "middleman-core/lib/middleman-more/templates/smacss"]
path = middleman-more/lib/middleman-more/templates/smacss path = middleman-core/lib/middleman-more/templates/smacss
url = git@github.com:nsteiner/middleman-smacss.git url = git@github.com:nsteiner/middleman-smacss.git

View file

@ -1,7 +1,6 @@
middleman-*/lib/**/*.rb middleman-*/lib/**/*.rb
--exclude middleman-core/lib/middleman-core/vendor/ --exclude middleman-core/lib/middleman-core/vendor/
--exclude middleman-core/lib/middleman-core/extensions/automatic_image_sizes/fastimage.rb --exclude middleman-core/lib/middleman-core/extensions/automatic_image_sizes/fastimage.rb
--exclude middleman-more/lib/middleman-more/extensions/minify_css/cssmin.rb
--exclude middleman-core/lib/middleman-core/step_definitions --exclude middleman-core/lib/middleman-core/step_definitions
--exclude middleman-core/lib/middleman-core/templates/default/ --exclude middleman-core/lib/middleman-core/templates/default/
--exclude middleman-core/lib/middleman-core/templates/html5/ --exclude middleman-core/lib/middleman-core/templates/html5/

View file

@ -1,6 +1,7 @@
master master
=== ===
* Move more into core, autoloaded if gems are available.
* DataStore may now be accessed like a hash with #[] and #has_key?. #880 * DataStore may now be accessed like a hash with #[] and #has_key?. #880
* The i18n extension now supports providing localized templates as separate files, like index.es.html.haml. #816, #823 * The i18n extension now supports providing localized templates as separate files, like index.es.html.haml. #816, #823
* The list of regular expressions for which files are ignored by the file watcher are now configurable. * The list of regular expressions for which files are ignored by the file watcher are now configurable.

View file

@ -1,9 +1,8 @@
source 'https://rubygems.org' source 'https://rubygems.org'
# Build and doc tools # Build and doc tools
gem "rake", "~> 10.0.3" gem "rake", "~> 10.0.3", :require => false
gem "yard", "~> 0.8.0" gem "yard", "~> 0.8.0", :require => false
# Test tools # Test tools
gem "cucumber", "~> 1.3.1" gem "cucumber", "~> 1.3.1"
@ -12,7 +11,7 @@ gem "aruba", "~> 0.5.1"
gem "rspec", "~> 2.12" gem "rspec", "~> 2.12"
# Optional middleman dependencies, included for tests # Optional middleman dependencies, included for tests
gem "haml", "~> 4.0.0" # Make sure to use Haml 4 for tests gem "haml", "~> 4.0.0", :require => false # Make sure to use Haml 4 for tests
gem "sinatra", :require => false gem "sinatra", :require => false
gem "slim", :require => false gem "slim", :require => false
gem "liquid", :require => false gem "liquid", :require => false
@ -30,6 +29,5 @@ end
# Middleman itself # Middleman itself
gem "middleman-core", :path => "middleman-core" gem "middleman-core", :path => "middleman-core"
gem "middleman-more", :path => "middleman-more"
gem "middleman-sprockets", :github => "middleman/middleman-sprockets" gem "middleman-sprockets", :github => "middleman/middleman-sprockets"
gem "middleman", :path => "middleman" gem "middleman", :path => "middleman"

View file

@ -7,7 +7,7 @@ require File.expand_path("../middleman-core/lib/middleman-core/version.rb", __FI
ROOT = File.expand_path(File.dirname(__FILE__)) ROOT = File.expand_path(File.dirname(__FILE__))
GEM_NAME = 'middleman' GEM_NAME = 'middleman'
middleman_gems = %w(middleman-core middleman-more middleman) middleman_gems = %w(middleman-core middleman)
GEM_PATHS = middleman_gems.freeze GEM_PATHS = middleman_gems.freeze
def sh_rake(command) def sh_rake(command)

View file

@ -1,2 +0,0 @@
--exclusions-file .cane-exclusions.yml
--no-doc

View file

@ -1,5 +0,0 @@
style:
- lib/middleman-core/vendor/hooks-0.2.0/lib/hooks/inheritable_attribute.rb
- lib/middleman-core/vendor/hooks-0.2.0/test/hooks_test.rb
- lib/middleman-core/vendor/hooks-0.2.0/test/inheritable_attribute_test.rb
- lib/middleman-core/vendor/hooks-0.2.0/lib/hooks.rb

View file

@ -1,7 +1,7 @@
Feature: Text Files Without Extensions Should Build and Preview Feature: Text Files Without Extensions Should Build and Preview
Scenario: Building Text Files with directory indexes Scenario: Building Text Files with directory indexes
Given a successfully built app at "extensionless-text-files-app" Given a successfully built app at "more-extensionless-text-files-app"
When I cd to "build" When I cd to "build"
Then the following files should exist: Then the following files should exist:
| CNAME | | CNAME |
@ -13,7 +13,7 @@ Feature: Text Files Without Extensions Should Build and Preview
| README/index.html | | README/index.html |
Scenario: Previewing Text Files Scenario: Previewing Text Files
Given the Server is running at "extensionless-text-files-app" Given the Server is running at "more-extensionless-text-files-app"
When I go to "/CNAME" When I go to "/CNAME"
Then I should see "test.github.com" Then I should see "test.github.com"
When I go to "/LICENSE" When I go to "/LICENSE"

View file

@ -1,6 +1,6 @@
Feature: Setting page settings through frontmatter Feature: Setting page settings through frontmatter
Scenario: Setting layout, ignoring, and disabling directory indexes through frontmatter (build) Scenario: Setting layout, ignoring, and disabling directory indexes through frontmatter (build)
Given a successfully built app at "frontmatter-settings-app" Given a successfully built app at "more-frontmatter-settings-app"
Then the following files should exist: Then the following files should exist:
| build/proxied/index.html | | build/proxied/index.html |
| build/no_index.html | | build/no_index.html |
@ -11,7 +11,7 @@ Feature: Setting page settings through frontmatter
Scenario: Setting layout, ignoring, and disabling directory indexes through frontmatter (preview) Scenario: Setting layout, ignoring, and disabling directory indexes through frontmatter (preview)
Given the Server is running at "frontmatter-settings-app" Given the Server is running at "more-frontmatter-settings-app"
# When I go to "/proxied/" # When I go to "/proxied/"
# Then I should not see "File Not Found" # Then I should not see "File Not Found"
When I go to "/no_index.html" When I go to "/no_index.html"
@ -27,7 +27,7 @@ Feature: Setting page settings through frontmatter
Then I should see "File Not Found" Then I should see "File Not Found"
Scenario: Changing frontmatter in preview server Scenario: Changing frontmatter in preview server
Given the Server is running at "frontmatter-settings-app" Given the Server is running at "more-frontmatter-settings-app"
When I go to "/ignored/index.html" When I go to "/ignored/index.html"
Then I should see "File Not Found" Then I should see "File Not Found"
And the file "source/ignored.html.erb" has the contents And the file "source/ignored.html.erb" has the contents

View file

@ -1,13 +1,13 @@
Feature: Ignoring paths Feature: Ignoring paths
Scenario: Ignore with directory indexes (source file, build) Scenario: Ignore with directory indexes (source file, build)
Given a fixture app "ignore-app" Given a fixture app "more-ignore-app"
And a file named "config.rb" with: And a file named "config.rb" with:
""" """
activate :directory_indexes activate :directory_indexes
ignore 'about.html.erb' ignore 'about.html.erb'
ignore 'plain.html' ignore 'plain.html'
""" """
And a successfully built app at "ignore-app" And a successfully built app at "more-ignore-app"
Then the following files should exist: Then the following files should exist:
| build/index.html | | build/index.html |
And the following files should not exist: And the following files should not exist:
@ -15,7 +15,7 @@ Feature: Ignoring paths
| build/plain/index.html | | build/plain/index.html |
Scenario: Ignore with directory indexes (source file, server) Scenario: Ignore with directory indexes (source file, server)
Given a fixture app "ignore-app" Given a fixture app "more-ignore-app"
And a file named "config.rb" with: And a file named "config.rb" with:
""" """
activate :directory_indexes activate :directory_indexes
@ -31,14 +31,14 @@ Feature: Ignoring paths
Then I should see "File Not Found" Then I should see "File Not Found"
Scenario: Ignore with directory indexes (output path splat, build) Scenario: Ignore with directory indexes (output path splat, build)
Given a fixture app "ignore-app" Given a fixture app "more-ignore-app"
And a file named "config.rb" with: And a file named "config.rb" with:
""" """
activate :directory_indexes activate :directory_indexes
ignore 'about*' ignore 'about*'
ignore 'plain*' ignore 'plain*'
""" """
And a successfully built app at "ignore-app" And a successfully built app at "more-ignore-app"
Then the following files should exist: Then the following files should exist:
| build/index.html | | build/index.html |
And the following files should not exist: And the following files should not exist:
@ -46,7 +46,7 @@ Feature: Ignoring paths
| build/plain/index.html | | build/plain/index.html |
Scenario: Ignore with directory indexes (output path splat, server) Scenario: Ignore with directory indexes (output path splat, server)
Given a fixture app "ignore-app" Given a fixture app "more-ignore-app"
And a file named "config.rb" with: And a file named "config.rb" with:
""" """
activate :directory_indexes activate :directory_indexes

View file

@ -1,7 +1,7 @@
Feature: More default extensions Feature: More default extensions
Scenario: Default extensions preview Scenario: Default extensions preview
Given the Server is running at "implied-extensions-app" Given the Server is running at "more-implied-extensions-app"
When I go to "/test.html" When I go to "/test.html"
Then I should see "Hello" Then I should see "Hello"
When I go to "/test2.html" When I go to "/test2.html"
@ -20,8 +20,8 @@ Feature: More default extensions
Then I should see "color" Then I should see "color"
Scenario: Default extensions build Scenario: Default extensions build
Given a fixture app "implied-extensions-app" Given a fixture app "more-implied-extensions-app"
And a successfully built app at "implied-extensions-app" And a successfully built app at "more-implied-extensions-app"
When I cd to "build" When I cd to "build"
Then the following files should exist: Then the following files should exist:
| test.html | | test.html |

View file

@ -2,17 +2,17 @@ Feature: Instance Vars
In order to share data with layouts and partials via instance variables In order to share data with layouts and partials via instance variables
Scenario: Setting an instance var in a template should be visible in its layout Scenario: Setting an instance var in a template should be visible in its layout
Given the Server is running at "instance-vars-app" Given the Server is running at "more-instance-vars-app"
When I go to "/instance-var-set.html" When I go to "/instance-var-set.html"
Then I should see "Var is 100" Then I should see "Var is 100"
Scenario: Setting an instance var in a template should be visible in a partial Scenario: Setting an instance var in a template should be visible in a partial
Given the Server is running at "instance-vars-app" Given the Server is running at "more-instance-vars-app"
When I go to "/instance-var-set.html" When I go to "/instance-var-set.html"
Then I should see "My var is here!" Then I should see "My var is here!"
Scenario: Setting an instance var in one file should not be visible in another Scenario: Setting an instance var in one file should not be visible in another
Given the Server is running at "instance-vars-app" Given the Server is running at "more-instance-vars-app"
When I go to "/instance-var-set.html" When I go to "/instance-var-set.html"
When I go to "/no-instance-var.html" When I go to "/no-instance-var.html"
Then I should see "No var..." Then I should see "No var..."

View file

@ -1,7 +1,7 @@
Feature: Step through sitemap as a tree Feature: Step through sitemap as a tree (more)
Scenario: Root Scenario: Root
Given the Server is running at "traversal-app" Given the Server is running at "more-traversal-app"
When I go to "/index.html" When I go to "/index.html"
Then I should see "Path: index.html" Then I should see "Path: index.html"
Then I should not see "Parent: index.html" Then I should not see "Parent: index.html"
@ -10,7 +10,7 @@ Feature: Step through sitemap as a tree
Then I should not see "Child: proxied.html" Then I should not see "Child: proxied.html"
Scenario: Directories have children and a parent Scenario: Directories have children and a parent
Given the Server is running at "traversal-app" Given the Server is running at "more-traversal-app"
When I go to "/sub/index.html" When I go to "/sub/index.html"
Then I should see "Path: sub/index.html" Then I should see "Path: sub/index.html"
Then I should see "Parent: index.html" Then I should see "Parent: index.html"
@ -22,7 +22,7 @@ Feature: Step through sitemap as a tree
Then I should see "Sibling: root.html" Then I should see "Sibling: root.html"
Scenario: Directory accessed without index.html Scenario: Directory accessed without index.html
Given the Server is running at "traversal-app" Given the Server is running at "more-traversal-app"
When I go to "/sub/" When I go to "/sub/"
Then I should see "Path: sub/index.html" Then I should see "Path: sub/index.html"
Then I should see "Parent: index.html" Then I should see "Parent: index.html"
@ -34,7 +34,7 @@ Feature: Step through sitemap as a tree
Then I should see "Sibling: root.html" Then I should see "Sibling: root.html"
Scenario: Page has siblings, parent, and source file Scenario: Page has siblings, parent, and source file
Given the Server is running at "traversal-app" Given the Server is running at "more-traversal-app"
When I go to "/sub/sibling/" When I go to "/sub/sibling/"
Then I should see "Parent: sub/index.html" Then I should see "Parent: sub/index.html"
Then I should see "Sibling: sub/fake.html" Then I should see "Sibling: sub/fake.html"
@ -44,7 +44,7 @@ Feature: Step through sitemap as a tree
Then I should see "Source: source/sub/sibling.html.erb" Then I should see "Source: source/sub/sibling.html.erb"
Scenario: Proxied page has siblings, parent, and source file Scenario: Proxied page has siblings, parent, and source file
Given the Server is running at "traversal-app" Given the Server is running at "more-traversal-app"
When I go to "/sub/fake/" When I go to "/sub/fake/"
Then I should see "Path: sub/fake.html" Then I should see "Path: sub/fake.html"
Then I should see "Parent: sub/index.html" Then I should see "Parent: sub/index.html"
@ -55,13 +55,13 @@ Feature: Step through sitemap as a tree
Then I should see "Source: source/proxied.html.erb" Then I should see "Source: source/proxied.html.erb"
Scenario: Child pages have data Scenario: Child pages have data
Given the Server is running at "traversal-app" Given the Server is running at "more-traversal-app"
When I go to "/directory-indexed" When I go to "/directory-indexed"
Then I should see "Title of Sibling One" Then I should see "Title of Sibling One"
Then I should see "Title of Sibling Two" Then I should see "Title of Sibling Two"
Scenario: When directory_index extension is active, child pages are found in named directory Scenario: When directory_index extension is active, child pages are found in named directory
Given the Server is running at "traversal-app" Given the Server is running at "more-traversal-app"
When I go to "/directory-indexed" When I go to "/directory-indexed"
Then I should see "Path: directory-indexed.html" Then I should see "Path: directory-indexed.html"
Then I should see "Parent: index.html" Then I should see "Parent: index.html"

View file

@ -19,4 +19,4 @@ Feature: SASS .sass-cache custom location
When I go to "/stylesheets/plain.css" When I go to "/stylesheets/plain.css"
Then I should see "html, body, div, span, applet, object, iframe," Then I should see "html, body, div, span, applet, object, iframe,"
Then a directory named "/tmp/middleman-more-custom-sass_cache_path" should exist Then a directory named "/tmp/middleman-core-custom-sass_cache_path" should exist

View file

@ -1,6 +1,6 @@
Feature: Sass Updates and Partials Feature: Sass Updates and Partials
Scenario: The preview server should update stylesheets when Sass changes Scenario: The preview server should update stylesheets when Sass changes
Given the Server is running at "preview-app" Given the Server is running at "more-preview-app"
And the file "source/stylesheets/plain.css.sass" has the contents And the file "source/stylesheets/plain.css.sass" has the contents
""" """
red red
@ -17,7 +17,7 @@ Feature: Sass Updates and Partials
Then I should see "color: blue;" Then I should see "color: blue;"
Scenario: The preview server should update stylesheets when Sass partials change Scenario: The preview server should update stylesheets when Sass partials change
Given the Server is running at "preview-app" Given the Server is running at "more-preview-app"
And the file "source/stylesheets/main.css.sass" has the contents And the file "source/stylesheets/main.css.sass" has the contents
""" """
@import partial.sass @import partial.sass
@ -50,5 +50,5 @@ Feature: Sass Updates and Partials
And I should see "font-size: 18px" And I should see "font-size: 18px"
Scenario: Sass partials should work when building Scenario: Sass partials should work when building
Given a successfully built app at "preview-app" Given a successfully built app at "more-preview-app"
Then the file "build/stylesheets/main.css" should contain "font-size: 18px" Then the file "build/stylesheets/main.css" should contain "font-size: 18px"

View file

Before

Width:  |  Height:  |  Size: 216 B

After

Width:  |  Height:  |  Size: 216 B

View file

Before

Width:  |  Height:  |  Size: 318 B

After

Width:  |  Height:  |  Size: 318 B

View file

Before

Width:  |  Height:  |  Size: 334 B

After

Width:  |  Height:  |  Size: 334 B

View file

Before

Width:  |  Height:  |  Size: 334 B

After

Width:  |  Height:  |  Size: 334 B

View file

Before

Width:  |  Height:  |  Size: 216 B

After

Width:  |  Height:  |  Size: 216 B

View file

Before

Width:  |  Height:  |  Size: 334 B

After

Width:  |  Height:  |  Size: 334 B

View file

Before

Width:  |  Height:  |  Size: 334 B

After

Width:  |  Height:  |  Size: 334 B

View file

Before

Width:  |  Height:  |  Size: 216 B

After

Width:  |  Height:  |  Size: 216 B

View file

Before

Width:  |  Height:  |  Size: 43 B

After

Width:  |  Height:  |  Size: 43 B

Some files were not shown because too many files have changed in this diff Show more