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.

TemplateRunner#ask broken

#1604

TemplateRunner's #ask uses gets, which looks for a file in ARGV[0] if ARGV isn't empty. This means it's not usable with rake rails:template, since there's no such file "rails:template."

The fix is to use STDIN.gets. A patch is attached, and a fork with the commit is available at http://github.com/gcnovus/rails/...

Reported by Gaius Centus Novus · December 20th, 2008 @ 03:15 AM

State: resolved
Milestone: none
Assigned to: nobody
Importance: none

Activity

  1. CancelProfileIsBroken
    CancelProfileIsBroken
    • Assigned user set to Pratik
    • Tag changed from gets, stdin, template to gets, patch, stdin, template

    March 7th, 2009 @ 02:23 PM

  2. Pratik
    Pratik
    • State changed from new to incomplete

    The patch doesn't seem to solving the issue.

    March 7th, 2009 @ 03:05 PM

  3. CancelProfileIsBroken
    CancelProfileIsBroken
    • Tag changed from gets, patch, stdin, template to bugmash, gets, patch, stdin, template

    August 5th, 2009 @ 03:12 PM

  4. pjammer
    pjammer

    -1 This ticket should be closed as the file path for this patch doesn't exist and def ask is now in the following path: Thor::Shell::Basic in the basic.rb file.

    It appears that $stdin.gets has been applied already in master branch.

    Here is the code snippet:

          # Ask something to the user and receives a response.
          #
          # ==== Example
          # ask("What is your name?")
          #
          def ask(statement, color=nil)
            say("#{statement} ", color)
            $stdin.gets.strip
          end
    

    August 9th, 2009 @ 02:34 AM

  5. Pratik
    Pratik
    • State changed from incomplete to resolved

    August 9th, 2009 @ 02:35 AM

  6. CancelProfileIsBroken
    CancelProfileIsBroken
    • Assigned user cleared.
    • Tag changed from bugmash, gets, patch, stdin, template to gets, patch, stdin, template
    • Milestone cleared.

    August 9th, 2009 @ 02:51 AM