middleman 3.0.0.alpha.5 → 3.0.0.alpha.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. data/CHANGELOG.md +3 -2
  2. data/README.md +7 -7
  3. data/bin/middleman +3 -2
  4. data/features/builder.feature +4 -0
  5. data/features/cli.feature +10 -11
  6. data/features/nested_layouts.feature +24 -0
  7. data/features/sitemap_traversal.features +56 -0
  8. data/fixtures/empty-app/not-config.rb +0 -0
  9. data/fixtures/nested-layout-app/config.rb +1 -0
  10. data/fixtures/nested-layout-app/source/data-one.html.erb +5 -0
  11. data/fixtures/nested-layout-app/source/data-two.html.erb +5 -0
  12. data/fixtures/nested-layout-app/source/index.html.erb +1 -0
  13. data/fixtures/nested-layout-app/source/layouts/inner.erb +4 -0
  14. data/fixtures/nested-layout-app/source/layouts/master.erb +3 -0
  15. data/fixtures/nested-layout-app/source/layouts/outer.erb +4 -0
  16. data/fixtures/traversal-app/config.rb +2 -0
  17. data/fixtures/traversal-app/source/index.html.erb +0 -0
  18. data/fixtures/traversal-app/source/layout.erb +13 -0
  19. data/fixtures/traversal-app/source/proxied.html.erb +0 -0
  20. data/fixtures/traversal-app/source/root.html.erb +0 -0
  21. data/fixtures/traversal-app/source/sub/index.html.erb +0 -0
  22. data/fixtures/traversal-app/source/sub/sibling.html.erb +0 -0
  23. data/fixtures/traversal-app/source/sub/sibling2.html.erb +0 -0
  24. data/fixtures/traversal-app/source/sub/sub2/index.html.erb +0 -0
  25. data/fixtures/traversal-app/source/sub/sub3/deep.html.erb +0 -0
  26. data/lib/middleman.rb +0 -3
  27. data/lib/middleman/base.rb +3 -28
  28. data/lib/middleman/cli/server.rb +0 -1
  29. data/lib/middleman/core_extensions/builder.rb +1 -7
  30. data/lib/middleman/core_extensions/default_helpers.rb +27 -1
  31. data/lib/middleman/core_extensions/extensions.rb +20 -4
  32. data/lib/middleman/core_extensions/file_watcher.rb +25 -8
  33. data/lib/middleman/core_extensions/front_matter.rb +5 -12
  34. data/lib/middleman/core_extensions/rendering.rb +10 -0
  35. data/lib/middleman/core_extensions/sitemap.rb +4 -0
  36. data/lib/middleman/guard.rb +11 -11
  37. data/lib/middleman/sitemap/page.rb +55 -0
  38. data/lib/middleman/sitemap/template.rb +9 -3
  39. data/lib/middleman/step_definitions.rb +0 -1
  40. data/lib/middleman/templates/default.rb +7 -2
  41. data/lib/middleman/templates/default/source/images/background.png +0 -0
  42. data/lib/middleman/templates/default/source/images/middleman.png +0 -0
  43. data/lib/middleman/templates/default/source/index.html.erb +9 -4
  44. data/lib/middleman/templates/default/source/javascripts/all.js +1 -0
  45. data/lib/middleman/templates/default/source/layouts/layout.erb +19 -0
  46. data/lib/middleman/templates/default/source/stylesheets/_animate.scss +23 -0
  47. data/lib/middleman/templates/default/source/stylesheets/_normalize.scss +431 -0
  48. data/lib/middleman/templates/default/source/stylesheets/all.css.scss +40 -0
  49. data/lib/middleman/templates/shared/config.tt +4 -16
  50. data/lib/middleman/version.rb +1 -1
  51. data/middleman-x86-mingw32.gemspec +1 -1
  52. data/middleman.gemspec +1 -1
  53. metadata +54 -13
  54. data/features/generator.feature +0 -8
  55. data/lib/middleman/extensions/sitemap_tree.rb +0 -38
  56. data/lib/middleman/step_definitions/generator_steps.rb +0 -26
  57. data/lib/middleman/templates/default/source/layout.erb +0 -19
  58. data/lib/middleman/templates/default/source/stylesheets/site.css.scss +0 -32
@@ -12,22 +12,7 @@
12
12
  # end
13
13
 
14
14
  ###
15
- # Haml
16
- ###
17
-
18
- # CodeRay syntax highlighting in Haml
19
- # First: gem install haml-coderay
20
- # require 'haml-coderay'
21
-
22
- # CoffeeScript filters in Haml
23
- # First: gem install coffee-filter
24
- # require 'coffee-filter'
25
-
26
- # Automatic image dimensions on image_tag helper
27
- # activate :automatic_image_sizes
28
-
29
- ###
30
- # Page command
15
+ # Page options, layouts, aliases and proxies
31
16
  ###
32
17
 
33
18
  # Per-page layout changes:
@@ -52,6 +37,9 @@
52
37
  # Helpers
53
38
  ###
54
39
 
40
+ # Automatic image dimensions on image_tag helper
41
+ # activate :automatic_image_sizes
42
+
55
43
  # Methods defined in the helpers block are available in templates
56
44
  # helpers do
57
45
  # def some_helper
@@ -4,7 +4,7 @@ require "rubygems"
4
4
  module Middleman
5
5
  # Current Version
6
6
  # @return [String]
7
- VERSION = "3.0.0.alpha.5"
7
+ VERSION = "3.0.0.alpha.6"
8
8
 
9
9
  # Parsed version for RubyGems
10
10
  # @private
@@ -33,7 +33,7 @@ Gem::Specification.new do |s|
33
33
  s.add_dependency("execjs", ["~> 1.2.7"])
34
34
  s.add_dependency("sprockets", ["~> 2.1.2"])
35
35
  s.add_dependency("sprockets-sass", ["~> 0.6.0"])
36
- s.add_dependency("guard", ["~> 0.9.1"])
36
+ s.add_dependency("guard", ["~> 0.9.2"])
37
37
  s.add_dependency("redcarpet", ["~> 2.0.0"])
38
38
 
39
39
  s.add_dependency("eventmachine", ["1.0.0.beta.4.1"])
@@ -33,7 +33,7 @@ Gem::Specification.new do |s|
33
33
  s.add_dependency("execjs", ["~> 1.2.7"])
34
34
  s.add_dependency("sprockets", ["~> 2.1.2"])
35
35
  s.add_dependency("sprockets-sass", ["~> 0.6.0"])
36
- s.add_dependency("guard", ["~> 0.9.1"])
36
+ s.add_dependency("guard", ["~> 0.9.2"])
37
37
  s.add_dependency("redcarpet", ["~> 2.0.0"])
38
38
 
39
39
  # Development and test
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: middleman
3
3
  version: !ruby/object:Gem::Version
4
- hash: -3702664394
4
+ hash: -3702664400
5
5
  prerelease: 6
6
6
  segments:
7
7
  - 3
8
8
  - 0
9
9
  - 0
10
10
  - alpha
11
- - 5
12
- version: 3.0.0.alpha.5
11
+ - 6
12
+ version: 3.0.0.alpha.6
13
13
  platform: ruby
14
14
  authors:
15
15
  - Thomas Reynolds
@@ -17,7 +17,7 @@ autorequire:
17
17
  bindir: bin
18
18
  cert_chain: []
19
19
 
20
- date: 2011-12-21 00:00:00 -08:00
20
+ date: 2011-12-23 00:00:00 -08:00
21
21
  default_executable:
22
22
  dependencies:
23
23
  - !ruby/object:Gem::Dependency
@@ -268,12 +268,12 @@ dependencies:
268
268
  requirements:
269
269
  - - ~>
270
270
  - !ruby/object:Gem::Version
271
- hash: 57
271
+ hash: 63
272
272
  segments:
273
273
  - 0
274
274
  - 9
275
- - 1
276
- version: 0.9.1
275
+ - 2
276
+ version: 0.9.2
277
277
  name: guard
278
278
  version_requirements: *id016
279
279
  - !ruby/object:Gem::Dependency
@@ -510,7 +510,6 @@ files:
510
510
  - features/fonts.feature
511
511
  - features/former_padrino_helpers.feature
512
512
  - features/front-matter.feature
513
- - features/generator.feature
514
513
  - features/helpers_auto_javascript_include_tag.feature
515
514
  - features/helpers_auto_stylesheet_link_tag.feature
516
515
  - features/helpers_external.feature
@@ -522,11 +521,13 @@ files:
522
521
  - features/minify_css.feature
523
522
  - features/minify_javascript.feature
524
523
  - features/mount_rack.feature
524
+ - features/nested_layouts.feature
525
525
  - features/page_alias_and_layouts.feature
526
526
  - features/partials.feature
527
527
  - features/preview_changes.feature
528
528
  - features/relative_assets.feature
529
529
  - features/scss-support.feature
530
+ - features/sitemap_traversal.features
530
531
  - features/slim.feature
531
532
  - features/sprockets.feature
532
533
  - features/sprockets_gems.feature
@@ -569,6 +570,7 @@ files:
569
570
  - fixtures/different-engine-partial/source/layouts/layout.erb
570
571
  - fixtures/different-engine-partial/source/shared/_footer.slim
571
572
  - fixtures/different-engine-partial/source/shared/_header.erb
573
+ - fixtures/empty-app/not-config.rb
572
574
  - fixtures/engine-matching-layout/config.rb
573
575
  - fixtures/engine-matching-layout/source/index.html.erb
574
576
  - fixtures/engine-matching-layout/source/layout.erb
@@ -618,6 +620,13 @@ files:
618
620
  - fixtures/multiple-layouts/source/index.html.erb
619
621
  - fixtures/multiple-layouts/source/layout.erb
620
622
  - fixtures/multiple-layouts/source/layout.haml
623
+ - fixtures/nested-layout-app/config.rb
624
+ - fixtures/nested-layout-app/source/data-one.html.erb
625
+ - fixtures/nested-layout-app/source/data-two.html.erb
626
+ - fixtures/nested-layout-app/source/index.html.erb
627
+ - fixtures/nested-layout-app/source/layouts/inner.erb
628
+ - fixtures/nested-layout-app/source/layouts/master.erb
629
+ - fixtures/nested-layout-app/source/layouts/outer.erb
621
630
  - fixtures/no-layout/config.rb
622
631
  - fixtures/no-layout/source/index.html.erb
623
632
  - fixtures/partials-app/config.rb
@@ -743,6 +752,16 @@ files:
743
752
  - fixtures/test-app/source/sub1/page-classes.html.haml
744
753
  - fixtures/test-app/source/sub1/sub2/page-classes.html.haml
745
754
  - fixtures/test-app/source/tiny_src.html.haml
755
+ - fixtures/traversal-app/config.rb
756
+ - fixtures/traversal-app/source/index.html.erb
757
+ - fixtures/traversal-app/source/layout.erb
758
+ - fixtures/traversal-app/source/proxied.html.erb
759
+ - fixtures/traversal-app/source/root.html.erb
760
+ - fixtures/traversal-app/source/sub/index.html.erb
761
+ - fixtures/traversal-app/source/sub/sibling.html.erb
762
+ - fixtures/traversal-app/source/sub/sibling2.html.erb
763
+ - fixtures/traversal-app/source/sub/sub2/index.html.erb
764
+ - fixtures/traversal-app/source/sub/sub3/deep.html.erb
746
765
  - fixtures/wildcard-app/config.rb
747
766
  - fixtures/wildcard-app/source/admin/index.html.erb
748
767
  - fixtures/wildcard-app/source/admin/page.html.erb
@@ -785,7 +804,6 @@ files:
785
804
  - lib/middleman/extensions/minify_css/cssmin.rb
786
805
  - lib/middleman/extensions/minify_javascript.rb
787
806
  - lib/middleman/extensions/relative_assets.rb
788
- - lib/middleman/extensions/sitemap_tree.rb
789
807
  - lib/middleman/guard.rb
790
808
  - lib/middleman/renderers/erb.rb
791
809
  - lib/middleman/renderers/haml.rb
@@ -797,14 +815,18 @@ files:
797
815
  - lib/middleman/sitemap/template.rb
798
816
  - lib/middleman/step_definitions.rb
799
817
  - lib/middleman/step_definitions/builder_steps.rb
800
- - lib/middleman/step_definitions/generator_steps.rb
801
818
  - lib/middleman/step_definitions/middleman_steps.rb
802
819
  - lib/middleman/step_definitions/server_steps.rb
803
820
  - lib/middleman/templates.rb
804
821
  - lib/middleman/templates/default.rb
822
+ - lib/middleman/templates/default/source/images/background.png
823
+ - lib/middleman/templates/default/source/images/middleman.png
805
824
  - lib/middleman/templates/default/source/index.html.erb
806
- - lib/middleman/templates/default/source/layout.erb
807
- - lib/middleman/templates/default/source/stylesheets/site.css.scss
825
+ - lib/middleman/templates/default/source/javascripts/all.js
826
+ - lib/middleman/templates/default/source/layouts/layout.erb
827
+ - lib/middleman/templates/default/source/stylesheets/_animate.scss
828
+ - lib/middleman/templates/default/source/stylesheets/_normalize.scss
829
+ - lib/middleman/templates/default/source/stylesheets/all.css.scss
808
830
  - lib/middleman/templates/html5.rb
809
831
  - lib/middleman/templates/html5/source/404.html
810
832
  - lib/middleman/templates/html5/source/README.md
@@ -1149,7 +1171,6 @@ test_files:
1149
1171
  - features/fonts.feature
1150
1172
  - features/former_padrino_helpers.feature
1151
1173
  - features/front-matter.feature
1152
- - features/generator.feature
1153
1174
  - features/helpers_auto_javascript_include_tag.feature
1154
1175
  - features/helpers_auto_stylesheet_link_tag.feature
1155
1176
  - features/helpers_external.feature
@@ -1161,11 +1182,13 @@ test_files:
1161
1182
  - features/minify_css.feature
1162
1183
  - features/minify_javascript.feature
1163
1184
  - features/mount_rack.feature
1185
+ - features/nested_layouts.feature
1164
1186
  - features/page_alias_and_layouts.feature
1165
1187
  - features/partials.feature
1166
1188
  - features/preview_changes.feature
1167
1189
  - features/relative_assets.feature
1168
1190
  - features/scss-support.feature
1191
+ - features/sitemap_traversal.features
1169
1192
  - features/slim.feature
1170
1193
  - features/sprockets.feature
1171
1194
  - features/sprockets_gems.feature
@@ -1208,6 +1231,7 @@ test_files:
1208
1231
  - fixtures/different-engine-partial/source/layouts/layout.erb
1209
1232
  - fixtures/different-engine-partial/source/shared/_footer.slim
1210
1233
  - fixtures/different-engine-partial/source/shared/_header.erb
1234
+ - fixtures/empty-app/not-config.rb
1211
1235
  - fixtures/engine-matching-layout/config.rb
1212
1236
  - fixtures/engine-matching-layout/source/index.html.erb
1213
1237
  - fixtures/engine-matching-layout/source/layout.erb
@@ -1257,6 +1281,13 @@ test_files:
1257
1281
  - fixtures/multiple-layouts/source/index.html.erb
1258
1282
  - fixtures/multiple-layouts/source/layout.erb
1259
1283
  - fixtures/multiple-layouts/source/layout.haml
1284
+ - fixtures/nested-layout-app/config.rb
1285
+ - fixtures/nested-layout-app/source/data-one.html.erb
1286
+ - fixtures/nested-layout-app/source/data-two.html.erb
1287
+ - fixtures/nested-layout-app/source/index.html.erb
1288
+ - fixtures/nested-layout-app/source/layouts/inner.erb
1289
+ - fixtures/nested-layout-app/source/layouts/master.erb
1290
+ - fixtures/nested-layout-app/source/layouts/outer.erb
1260
1291
  - fixtures/no-layout/config.rb
1261
1292
  - fixtures/no-layout/source/index.html.erb
1262
1293
  - fixtures/partials-app/config.rb
@@ -1382,6 +1413,16 @@ test_files:
1382
1413
  - fixtures/test-app/source/sub1/page-classes.html.haml
1383
1414
  - fixtures/test-app/source/sub1/sub2/page-classes.html.haml
1384
1415
  - fixtures/test-app/source/tiny_src.html.haml
1416
+ - fixtures/traversal-app/config.rb
1417
+ - fixtures/traversal-app/source/index.html.erb
1418
+ - fixtures/traversal-app/source/layout.erb
1419
+ - fixtures/traversal-app/source/proxied.html.erb
1420
+ - fixtures/traversal-app/source/root.html.erb
1421
+ - fixtures/traversal-app/source/sub/index.html.erb
1422
+ - fixtures/traversal-app/source/sub/sibling.html.erb
1423
+ - fixtures/traversal-app/source/sub/sibling2.html.erb
1424
+ - fixtures/traversal-app/source/sub/sub2/index.html.erb
1425
+ - fixtures/traversal-app/source/sub/sub3/deep.html.erb
1385
1426
  - fixtures/wildcard-app/config.rb
1386
1427
  - fixtures/wildcard-app/source/admin/index.html.erb
1387
1428
  - fixtures/wildcard-app/source/admin/page.html.erb
@@ -1,8 +0,0 @@
1
- Feature: Generator
2
- In order to generate static assets for client
3
-
4
- Scenario: Copying template files
5
- Given a project at "generator-test"
6
- And the project has been initialized
7
- Then template files should exist
8
- And empty directories should exist
@@ -1,38 +0,0 @@
1
- module Middleman::Extensions
2
- module SitemapTree
3
- class << self
4
- def registered(app)
5
- app.helpers Helpers
6
- end
7
- alias :included :registered
8
- end
9
-
10
- module Helpers
11
- def sitemap_tree(regex=nil)
12
- @sitemap_tree_cache = {}
13
-
14
- key = regex.nil? ? "all" : regex
15
-
16
- if !@sitemap_tree_cache.has_key?(key)
17
- auto_hash = Hash.new{ |h,k| h[k] = Hash.new &h.default_proc }
18
-
19
- app.sitemap.all_paths.each do |path|
20
- next if !regex.nil? && !path.match(regex)
21
- sub = auto_hash
22
- path.split( "/" ).each{ |dir| sub[dir]; sub = sub[dir] }
23
- end
24
-
25
- @sitemap_tree_cache[key] = auto_hash
26
- end
27
-
28
- @sitemap_tree_cache[key]
29
- end
30
-
31
- def html_sitemap
32
- sitemap_tree(/\.html$/)
33
- end
34
- end
35
- end
36
-
37
- register :sitemap_tree, SitemapTree
38
- end
@@ -1,26 +0,0 @@
1
- require 'fileutils'
2
-
3
- Given /^the project has been initialized$/ do
4
- step %Q{the project should be cleaned up}
5
- init_cmd = File.join(MIDDLEMAN_BIN_PATH, "middleman init")
6
- `cd #{File.dirname(@target)} && #{init_cmd} #{File.basename(@target)}`
7
- end
8
-
9
- Then /^template files should exist$/ do
10
- template_glob = File.join(MIDDLEMAN_ROOT_PATH, "lib", "middleman", "templates", "default", "*/**/*")
11
-
12
- Dir[template_glob].each do |f|
13
- next if File.directory?(f)
14
- File.exists?("#{@target}/#{f.split('template/')[1]}").should be_true
15
- end
16
- end
17
-
18
- Then /^empty directories should exist$/ do
19
- %w(source/stylesheets source/javascripts source/images).each do |d|
20
- File.exists?("#{@target}/#{d}").should be_true
21
- end
22
- end
23
-
24
- Then /^the project should be cleaned up$/ do
25
- FileUtils.rm_rf(@target)
26
- end
@@ -1,19 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8">
5
- <!-- Always force latest IE rendering engine (even in intranet) & Chrome Frame -->
6
- <meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
7
-
8
- <%= stylesheet_link_tag "site.css" %>
9
- <%= yield_content :head %>
10
- </head>
11
-
12
- <body class="<%= page_classes %>">
13
-
14
- <div id="main" role="main">
15
- <%= yield %>
16
- </div>
17
-
18
- </body>
19
- </html>
@@ -1,32 +0,0 @@
1
- @import "compass";
2
-
3
- $link-color: #0388a6;
4
- $link-hover-color: #009ce0;
5
- $link-focus-color: false;
6
- $link-active-color: false;
7
- $link-visited-color: false;
8
-
9
- $font-color: #2a2a2a;
10
- $font-family: sans-serif;
11
- $base-font-size: 12px;
12
- $base-line-height: 18px;
13
-
14
- $total-cols: 12;
15
- $col-width: 4em;
16
- $gutter-width: 1em;
17
- $side-gutter-width: $gutter-width;
18
-
19
- @include global-reset;
20
-
21
- body {
22
- font-family: $font-family;
23
- color: $font-color;
24
- }
25
-
26
- a {
27
- @include link-colors($link-color, $link-hover-color, $link-focus-color, $link-active-color, $link-visited-color);
28
- }
29
-
30
- #main {
31
- padding: 50px;
32
- }