Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix code that computes module_name #59

Merged
merged 1 commit into from
Dec 26, 2012
Merged

fix code that computes module_name #59

merged 1 commit into from
Dec 26, 2012

Conversation

terryfinn
Copy link
Contributor

Using methadone to create a new app with a name like foo_bar_app, the
old code would compute module_name to be Foobarapp when it should be
FooBarApp. This results in an error when trying to run the app
generated by methadone. The app will crash with an error like:

$ bundle exec bin/foo_bar_app 
bin/foo_bar_app:38:in `<class:App>': uninitialized constant
App::Foobarapp (NameError)
    from bin/foo_bar_app:7:in `<main>'

This code will properly compute the module_name.

Using methadone to create a new app with a name like “foo_bar_app”, the
old code would compute module_name to be “Foobarapp” when it should be
“FooBarApp”. This results in an error when trying to run the app
generated by methadone.  The app will crash with an error like:

bin/foo_bar_app:38:in `<class:App>': uninitialized constant
App::Foobarapp (NameError)
	from bin/foo_bar_app:7:in `<main>'

This code will properly compute the module_name.
@davetron5000
Copy link
Owner

Nice catch - yeah the call to captialize on a string lower-cases everything else, which I didn't realize. I'll see why Travis is complaining and then merge this. Thanks for the patch!

davetron5000 added a commit that referenced this pull request Dec 26, 2012
@davetron5000 davetron5000 merged commit 175fa14 into davetron5000:master Dec 26, 2012
@terryfinn terryfinn deleted the fix_module_name_error branch November 18, 2013 14:06
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants