Helpers#R now calls to_param on any object it passes in
Fix route generation issue with routes including “.” (#22)
Improved tests
Improved 1.9 support
Camping::Server is now built upon Rack::Server
Add support for ERB, Haml etc through Tilt
Introducing Camping.options and Camping#set
Camping::Server only loads ActiveRecord when needed
Speed-up of Camping::Mab (thanks zimbatm!)
@state is now an alias of @env
Camping.use injects a Rack middleware.
Update Flipbook to RDoc 2.4
Removed old examples.
Updated examples/blog.rb
Camping::Apps returns!
Session-cookies now timeout naturally (thanks jenna!)
You can now `throw :halt` to halt the response in a helper.
Camping::H#u is gone (was an alias to merge!)
Camping::Session now uses session-cookies. The AR-backend is gone for now.
camping/db.rb has been renamed to camping/ar.rb.
Camping now uses Rack internally. Every app responds to call.
Camping::Apps removed, it wasn’t reliable.
bin/camping server kinds splitted in various files.
NotFound and ServerError controllers changed to methods :
r404 : called when a controller was not found r500 : called on uncaught exception r501 : called on undefined method
All of those can be overridden at your taste.
Markaby no longer required. Like AR, is it autoloaded on (Mab) usage.
Camping::H is now inheriting from Hash instead of HashWithIndifferentAccess.
Which made possible to remove the last strict dependency : active_support
errors_for removed, it wasn’t really used
Bug fixes !
Camping::Apps stores an array of classes for all loaded apps.
bin/camping can be given a directory. Like: camping examples/
Console mode – thank zimbatm. Use: camping -C yourapp.rb
Call controllers with Camping.method_missing.
Tepee.get(:Index) #=> (Response) Blog.post(:Delete, id) #=> (Response) Blog.post(:Login, :input => {'username' => 'admin', 'password' => 'camping'}) #=> #<Blog::Controllers::Login @user=... > Blog.get(:Info, :env => {:HTTP_HOST => 'wagon'}) #=> #<Blog::Controllers::Info @env={'HTTP_HOST'=>'wagon'} ...>
Using rn instead of n on output. FastCGI has these needs.
ActiveRecord no longer required or installed.
If you refer to Models::Base, however, ActiveRecord will be loaded with autoload. (see lib/camping/db.rb)
new Camping::FastCGI.serve which will serve a whole directory of apps (see code.whytheluckystiff.net/camping/wiki/TheCampingServer)
~/.campingrc can contain database connection info if you want your default to be something other than SQLite.
database: adapter: mysql username: camping socket: /tmp/mysql.sock password: NOFORESTFIRES database: camping
controllers are now ordered. uses the inherited hook to keep track of all classes created with R. those classes are scanned, in order, when a request is made. any other controllers are handled first. so if you plan on overriding the urls method, be sure to subclass from R().
Console mode will load .irbrc in the working directory, if present. (for example, in my ~/git/balloon directory, i have this in the .irbrc: include Balloon::Models when camping -C balloon.rb gets run, the models all get included in main.)
And, of course, many other bugfixes from myself and the loyal+kind zimbatm…
Markaby updated to 0.5. (See its CHANGELOG.)
Efficient file uploads for multipart/form-data POSTs.
Camping tool now uses Mongrel, if available. If not, sticks with WEBrick.
Multiple apps can be loaded with the camping tool, each mounted according to their file name.
Streaming HTTP support. If body is IO, will simply pass to the controller. Mongrel, in particular, supports this nicely.
Moved Camping::Controllers::Base to Camping::Base.
Moved Camping::Controllers::R to Camping::R.
New session library (lib/camping/session.rb).
WEBrick handler (lib/camping/webrick.rb) and Mongrel handler (lib/camping/mongrel.rb).
Helpers#URL, builds a complete URL for a route. Returns a URI object. This way relative links could just return self.URL.path.
Base#initialize takes over some of Base#service’s duties.
ENV now available as @env in controllers and views.
Beautiful multi-page docs without frames!
bin/camping: an application launcher.
Camping.run(request, response)
now changed to controller
= Camping.run(request, env)
This means outputting the response is the wrapper/server’s job. See bin/camping, you can do a controller.to_s at the least.
Controllers::Base.env
is the new thread-safe home for
ENV
.
The input hash now works more like Rails params. You can call keys like methods or with symbols or strings.
Queries are now parsed more like PHP/Rails, in that you can denote structure with brackets: post=_why;post=2
Auto-prefix table names, to help prevent name clash.
Helpers.errors_for simple validation.
Lots of empty :href and :action attributes, a bug.
New single-page flipbook RDoc template.
Camping.goes allows fresh modules build from all Camping parts.
File uploads now supported (multipart/form-data).
Helpers.R can rebuild routes.
Helpers./ for tracing paths from the root.
Allowed request and response streams to be passed in, to allow WEBrick and FastCGI support.
Initial checkin, see announcement at redhanded.hobix.com/bits/campingAMicroframework.html.