rack

Rails 3, HTTP extensions (WebDAV) and Rack App mounting

Hello, 1 The following is more to point out to the code devs an issue of rails that can be percieved as a flaw. 2 And also me asking some oppinions from people who know better. I want to add WebDAV to my Rails 3 App with Warden authentication. My warden middleware is injected via Devise. http://github.com/chrisroberts/dav4rack ...

Rails 3, OmniAuth and passenger throws RoutingError

I'm trying to build a new rails 3 app from scratch using OmniAuth. Currently I just have a completely empty app, where I've added omniauth to the Gemfile, and added a omniauth.rb in config/initializers that looks like this: Rails.application.config.middleware.use OmniAuth::Builder do provider :facebook, 'APP_ID', 'APP_SECRET' end (E...

How to dump an HTTP request from within Sinatra?

Is there a way to dump all incoming requests to a Sinatra application in the exact way the application receives the data? Maybe some sort of Rack middleware? ...

Do Rails controllers URL unencode params for me?

If a url parameter comes in urlencoded, does rails decode it for me, or do I have to call CGI::unencode myself? (I'm asking because I'm seeing what is I think inconsistent behavior, and may be a bug in either rails or rspec, but wanted to ask here first to get a sanity check) ...

Specifying Content Type in rspec

I'm trying to build an rspec test that sends JSON (or XML) via POST. However, I can't seem to actually get it working: json = {.... data ....}.to_json post '/model1.json',json,{'CONTENT_TYPE'=>'application/json'} and this json = {.... data ....}.to_json post '/model1.json',json,{'Content-Type'=>'application/json'} a...

How to redirect without www using Rails 3 / Rack?

I understand there are a lot of questions that answer this. I'm familiar with .htaccess and nginx.conf methods, but I do not have access to such traditional configuration methods on heroku. Simone Carletti gave this answer that leverages Rails 2.x Metals, but I'm using Rails 3 and this isn't compatible. http://stackoverflow.com/questio...