Commit graph

43 commits

Author SHA1 Message Date
Thomas Reynolds 614d69dc18 move current_path in to the template context, one less piece of global state 2014-01-03 14:56:16 -08:00
Thomas Reynolds f40903e663 move rendering into specialized File and Template rendering classes. 2014-01-03 13:40:37 -08:00
Thomas Reynolds c06fbcfc93 rely directly on rack-mock 2014-01-02 21:45:42 -08:00
Thomas Reynolds 95eaeba960 Start cleaning up Rack internals 2014-01-01 19:09:47 -08:00
Thomas Reynolds a610608785 remove old style extension support 2014-01-01 15:10:49 -08:00
Thomas Reynolds c95c924d53 build a config file jail 2013-12-31 18:21:30 -08:00
Thomas Reynolds 2e2415612a spring cleaning util and discovery of nasty variable mutating in url_for 2013-12-31 14:41:17 -08:00
Karl Freeman 03d6e6c990 Implemented Rubocop
- just took a stab at running the StringLiterals cop to get a taste.
2013-12-28 00:47:39 +00:00
Ben Hollis 34d399f580 Fix yard options 2013-11-25 00:12:39 -08:00
Ben Hollis da34153e0c Support HEAD requests. Fixes #1021. 2013-10-19 16:18:11 -07:00
Aggelos Orfanakos 2a8b22558a Don't set resp Content-Type for some status codes
There must not be a Content-Type set when the Status is 1xx, 204, 205 or
304, otherwise Rack blows up with the following error: "Content-Type
header found in 304 response, not allowed"
2013-07-13 05:01:32 +03:00
Ben Hollis bef6e13c5f I never meant to actually name this parameter blockm 2013-07-08 22:17:12 -07:00
Alan Larkin 26b7f46978 Fixed typo in middleman-core/core-extensions/request.rb. 2013-06-25 14:55:12 +01:00
Thomas Reynolds d3d85f8bc7 Merge pull request #923 from pulletsforever/feature/rack-block
Allow block to be passed through from Middleman.server()
2013-06-03 13:35:01 -07:00
David W. Keith f2f17c33b3 Allow block to be passed through from Middleman.server() 2013-06-03 11:48:16 -07:00
Ben Hollis ee11ccb184 Reorganize Request a bit 2013-04-12 23:32:18 -07:00
Ben Hollis fdd52cd640 Remove global access to the rack env and response 2013-04-09 23:06:10 -07:00
Ben Hollis 16ca3d5c17 Make some common shared state, and logging, threadsafe 2013-04-09 23:06:10 -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
Ben Hollis 397ccd2c1e Fix a bunch of Ruby warnings, including a bug in the not_found method 2013-04-06 14:56:08 -07:00
Ben Hollis 16b3a729cd Serve extensionless files or dotfiles with text/plain MIME type, and remove Sitemap::Resource#mime_type. 2013-01-17 19:40:39 -08:00
Thomas Reynolds fbb2a355d7 Copy binary files instead of rendering through MM. Closes #643. Closes #699 2012-12-30 20:44:29 -08:00
Thomas Reynolds 6253c91610 Allow non-templates to have frontmatter. Closes #698 2012-12-30 20:40:20 -08:00
Ben Hollis ae743ac4db Conform to the rack specs, with help from Rack::Lint 2012-12-25 16:11:13 -08:00
Thomas Reynolds 2aec04db69 Merge pull request #558 from bhollis/asset-hash-rack
Asset_hash doesn't play nice with Sprockets
2012-09-23 18:41:11 -07:00
Ben Hollis 8ec42df641 Correctly preview directory URLs with .s in them and show the request path on 404 pages. 2012-09-16 01:57:33 -07:00
Ben Hollis 09ba0049d4 Fix asset_hashing assets affected by Rack middleware or mounted apps (like sprockets). Fixes #558 2012-09-11 00:08:58 -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
Ben Hollis 00b590eedb Support profiling server startup and build via a --profile flag 2012-07-19 21:05:33 -07:00
Thomas Reynolds 1f6d1a7ee1 Extract load_paths so they aren't locked into the binary 2012-07-19 10:55:14 -07:00
Thomas Reynolds de6d7980ac Use centralized Logger and add instrument methods 2012-07-18 09:30:39 -07:00
Thomas Reynolds f81b6c7c40 Merge pull request #478 from rolftimmermans/charset-fix
Change the default character encoding to 'utf-8', with a dash
2012-06-16 15:11:05 -07:00
Rolf Timmermans b6d2579678 Use method should accept a block when adding Rack middleware. 2012-06-14 13:53:49 +02:00
Rolf Timmermans f11d21d122 Change the default character encoding to 'utf-8' instead of 'utf8' to please more browsers. 2012-06-14 13:28:00 +02:00
Thomas Reynolds 8d483f882c Move Sprockets into an extension 2012-05-26 13:43:27 -07:00
Thomas Reynolds fffa80a987 Backwards compatibility with old Rack aPI. Fixes #447 2012-05-24 11:01:46 -07:00
Thomas Reynolds 3412af346e Rely on Webrick directly for preview, makes quick app reloading simple. 2012-05-19 19:41:22 -07:00
Ben Hollis 64a2933161 Remove duplicate server methods and solve webrick logging in a platform-independent way 2012-05-16 21:19:03 -07:00
Thomas Reynolds 8c87bbc757 Handle .htc files [no-ci] 2012-05-12 08:48:03 -07:00
Ben Hollis 8d101552f3 Log to NUL: in Windows because apparently that's their name for /dev/null. Fixes #421 2012-05-10 22:12:55 -07:00
Thomas Reynolds d55fef62b4 Remove usage of autoload statement in favor of require 2012-05-07 14:41:39 -07:00
Thomas Reynolds 7b8457d963 Yard doc cleanup 2 2012-05-02 11:18:16 -07:00
Thomas Reynolds 342044a01d Split out Request handling into an Extension. Dup the Application (like Sinatra) when responding 2012-05-01 13:11:42 -07:00