kenichi / angelo

Sinatra-like DSL for Reel that supports WebSockets and SSE
Other
303 stars 23 forks source link

public_dir cannot be absolute #63

Open kylekyle opened 8 years ago

kylekyle commented 8 years ago

If you pass an absolute directory to public_dir, it will be concatenated to the end of __FILE__, for something like this:

/Users/kyle/server/lib/Users/kyle/public

kenichi commented 8 years ago

thanks. yes, it is joined to root - which is lazily inited to app_file/... see the following lines:

https://github.com/kenichi/angelo/blob/master/lib/angelo/base.rb#L54 https://github.com/kenichi/angelo/blob/master/lib/angelo/base.rb#L142-L144 https://github.com/kenichi/angelo/blob/master/lib/angelo/base.rb#L111-L119

you can set it relatively, using ../.. etc. if you think it would be useful to have absolute path support, i would be open to a PR that checks for / at the beginning of the string maybe or something like that.

what are your thoughts?