Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

rails master warning #39

Closed
masterkain opened this Issue Oct 10, 2011 · 4 comments

Comments

Projects
None yet
3 participants
:public is no longer used to avoid overloading Module#public, use :public_folder instead
from /Users/kain/.rvm/gems/ruby-1.9.3-preview1/bundler/gems/girl_friday-dbd3c7f9cade/lib/girl_friday/server.rb:17:in `<class:Server>'
Owner

mperham commented Oct 10, 2011

So if I change this to public_folder, would that break people who are using an older version of the Sinatra gem?

Owner

mperham commented Oct 10, 2011

I'll just update the dep to require ~> 1.3

@mperham mperham closed this in bcdb412 Oct 10, 2011

rkh commented Oct 10, 2011

Yes, :public_folder will only work in Sinatra >= 1.2.7 (we're at 1.3.1 atm). In >= 1.3.0 you will not be able to read the value via settings.public, which is why it's important for us to display that warning.

Here is what you can do if you don't want to check the Sinatra version:

set(:public_folder, ...)
set(:public) { public_folder) if settings.respond_to? :public

If you don't mind the warning, you can just leave it at set(:public, ...)

I'm truly sorry for the inconvenience, but overriding #public really messed with some Ruby code.

Owner

mperham commented Oct 10, 2011

If someone is looking for OSS work, it would be nice to have an integration test or two for the gf server functionality. That's completely untested right now. :-(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment