Skip to content

Commit

Permalink
Moar dokumentashuns
Browse files Browse the repository at this point in the history
  • Loading branch information
actsasbuffoon committed Aug 27, 2011
1 parent 130abed commit 2f4c519
Show file tree
Hide file tree
Showing 19 changed files with 958 additions and 45 deletions.
1 change: 1 addition & 0 deletions Gemfile
Expand Up @@ -18,6 +18,7 @@ gem "sass"
gem "rdiscount" gem "rdiscount"
gem "coffee-script" gem "coffee-script"
gem "git" gem "git"
gem "pygments.rb"


# Add dependencies to develop your gem here. # Add dependencies to develop your gem here.
# Include everything needed to run rake, tests, features, etc. # Include everything needed to run rake, tests, features, etc.
Expand Down
8 changes: 8 additions & 0 deletions Gemfile.lock
Expand Up @@ -10,6 +10,7 @@ GEM
async_sinatra (0.5.0) async_sinatra (0.5.0)
rack (>= 1.2.1) rack (>= 1.2.1)
sinatra (>= 1.0) sinatra (>= 1.0)
blankslate (2.1.2.4)
bson (1.3.1) bson (1.3.1)
builder (2.1.2) builder (2.1.2)
coffee-script (2.2.0) coffee-script (2.2.0)
Expand All @@ -23,6 +24,7 @@ GEM
eventmachine (0.12.10) eventmachine (0.12.10)
execjs (1.2.4) execjs (1.2.4)
multi_json (~> 1.0) multi_json (~> 1.0)
ffi (1.0.9)
git (1.2.5) git (1.2.5)
haml (3.1.2) haml (3.1.2)
i18n (0.5.0) i18n (0.5.0)
Expand All @@ -42,6 +44,8 @@ GEM
mustache (0.99.4) mustache (0.99.4)
nokogiri (1.5.0) nokogiri (1.5.0)
pygmentize (0.0.3) pygmentize (0.0.3)
pygments.rb (0.1.3)
rubypython (>= 0.5.1)
rack (1.3.2) rack (1.3.2)
rake (0.9.2) rake (0.9.2)
rcov (0.9.10) rcov (0.9.10)
Expand All @@ -50,6 +54,9 @@ GEM
rocco (0.8.1) rocco (0.8.1)
mustache mustache
redcarpet redcarpet
rubypython (0.5.1)
blankslate (>= 2.1.2.3)
ffi (~> 1.0.7)
sass (3.1.7) sass (3.1.7)
shoulda (2.11.3) shoulda (2.11.3)
sinatra (1.2.6) sinatra (1.2.6)
Expand Down Expand Up @@ -80,6 +87,7 @@ DEPENDENCIES
mongoid (>= 2.1.7) mongoid (>= 2.1.7)
nokogiri (>= 1.4.4) nokogiri (>= 1.4.4)
pygmentize pygmentize
pygments.rb
rcov rcov
rdiscount rdiscount
rocco rocco
Expand Down
8 changes: 6 additions & 2 deletions Rakefile
Expand Up @@ -96,6 +96,8 @@ namespace :docs do
puts "Compiling markdown" puts "Compiling markdown"
require 'haml' require 'haml'
require 'rdiscount' require 'rdiscount'
require 'pygments'
require File.expand_path('utils.rb')
Haml::Engine.instance_variable_set "@options".to_sym, {format: :html5} Haml::Engine.instance_variable_set "@options".to_sym, {format: :html5}
args = { args = {
rb_files: Dir["doc_files/output/rocco_rb/**/*.html"], rb_files: Dir["doc_files/output/rocco_rb/**/*.html"],
Expand All @@ -105,7 +107,9 @@ namespace :docs do
Dir["doc_files/pages/*.markdown"].each do |file| Dir["doc_files/pages/*.markdown"].each do |file|
File.open("doc_files/output/#{file.split("/").last.sub(/\.markdown$/, ".html")}", "w") do |f| File.open("doc_files/output/#{file.split("/").last.sub(/\.markdown$/, ".html")}", "w") do |f|
f.write Haml::Engine.new(File.read "doc_files/layout.haml").render(Object.new, args.merge(current_file: file)) do f.write Haml::Engine.new(File.read "doc_files/layout.haml").render(Object.new, args.merge(current_file: file)) do
Markdown.new(File.read file).to_html markdown = File.read file
markdown = pygmentize_markdown(markdown)
Markdown.new(markdown).to_html
end end
end end
end end
Expand All @@ -126,7 +130,7 @@ namespace :docs do
desc "Copy static files for docs" desc "Copy static files for docs"
task :copy_static do task :copy_static do
puts "Copying images" puts "Copying images"
FileUtils.cp_r "doc_files/images", "doc_files/output/images" FileUtils.cp_r "doc_files/images", "doc_files/output/"
end end


desc "Move docs to gh-pages branch" desc "Move docs to gh-pages branch"
Expand Down
4 changes: 2 additions & 2 deletions doc_files/coffee/application.coffee
Expand Up @@ -3,8 +3,8 @@ position_clouds = () ->
el = $(e) el = $(e)
el.offset({ el.offset({
left: Math.floor( Math.random() * (960 - el.width()) ), left: Math.floor( Math.random() * (960 - el.width()) ),
top: Math.floor( Math.random() * ($(window).height() - 400) ) top: Math.floor( Math.random() * ($(document).height() - el.height() - 200) )
}) })


$(document).ready () -> $(window).load () ->
position_clouds() position_clouds()
Binary file added doc_files/images/ackbar_trap.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc_files/images/lolcat.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc_files/images/wave.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 3 additions & 2 deletions doc_files/layout.haml
Expand Up @@ -42,5 +42,6 @@
%img.cloud#cloud5{src: "images/cloud5.png"} %img.cloud#cloud5{src: "images/cloud5.png"}
%img.cloud#cloud6{src: "images/cloud6.png"} %img.cloud#cloud6{src: "images/cloud6.png"}
%img.cloud#cloud7{src: "images/cloud7.png"} %img.cloud#cloud7{src: "images/cloud7.png"}
#footer #push
%p Rocket.io and all associated content are licensed under the MIT license. #footer
%p Rocket.io and all associated content are licensed under the MIT license.
279 changes: 279 additions & 0 deletions doc_files/output/Introduction.html

Large diffs are not rendered by default.

10 changes: 7 additions & 3 deletions doc_files/output/ORM_Notes.html
Expand Up @@ -22,6 +22,9 @@ <h3>Pages</h3>
<li> <li>
<a href='index.html'>index</a> <a href='index.html'>index</a>
</li> </li>
<li>
<a href='Introduction.html'>Introduction</a>
</li>
<li> <li>
<a href='ORM_Notes.html'>ORM Notes</a> <a href='ORM_Notes.html'>ORM Notes</a>
</li> </li>
Expand Down Expand Up @@ -87,9 +90,10 @@ <h2 id='content_header'>ORM_Notes.markdown</h2>
<img class='cloud' id='cloud5' src='images/cloud5.png' /> <img class='cloud' id='cloud5' src='images/cloud5.png' />
<img class='cloud' id='cloud6' src='images/cloud6.png' /> <img class='cloud' id='cloud6' src='images/cloud6.png' />
<img class='cloud' id='cloud7' src='images/cloud7.png' /> <img class='cloud' id='cloud7' src='images/cloud7.png' />
<div id='footer'> <div id='push'></div>
<p>Rocket.io and all associated content are licensed under the MIT license.</p> </div>
</div> <div id='footer'>
<p>Rocket.io and all associated content are licensed under the MIT license.</p>
</div> </div>
</body> </body>
</html> </html>
221 changes: 205 additions & 16 deletions doc_files/output/css/main.css
@@ -1,19 +1,8 @@
html, body { html, body {
background: #aaaadd; background: #aaaadd;
margin: 0px; margin: 0px;
padding: 0px; } padding: 0px;

height: 100%; }
#footer {
background-image: url("../images/ground.png");
height: 64px;
position: absolute;
bottom: 0px;
left: 0px;
width: 100%;
z-index: 10; }
#footer p {
padding: 10px 40px;
color: #bbffbb; }


#topbar { #topbar {
margin-bottom: 15px; } margin-bottom: 15px; }
Expand All @@ -23,7 +12,8 @@ html, body {
left: 120px; } left: 120px; }


.row { .row {
display: table-row; } display: table-row;
width: 960px; }


#container { #container {
width: 960px; width: 960px;
Expand All @@ -42,19 +32,218 @@ html, body {
z-index: 50; z-index: 50;
position: relative; position: relative;
border-radius: 0px 10px 10px 0px; border-radius: 0px 10px 10px 0px;
width: 100%; } width: 760px; }
#container #navigation { #container #navigation {
background: rgba(200, 200, 255, 0.4); background: rgba(200, 200, 255, 0.4);
display: table-cell; display: table-cell;
padding: 10px; padding: 10px;
z-index: 50; z-index: 50;
position: relative; position: relative;
border-radius: 10px 0px 0px 10px; } border-radius: 10px 0px 0px 10px;
width: 200px; }
#container #navigation ul { #container #navigation ul {
list-style: none; list-style: none;
padding: 0px; padding: 0px;
margin: 0px; } margin: 0px; }


#wrapper {
min-height: 100%;
margin-bottom: -80px; }

#push {
height: 80px; }

#footer {
background-image: url("../images/ground.png");
height: 64px;
width: 100%; }
#footer p {
padding: 10px 40px;
color: #bbffbb; }

.cloud { .cloud {
position: absolute; position: absolute;
z-index: 5; } z-index: 5; }

.code_example {
overflow: auto;
background: #002b36;
width: 720px;
padding: 10px; }

pre {
margin: 0px; }

.code_example {
color: #93a1a1 !important;
font-style: normal !important;
font-weight: normal !important; }

.code_example .c {
color: #586e75 !important;
font-style: italic !important; }

.code_example .cm {
color: #586e75 !important;
font-style: italic !important; }

.code_example .cp {
color: #586e75 !important;
font-style: italic !important; }

.code_example .c1 {
color: #586e75 !important;
font-style: italic !important; }

.code_example .cs {
color: #586e75 !important;
font-weight: bold !important;
font-style: italic !important; }

.code_example .err {
color: #dc322f !important;
background: none !important; }

.code_example .k {
color: #cb4b16 !important; }

.code_example .o {
color: #93a1a1 !important;
font-weight: bold !important; }

.code_example .p {
color: #93a1a1 !important; }

.code_example .ow {
color: #2aa198 !important;
font-weight: bold !important; }

.code_example .gd {
color: #93a1a1 !important;
background-color: #372c34 !important;
display: inline-block; }

.code_example .gd .x {
color: #93a1a1 !important;
background-color: #4d2d33 !important;
display: inline-block; }

.code_example .ge {
color: #93a1a1 !important;
font-style: italic !important; }

.code_example .gh {
color: #586e75 !important; }

.code_example .gi {
color: #93a1a1 !important;
background-color: #1a412b !important;
display: inline-block; }

.code_example .gi .x {
color: #93a1a1 !important;
background-color: #355720 !important;
display: inline-block; }

.code_example .gs {
color: #93a1a1 !important;
font-weight: bold !important; }

.code_example .gu {
color: #6c71c4 !important; }

.code_example .kc {
color: #859900 !important;
font-weight: bold !important; }

.code_example .kd {
color: #268bd2 !important; }

.code_example .kp {
color: #cb4b16 !important;
font-weight: bold !important; }

.code_example .kr {
color: #d33682 !important;
font-weight: bold !important; }

.code_example .kt {
color: #2aa198 !important; }

.code_example .n {
color: #268bd2 !important; }

.code_example .na {
color: #268bd2 !important; }

.code_example .nb {
color: #859900 !important; }

.code_example .nc {
color: #d33682 !important; }

.code_example .no {
color: #b58900 !important; }

.code_example .nl {
color: #859900 !important; }

.code_example .ne {
color: #268bd2 !important;
font-weight: bold !important; }

.code_example .nf {
color: #268bd2 !important;
font-weight: bold !important; }

.code_example .nn {
color: #b58900 !important; }

.code_example .nt {
color: #268bd2 !important;
font-weight: bold !important; }

.code_example .nx {
color: #b58900 !important; }

.code_example .vg {
color: #268bd2 !important; }

.code_example .vi {
color: #268bd2 !important; }

.code_example .nv {
color: #268bd2 !important; }

.code_example .mf {
color: #2aa198 !important; }

.code_example .m {
color: #2aa198 !important; }

.code_example .mh {
color: #2aa198 !important; }

.code_example .mi {
color: #2aa198 !important; }

.code_example .s {
color: #2aa198 !important; }

.code_example .sd {
color: #2aa198 !important; }

.code_example .s2 {
color: #2aa198 !important; }

.code_example .se {
color: #dc322f !important; }

.code_example .si {
color: #268bd2 !important; }

.code_example .sr {
color: #2aa198 !important; }

.code_example .s1 {
color: #2aa198 !important; }
Binary file added doc_files/output/images/ackbar_trap.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc_files/output/images/lolcat.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc_files/output/images/wave.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 2f4c519

Please sign in to comment.