Sinatra 0.3 Features
Ryan Tomayko provided a great changelist for the new gem release of Sinatra, which I hope to expand on a bit here, by pointing you to more details on the changes.
Here’s a quick summary of changes since the 0.2.2 release:
-
Add sinatra.gemspec w/ support for github gem builds. Forks can now
enable the build gem option in github to get free username-sinatra.gem
builds: gem install username-sinatra.gem — source=http://gems.github.com/ - Require Rack 0.4; removes frozen rack dir.
-
Basic RSpec support; require ‘sinatra/test/rspec’ instead of
‘sinatra/test/spec’ to use. [avdi] -
before filters can modify request environment vars used for
routing (e.g., PATH_INFO, REQUEST_METHOD, etc.) for URL rewriting
type functionality. - In-file templates now uses @@ instead of ## as template separator.
- Top-level environment test predicates: development?, test?, production?
-
Top-level “set”, “enable”, and “disable” methods for tweaking
app options. [rtomayko] — This allows the syntax in my post about options -
Top-level “use” method for building Rack middleware pipelines
leading to app. see readme for usage. [rtomayko] — this is the use syntax in my post about sessions - New “reload” option - set false to disable reloading in development.
- New “host” option - host/ip to bind to [cschneid]
-
New “app_file” option - override the file to reload in development
mode [cschneid] — This makes embedding Sinatra inside other apps easier to do during development. More info in my app_file post. - Development error/not_found page cleanup [sr, adamwiggins]
-
Remove a bunch of core extensions (String#to_param, String#from_param,
Hash#from_params, Hash#to_params, Hash#symbolize_keys, Hash#pass) -
Various grammar and formatting fixes to README; additions on
community and contributing [cypher] - Build RDoc using Hanna template: http://sinatra.rubyforge.org/api/
- Specs, documentation and fixes for splat’n routes [vic] — See how to use splat routes in my post on it.
- Fix whitespace errors across all source files. [rtomayko]
- Fix streaming issues with Mongrel (body not closed). [bmizerany]
-
Fix various issues with environment not being set properly (configure
blocks not running, error pages not registering, etc.) [cypher] - Fix to allow locals to be passed to ERB templates [cschneid] — More Details
- Fix locking issues causing random errors during reload in development.
- Fix for escaped paths not resolving static files [Matthew Walker]
Leave a Reply