What am I doing that prevents Sinatra from loading OmniAuth when running Ruby 1.8.7
OmniAuth is supposed to be 1.8.7 compatible and is Rack based. I've created a custom strategy for OmniAuth that is somehow making Sinatra when run with Ruby 1.8.7 / REE unhappy. It works fine with Rails 3 in 1.8.7 or 1.9.2 and it also works properly with Sinatra running on 1.9.2.
The source code for my custom strategy (still somewhat in development) is here:
https://github.com/st开发者_如何学编程evenhaddox/oa-casportThe code for a sample Sinatra application is here:
https://github.com/stevenhaddox/oa-casport-sinatraAny suggestions as to why the OmniAuth::Builder is unhappy under Ruby 1.8.7 would be greatly appreciated as I'd love to ensure that I support the same Ruby platforms as OmniAuth itself does.
Sinatra does add a lot of dependencies, but since the OmniAuth gem is supposed to work properly with Sinatra and Rails in many versions of Ruby I excluded a Sinatra dependency as being a culprit, but rather something in my oa-casport gem code itself most likely.
In my ruby experience (which is arguably short), don't count on that kind of stuff. A gem may specify >= x.y
rather than ~> x.y
or whatever is the pickier syntax, and you may very well end up with 1.9 dependency. And even then you may get surprises. Check every gem involved, always.
精彩评论