hanami version 1.2.0.
If you give the name in typical way e.g. hanami new app_x it will create folders like this:
lib/
app_x/
entities/
mailers/
repositories/
app_x.rb
When the app name is . it puts folders entities, mailers and repositories directly in lib/ and creates a file ..rb (in lib/), which is then incorrectly required in config/environment.rb, like so:
# ...
require_relative '../lib/.'
Name . should be translated into real name of the current folder.
I (still) think we should have this functionality, since it's a common pattern for command line utilities.
I'm using hanami CLI that way because I like to put everything in rvm gemset. So I start new project like this:
mkdir project_x
cd project_x
rvm use ruby-2.5@project_x --create --ruby-version
gem install hanami
hanami new .
@cllns WDYT if we just add some simple format validators to CLI library and will use it here?
Just had another request for this (#939).
@davydovanton I'm not sure how format validators would solve this. We could use that to tell people they can't create a project at ., but, instead, I think we should allow it.
@cllns Might be a silly question (I probably missed something) but what was wrong with @tzmfreedom's PR #939 which (as far as I can see) has an implementation of a solution?
Dear all, we support this behavior since long time, but due to an evident regression it wasn't working anymore. I've opened #947 To fix this. Please review.