Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

CamelCasing cask class gives uninitialized constant? #64

Closed
ghost opened this issue Oct 15, 2012 · 3 comments
Closed

CamelCasing cask class gives uninitialized constant? #64

ghost opened this issue Oct 15, 2012 · 3 comments

Comments

@ghost
Copy link

ghost commented Oct 15, 2012

My commits so far haven't used proper CamelCase for the app name because when do I do, I get an uninitialized constant error.

For example:

class Rubymine < Cask

works when I copy the rb and brew cask install it to test, but

class RubyMine < Cask

gives me
uninitialized constant Cask::Rubymine
when I try to brew cask install

@phinze
Copy link
Contributor

phinze commented Oct 15, 2012

I think you're hitting the hyphen -> CamelCase convention in homebrew-cask.

Have a look at this line:

https://github.com/phinze/homebrew-cask/blob/c44192c1d3aefd812aabc994ff68d8f2e47b6919/lib/cask.rb#L50

Basically each hyphen-separated token is split, capitalized, and joined, so: "foo-bar-baz" becomes FooBarBaz.

So if your file was named ruby-mine.rb the code would expect RubyMine and if it was named rubymine.rb the code would expect Rubymine.

Not sure if this is exactly the issue you were seeing -- does this help clear things up at all?

@ghost
Copy link
Author

ghost commented Oct 15, 2012

That explains it. Thanks.

On Mon, Oct 15, 2012 at 5:28 PM, Paul Hinze notifications@github.comwrote:

I think you're hitting the hyphen -> CamelCase convention in homebrew-cask.

Have a look at this line:

https://github.com/phinze/homebrew-cask/blob/c44192c1d3aefd812aabc994ff68d8f2e47b6919/lib/cask.rb#L50

Basically each hyphen-separated token is split, capitalized, and joined,
so: "foo-bar-baz" becomes FooBarBaz.

So if your file was named ruby-mine.rb the code would expect RubyMine and
if it was named rubymine.rb the code would expect Rubymine.

Not sure if this is exactly the issue you were seeing -- does this help
clear things up at all?


Reply to this email directly or view it on GitHubhttps://github.com//issues/64#issuecomment-9464330.

@phinze phinze closed this as completed Oct 16, 2012
@mwarkentin
Copy link
Sponsor Contributor

@phinze It would be useful if this was documented on the How to Contribute page - I ran into the same issue, and had to search through the issues to find out what was going on.

@jfsiii
Copy link
Contributor

jfsiii commented May 11, 2013

👍

I found this page by searching for uninitialized constant after brew cask install webkit returned Error: uninitialized constant Cask::Webkit

fharbe pushed a commit to fharbe/homebrew-cask that referenced this issue Mar 11, 2014
…-jdk-bundled

IntelliJ IDEA Ultimate 13.0.2 EAP 133.370 with bundled JRE 1.7.0_45
@Homebrew Homebrew locked and limited conversation to collaborators May 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants