FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
developer.github.com/lib/redirect_generator.rb at master · github/developer.github.com · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
This repository was archived by the owner on Nov 1, 2017. It is now read-only.
github
/
developer.github.com
Public archive
Notifications
You must be signed in to change notification settings
Fork
1.1k
Star
1.3k
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
developer.github.com
/
lib
/
redirect_generator.rb
Copy path
More file actions
More file actions
Latest commit
History
History
History
19 lines (18 loc) · 433 Bytes
Breadcrumbs
developer.github.com
/
lib
/
redirect_generator.rb
Copy path
File metadata and controls
19 lines (18 loc) · 433 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
module
RedirectGenerator
def
generate_redirects
(
redirects
)
redirects
.
each
do
|
pairs
|
pairs
.
each_pair
do
|
old_url
,
new_url
|
filename
=
old_url
.
to_s
.
sub
(
%r{/$}
,
''
)
@items
.
create
(
"<%= renderp '/redirect.*',
{ :new_url => '
#{
new_url
}
'
}
%>"
,
{
:filename
=>
filename
}
,
filename
)
end
end
end
end
include
RedirectGenerator
Back
|
FazBrowse Home
|
New Git URL