Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nginx-push-stream-module
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
nginx-push-stream-module
Commits
577f34e7
Commit
577f34e7
authored
Apr 21, 2011
by
Wandenberg Peixoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rakefile with tasks to runs tests and generate preview for docs in github format
parent
d6bb1b6e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
79 additions
and
0 deletions
+79
-0
github_template.html.erb
misc/github_template.html.erb
+45
-0
Rakefile
test/Rakefile
+34
-0
No files found.
misc/github_template.html.erb
0 → 100644
View file @
577f34e7
<html>
<head>
<meta
charset=
"utf-8"
>
<title>
<%=
filename
%>
- Preview to GitHub
</title>
<link
type=
"text/css"
rel=
"stylesheet"
media=
"screen"
href=
"http://github.com/stylesheets/bundle_common.css"
>
<link
type=
"text/css"
rel=
"stylesheet"
media=
"screen"
href=
"http://github.com/stylesheets/bundle_github.css"
>
<script
type=
"text/javascript"
>
if
(
typeof
console
==
"
undefined
"
||
typeof
console
.
log
==
"
undefined
"
)
console
=
{
log
:
function
()
{}
}
var
GitHub
=
{
assetHost
:
'
http://github.com
'
}
var
github_user
=
''
</script>
<script
type=
"text/javascript"
src=
"http://github.com/javascripts/jquery/jquery-1.4.2.min.js"
></script>
<script
type=
"text/javascript"
src=
"http://github.com/javascripts/bundle_common.js"
></script>
<script
type=
"text/javascript"
src=
"http://github.com/javascripts/bundle_github.js"
></script>
</head>
<body
class=
"logged_in page-blob usingMouse"
>
<div
id=
"main"
class=
"subnavd"
>
<div
class=
"site"
>
<br/><br/><br/><br/><br/><br/>
<div
id=
"slider"
>
<div
class=
"frames"
>
<div
data-path=
"HISTORY.md/"
class=
"frame frame-center"
>
<div
id=
"files"
>
<div
class=
"file"
>
<div
class=
"blob instapaper_body"
id=
"readme"
>
<div
class=
"wikistyle"
>
<%=
content
%>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div
style=
"display: none;"
class=
"frame frame-loading"
>
<img
width=
"32"
height=
"32"
src=
"http://github.com/images/modules/ajax/big_spinner_336699.gif"
>
</div>
</div>
</div>
</body>
</html>
test/Rakefile
0 → 100644
View file @
577f34e7
require
'bundler'
base_dir
=
File
.
expand_path
(
'..'
,
File
.
dirname
(
__FILE__
))
namespace
:docs
do
desc
"Generates docs files to preview."
task
:generate
do
Bundler
.
require
(
:docs
)
require
'erb'
require
'github/markup'
template
=
ERB
.
new
File
.
read
(
"
#{
base_dir
}
/misc/github_template.html.erb"
)
Dir
.
glob
(
"
#{
base_dir
}
/*.textile"
).
each
do
|
file
|
filename
=
File
.
basename
(
file
)
content
=
GitHub
::
Markup
.
render
(
file
,
File
.
read
(
file
))
rendered
=
template
.
result
(
binding
)
output
=
"
#{
base_dir
}
/misc/
#{
filename
}
"
File
.
open
(
output
,
'w'
)
{
|
f
|
f
.
write
(
rendered
)
}
puts
"Preview rendered to
#{
output
}
"
end
end
end
desc
"Run all tests."
task
:tests
do
Bundler
.
setup
(
:test
)
require
'test/unit'
Dir
.
glob
(
'test_*.rb'
).
each
do
|
f
|
test_case
=
"
#{
base_dir
}
/
#{
f
}
"
.
gsub
(
'.rb'
,
''
)
require
test_case
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment