Commit graph

294 commits

Author SHA1 Message Date
Thomas Reynolds 86cd626084 write some file change and deletion tests for better data coverage 2013-05-29 10:59:03 -04:00
Thomas Reynolds b8b48afcbb how do i paren? 2013-05-29 10:35:00 -04:00
Thomas Reynolds fef8b8417d Add more nested data tests, actually get simplecov to run 2013-05-29 09:59:15 -04:00
Manuel Meurer ed59260367 Replace all occurrences of data.page with current_page.data
see https://github.com/middleman/middleman/issues/912
2013-05-29 11:25:57 +02:00
Ben Hollis 994bd651f8 Add Simplecov 2013-05-28 22:29:58 -07:00
Thomas Reynolds 407f1b67a3 fix test for updated uglifier 2013-05-18 13:47:15 -07:00
Thomas Reynolds 9ebddeed1d merge more into core, use gem availability to autoload 2013-05-09 14:41:26 -07:00
Thomas Reynolds 2679b7c506 Default build to cleaning 2013-04-13 13:52:22 -07:00
Thomas Reynolds 0574cc3d28 Support sideloading from .frontmatter files. Closes #855 2013-04-12 16:14:16 -07:00
Ben Hollis 7a4aa109a6 Overhaul content-type handling, making it configurable via page/proxy commands as well as frontmatter with the 'content_type' parameter.
Now, users can set content type explicitly for their files in a number of ways, or rely on automatic file-extension content types. Proxied files default to automatic file-extension content types, but then fall back to the content type of the resource they proxy to. There is also a bug fixed around correctly setting content type inside send_file. Fixes #821.
2013-04-06 15:11:25 -07:00
Ryunosuke SATO 1e64e8022e Support directory name as a data key 2013-03-23 17:17:34 +09:00
Ben Hollis 6672c1c324 Merge branch '3.0-stable' 2013-03-10 16:32:55 -07:00
Kevin McCarthy 7608275089 Fix dynamic multi-byte utf-8 files rebuilding.
Thor compares the new contents with the existing file by using
File.binread(destination) == new_content.
File.binread returns a string with ASCII_8BIT encoding, which will not
match the new_content if new_content contains multi-byte utf-8.

This patch simply encodes the new_content to ASCII_8BIT before passing
it to Thor.
2013-03-03 18:13:41 -08:00
Ben Hollis c0c14f4eab Merge remote-tracking branch 'origin/3.0-stable'
Conflicts:
	CHANGELOG.md
	middleman-core/lib/middleman-core/cli/build.rb
	middleman-core/lib/middleman-core/core_extensions/rendering.rb
	middleman-core/lib/middleman-core/preview_server.rb
	middleman-core/lib/middleman-core/renderers/sass.rb
	middleman-core/lib/middleman-core/sitemap/store.rb
	middleman-core/lib/middleman-core/util.rb
	middleman-core/lib/middleman-core/version.rb
	middleman-more/lib/middleman-more/core_extensions/compass.rb
	middleman-more/lib/middleman-more/core_extensions/default_helpers.rb
	middleman-more/lib/middleman-more/extensions/asset_hash.rb
2013-01-25 21:43:30 -08:00
Steven Sloan 17ad2caf11 also "build" .htpasswd files 2013-01-21 11:21:48 -08:00
Steven Sloan c121c407df also "build" .htpasswd files 2013-01-18 20:13:49 -05:00
Thomas Reynolds eccda125e5 Remove Tilt mappings for missing libraries. Fixes #713 2013-01-08 10:24:07 -08:00
Thomas Reynolds 6253c91610 Allow non-templates to have frontmatter. Closes #698 2012-12-30 20:40:20 -08:00
Thomas Reynolds e97d0ad0e4 Allow non-templates to have frontmatter. Closes #698 2012-12-30 20:29:39 -08:00
Thomas Reynolds 45ddc0c344 Make Sitemap metadata queryable with arel-style API 2012-12-25 16:05:54 -08:00
Thomas Reynolds 12a604d69e Fix html5bp test 2012-12-15 14:56:22 -08:00
Casey Leask dd4c07d9d1 Added fix for empty YAML 2012-12-15 14:52:55 -08:00
Thomas Reynolds 054ce83d35 Fix html5bp test 2012-12-15 14:49:50 -08:00
Casey Leask 85f06ccecd Added fix for empty YAML 2012-12-14 14:22:42 +11:00
Thomas Reynolds 4ee9369d7e Merge pull request #635 from bhollis/proxy
Upgrade proxy to be able to take :locals and understand :ignore
2012-10-13 14:04:17 -07:00
Thomas Reynolds 4255ff8b00 Merge branch '3.0-stable' of github.com:middleman/middleman into 3.0-stable 2012-10-13 14:04:02 -07:00
Ben Hollis 862551c523 Upgrade proxy to be able to take :locals and understand :ignore, and store proxy options and metadata with the proxy list.
This allows users to use proxy directly instead of page to create dynamic pages, and improves performance of dynamic pages for sites that create many proxies. It also allows people to use locals instead of instance variables, which are better for partials and reduce the risk of overwriting Middleman settings.
2012-10-13 14:03:32 -07:00
Ben Hollis 1ee89ac6bf Upgrade proxy to be able to take :locals and understand :ignore, and store proxy options and metadata with the proxy list.
This allows users to use proxy directly instead of page to create dynamic pages, and improves performance of dynamic pages for sites that create many proxies. It also allows people to use locals instead of instance variables, which are better for partials and reduce the risk of overwriting Middleman settings.
2012-10-12 19:46:11 -07:00
Jörg Thalheim 4b52858f61 test directories containing the tilde characters 2012-10-11 10:06:50 -07:00
Jörg Thalheim 392a4d23f6 test directories containing the tilde characters 2012-10-10 18:18:55 -07:00
Adam Luikart c2f7303041 h5bp 4.0 renames script.js to main.js. Fixes failing cli_init test. 2012-09-05 15:42:49 -05:00
Thomas Reynolds 193f32b9fb Add test gems to extension and a gitignore. Closes #570 2012-08-20 19:37:10 -07:00
Thomas Reynolds 446aa6a4ba Clean up whitespace, play with cane for testing style quality and code complexity 2012-08-13 15:41:07 -07:00
cwebbdesign a0c11df4cc Adding tests for overriding layouts using frontmatter 2012-07-27 10:55:30 +02:00
Tim Bates 99a8723ea6 Fix instance variables in dynamic pages 2012-07-24 23:02:27 +09:30
Tim Bates 0fa1bfe675 Tests and a small bug fix to make them pass 2012-07-13 16:00:53 +09:30
Thomas Reynolds 63224639d9 Add tests for more implied extensions 2012-07-04 16:45:27 -07:00
Thomas Reynolds 8912d3627d Update Padrino to 0.10.7 and Thor to 0.15.3. Closes #495 2012-06-20 17:53:14 -07:00
Thomas Reynolds c3796a9161 :automatic_directory_matcher optionally converts a character sequence in file names into a subdirectory. Closes #491 2012-06-19 20:07:50 -07:00
Thomas Reynolds bd9d9d0f93 travishatesme 2012-06-18 16:53:22 -07:00
Thomas Reynolds 518ae3f46d Move encoding tests into a dynamic form so they aren't packaged with gemspecs on unsupported platforms. 2012-06-18 15:18:16 -07:00
Thomas Reynolds 5071a2c15d Tests for #477 2012-06-17 12:03:36 -07:00
Thomas Reynolds 8d483f882c Move Sprockets into an extension 2012-05-26 13:43:27 -07:00
Thomas Reynolds f8c64f25ec Put test ENV in the right place so cucumber/rake both work 2012-05-25 18:19:11 -07:00
Thomas Reynolds b5b6349220 Only allow frontmatter on first line, unless we have a ruby 1.9 encoding comment, then allow it on the second line. Fixes #446 2012-05-25 13:17:22 -07:00
Thomas Reynolds 64f84bacd2 asset urls, padrino helpers and i18n belong in more 2012-05-24 16:31:21 -07:00
Thomas Reynolds 1cad726c81 Move off-by-default extensions into middleman-more, make middleman-more itself an extension 2012-05-24 16:14:17 -07:00
Thomas Reynolds 671dcde65f Merge pull request #438 from bhollis/link_to
Make link_to magical
2012-05-19 19:43:42 -07:00
Ben Hollis c775a9973c Handle relative path urls in link_to, and add an option to produce relative links as well. Or, set :relative_links in config.rb to turn on relative links for all link_to calls. 2012-05-19 19:24:37 -07:00
Ben Hollis fc9c5e5fa2 Properly clear frontmatter cache when files change, and calculate frontmatter in the right order so resource_list_manipulators can see it. 2012-05-19 18:47:43 -07:00
Thomas Reynolds 190be5f515 Bundler CLI commands 2012-05-10 15:06:06 -07:00
Thomas Reynolds 162622c453 JSON frontmatter and allowing frontmatter to be located after a encoding value 2012-05-09 13:33:14 -07:00
Ben Hollis 35d1a67dd1 Generate a .gitgnore file by default. Fixes #375. 2012-05-04 21:11:11 -07:00
Thomas Reynolds 0be82d371e new extension cli 2012-05-02 15:59:36 -07:00
Ben Hollis 713350e294 Disable unicode build test for now 2012-04-30 21:29:33 -07:00
Ben Hollis dddd409336 Support Unicode characters in filenames, both in source filenames and in the names of proxied paths. Fixes #332. 2012-04-29 21:42:45 -07:00
Ben Hollis 05a769d762 link_to with an absolute path that corresponds to a page path will get rewritten to the page's output URL 2012-04-27 22:05:52 -07:00
Thomas Reynolds 240f67410d Use config.rb file contents in minify test cases instead of fixtures 2012-04-26 14:07:10 -07:00
Thomas Reynolds 9024de85d8 Allow partial to find files without an underscore prefix. Closes #366 2012-04-20 10:34:22 -07:00
Thomas Reynolds bd9814965e Move 3rd party CLI out of fixtures 2012-04-16 15:38:26 -07:00
Thomas Reynolds d08624dfe3 Port i18n to new sitemap api 2012-04-16 13:42:22 -07:00
Thomas Reynolds 5fde3996f7 Enable i18n tests 2012-04-14 14:13:16 -07:00
Thomas Reynolds d935aedd59 Sitemap refactor 2012-04-14 13:17:42 -07:00
Thomas Reynolds e769477e93 Implied extensions. Closes #304 2012-03-29 18:22:43 +01:00
Ben Hollis 086f05989b Fix ignore with a regex (with a test) and consolidate ignores into a single list of callbacks. 2012-03-24 20:45:17 -07:00
Ben Hollis d51056cb26 Fix CLI tests now that we generate a Gemfile by default 2012-03-24 20:37:15 -07:00
Ben Hollis 1b0fe80873 Fix watcher to be more selective about what it ignores 2012-03-18 18:55:02 -06:00
Ben Hollis 4a5fededf7 Make with_layout work with globs/regexes 2012-03-15 00:31:50 -07:00
Ben Hollis 5db1a9453a Make directory_indexes use provides_metadata_for_path instead of its own list of ignored paths, allowing it to support regexes/globs 2012-03-15 00:29:50 -07:00
Ben Hollis 9555266ac1 Variables not passed to proxies when they are built. Possibly related to issue #302. 2012-03-11 22:49:21 -07:00
Thomas Reynolds 7d7f9a20ef i18n not ready for primetime yet 2012-03-10 19:40:04 -08:00
Thomas Reynolds 8d22fee8d8 Merge pull request #298 from bhollis/i18n-helpers
Fix Padrino helpers that require an i18n locale to be present
2012-03-09 10:19:15 -08:00
Ben Hollis efe1d45af7 Rewrite sitemap_traversal tests to better reflect what should actually happen, and to expose a bug in current_page. 2012-03-07 22:08:41 -08:00
Ben Hollis 739a8633ae Rename sitemap_traversal.features to sitemap_traversal.feature so it will actually be run. Also rename ignore_already_minified.features for the same reason. 2012-03-07 22:08:16 -08:00
Ben Hollis 617f73c8db Fix Padrino helpers that require an i18n locale to be present 2012-03-04 17:20:57 -08:00
Thomas Reynolds 410b6b37d1 make sure html5 template has correct paths setup. Fixes #291 2012-03-03 16:40:03 -08:00
Thomas Reynolds 445b66bed7 test backwards compatible request.params template values. closes #294 2012-03-01 13:43:47 -08:00
Thomas Reynolds 5842bf8e5b allow extensionless files to be previewed and built. fixes #270, but requires alternative layouts be placed in a layouts/ directory now. 2012-02-12 11:45:42 -08:00
Ben Hollis e136fab77c Use a page_by_destination lookup to make rerouting work both ways, in build and during preview server. 2012-02-04 23:07:02 -08:00
Thomas Reynolds aeb9d10b25 automatically load helper modules from helpers/. closes #238 2012-01-15 13:44:00 -08:00
Thomas Reynolds e3b15366cb ignore globs, mostly working, except with directory indexes 2012-01-14 14:09:20 -08:00
Thomas Reynolds 3ef11f3add more ignore variation tests 2012-01-14 12:21:35 -08:00
Thomas Reynolds 309f8dd966 Merge pull request #231 from bhollis/ignore
Scenarios to test proposed "ignore" behavior
2012-01-14 12:19:07 -08:00
Thomas Reynolds 34e40cbe01 Also test frontmatter options in preview mode (exposed proxy bug, which was fixed 2012-01-07 18:11:56 -08:00
Thomas Reynolds c473181167 frontmatter can control whether a page is ignored 2012-01-07 17:21:26 -08:00
Ben Hollis b01f0f96e8 New (failing) feature describing what it would look like to set some page features through frontmatter.
This tests the ability to set layout, ignore, and diable directory_index. Pertains to issue #194.
2012-01-06 23:08:38 -08:00
Ben Hollis cebb15c9ca Add a new (failing) feature test to show the behavior I think would be good for the "ignore" helper.
These scenarios show ignoring files by their source paths rather than their output paths,
ignoring globbed paths (including into subdirectories), and ignoring paths that will be transformed
by directory_indexes. These scenarios pertain to issues #229 and #225.
2012-01-06 22:43:32 -08:00
Thomas Reynolds 92319ebffc support glob page instance vars. fixes #230 2012-01-05 21:18:55 -08:00
Ben Hollis c5063c1e35 Fix builder steps to properly copy configs, and add a new scenario that shows build --clean not working right when the build directory is set to a nested path. When a path is ignored, it doesn't get removed - in fact, no unused paths will get removed, this is just the easiest way to show it in a test. 2012-01-04 22:54:20 -08:00
Thomas Reynolds 8cbd3352a0 enable gemtest at a per-gem level 2012-01-02 14:48:47 -08:00
Thomas Reynolds aee8e32524 test sitemap removal 2011-12-31 12:56:17 -08:00
Thomas Reynolds ca10d108e3 fix remaining middleman-more tests 2011-12-29 19:28:49 -08:00
Thomas Reynolds 73913f0ace Start getting middleman-more tests passing. About 50% done 2011-12-29 19:04:39 -08:00
Thomas Reynolds c8a134a386 split into middleman-core and middleman-more 2011-12-29 15:09:51 -08:00