davetron5000 / optparse-plus

Start your command line scripts off right in Ruby
http://davetron5000.github.com/optparse-plus
Apache License 2.0
521 stars 54 forks source link

methadone and Windows #125

Closed jpc2 closed 5 years ago

jpc2 commented 5 years ago

No, it doesn't cure it.... makes it a bit worse maybe.

Have not needed to do any Ruby in a year or so. Too much antique FORTRAN to work on. But it generated money and recently a need for a small command line Ruby program. Seemed like a good reason to try the new version of methadone.

Mostly works about as I remember. Miss the Cucumber, but it doesn't like Windows either. Used RSpec with rspec-given. Will have to try the TestUnit way when I have a chance.

Two items of note:

  1. The 'bundle exec ruby app_name' is a pain. Made a little bundle-exec.bat file with '@bundle exec ruby %*' in it. Put it in the top directory of the application. Not general enough to handle 'bundle exec rake'.
  2. The app.gemspec file generated by methadone the bin directory to 'exe' and the executables in 'exe/'. The necessary app.bat file generated by the gem install won't be found. My Ruby 2.5 does not have an 'exe' directory. Could possibly be fixed by adding '-b' or '--bin' in bin/methadone in the 'bundle gem' command at line 26 or so. (I may try tomorrow.) I see that methadone.gemspec uses 'bin/' for the executables.
davetron5000 commented 5 years ago

I'm not able to run windows easily to look into any of this. If you want to try in a PR that might help, but I don't know the state of the art in Windows land these days :(

jpc2 commented 5 years ago

Adding the --bin to the 'bundle gem' line in methadone did not help. Is there a way to not have the 'console' and 'setup' files in the bin directory installed when the gem is installed?

davetron5000 commented 5 years ago

Methadone provides no console nor setup files. Sounds like those are coming from your rails app?

jpc2 commented 5 years ago

Actually it does put console and setup in the app/bin directory when you setup a new project - at least in 2.0.1. setup is a bash script that runs bundle install and console is a ruby script that runs irb.

davetron5000 commented 5 years ago

Hmm. That must come from bundle gem which methadone runs under the covers. What problem are those causing? Presumably the bundler team had a good reason for putting those in there?

jpc2 commented 5 years ago

Ok, I'll do some googling. Just tried 2.0.2 and it is working. I like what I've see of your clean_test but it took a bit to find it.

I'll close this. Mostly just wanted to document what I found.