Mounting a sinatra app on rails 3.1 heroku - ruby-on-rails-3.1

I'm trying to mount the following
https://github.com/cookinfacebook/fb-koala-heroku
Into a brand new Rails 3.1 app using sinatra, but i'm not sure how to do it.
Where would I put this in a Rails app and what would my route be?
Do I have to move the gems from the sinatra apps Gemfile to my facebook apps Gemfile?

I think that you have more reading to do. It looks like from the koala app template that you don't need Rails - and indeed it would likely add a lot more baggage and problems, since usually its Sinatra OR Rails.
Sinatra and Rails both run using the ruby programming language.
I hope that helps.

Related

Flash for Sinatra

What’s the best way to go about using flash in Sinatra? Similar to how Rails or Flask handle flash.
The Sinatra docs suggest this gem, rack-flash for flash.
I also came across this gem, sinatra-flash for flash.
Is it best to use one of the above gems, a different gem, or implement it myself?
I was looking at how to use flash for displaying form validation errors.

OAuth2 Provider gem for non-rails, non-mongo apps?

I need to add OAuth2 authentication to a Sinatra-based API. No ActiveRecord, no MongoDB... but DataMapper.
Does anybody know what gems I can use to achieve this? I added rack-oauth2-server, but it depends on Mongo. I'm trying to understand rack-oauth2, but there is practically no documentation and I can't see how this is supposed to integrate in a real application that provides oauth authentication. Any well-documented gems out there? (Not Rails gems).
omniauth-oauth2 looked like it would work, but again, there's basically no documentation on how to integrate it. Links to articles that outline integration with these gems would also be useful.
I've been searching all day and just keep going around in circles. I'm sure this is a solved problem.
Why you didn't look at http://rubydoc.info/gems/oauth2/0.7.1/frames?

Choosing a recaptcha gem for rails

I am currently working on a rails 3.1 app that is going to be in the wild soon. I need to add captcha's to a couple of the pages (reset password etc). I think I have decided to go with recaptcha's service but I'm stuck trying to decide which gem to use. The two obvious options are:
ambethia / recaptcha: https://github.com/ambethia/recaptcha
and
rack-recapcha https://github.com/achiu/rack-recaptcha
Does anyone have any experience / suggestions as to which works better with rails 3.1?
I'm succesfully using ambethia/recaptcha.
The main thing is neither of them are using the asset pipeline from rails 3.1.
Anyhow ambethia/recaptcha. works fine.

Which is the best 0auth gem for a rails app?

I'm going to add Oauth autenthication to my rails web app. Since I don't want to reinvent the wheel, have you got some ruby gem to suggest to add this kind of feature?
TIA
Paolo
I would say that this advice is now superseded. I'd suggest you use OmniAuth instead, possibly with Devise if you need normal auth as well.
There are 2 OmniAuth specific RailsCasts that walk you through exactly what's needed: OmniAuth Part 1 and OmniAuth Part 2
Have a look at these:
Pelle's plugin at github tutorial is here
and the second one is oauth2 with some examples
Petr

Integrating models and views in new Sinatra extensions

So I would like to use the new possibility to create extensions for Sinatra.
My Extension needs to integrate a model and some views/templates but I don't know how to or where to integrate them?
Did anybody already built something more complex than the example from the documentation?
Here is a list of libraries and extensions on the Sinatra web site
have a look at the Sinatra: Writing Extensions article on the official Sinatra website.

Resources