This project is archived and is in readonly mode.
[BUG] [PATCH] Allow https URIs to be supplied for rails templates
-
Ryan Bigg
- Importance changed from to Low
There is no patch on this ticket. Please attach it!
Thanks for trying this mate.
-
Xavier Shay
hmm, can't seem to get lighthouse to take it.
Here it is as a gist:
https://gist.github.com/63d1660cb8c706dee4f7 -
Andrew White
The url in the test points to an actual gist - the expects on :open will prevent the request but it should be an fake url so that it's obviously irrelevant.
-
Xavier Shay
I agree. My patch test is copied from another test in that file. They should both be changed (along with any others). Out of scope for this ticket.
-
Daniel Kehoe
The priority on this should be "HIGH" and it really should be included in 3.0.4.
It's a tiny fix but without it, any application generator template hosted on GitHub is inaccessible.
GitHub recently changed all URIs from http to https to increase security (subsequent to awareness of the Firesheep exploit). Many projects that offer an application generator template put them on GitHub.
For an example of the consequences of this failure, see the GitHub support ticket:
http://support.github.com/discussions/site/2213-github-https-redire...I've got two apps that use application generator templates on GitHub and I've had requests for help from people who were relying on the templates to get started.
-- Daniel
-
Rohit Arondekar
Any updates here?
-
Xavier Shay
To help speed things up, please review the patch by applying it and ensuring it works as advertised, then add a +1 to this ticket.
-
Jan
Uh, oh, seems like your patch made it: https://github.com/rails/rails/commit/667bcac439f2bf0bdd072cf9dc286...
-
Jan
Well, without the "?" from your regexp it now supports https only... :(
-
Santiago Pastorino
- State changed from new to open
- Milestone cleared.
- Assigned user set to Santiago Pastorino
Xavier, can you provide a patch again with the ? and with a test for http.
Thanks. -
Xavier Shay
There is already a test for http, that is currently failing on master.
ruby -Itest test/generators/app_generator_test.rb ~/Code/ex/rails/railties master Loaded suite test/generators/app_generator_test Started ............................E.......... Finished in 1.668626 seconds. 1) Error: test_template_is_executed_when_supplied(AppGeneratorTest): Rails::Generators::Error: The template [/Users/xavier/Code/ex/rails/railties/http:/gist.github.com/103208.txt] could not be loaded. Error: Could not find "/Users/xavier/Code/ex/rails/railties/http:/gist.github.com/103208.txt" in any of your source paths. Your current source paths are:As such, only the code needs to change. Here is a new fix, I have confirmed it fixes the test:
https://gist.github.com/raw/718394/de680f23fdc4004bca34fc6a89ee54a8... -
Repository
- State changed from open to committed
(from [76053fe4d12bd2be38e16b3322f9de73e09b43bc]) Allow http templates again, fix the broken test
[#5926 [BUG] [PATCH] Allow https URIs to be supplied for rails templates state:committed]
Signed-off-by: Santiago Pastorino santiago@wyeworks.com
https://github.com/rails/rails/commit/76053fe4d12bd2be38e16b3322f9d... -
James OKelly
I just updated to rails 3.0.3 to get around this issue and whenever I try a
rails new temp -m https://github.com/dreamr/Rails3-Greenfield-Template/raw/master/mai...
I get "Could not find "/Users/james/development/https:/github.com/dreamr/Rails3-Greenfield-Template/raw/master/main.rb" in any of your source paths"
So the request is not going through the web. I am updating the tests locally for rails and seeing whats up.
OS X SL Ruby 1.8.7-head
-
James OKelly
Also when I installed 3.0.3 it said at the end:
File not found: lib
just an fyi, ill get to that after I get these tests up and running to look into the http/https issue.
-
Xavier Shay
This fix has not been released yet, it is scheduled for 3.0.4