This project is archived and is in readonly mode.
TemplateRunner#ask broken
Reported by Gaius Centus Novus | December 20th, 2008 @ 03:15 AM
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/...
Comments and changes to this ticket
-
CancelProfileIsBroken March 7th, 2009 @ 02:23 PM
- Assigned user set to Pratik
- Tag changed from gets, stdin, template to gets, patch, stdin, template
-
Pratik March 7th, 2009 @ 03:05 PM
- State changed from new to incomplete
The patch doesn't seem to solving the issue.
-
CancelProfileIsBroken August 5th, 2009 @ 03:12 PM
- Tag changed from gets, patch, stdin, template to bugmash, gets, patch, stdin, template
-
pjammer August 9th, 2009 @ 02:34 AM
-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
-
Pratik August 9th, 2009 @ 02:35 AM
- State changed from incomplete to resolved
-
CancelProfileIsBroken August 9th, 2009 @ 02:51 AM
- Assigned user cleared.
- Tag changed from bugmash, gets, patch, stdin, template to gets, patch, stdin, template
- Milestone cleared.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>