Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

proper "Usage:" messages for "rails plugin" commands

#5043

Firstly, executing the following command prints unnecessary "Unknown command:".

% rails plugin

Next, commands below do nothing neither print nothing. In these cases, it might be better printing the usage.

% rails plugin install
% rails plugin remove

So, here's the patches for those tiny problems.

Reported by Akira Matsuda · July 4th, 2010 @ 11:20 AM

State: committed
Milestone: none
Assigned to: nobody
Importance: Low

Activity

  1. Neeraj Singh
    Neeraj Singh
    • Importance changed from to Low

    @Akira between all the blank lines getting removed and being added it is hard to see the real change. May be you want to split your patch into two: one with real changes and one with the blank line changes you want.

    July 7th, 2010 @ 06:06 PM

  2. Akira Matsuda
    Akira Matsuda

    @Neeraj Yes, the patch file contains three commits.
    Could you please

    % git log -p
    
    after
    % git am
    
    the patch?
    Or do I have to separate the patch file?

    July 7th, 2010 @ 09:27 PM

  3. Neeraj Singh
    Neeraj Singh

    @Akira all the changes related to a common thing should be in one single commit.

    So I would suggest you to have two commits.

    • One for all business functionality change.
    • and the other for formatting changes.

    July 7th, 2010 @ 09:36 PM

  4. Akira Matsuda
    Akira Matsuda

    @Neeraj

    Can't agree for this. This is really a dangerous habit for a team development.

    all the changes related to a common thing should be in one single commit

    Keep in mind that atomicity of the commits is the most important thing in order to avoid the conflict hell.
    That's what Junio says.

    But anyway, I should agree that I made my commits too specific in this case.
    Attached a new patch squashing two commits as you suggested.
    Thanks!

    July 7th, 2010 @ 11:07 PM

  5. Repository
    Repository
    • State changed from new to committed

    (from [bf5d15456757e63598575db42917d702af9da729]) Print proper "Usage:" messages for "rails plugin" command

    • suppress outputting "Unknown command:" when no command were specified
    • output the "Usage:" message when no plugin names were given

    [#5043 proper "Usage:" messages for "rails plugin" commands state:committed]

    Signed-off-by: Jeremy Kemper jeremy@bitsweat.net
    http://github.com/rails/rails/commit/bf5d15456757e63598575db42917d7...

    July 8th, 2010 @ 12:21 AM