middleman-core 3.0.14 → 3.1.0.beta.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (113) hide show
  1. data/features/clean_build.feature +4 -5
  2. data/features/content_type.feature +43 -0
  3. data/features/data.feature +9 -4
  4. data/features/front-matter-neighbor.feature +151 -0
  5. data/features/queryable.feature +31 -0
  6. data/features/step_definitions/queryable_steps.rb +123 -0
  7. data/fixtures/content-type-app/config.rb +1 -0
  8. data/fixtures/content-type-app/source/.htaccess +1 -0
  9. data/fixtures/content-type-app/source/README +1 -0
  10. data/fixtures/content-type-app/source/images/blank.gif +0 -0
  11. data/fixtures/content-type-app/source/index.html +1 -0
  12. data/fixtures/content-type-app/source/javascripts/app.js +1 -0
  13. data/fixtures/content-type-app/source/override.html +5 -0
  14. data/fixtures/content-type-app/source/stylesheets/site.css +1 -0
  15. data/fixtures/frontmatter-neighbor-app/config.rb +0 -0
  16. data/fixtures/frontmatter-neighbor-app/source/front-matter-2.php.erb +2 -0
  17. data/fixtures/frontmatter-neighbor-app/source/front-matter-2.php.erb.frontmatter +4 -0
  18. data/fixtures/frontmatter-neighbor-app/source/front-matter-auto.erb +1 -0
  19. data/fixtures/frontmatter-neighbor-app/source/front-matter-auto.erb.frontmatter +4 -0
  20. data/fixtures/frontmatter-neighbor-app/source/front-matter-change.html.erb +1 -0
  21. data/fixtures/frontmatter-neighbor-app/source/front-matter-change.html.erb.frontmatter +4 -0
  22. data/fixtures/frontmatter-neighbor-app/source/front-matter-encoding.html.erb +1 -0
  23. data/fixtures/frontmatter-neighbor-app/source/front-matter-encoding.html.erb.frontmatter +5 -0
  24. data/fixtures/frontmatter-neighbor-app/source/json-front-matter-2.php.erb +2 -0
  25. data/fixtures/frontmatter-neighbor-app/source/json-front-matter-2.php.erb.frontmatter +4 -0
  26. data/fixtures/frontmatter-neighbor-app/source/json-front-matter-auto.erb +1 -0
  27. data/fixtures/frontmatter-neighbor-app/source/json-front-matter-auto.erb.frontmatter +4 -0
  28. data/fixtures/frontmatter-neighbor-app/source/json-front-matter.html.erb +1 -0
  29. data/fixtures/frontmatter-neighbor-app/source/json-front-matter.html.erb.frontmatter +4 -0
  30. data/fixtures/frontmatter-neighbor-app/source/raw-front-matter.html +1 -0
  31. data/fixtures/frontmatter-neighbor-app/source/raw-front-matter.html.frontmatter +4 -0
  32. data/fixtures/frontmatter-neighbor-app/source/raw-front-matter.php +1 -0
  33. data/fixtures/frontmatter-neighbor-app/source/raw-front-matter.php.frontmatter +4 -0
  34. data/fixtures/frontmatter-settings-neighbor-app/config.rb +4 -0
  35. data/fixtures/frontmatter-settings-neighbor-app/source/alternate_layout.html.erb +1 -0
  36. data/fixtures/frontmatter-settings-neighbor-app/source/alternate_layout.html.erb.frontmatter +3 -0
  37. data/fixtures/frontmatter-settings-neighbor-app/source/ignored.html.erb +1 -0
  38. data/fixtures/frontmatter-settings-neighbor-app/source/ignored.html.erb.frontmatter +3 -0
  39. data/fixtures/frontmatter-settings-neighbor-app/source/layouts/alternate.erb +3 -0
  40. data/fixtures/frontmatter-settings-neighbor-app/source/layouts/override.erb +2 -0
  41. data/fixtures/frontmatter-settings-neighbor-app/source/override_layout.html.erb +1 -0
  42. data/fixtures/frontmatter-settings-neighbor-app/source/override_layout.html.erb.frontmatter +3 -0
  43. data/fixtures/frontmatter-settings-neighbor-app/source/page_mentioned.html.erb +1 -0
  44. data/fixtures/frontmatter-settings-neighbor-app/source/page_mentioned.html.erb.frontmatter +3 -0
  45. data/fixtures/nested-data-app/config.rb +1 -0
  46. data/fixtures/nested-data-app/data/examples/test.yml +1 -0
  47. data/fixtures/nested-data-app/source/test.html.erb +1 -0
  48. data/fixtures/queryable-app/config.rb +0 -0
  49. data/fixtures/queryable-app/source/2010-08-08-test-document-file.html.markdown +8 -0
  50. data/fixtures/queryable-app/source/2010-08-09-another-test-document.html.markdown +10 -0
  51. data/fixtures/queryable-app/source/2011-12-26-some-test-document.html.markdown +6 -0
  52. data/fixtures/queryable-app/source/document_with_date_in_yaml.html.markdown +7 -0
  53. data/fixtures/queryable-app/source/document_without_date.html.markdown +7 -0
  54. data/lib/middleman-core/application.rb +52 -84
  55. data/lib/middleman-core/cli.rb +3 -2
  56. data/lib/middleman-core/cli/build.rb +5 -7
  57. data/lib/middleman-core/cli/bundler.rb +1 -1
  58. data/lib/middleman-core/cli/console.rb +46 -0
  59. data/lib/middleman-core/configuration.rb +235 -0
  60. data/lib/middleman-core/core_extensions.rb +0 -6
  61. data/lib/middleman-core/core_extensions/data.rb +34 -11
  62. data/lib/middleman-core/core_extensions/extensions.rb +31 -35
  63. data/lib/middleman-core/core_extensions/external_helpers.rb +7 -7
  64. data/lib/middleman-core/core_extensions/file_watcher.rb +1 -1
  65. data/lib/middleman-core/core_extensions/front_matter.rb +44 -38
  66. data/lib/middleman-core/core_extensions/rendering.rb +27 -21
  67. data/lib/middleman-core/core_extensions/request.rb +41 -73
  68. data/lib/middleman-core/core_extensions/routing.rb +7 -24
  69. data/lib/middleman-core/core_extensions/show_exceptions.rb +6 -8
  70. data/lib/middleman-core/extensions.rb +35 -0
  71. data/lib/middleman-core/logger.rb +9 -0
  72. data/lib/middleman-core/meta_pages.rb +93 -0
  73. data/lib/middleman-core/meta_pages/assets/config.css +36 -0
  74. data/lib/middleman-core/meta_pages/assets/glyphicons-halflings.png +0 -0
  75. data/lib/middleman-core/meta_pages/assets/jquery-1.8.2.min.js +2 -0
  76. data/lib/middleman-core/meta_pages/assets/jquery.details-1.6.min.js +6 -0
  77. data/lib/middleman-core/meta_pages/assets/meta.css +368 -0
  78. data/lib/middleman-core/meta_pages/assets/sitemap.css +635 -0
  79. data/lib/middleman-core/meta_pages/assets/sitemap.js +0 -0
  80. data/lib/middleman-core/meta_pages/config_setting.rb +39 -0
  81. data/lib/middleman-core/meta_pages/sitemap_resource.rb +52 -0
  82. data/lib/middleman-core/meta_pages/sitemap_tree.rb +73 -0
  83. data/lib/middleman-core/meta_pages/templates/config.html.erb +59 -0
  84. data/lib/middleman-core/meta_pages/templates/index.html.erb +21 -0
  85. data/lib/middleman-core/meta_pages/templates/sitemap.html.erb +31 -0
  86. data/lib/middleman-core/preview_server.rb +18 -7
  87. data/lib/middleman-core/profiling.rb +1 -1
  88. data/lib/middleman-core/renderers/erb.rb +5 -5
  89. data/lib/middleman-core/renderers/less.rb +3 -3
  90. data/lib/middleman-core/renderers/markdown.rb +10 -9
  91. data/lib/middleman-core/renderers/redcarpet.rb +16 -21
  92. data/lib/middleman-core/renderers/sass.rb +4 -5
  93. data/lib/middleman-core/renderers/slim.rb +4 -1
  94. data/lib/middleman-core/sitemap.rb +3 -3
  95. data/lib/middleman-core/sitemap/extensions/content_type.rb +16 -0
  96. data/lib/middleman-core/sitemap/extensions/on_disk.rb +2 -2
  97. data/lib/middleman-core/sitemap/extensions/proxies.rb +26 -16
  98. data/lib/middleman-core/sitemap/queryable.rb +148 -0
  99. data/lib/middleman-core/sitemap/resource.rb +14 -2
  100. data/lib/middleman-core/sitemap/store.rb +8 -7
  101. data/lib/middleman-core/step_definitions/builder_steps.rb +3 -0
  102. data/lib/middleman-core/step_definitions/server_steps.rb +6 -1
  103. data/lib/middleman-core/templates/default/source/layouts/layout.erb +1 -1
  104. data/lib/middleman-core/templates/extension/lib/lib.rb +17 -26
  105. data/lib/middleman-core/templates/html5/source/layouts/layout.erb +1 -1
  106. data/lib/middleman-core/templates/shared/Gemfile.tt +6 -1
  107. data/lib/middleman-core/util.rb +7 -5
  108. data/lib/middleman-core/version.rb +1 -1
  109. data/middleman-core.gemspec +1 -1
  110. metadata +126 -28
  111. data/lib/middleman-core/core_extensions/builder.rb +0 -17
  112. data/lib/middleman-core/core_extensions/ruby_encoding.rb +0 -25
  113. data/middleman-core-x86-mingw32.gemspec +0 -38
@@ -1,17 +0,0 @@
1
- module Middleman
2
- module CoreExtensions
3
-
4
- # Convenience methods to allow config.rb to talk to the Builder
5
- module Builder
6
-
7
- # Extension registered
8
- class << self
9
- # @private
10
- def registered(app)
11
- app.define_hook :after_build
12
- end
13
- alias :included :registered
14
- end
15
- end
16
- end
17
- end
@@ -1,25 +0,0 @@
1
- # Simple extension to manage Ruby encodings
2
- module Middleman::CoreExtensions::RubyEncoding
3
-
4
- # Setup extension
5
- class << self
6
-
7
- # Once registerd
8
- def registered(app)
9
- app.send :include, InstanceMethods
10
- end
11
-
12
- alias :included :registered
13
- end
14
-
15
- module InstanceMethods
16
- def initialize
17
- if Object.const_defined?(:Encoding)
18
- Encoding.default_internal = encoding
19
- Encoding.default_external = encoding
20
- end
21
-
22
- super
23
- end
24
- end
25
- end
@@ -1,38 +0,0 @@
1
- # -*- encoding: utf-8 -*-
2
- $:.push File.expand_path("../lib", __FILE__)
3
- require "middleman-core/version"
4
-
5
- Gem::Specification.new do |s|
6
- s.name = "middleman-core-x86-mingw32"
7
- s.version = Middleman::VERSION
8
- s.platform = Gem::Platform::RUBY
9
- s.license = "MIT"
10
- s.authors = ["Thomas Reynolds", "Ben Hollis"]
11
- s.email = ["me@tdreyno.com", "ben@benhollis.net"]
12
- s.homepage = "http://middlemanapp.com"
13
- s.summary = "Hand-crafted frontend development"
14
- s.description = "A static site generator. Provides dozens of templating languages (Haml, Sass, Compass, Slim, CoffeeScript, and more). Makes minification, compression, cache busting, Yaml data (and more) an easy part of your development cycle."
15
-
16
- s.files = `git ls-files -z`.split("\0")
17
- s.test_files = `git ls-files -z -- {fixtures,features}/*`.split("\0")
18
- s.executable = "middleman"
19
- s.require_path = "lib"
20
-
21
- # Core
22
- s.add_dependency("bundler", ["~> 1.1"])
23
- s.add_dependency("rack", ["~> 1.4.1"])
24
- s.add_dependency("tilt", ["~> 1.3.6"])
25
-
26
- # Builder
27
- s.add_dependency("rack-test", ["~> 0.6.1"])
28
-
29
- # CLI
30
- s.add_dependency("thor", ["~> 0.15.4"])
31
-
32
- # Helpers
33
- s.add_dependency("activesupport", ["~> 3.2.6"])
34
-
35
- # Watcher
36
- s.add_dependency("listen", ["~> 0.7.3"])
37
- s.add_dependency("wdm", ["~> 0.1.0"]) # Windows
38
- end