Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

rails master warning #39

Closed
masterkain opened this Issue · 4 comments

3 participants

@masterkain
: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>'
@mperham
Owner

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

@mperham
Owner

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

@mperham mperham closed this in bcdb412
@rkh

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.

@mperham
Owner

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
Something went wrong with that request. Please try again.