rename public_folder to public_dir #427

Closed
wants to merge 1 commit into
from

2 participants

@gnandretta
Sinatra member

No description provided.

@zzak zzak commented on the diff Jan 12, 2012
lib/sinatra/base.rb
@@ -1112,8 +1112,13 @@ def condition(name = "#{caller.first[/`.*'/]} condition", &block)
end
def public=(value)
- warn ":public is no longer used to avoid overloading Module#public, use :public_folder instead"
- set(:public_folder, value)
+ warn ":public is no longer used to avoid overloading Module#public, use :public_dir instead"
@zzak
Sinatra member
zzak added a line comment Jan 12, 2012

Should there be a similar warning for public_folder too then?

@gnandretta
Sinatra member
gnandretta added a line comment Jan 12, 2012

@zzak Do you mean like the one that it's a few lines below? (from lines 1119 to 1122)

@zzak
Sinatra member
zzak added a line comment Jan 12, 2012

Hahahaha, yup! Must have missed that..

Good look!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@rkh
Sinatra member
rkh commented Mar 7, 2012

OK, I will except this if public_folder is a valid alias (i.e. both getter and setter, no warning), otherwise this will be to annoying for people that already switched.

@gnandretta gnandretta referenced this pull request Mar 11, 2012
Merged

public_dir alias #481

@gnandretta gnandretta closed this Mar 11, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment