jekyll / Utterson

CI benchmarking suite for Jekyll
MIT License
13 stars 8 forks source link

Use File.basename to get the site's base name #58

Closed ashmaroli closed 6 years ago

ashmaroli commented 6 years ago
pathawks commented 6 years ago

What happens if File::SEPARATOR is not /?

split("/") is very easy to read, but File.basename feels a bit wonky since we are not actually working with files, but URLs. I'm much more concerned with readability than performance, since an Utterson build takes ten minutes, but this script runs in less than a tenth of a second.

ashmaroli commented 6 years ago

we are not actually working with files, but URLs

True. But this felt more readable to me than url.split("/").last

pathawks commented 6 years ago

@ashmaroli Personal preference, I guess