Skip to content
Browse files

nanocify!

  • Loading branch information...
1 parent e31f83d commit ec74c94634bdb46ce4533a1018aa3214c2ec3fc4 @weppos committed Sep 6, 2011
View
11 Gemfile
@@ -0,0 +1,11 @@
+source "http://rubygems.org"
+
+gem 'nanoc', '~> 3.2.0'
+gem 'kramdown', '~> 0.13.0'
+gem 'nokogiri'
+gem 'pygmentize'
+gem 'systemu'
+
+group :development do
+ gem 'adsf'
+end
View
26 Gemfile.lock
@@ -0,0 +1,26 @@
+GEM
+ remote: http://rubygems.org/
+ specs:
+ adsf (1.0.1)
+ rack (>= 1.0.0)
+ cri (2.0.2)
+ kramdown (0.13.3)
+ nanoc (3.2.2)
+ nanoc3 (>= 3.2.2)
+ nanoc3 (3.2.2)
+ cri (~> 2.0)
+ nokogiri (1.5.0)
+ pygmentize (0.0.3)
+ rack (1.3.2)
+ systemu (2.3.0)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ adsf
+ kramdown (~> 0.13.0)
+ nanoc (~> 3.2.0)
+ nokogiri
+ pygmentize
+ systemu
View
1 Rakefile
@@ -0,0 +1 @@
+require 'nanoc3/tasks'
View
45 Rules
@@ -0,0 +1,45 @@
+#!/usr/bin/env ruby
+
+# A few helpful tips about the Rules file:
+#
+# * The string given to #compile and #route are matching patterns for
+# identifiers--not for paths. Therefore, you can't match on extension.
+#
+# * The order of rules is important: for each item, only the first matching
+# rule is applied.
+#
+# * Item identifiers start and end with a slash (e.g. “/about/” for the file
+# “content/about.html”). To select all children, grandchildren, … of an
+# item, use the pattern “/about/*/”; “/about/*” will also select the parent,
+# because “*” matches zero or more characters.
+
+compile '/static/*/' do
+ # don't filter or layout
+end
+
+compile '*' do
+ if item.binary?
+ # don't filter binary items
+ else
+ # filter :erb
+ filter :kramdown
+ filter :colorize_syntax, :default_colorizer => :pygmentize
+ layout 'default'
+ end
+end
+
+route '/static/*/' do
+ item.identifier.chop + '.' + item[:extension]
+end
+
+route '*' do
+ if item.binary?
+ # Write item with identifier /foo/ to /foo.ext
+ item.identifier.chop + '.' + item[:extension]
+ else
+ # Write item with identifier /foo/ to /foo/index.html
+ item.identifier + 'index.html'
+ end
+end
+
+layout '*', :erb
View
64 config.yaml
@@ -0,0 +1,64 @@
+# A list of file extensions that nanoc will consider to be textual rather than
+# binary. If an item with an extension not in this list is found, the file
+# will be considered as binary.
+text_extensions: [ 'css', 'erb', 'haml', 'htm', 'html', 'js', 'less', 'markdown', 'md', 'php', 'rb', 'sass', 'scss', 'txt', 'xhtml', 'xml' ]
+
+# The path to the directory where all generated files will be written to. This
+# can be an absolute path starting with a slash, but it can also be path
+# relative to the site directory.
+output_dir: output
+
+# A list of index filenames, i.e. names of files that will be served by a web
+# server when a directory is requested. Usually, index files are named
+# “index.hml”, but depending on the web server, this may be something else,
+# such as “default.htm”. This list is used by nanoc to generate pretty URLs.
+index_filenames: [ 'index.html' ]
+
+# Whether or not to generate a diff of the compiled content when compiling a
+# site. The diff will contain the differences between the compiled content
+# before and after the last site compilation.
+enable_output_diff: false
+
+# The data sources where nanoc loads its data from. This is an array of
+# hashes; each array element represents a single data source. By default,
+# there is only a single data source that reads data from the “content/” and
+# “layout/” directories in the site directory.
+data_sources:
+ -
+ # The type is the identifier of the data source. By default, this will be
+ # `filesystem_unified`.
+ type: filesystem_unified
+
+ # The path where items should be mounted (comparable to mount points in
+ # Unix-like systems). This is “/” by default, meaning that items will have
+ # “/” prefixed to their identifiers. If the items root were “/en/”
+ # instead, an item at content/about.html would have an identifier of
+ # “/en/about/” instead of just “/about/”.
+ items_root: /
+
+ # The path where layouts should be mounted. The layouts root behaves the
+ # same as the items root, but applies to layouts rather than items.
+ layouts_root: /
+
+# Configuration for the “watch” command, which watches a site for changes and
+# recompiles if necessary.
+watcher:
+ # A list of directories to watch for changes. When editing this, make sure
+ # that the “output/” and “tmp/” directories are _not_ included in this list,
+ # because recompiling the site will cause these directories to change, which
+ # will cause the site to be recompiled, which will cause these directories
+ # to change, which will cause the site to be recompiled again, and so on.
+ dirs_to_watch: [ 'content', 'layouts', 'lib' ]
+
+ # A list of single files to watch for changes. As mentioned above, don’t put
+ # any files from the “output/” or “tmp/” directories in here.
+ files_to_watch: [ 'config.yaml', 'Rules' ]
+
+ # When to send notifications (using Growl or notify-send).
+ notify_on_compilation_success: true
+ notify_on_compilation_failure: true
+
+deploy:
+ default:
+ options: [ '-Plrtvz', '--delete-after' ]
+ dst: "italia:~/rubyist.simonecarletti.com"
View
0 content/index.md
No changes.
View
0 doc/rails/design.md → content/rails/design.md
File renamed without changes.
View
0 doc/rails/documentation.md → content/rails/documentation.md
File renamed without changes.
View
0 doc/rails/extensions.md → content/rails/extensions.md
File renamed without changes.
View
0 doc/rails/i18n.md → content/rails/i18n.md
File renamed without changes.
View
0 doc/activerecord/activerecord.md → content/rails/models.md
File renamed without changes.
View
0 doc/ruby/documentation.md → content/ruby/documentation.md
File renamed without changes.
View
0 doc/ruby/editor.md → content/ruby/editor.md
File renamed without changes.
View
0 doc/ruby/naming.md → content/ruby/naming.md
File renamed without changes.
View
0 doc/ruby/style.md → content/ruby/style.md
File renamed without changes.
View
67 content/ruby/yardoc.md
@@ -0,0 +1,67 @@
+# YARD
+
+YARD is a powerful Ruby documentation tool for generating API documentation from Ruby source code.
+
+## Tag Conventions
+
+YARD provides a [set of Javadoc-inspired tags](http://rubydoc.info/docs/yard/file/docs/Tags.md) the developer can use to enrich the documentation with additional
+metadata.
+
+### Order of Tags
+
+Whilst YARD does not enforce a particular order, a common convention makes the source code more readable, especially when the documentation block contains more than 5 tags.
+
+Include tags in the following order:
+
+ Description block.
+
+ @example
+
+ @note
+ @todo
+
+ @param
+ @return
+ @raise
+
+ @see
+
+ @author
+ @version
+ @since
+
+ @abstract
+ @api
+ @deprecated
+
+
+### Ordering Multiple Tags
+
+We employ the following conventions when a tag appears more than once in a documentation block.
+
+* Multiple `@author` tags should be listed in chronological order, with the creator of the class/method listed at the top.
+* Multiple `@param` tags should be listed in argument-declaration order. This makes it easier to visually match the list to the declaration.
+* Multiple `@raise` tags should be listed alphabetically by the exception names.
+
+### Required Tags
+
+A `@param` tag is "required" (by convention) for every parameter. The description can be omitted if the meaning of the parameter is obvious.
+
+ # Opens a socket connection and returns the TCPSocket instance.
+ #
+ # @param [String] host
+ # @param [Integer] port
+ # @return [TCPSocket]
+ def connect(host, port)
+ end
+
+The `@return` tag is required for every method that returns something other than void. The description can be omitted if the meaning of the parameter is obvious. Whenever possible, find something non-redundant (ideally, more specific) to use for the tag comment.
+
+ # Opens a socket connection and returns the TCPSocket instance.
+ #
+ # @param [String] host
+ # @param [Integer] port
+ # @return [TCPSocket] The socket connection,
+ # preconfigured with the default set of options.
+ def connect(host, port)
+ end
View
13 content/static/css/style.css
@@ -0,0 +1,13 @@
+/* -------------------------------
+ GLOBAL
+------------------------------- */
+
+body {
+ font-size: 12px;
+}
+
+
+/* reset margin-top if under main */
+#main > h1 {
+ margin-top: 0;
+}
View
254 content/static/shared/css/all.css
@@ -0,0 +1,254 @@
+a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,dialog,div,dl,dt,em,embed,fieldset,figcaption,figure,font,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,meter,nav,object,ol,output,p,pre,progress,q,rp,rt,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video,xmp{border:0;margin:0;padding:0;font-size:100%;}
+html,body{height:100%;}
+article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block;}
+b,strong{font-weight:bold;}
+img{color:transparent;font-size:0;vertical-align:middle;-ms-interpolation-mode:bicubic;}
+li{display:list-item;}
+table{border-collapse:collapse;border-spacing:0;}
+th,td,caption{font-weight:normal;vertical-align:top;text-align:left;}
+svg{overflow:hidden;}
+body{min-width:960px;}
+.container_12,.container_16{margin-left:auto;margin-right:auto;width:960px;}
+.grid_1,.grid_2,.grid_3,.grid_4,.grid_5,.grid_6,.grid_7,.grid_8,.grid_9,.grid_10,.grid_11,.grid_12,.grid_13,.grid_14,.grid_15,.grid_16{display:inline;float:left;margin-left:10px;margin-right:10px;}
+.push_1,.pull_1,.push_2,.pull_2,.push_3,.pull_3,.push_4,.pull_4,.push_5,.pull_5,.push_6,.pull_6,.push_7,.pull_7,.push_8,.pull_8,.push_9,.pull_9,.push_10,.pull_10,.push_11,.pull_11,.push_12,.pull_12,.push_13,.pull_13,.push_14,.pull_14,.push_15,.pull_15{position:relative;}
+.container_12 .grid_3,.container_16 .grid_4{width:220px;}
+.container_12 .grid_6,.container_16 .grid_8{width:460px;}
+.container_12 .grid_9,.container_16 .grid_12{width:700px;}
+.container_12 .grid_12,.container_16 .grid_16{width:940px;}
+.alpha{margin-left:0;}
+.omega{margin-right:0;}
+.container_12 .grid_1{width:60px;}
+.container_12 .grid_2{width:140px;}
+.container_12 .grid_4{width:300px;}
+.container_12 .grid_5{width:380px;}
+.container_12 .grid_7{width:540px;}
+.container_12 .grid_8{width:620px;}
+.container_12 .grid_10{width:780px;}
+.container_12 .grid_11{width:860px;}
+.container_16 .grid_1{width:40px;}
+.container_16 .grid_2{width:100px;}
+.container_16 .grid_3{width:160px;}
+.container_16 .grid_5{width:280px;}
+.container_16 .grid_6{width:340px;}
+.container_16 .grid_7{width:400px;}
+.container_16 .grid_9{width:520px;}
+.container_16 .grid_10{width:580px;}
+.container_16 .grid_11{width:640px;}
+.container_16 .grid_13{width:760px;}
+.container_16 .grid_14{width:820px;}
+.container_16 .grid_15{width:880px;}
+.container_12 .prefix_3,.container_16 .prefix_4{padding-left:240px;}
+.container_12 .prefix_6,.container_16 .prefix_8{padding-left:480px;}
+.container_12 .prefix_9,.container_16 .prefix_12{padding-left:720px;}
+.container_12 .prefix_1{padding-left:80px;}
+.container_12 .prefix_2{padding-left:160px;}
+.container_12 .prefix_4{padding-left:320px;}
+.container_12 .prefix_5{padding-left:400px;}
+.container_12 .prefix_7{padding-left:560px;}
+.container_12 .prefix_8{padding-left:640px;}
+.container_12 .prefix_10{padding-left:800px;}
+.container_12 .prefix_11{padding-left:880px;}
+.container_16 .prefix_1{padding-left:60px;}
+.container_16 .prefix_2{padding-left:120px;}
+.container_16 .prefix_3{padding-left:180px;}
+.container_16 .prefix_5{padding-left:300px;}
+.container_16 .prefix_6{padding-left:360px;}
+.container_16 .prefix_7{padding-left:420px;}
+.container_16 .prefix_9{padding-left:540px;}
+.container_16 .prefix_10{padding-left:600px;}
+.container_16 .prefix_11{padding-left:660px;}
+.container_16 .prefix_13{padding-left:780px;}
+.container_16 .prefix_14{padding-left:840px;}
+.container_16 .prefix_15{padding-left:900px;}
+.container_12 .suffix_3,.container_16 .suffix_4{padding-right:240px;}
+.container_12 .suffix_6,.container_16 .suffix_8{padding-right:480px;}
+.container_12 .suffix_9,.container_16 .suffix_12{padding-right:720px;}
+.container_12 .suffix_1{padding-right:80px;}
+.container_12 .suffix_2{padding-right:160px;}
+.container_12 .suffix_4{padding-right:320px;}
+.container_12 .suffix_5{padding-right:400px;}
+.container_12 .suffix_7{padding-right:560px;}
+.container_12 .suffix_8{padding-right:640px;}
+.container_12 .suffix_10{padding-right:800px;}
+.container_12 .suffix_11{padding-right:880px;}
+.container_16 .suffix_1{padding-right:60px;}
+.container_16 .suffix_2{padding-right:120px;}
+.container_16 .suffix_3{padding-right:180px;}
+.container_16 .suffix_5{padding-right:300px;}
+.container_16 .suffix_6{padding-right:360px;}
+.container_16 .suffix_7{padding-right:420px;}
+.container_16 .suffix_9{padding-right:540px;}
+.container_16 .suffix_10{padding-right:600px;}
+.container_16 .suffix_11{padding-right:660px;}
+.container_16 .suffix_13{padding-right:780px;}
+.container_16 .suffix_14{padding-right:840px;}
+.container_16 .suffix_15{padding-right:900px;}
+.container_12 .push_3,.container_16 .push_4{left:240px;}
+.container_12 .push_6,.container_16 .push_8{left:480px;}
+.container_12 .push_9,.container_16 .push_12{left:720px;}
+.container_12 .push_1{left:80px;}
+.container_12 .push_2{left:160px;}
+.container_12 .push_4{left:320px;}
+.container_12 .push_5{left:400px;}
+.container_12 .push_7{left:560px;}
+.container_12 .push_8{left:640px;}
+.container_12 .push_10{left:800px;}
+.container_12 .push_11{left:880px;}
+.container_16 .push_1{left:60px;}
+.container_16 .push_2{left:120px;}
+.container_16 .push_3{left:180px;}
+.container_16 .push_5{left:300px;}
+.container_16 .push_6{left:360px;}
+.container_16 .push_7{left:420px;}
+.container_16 .push_9{left:540px;}
+.container_16 .push_10{left:600px;}
+.container_16 .push_11{left:660px;}
+.container_16 .push_13{left:780px;}
+.container_16 .push_14{left:840px;}
+.container_16 .push_15{left:900px;}
+.container_12 .pull_3,.container_16 .pull_4{left:-240px;}
+.container_12 .pull_6,.container_16 .pull_8{left:-480px;}
+.container_12 .pull_9,.container_16 .pull_12{left:-720px;}
+.container_12 .pull_1{left:-80px;}
+.container_12 .pull_2{left:-160px;}
+.container_12 .pull_4{left:-320px;}
+.container_12 .pull_5{left:-400px;}
+.container_12 .pull_7{left:-560px;}
+.container_12 .pull_8{left:-640px;}
+.container_12 .pull_10{left:-800px;}
+.container_12 .pull_11{left:-880px;}
+.container_16 .pull_1{left:-60px;}
+.container_16 .pull_2{left:-120px;}
+.container_16 .pull_3{left:-180px;}
+.container_16 .pull_5{left:-300px;}
+.container_16 .pull_6{left:-360px;}
+.container_16 .pull_7{left:-420px;}
+.container_16 .pull_9{left:-540px;}
+.container_16 .pull_10{left:-600px;}
+.container_16 .pull_11{left:-660px;}
+.container_16 .pull_13{left:-780px;}
+.container_16 .pull_14{left:-840px;}
+.container_16 .pull_15{left:-900px;}
+.clear{clear:both;display:block;overflow:hidden;visibility:hidden;width:0;height:0;}
+.clearfix:before,.clearfix:after{content:'\0020';display:block;overflow:hidden;visibility:hidden;width:0;height:0;}
+.clearfix:after{clear:both;}
+.clearfix{zoom:1;}
+body{font-size:62.5%;font-family:"Helvetica Neue",Helvetica,Arial,"Liberation Sans",FreeSans,sans-serif;font-weight:300;background:#fff;color:#333;}
+h1,h2,h3,h4,h5,h6{letter-spacing:-.03em;font-weight:bold;}
+p,dl,hr,h1,h2,h3,h4,h5,h6,ol,ul,pre,table,address,fieldset,figure{margin-bottom:20px;margin-bottom:.75em;}
+h1{font-size:220%;margin:1em 0 .5em 0;line-height:1.25em;}
+h2{font-size:160%;margin:1em 0 .5em 0;line-height:1.25em;}
+h3{font-size:130%;margin:.75em 0 .35em 0;}
+h4{font-size:110%;margin:1em 0 .25em 0;}
+h5{font-size:110%;margin:.25em 0;}
+h6{font-size:100%;margin:0;}
+hr{margin:0;padding:0;border:0 #ddd solid;height:1px;background-color:#FFF;clear:both;}
+strong{color:#000;}
+ol{list-style:decimal;}
+ul{list-style:disc;}
+li{margin-left:30px;}
+hr.single{border-top-style:solid;border-top-width:1px;}
+hr.dotted{border-top-style:dotted;border-top-width:1px;}
+hr.double{border-top-style:double;border-top-width:1px;}
+hr.separator_12{width:940px;margin:1em auto;}
+.prepend-top{margin-top:1.5em;}
+.append-bottom{margin-bottom:1.5em;}
+a{color:#369;color:#06A;text-decoration:none;}
+a:hover{color:#008200;color:#06A;text-decoration:underline;}
+code{font-size:90%;font-family:Monaco,Consolas,monospace;color:#000;padding:2px 5px;}
+pre{font-size:90%;font-family:Monaco,Consolas,monospace;background-color:#f8f8f8;border:1px solid #ddd;border-left-width:5px;display:block;line-height:150%;overflow:auto;padding:15px;}
+pre>code{padding:0;}
+a code{color:#06A;text-decoration:none;}
+a:hover code{color:#06A;text-decoration:underline;}
+abbr,acronym{font-family:monotype;border-bottom:1px dotted silver;}
+blockquote{margin:1em;padding:0 0 0 25px;color:#666;background:url(/images/layout/blockquote-open.png) no-repeat left top;font-family:Georgia,"Bitstream Vera Serif",Times,serif;font-style:normal;}
+#header{margin:.5em auto;padding:0;background:#fff;}
+#header #logo a{font-family:"Helvetica Neue",Helvetica,Arial,"Liberation Sans",FreeSans,sans-serif;font-size:60px;color:#111;letter-spacing:-.05em;font-weight:bold;margin:0;text-shadow:#CCC 1px 1px 0;}
+#header #logo a,#header #logo a:hover{color:#111;text-decoration:none;}
+#header #logo a em{color:#666;font-family:Georgia,"Bitstream Vera Serif",Times,serif;font-size:80%;margin-left:-5px;}
+#header #menu{text-align:right;font-family:"Helvetica Neue",Helvetica,Arial,"Liberation Sans",FreeSans,sans-serif;font-size:140%;font-variant:small-caps;text-transform:lowercase;}
+#header #menu ul{padding:2em 0 0 0;margin:0;list-style-type:none;}
+#header #menu ul li{display:inline;margin:0;padding:0 .75em 0 .5em;border-right:1px dotted #ddd;}
+#header+hr{margin:.75 auto 1.5em auto;}
+#content{margin:1.5em auto;font-size:125%;line-height:1.6;}
+#sidebar{font-size:90%;}
+#sidebar h2{font-size:110%;text-transform:uppercase;}
+#sidebar>h2,#sidebar>h3,#sidebar>h4{margin-top:.25em;}
+#sidebar h2 a:hover,#sidebar h3 a:hover,#sidebar h4 a:hover{color:#06a;text-decoration:none;}
+#prefooter{font-size:120%;}
+#prefooter h6{text-transform:uppercase;padding-bottom:.5em;margin:.5em 0;border-bottom:1px dotted #ddd;}
+#prefooter ol,#prefooter ul{list-style-type:none;margin:0;}
+#prefooter li{margin:.5em 0;}
+#footer{font-size:110%;margin-top:0;margin-bottom:1em;padding:1em 0;color:#333;text-align:center;}
+table{width:100%;font-size:.85em;}
+table th{font-weight:normal;font-variant:small-caps;text-align:right;color:white;background-color:#333;padding:3px 6px;}
+table td{background-color:#f3f3f3;padding:3px 6px;}
+table td code{background-color:#f3f3f3;}
+.textcenter{text-align:center;}
+.textleft{text-align:left;}
+.textright{text-align:right;}
+.alignleft{float:left;display:inline;}
+.alignright{float:right;display:inline;}
+.aligncenter{display:block;margin-left:auto;margin-right:auto;}
+img.alignright{padding:4px;margin:0 0 2px 7px;}
+img.alignleft{padding:4px;margin:0 7px 2px 0;}
+img.aligncenter{width:auto;}
+.highlight .c{color:#998;font-style:italic;}
+.highlight .err{color:#a61717;background-color:#e3d2d2;}
+.highlight .k{font-weight:bold;}
+.highlight .o{font-weight:bold;}
+.highlight .cm{color:#998;font-style:italic;}
+.highlight .cp{color:#999;font-weight:bold;}
+.highlight .c1{color:#998;font-style:italic;}
+.highlight .cs{color:#999;font-weight:bold;font-style:italic;}
+.highlight .gd{color:#000;background-color:#fdd;}
+.highlight .gd .x{color:#000;background-color:#faa;}
+.highlight .ge{font-style:italic;}
+.highlight .gr{color:#a00;}
+.highlight .gh{color:#999;}
+.highlight .gi{color:#000;background-color:#dfd;}
+.highlight .gi .x{color:#000;background-color:#afa;}
+.highlight .go{color:#888;}
+.highlight .gp{color:#555;}
+.highlight .gs{font-weight:bold;}
+.highlight .gu{color:#aaa;}
+.highlight .gt{color:#a00;}
+.highlight .kc{font-weight:bold;}
+.highlight .kd{font-weight:bold;}
+.highlight .kp{font-weight:bold;}
+.highlight .kr{font-weight:bold;}
+.highlight .kt{color:#458;font-weight:bold;}
+.highlight .m{color:#099;}
+.highlight .s{color:#d14;}
+.highlight .na{color:#008080;}
+.highlight .nb{color:#0086B3;}
+.highlight .nc{color:#458;font-weight:bold;}
+.highlight .no{color:#008080;}
+.highlight .ni{color:#800080;}
+.highlight .ne{color:#900;font-weight:bold;}
+.highlight .nf{color:#900;font-weight:bold;}
+.highlight .nn{color:#555;}
+.highlight .nt{color:#000080;}
+.highlight .nv{color:#008080;}
+.highlight .ow{font-weight:bold;}
+.highlight .w{color:#bbb;}
+.highlight .mf{color:#099;}
+.highlight .mh{color:#099;}
+.highlight .mi{color:#099;}
+.highlight .mo{color:#099;}
+.highlight .sb{color:#d14;}
+.highlight .sc{color:#d14;}
+.highlight .sd{color:#d14;}
+.highlight .s2{color:#d14;}
+.highlight .se{color:#d14;}
+.highlight .sh{color:#d14;}
+.highlight .si{color:#d14;}
+.highlight .sx{color:#d14;}
+.highlight .sr{color:#009926;}
+.highlight .s1{color:#d14;}
+.highlight .ss{color:#990073;}
+.highlight .bp{color:#999;}
+.highlight .vc{color:#008080;}
+.highlight .vg{color:#008080;}
+.highlight .vi{color:#008080;}
+.highlight .il{color:#099;}
View
39 doc/index.json
@@ -1,39 +0,0 @@
-{
- "title": "The Rubyist",
- "langTitle": "The Rubyist in English",
- "description": "A collection of Ruby coding conventions and standards.",
- "sections": [
- {
- "title": "Intro",
- "dir": "intro",
- "articles": []
- },
- {
- "title": "Ruby",
- "dir": "ruby",
- "articles": [
- "editor",
- "naming",
- "style",
- "documentation"
- ]
- },
- {
- "title": "Rails",
- "dir": "rails",
- "articles": [
- "design",
- "i18n",
- "style",
- "documentation"
- ]
- },
- {
- "title": "ActiveRecord",
- "dir": "activerecord",
- "articles": [
- "activerecord"
- ]
- }
- ]
-}
View
1 doc/intro/index.md
@@ -1 +0,0 @@
-## Intro
View
1 doc/ruby/yardoc.md
@@ -1 +0,0 @@
-# YARD
View
48 layouts/default.html
@@ -0,0 +1,48 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <title><%= @item[:title] %></title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+
+ <!-- docss -->
+ <link rel="stylesheet" href="/static/shared/css/all.css" type="text/css" media="screen" />
+ <!-- custom -->
+ <link rel="stylesheet" href="/static/css/style.css" type="text/css" media="screen" />
+
+ <%= render 'google-analytics' %>
+</head>
+
+<body>
+
+ <div id="header" class="container_12 clearfix">
+ <div id="logo" class="grid_6">
+ <a href="/"><em>The</em> Rubyist</a>
+ </div>
+ <div id="menu" class="grid_6">
+ <ul id="nav" class="clearfix">
+ </ul>
+ </div>
+ </div>
+
+ <hr class="single separator_12" />
+
+ <div id="content" class="container_12 clearfix">
+ <div id="main" class="grid_8">
+ <%= yield %>
+ </div>
+ <div id="sidebar" class="grid_3 prefix_1">
+ <%= render 'sidebar' %>
+ </div>
+ </div>
+
+ <hr class="single separator_12" />
+
+ <div id="footer" class="container_12 clearfix">
+ <div id="copy">
+ Copyright &copy; 2011 <a href="http://www.simonecarletti.com">Simone Carletti</a>
+ </div>
+ </div>
+
+</body>
+</html>
View
0 layouts/google-analytics.html
No changes.
View
19 layouts/sidebar.html
@@ -0,0 +1,19 @@
+<h2>Ruby</h2>
+
+<ul>
+ <li><a href="/ruby/editor/">Editor</a></li>
+ <li><a href="/ruby/naming/">Naming</a></li>
+ <li><a href="/ruby/style/">Naming</a></li>
+ <li><a href="/ruby/documentation/">Documentation</a></li>
+ <li><a href="/ruby/documentation/">Yardoc</a></li>
+</ul>
+
+<h2>Rails</h2>
+
+<ul>
+ <li><a href="/rails/design/">Design</a></li>
+ <li><a href="/rails/i18n/">I18n</a></li>
+ <li><a href="/rails/style/">Style</a></li>
+ <li><a href="/rails/documentation/">Documentation</a></li>
+ <li><a href="/rails/extensions/">Extensions</a></li>
+</ul>
View
2 lib/default.rb
@@ -0,0 +1,2 @@
+# All files in the 'lib' directory will be loaded
+# before nanoc starts compiling.
View
1 lib/helpers.rb
@@ -0,0 +1 @@
+include Nanoc3::Helpers::Rendering
View
67 output/index.html
@@ -0,0 +1,67 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <title></title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+
+ <!-- docss -->
+ <link rel="stylesheet" href="/static/shared/css/all.css" type="text/css" media="screen" />
+ <!-- custom -->
+ <link rel="stylesheet" href="/static/css/style.css" type="text/css" media="screen" />
+
+
+</head>
+
+<body>
+
+ <div id="header" class="container_12 clearfix">
+ <div id="logo" class="grid_6">
+ <a href="/"><em>The</em> Rubyist</a>
+ </div>
+ <div id="menu" class="grid_6">
+ <ul id="nav" class="clearfix">
+ </ul>
+ </div>
+ </div>
+
+ <hr class="single separator_12" />
+
+ <div id="content" class="container_12 clearfix">
+ <div id="main" class="grid_8">
+
+ </div>
+ <div id="sidebar" class="grid_3 prefix_1">
+ <h2>Ruby</h2>
+
+<ul>
+ <li><a href="/ruby/editor/">Editor</a></li>
+ <li><a href="/ruby/naming/">Naming</a></li>
+ <li><a href="/ruby/style/">Naming</a></li>
+ <li><a href="/ruby/documentation/">Documentation</a></li>
+ <li><a href="/ruby/documentation/">Yardoc</a></li>
+</ul>
+
+<h2>Rails</h2>
+
+<ul>
+ <li><a href="/rails/design/">Design</a></li>
+ <li><a href="/rails/i18n/">I18n</a></li>
+ <li><a href="/rails/style/">Style</a></li>
+ <li><a href="/rails/documentation/">Documentation</a></li>
+ <li><a href="/rails/extensions/">Extensions</a></li>
+</ul>
+
+ </div>
+ </div>
+
+ <hr class="single separator_12" />
+
+ <div id="footer" class="container_12 clearfix">
+ <div id="copy">
+ Copyright &copy; 2011 <a href="http://www.simonecarletti.com">Simone Carletti</a>
+ </div>
+ </div>
+
+</body>
+</html>
View
129 output/rails/design/index.html
@@ -0,0 +1,129 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <title></title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+
+ <!-- docss -->
+ <link rel="stylesheet" href="/static/shared/css/all.css" type="text/css" media="screen" />
+ <!-- custom -->
+ <link rel="stylesheet" href="/static/css/style.css" type="text/css" media="screen" />
+
+
+</head>
+
+<body>
+
+ <div id="header" class="container_12 clearfix">
+ <div id="logo" class="grid_6">
+ <a href="/"><em>The</em> Rubyist</a>
+ </div>
+ <div id="menu" class="grid_6">
+ <ul id="nav" class="clearfix">
+ </ul>
+ </div>
+ </div>
+
+ <hr class="single separator_12" />
+
+ <div id="content" class="container_12 clearfix">
+ <div id="main" class="grid_8">
+ <h2 id="design-conventions">Design Conventions</h2>
+
+<h3 id="layout--page-namespace">Layout &amp; Page Namespace</h3>
+
+<p>Sometimes, CSS definitions apply to one page or all pages in a specific layout. The convention is to scope these definitions under the page namespace or layout namespace.</p>
+
+<p>Each template can have a layout namespace and a page namespace attached to the <code>body</code> HTML element.</p>
+
+<pre><code>&lt;body class="layout-boxed page-login"&gt;
+</code></pre>
+
+<p>The <code>layout-NAME</code> CSS class identifies the layout, the <code>page-NAME</code> identifies the page. Multiple actions can have the same layout namespace and, sometimes, the same page namespace.</p>
+
+<p>If a CSS class should apply only to boxed layouts use</p>
+
+<pre><code>.layout-boxed .the-class {
+ /* only for boxed */
+}
+</code></pre>
+
+<p>Likewise, use the page namespace to define page-wide classes.</p>
+
+<pre><code>.page-account .the-class {
+ /* only for boxed */
+}
+</code></pre>
+
+<h5 id="how-to-change-the-layout-name-namespace">How to change the @layout-NAME@ namespace</h5>
+
+<p>Each layout should have its own layout namespace attached to the layout file itself.</p>
+
+<h5 id="how-to-change-the-page-name-namespace">How to change the @page-NAME@ namespace</h5>
+
+<p>Use the <code>pagid</code> Ruby helper at the top of your action file.
+For example, to assign the page namespace <code>page-account</code> to the <code>/accounts/index.html.erb</code> view file, place the following string at the top of the view file.</p>
+
+<pre><code>&lt;% pagid "account" %&gt;
+
+... here your HTML view
+</code></pre>
+
+<h5 id="source-code">Source Code</h5>
+
+<p>Here’s the code for the <code>pagid</code> helper.</p>
+
+<pre><code># Sets/Gets a page id for a view.
+#
+# If called with an argument, appends the argument to the existing page id.
+#
+# pagid "page-users"
+# # =&gt; "page-users"
+# pagid
+# # =&gt; "page-users"
+# pagid "hidden"
+# # =&gt; "page-users hidden"
+# pagid
+# # =&gt; "page-users hidden"
+#
+# Returns a String with the current page id.
+def pagid(*args)
+ (@_pagid ||= []).concat(args).compact.join(" ")
+end
+</code></pre>
+ </div>
+ <div id="sidebar" class="grid_3 prefix_1">
+ <h2>Ruby</h2>
+
+<ul>
+ <li><a href="/ruby/editor/">Editor</a></li>
+ <li><a href="/ruby/naming/">Naming</a></li>
+ <li><a href="/ruby/style/">Naming</a></li>
+ <li><a href="/ruby/documentation/">Documentation</a></li>
+ <li><a href="/ruby/documentation/">Yardoc</a></li>
+</ul>
+
+<h2>Rails</h2>
+
+<ul>
+ <li><a href="/rails/design/">Design</a></li>
+ <li><a href="/rails/i18n/">I18n</a></li>
+ <li><a href="/rails/style/">Style</a></li>
+ <li><a href="/rails/documentation/">Documentation</a></li>
+ <li><a href="/rails/extensions/">Extensions</a></li>
+</ul>
+
+ </div>
+ </div>
+
+ <hr class="single separator_12" />
+
+ <div id="footer" class="container_12 clearfix">
+ <div id="copy">
+ Copyright &copy; 2011 <a href="http://www.simonecarletti.com">Simone Carletti</a>
+ </div>
+ </div>
+
+</body>
+</html>
View
73 output/rails/documentation/index.html
@@ -0,0 +1,73 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <title></title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+
+ <!-- docss -->
+ <link rel="stylesheet" href="/static/shared/css/all.css" type="text/css" media="screen" />
+ <!-- custom -->
+ <link rel="stylesheet" href="/static/css/style.css" type="text/css" media="screen" />
+
+
+</head>
+
+<body>
+
+ <div id="header" class="container_12 clearfix">
+ <div id="logo" class="grid_6">
+ <a href="/"><em>The</em> Rubyist</a>
+ </div>
+ <div id="menu" class="grid_6">
+ <ul id="nav" class="clearfix">
+ </ul>
+ </div>
+ </div>
+
+ <hr class="single separator_12" />
+
+ <div id="content" class="container_12 clearfix">
+ <div id="main" class="grid_8">
+ <h2 id="documentation">Documentation</h2>
+
+<p>Rails code MUST be documented using [TomDoc][3].</p>
+
+<p>TomDoc is a code documentation specification that helps you write precise documentation that is nice to read in plain text, yet structured enough to be automatically extracted and processed by a machine.</p>
+
+<p>Rails code usually doesn’t need the same level of details of a Ruby Gem or distributable library. Using YARD adds too much overhead, since nobody ever generates API documentation for a Rails project. Conversely, a Rails documentation needs to be easy to read but structured enough to provide a common specification for all the developers. TomDoc perfectly fits this requirement.</p>
+ </div>
+ <div id="sidebar" class="grid_3 prefix_1">
+ <h2>Ruby</h2>
+
+<ul>
+ <li><a href="/ruby/editor/">Editor</a></li>
+ <li><a href="/ruby/naming/">Naming</a></li>
+ <li><a href="/ruby/style/">Naming</a></li>
+ <li><a href="/ruby/documentation/">Documentation</a></li>
+ <li><a href="/ruby/documentation/">Yardoc</a></li>
+</ul>
+
+<h2>Rails</h2>
+
+<ul>
+ <li><a href="/rails/design/">Design</a></li>
+ <li><a href="/rails/i18n/">I18n</a></li>
+ <li><a href="/rails/style/">Style</a></li>
+ <li><a href="/rails/documentation/">Documentation</a></li>
+ <li><a href="/rails/extensions/">Extensions</a></li>
+</ul>
+
+ </div>
+ </div>
+
+ <hr class="single separator_12" />
+
+ <div id="footer" class="container_12 clearfix">
+ <div id="copy">
+ Copyright &copy; 2011 <a href="http://www.simonecarletti.com">Simone Carletti</a>
+ </div>
+ </div>
+
+</body>
+</html>
View
139 output/rails/extensions/index.html
@@ -0,0 +1,139 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <title></title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+
+ <!-- docss -->
+ <link rel="stylesheet" href="/static/shared/css/all.css" type="text/css" media="screen" />
+ <!-- custom -->
+ <link rel="stylesheet" href="/static/css/style.css" type="text/css" media="screen" />
+
+
+</head>
+
+<body>
+
+ <div id="header" class="container_12 clearfix">
+ <div id="logo" class="grid_6">
+ <a href="/"><em>The</em> Rubyist</a>
+ </div>
+ <div id="menu" class="grid_6">
+ <ul id="nav" class="clearfix">
+ </ul>
+ </div>
+ </div>
+
+ <hr class="single separator_12" />
+
+ <div id="content" class="container_12 clearfix">
+ <div id="main" class="grid_8">
+ <h2 id="extensions">Extensions</h2>
+
+<h5 id="warning">WARNING:</h5>
+
+<p>Thought Ruby allows you to reopen classes, you shouldn’t abuse that feature. In particular, avoid changin existing methods, especially in the Ruby core or standard library. If you change the behavior of a method, your application might now working properly.</p>
+
+<p>If you decide to add a new method, make sure you are using an unique name. Otherwise, if you are using a Gem which defines a method with the same name, something might not work as expected.</p>
+
+<p>Be careful when you modify existing classes. Consider using <a href="http://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming)">Inheritance</a> or <a href="http://en.wikipedia.org/wiki/Object_composition">Composition</a>.</p>
+
+<h3 id="ruby-rails--gem-extensions">Ruby, Rails &amp; Gem extensions</h3>
+
+<p>Sometimes you need to <strike>monkeypatch</strike> extend a specific Rails library, a Ruby core class, or a Gem. The flexibility of Ruby allows you to reopen an existing class/module to add new methods or modify existing ones.</p>
+
+<p>The most common question is: where should I write these extensions? In fact, there are several places where these files can be stored, however not all folders are loaded at the same time. Also, some folders are not loaded at all (unless you require them) making your <strike>hack</strike> customization even less elegant.</p>
+
+<p>The following convention solves the problem attempting to respect the purpose of each Rails folder.</p>
+
+<p>Create an initializer with the following content and save it in the <code>/config/initializers/</code> folder. The file name MUST be <code>_extruby.rb</code> The name SHOULD be prefixed with a <code>_</code>, in this way Rails will load this file before all the other initializers in the same folder.</p>
+
+<pre><code>Dir[File.expand_path("../../../lib/extruby/**/*.rb", __FILE__)].each { |f| require f }
+</code></pre>
+
+<p>Create the folder <code>/lib/extruby</code> which will contain all the extensions. The name of the folder MUST match the name of the initializer, without the <code>_</code>. To better organize the files, you SHOULD organize the extensions according to the following folder structure:</p>
+
+<p># TODO: explain structure</p>
+
+<pre><code>lib/extruby/
+├── active_record
+│   └── sqllike.rb
+├── mail
+│   ├── address.rb
+│   └── clone.rb
+├── money
+│   └── money-rails.rb
+├── postageapp
+│   └── actionmailer.rb
+├── public_suffix_service
+│   └── domain.rb
+├── ruby
+│   └── core
+│   ├── object_delayed_job.rb
+│   └── object_yielding.rb
+└── whois
+ ├── elabtime.rb
+ └── super_struct.rb
+</code></pre>
+
+<p>Remember that Ruby extensions MUST be tested as any other method. Depending on your test framework (<code>Test::Unit</code>, <code>Shoulda</code>) you SHOULD create a corresponding test suite for any customization.</p>
+
+<p># TODO: update structure</p>
+
+<pre><code>spec/lib/extruby/
+├── mail
+│   └── address_spec.rb
+├── money
+│   └── rails_spec.rb
+├── ruby
+│   └── core
+│   └── object_yielding_spec.rb
+└── whois
+ └── super_struct_spec.rb
+</code></pre>
+
+<h5 id="considerations">Considerations</h5>
+
+<p>The solution presented above attempts to respect the purpose of each Rails folder.</p>
+
+<ol>
+<li>It uses an initializer, so that the extensions are loaded when the Rails framework is loaded. However, the extensions are not stored in the initializers folder to avoid cluttering the namespace.</li>
+ <li>It prefixes the initializer with _ causing the initializer to be loaded before any initializer, making the extensions available as soon as possible.</li>
+ <li>It uses a dedicated folder in the <code>lib</code> folder to store all the <em>library</em> extensions.</li>
+</ol>
+ </div>
+ <div id="sidebar" class="grid_3 prefix_1">
+ <h2>Ruby</h2>
+
+<ul>
+ <li><a href="/ruby/editor/">Editor</a></li>
+ <li><a href="/ruby/naming/">Naming</a></li>
+ <li><a href="/ruby/style/">Naming</a></li>
+ <li><a href="/ruby/documentation/">Documentation</a></li>
+ <li><a href="/ruby/documentation/">Yardoc</a></li>
+</ul>
+
+<h2>Rails</h2>
+
+<ul>
+ <li><a href="/rails/design/">Design</a></li>
+ <li><a href="/rails/i18n/">I18n</a></li>
+ <li><a href="/rails/style/">Style</a></li>
+ <li><a href="/rails/documentation/">Documentation</a></li>
+ <li><a href="/rails/extensions/">Extensions</a></li>
+</ul>
+
+ </div>
+ </div>
+
+ <hr class="single separator_12" />
+
+ <div id="footer" class="container_12 clearfix">
+ <div id="copy">
+ Copyright &copy; 2011 <a href="http://www.simonecarletti.com">Simone Carletti</a>
+ </div>
+ </div>
+
+</body>
+</html>
View
206 output/rails/i18n/index.html
@@ -0,0 +1,206 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <title></title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+
+ <!-- docss -->
+ <link rel="stylesheet" href="/static/shared/css/all.css" type="text/css" media="screen" />
+ <!-- custom -->
+ <link rel="stylesheet" href="/static/css/style.css" type="text/css" media="screen" />
+
+
+</head>
+
+<body>
+
+ <div id="header" class="container_12 clearfix">
+ <div id="logo" class="grid_6">
+ <a href="/"><em>The</em> Rubyist</a>
+ </div>
+ <div id="menu" class="grid_6">
+ <ul id="nav" class="clearfix">
+ </ul>
+ </div>
+ </div>
+
+ <hr class="single separator_12" />
+
+ <div id="content" class="container_12 clearfix">
+ <div id="main" class="grid_8">
+ <h2 id="i18n">I18n</h2>
+
+<h3 id="yaml-file-structure">YAML File Structure</h3>
+
+<pre><code>LANGUAGE:
+
+ # The `app` node contains keys related to the main application.
+ app:
+ site_name: ...
+ site_description: ...
+ site_headline: ...
+
+
+ # The `flash` node contains all flash message keys,
+ # regardless the flash type.
+ #
+ # Tip: avoid prefixing flash keys with the type of the flash
+ # because the same message can be reused in different flash types.
+ # Also, you might want to change the flash level in the future.
+ flash:
+ article_created: "The article has been successfully created."
+ article_updated: "The article has been successfully updated."
+ bookmark_created: "The bookmark has been successfully created."
+ ...
+
+
+ # The `text` node contains shared keys.
+ text:
+
+ # Action keys are prefixed with `action_`.
+ #
+ # &lt;a href="#"&gt;&lt;%= t("text.action_edit") %&gt;&lt;/a&gt; or
+ # &lt;a href="#"&gt;&lt;%= t("text.action_cancel") %&gt;&lt;/a&gt;
+ #
+ action_edit: "edit"
+ action_cancel: "cancel"
+
+ # Button keys are prefixed with `action_`.
+ #
+ # &lt;%= submit_tag t("text.button_login") %&gt; or
+ # &lt;a href="#"&gt;&lt;%= t("text.action_cancel") %&gt;&lt;/a&gt;
+ #
+ button_login: "Login"
+ button_search: "Search"
+
+ # h1, h2, h3 keys are prefixed with `header_`.
+ #
+ # &lt;h1&gt;&lt;%= t("text.header_admin_settings") %&gt;&lt;/h1&gt;
+ #
+ header_admin_settings: "Admin Settings"
+ header_content: "Content"
+
+ # Short messages are prefixed with `message_`.
+ #
+ # &lt;% if @users.empty? %&gt;
+ # &lt;%= message_users_empty %&gt;
+ # &lt;% else %&gt;
+ # ...
+ # &lt;% end %&gt;
+ #
+ message_users_empty: "There are no users."
+ message_required_user: "You must be logged to perform this action."
+
+ # Use the placeholder `foo` to refernce a variable.
+ suggested_by_foo: "Suggested by {{username}}"
+ published_by_foo: "Published by {{username}}"
+ foo_ago: "{{time}} ago"
+
+ # Use the schema `x_string` to define a key which interpolates a counter.
+ x_comments:
+ one: "1 comment"
+ other: "{{count}} comments"
+ last_x_users:
+ one: "Last 1 comment"
+ other: "Last {{count}} comments"
+
+
+ # The ActionMailer keys follows the same ActionController conventions.
+ #
+ # - The main node is the name of the ActionMailer class.
+ # - It contains one node for each email action.
+ #
+ # == Requirements
+ #
+ # ACTION required keys:
+ #
+ # subject - The subject of the email.
+ #
+ # == Example
+ #
+ # user_mailer:
+ # notification:
+ # subject: "[{{project}}] New Contact Message"
+ # welcome_message:
+ # subject: "Welcome to {{project}}!"
+ #
+ MAILER:
+ ACTION:
+ subject: "[{{project}}] New Contact Message"
+ ...
+ ACTION:
+ subject: "Welcome to {{project}}!"
+ ...
+
+
+ # The ActionController keys follows Rails convention to have one main node
+ # corresponding to the controller name, including several nodes,
+ # one for each controller action.
+ #
+ # Following this convention will allow you to use the shortcut
+ #
+ # t(".meta_description")
+ #
+ # instead of
+ #
+ # t("users_controller.index.meta_description")
+ #
+ # == Requirements
+ #
+ # ACTION required keys:
+ #
+ # title - The content of the &lt;title&gt; tag
+ # meta_description - The content of the meta description tag.
+ #
+ # == Example
+ #
+ # users_controller:
+ # index:
+ # ...
+ # show:
+ # ...
+ #
+ CONTROLLER:
+ ACTION:
+ title: ...
+ meta_description: ...
+ ACTION:
+ title: ...
+ meta_description: ...
+</code></pre>
+ </div>
+ <div id="sidebar" class="grid_3 prefix_1">
+ <h2>Ruby</h2>
+
+<ul>
+ <li><a href="/ruby/editor/">Editor</a></li>
+ <li><a href="/ruby/naming/">Naming</a></li>
+ <li><a href="/ruby/style/">Naming</a></li>
+ <li><a href="/ruby/documentation/">Documentation</a></li>
+ <li><a href="/ruby/documentation/">Yardoc</a></li>
+</ul>
+
+<h2>Rails</h2>
+
+<ul>
+ <li><a href="/rails/design/">Design</a></li>
+ <li><a href="/rails/i18n/">I18n</a></li>
+ <li><a href="/rails/style/">Style</a></li>
+ <li><a href="/rails/documentation/">Documentation</a></li>
+ <li><a href="/rails/extensions/">Extensions</a></li>
+</ul>
+
+ </div>
+ </div>
+
+ <hr class="single separator_12" />
+
+ <div id="footer" class="container_12 clearfix">
+ <div id="copy">
+ Copyright &copy; 2011 <a href="http://www.simonecarletti.com">Simone Carletti</a>
+ </div>
+ </div>
+
+</body>
+</html>
View
122 output/rails/models/index.html
@@ -0,0 +1,122 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <title></title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+
+ <!-- docss -->
+ <link rel="stylesheet" href="/static/shared/css/all.css" type="text/css" media="screen" />
+ <!-- custom -->
+ <link rel="stylesheet" href="/static/css/style.css" type="text/css" media="screen" />
+
+
+</head>
+
+<body>
+
+ <div id="header" class="container_12 clearfix">
+ <div id="logo" class="grid_6">
+ <a href="/"><em>The</em> Rubyist</a>
+ </div>
+ <div id="menu" class="grid_6">
+ <ul id="nav" class="clearfix">
+ </ul>
+ </div>
+ </div>
+
+ <hr class="single separator_12" />
+
+ <div id="content" class="container_12 clearfix">
+ <div id="main" class="grid_8">
+ <h2 id="model-definition-order">Model Definition Order</h2>
+
+<pre><code>class Model
+
+ # Module inclusions
+ extend Module
+ include Module
+
+ # Subclasses
+ class Error &lt; StandardError
+ end
+
+ # Constants
+ CONSTANTS = nil
+
+ # Relationships
+ belongs_to :model
+ has_one :model
+ has_many :models
+
+ # Attribute definition, visibility
+ attr_reader :attribute
+ attr_accessor :attribute
+ attr_accessible :attribute
+ attr_protected :attribute
+
+ # Extensions
+ acts_as_list :scope =&gt; :keyword
+
+ # Before/After filters
+ before_save :method
+ before_create :method
+ before_update :method
+ after_update :method
+
+ # Validations
+ validates :attribute, :presence =&gt; true
+
+ # Named scopes
+ named_scope :one, lambda { }
+ named_scope :two, :conditions =&gt; ""
+
+ # Business Logic
+ def public_method_a
+ end
+
+ protected
+ def protected_method
+ end
+
+ private
+ def private_method
+ end
+
+end
+</code></pre>
+ </div>
+ <div id="sidebar" class="grid_3 prefix_1">
+ <h2>Ruby</h2>
+
+<ul>
+ <li><a href="/ruby/editor/">Editor</a></li>
+ <li><a href="/ruby/naming/">Naming</a></li>
+ <li><a href="/ruby/style/">Naming</a></li>
+ <li><a href="/ruby/documentation/">Documentation</a></li>
+ <li><a href="/ruby/documentation/">Yardoc</a></li>
+</ul>
+
+<h2>Rails</h2>
+
+<ul>
+ <li><a href="/rails/design/">Design</a></li>
+ <li><a href="/rails/i18n/">I18n</a></li>
+ <li><a href="/rails/style/">Style</a></li>
+ <li><a href="/rails/documentation/">Documentation</a></li>
+ <li><a href="/rails/extensions/">Extensions</a></li>
+</ul>
+
+ </div>
+ </div>
+
+ <hr class="single separator_12" />
+
+ <div id="footer" class="container_12 clearfix">
+ <div id="copy">
+ Copyright &copy; 2011 <a href="http://www.simonecarletti.com">Simone Carletti</a>
+ </div>
+ </div>
+
+</body>
+</html>
View
84 output/ruby/documentation/index.html
@@ -0,0 +1,84 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <title></title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+
+ <!-- docss -->
+ <link rel="stylesheet" href="/static/shared/css/all.css" type="text/css" media="screen" />
+ <!-- custom -->
+ <link rel="stylesheet" href="/static/css/style.css" type="text/css" media="screen" />
+
+
+</head>
+
+<body>
+
+ <div id="header" class="container_12 clearfix">
+ <div id="logo" class="grid_6">
+ <a href="/"><em>The</em> Rubyist</a>
+ </div>
+ <div id="menu" class="grid_6">
+ <ul id="nav" class="clearfix">
+ </ul>
+ </div>
+ </div>
+
+ <hr class="single separator_12" />
+
+ <div id="content" class="container_12 clearfix">
+ <div id="main" class="grid_8">
+ <h2 id="documentation">Documentation</h2>
+
+<p>Ruby libraries intended to be distributed or packaged as Gem MUST be documented using <a href="http://yardoc.org/">YARD</a>.</p>
+
+<p>YARD is a powerful Ruby documentation tool for generating API documentation from Ruby source code. While the base syntax is compatible with RDoc, YARD provides a set of <a href="http://rubydoc.info/docs/yard/file/docs/Tags.md#List_of_Available_Tags">Javadoc-inspired tags</a> the developer can use to enrich the documentation with details that cannot be extracted from the source code.</p>
+
+<p>Compared to RDoc, YARD is able to generate a more detailed API documentation. It also offers some very handy tools, such as <code>yard server --reload</code>, that generates and reloads the documentation on-the-fly.</p>
+
+<h3 id="list-of-documentation-toolsformats">List of Documentation Tools/Formats</h3>
+
+<ul>
+<li><a href="http://rdoc.rubyforge.org/">RDoc</a></li>
+ <li><a href="http://yardoc.org/">YARD</a></li>
+ <li>
+ <p><a href="http://tomdoc.org/">TomDoc</a></p>
+
+ </li>
+</ul>
+ </div>
+ <div id="sidebar" class="grid_3 prefix_1">
+ <h2>Ruby</h2>
+
+<ul>
+ <li><a href="/ruby/editor/">Editor</a></li>
+ <li><a href="/ruby/naming/">Naming</a></li>
+ <li><a href="/ruby/style/">Naming</a></li>
+ <li><a href="/ruby/documentation/">Documentation</a></li>
+ <li><a href="/ruby/documentation/">Yardoc</a></li>
+</ul>
+
+<h2>Rails</h2>
+
+<ul>
+ <li><a href="/rails/design/">Design</a></li>
+ <li><a href="/rails/i18n/">I18n</a></li>
+ <li><a href="/rails/style/">Style</a></li>
+ <li><a href="/rails/documentation/">Documentation</a></li>
+ <li><a href="/rails/extensions/">Extensions</a></li>
+</ul>
+
+ </div>
+ </div>
+
+ <hr class="single separator_12" />
+
+ <div id="footer" class="container_12 clearfix">
+ <div id="copy">
+ Copyright &copy; 2011 <a href="http://www.simonecarletti.com">Simone Carletti</a>
+ </div>
+ </div>
+
+</body>
+</html>
View
90 output/ruby/editor/index.html
@@ -0,0 +1,90 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <title></title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+
+ <!-- docss -->
+ <link rel="stylesheet" href="/static/shared/css/all.css" type="text/css" media="screen" />
+ <!-- custom -->
+ <link rel="stylesheet" href="/static/css/style.css" type="text/css" media="screen" />
+
+
+</head>
+
+<body>
+
+ <div id="header" class="container_12 clearfix">
+ <div id="logo" class="grid_6">
+ <a href="/"><em>The</em> Rubyist</a>
+ </div>
+ <div id="menu" class="grid_6">
+ <ul id="nav" class="clearfix">
+ </ul>
+ </div>
+ </div>
+
+ <hr class="single separator_12" />
+
+ <div id="content" class="container_12 clearfix">
+ <div id="main" class="grid_8">
+ <h2 id="editor-conventions">Editor Conventions</h2>
+
+<h3 id="indentation">Indentation</h3>
+
+<p>Indentation MUST consist of 2 spaces. Tabs are not allowed.</p>
+
+<p>Configure your editor to use Soft Tabs (replace tabs with spaces) or Spaces.
+The most part of IDE and editors support this feature.</p>
+
+<h3 id="maximum-line-length">Maximum Line Length</h3>
+
+<p>The target line length SHOULD be 80 characters.</p>
+
+<p>Developers SHOULD strive keep each line of their code under 80 characters where possible and practical. However, longer lines are acceptable in some circumstances.</p>
+
+<h3 id="line-termination">Line Termination</h3>
+
+<p>Line termination follows the Unix text file convention. Lines MUST end with a single linefeed (LF) character. Linefeed characters are represented as ordinal 10, or hexadecimal 0x0A.</p>
+
+<p>Note: Do not use carriage returns (CR) as is the convention in Apple OS’s (0x0D) or the carriage return - linefeed combination (CRLF) as is standard for the Windows OS (0x0D, 0x0A).</p>
+
+<h3 id="whitespaces">Whitespaces</h3>
+
+<p>#TODO</p>
+ </div>
+ <div id="sidebar" class="grid_3 prefix_1">
+ <h2>Ruby</h2>
+
+<ul>
+ <li><a href="/ruby/editor/">Editor</a></li>
+ <li><a href="/ruby/naming/">Naming</a></li>
+ <li><a href="/ruby/style/">Naming</a></li>
+ <li><a href="/ruby/documentation/">Documentation</a></li>
+ <li><a href="/ruby/documentation/">Yardoc</a></li>
+</ul>
+
+<h2>Rails</h2>
+
+<ul>
+ <li><a href="/rails/design/">Design</a></li>
+ <li><a href="/rails/i18n/">I18n</a></li>
+ <li><a href="/rails/style/">Style</a></li>
+ <li><a href="/rails/documentation/">Documentation</a></li>
+ <li><a href="/rails/extensions/">Extensions</a></li>
+</ul>
+
+ </div>
+ </div>
+
+ <hr class="single separator_12" />
+
+ <div id="footer" class="container_12 clearfix">
+ <div id="copy">
+ Copyright &copy; 2011 <a href="http://www.simonecarletti.com">Simone Carletti</a>
+ </div>
+ </div>
+
+</body>
+</html>
View
112 output/ruby/naming/index.html
@@ -0,0 +1,112 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <title></title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+
+ <!-- docss -->
+ <link rel="stylesheet" href="/static/shared/css/all.css" type="text/css" media="screen" />
+ <!-- custom -->
+ <link rel="stylesheet" href="/static/css/style.css" type="text/css" media="screen" />
+
+
+</head>
+
+<body>
+
+ <div id="header" class="container_12 clearfix">
+ <div id="logo" class="grid_6">
+ <a href="/"><em>The</em> Rubyist</a>
+ </div>
+ <div id="menu" class="grid_6">
+ <ul id="nav" class="clearfix">
+ </ul>
+ </div>
+ </div>
+
+ <hr class="single separator_12" />
+
+ <div id="content" class="container_12 clearfix">
+ <div id="main" class="grid_8">
+ <h2 id="naming-conventions">Naming Conventions</h2>
+
+<h3 id="constants">Constants</h3>
+
+<p>Constants MUST use <code>UPPER_CASE</code>.</p>
+
+<pre><code>Math::PI
+OptionParser::REQUIRED_ARGUMENT
+
+class Curses
+ KEY_DOWN = nil
+end
+</code></pre>
+
+<h3 id="classes-and-modules">Classes and Modules</h3>
+
+<p>Classes MUST use <code>PascalCase</code>. Join words of class names by capitalizing the first letter of each word. The same goes for <code>ModuleNames</code> as well.</p>
+
+<pre><code>class MyClass
+end
+
+module MyModule
+end
+</code></pre>
+
+<h3 id="methods-and-variables">Methods and Variables</h3>
+
+<p>Methods MUST use <code>underscore</code>, as do <code>local_variables</code>, <code>@instance_variables</code>, and <code>@@class_variables</code>. Join words with underscores (aka <code>snake_case</code>).</p>
+
+<pre><code>class Greeter
+ @@hello = nil
+ @@hello_message = nil
+
+ def hello
+ @hello = nil
+ end
+
+ def say_hello
+ @say_hello = nil
+ end
+end
+</code></pre>
+
+<p>Keep acronyms in class names capitalized. <code>MyXMLClass</code>, not <code>MyXmlClass</code>. Variables should use all lower-case.</p>
+
+<hr><p>Warning: There is no place in Ruby where <code>camelCase</code> is ever used.</p>
+ </div>
+ <div id="sidebar" class="grid_3 prefix_1">
+ <h2>Ruby</h2>
+
+<ul>
+ <li><a href="/ruby/editor/">Editor</a></li>
+ <li><a href="/ruby/naming/">Naming</a></li>
+ <li><a href="/ruby/style/">Naming</a></li>
+ <li><a href="/ruby/documentation/">Documentation</a></li>
+ <li><a href="/ruby/documentation/">Yardoc</a></li>
+</ul>
+
+<h2>Rails</h2>
+
+<ul>
+ <li><a href="/rails/design/">Design</a></li>
+ <li><a href="/rails/i18n/">I18n</a></li>
+ <li><a href="/rails/style/">Style</a></li>
+ <li><a href="/rails/documentation/">Documentation</a></li>
+ <li><a href="/rails/extensions/">Extensions</a></li>
+</ul>
+
+ </div>
+ </div>
+
+ <hr class="single separator_12" />
+
+ <div id="footer" class="container_12 clearfix">
+ <div id="copy">
+ Copyright &copy; 2011 <a href="http://www.simonecarletti.com">Simone Carletti</a>
+ </div>
+ </div>
+
+</body>
+</html>
View
222 output/ruby/style/index.html
@@ -0,0 +1,222 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <title></title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+
+ <!-- docss -->
+ <link rel="stylesheet" href="/static/shared/css/all.css" type="text/css" media="screen" />
+ <!-- custom -->
+ <link rel="stylesheet" href="/static/css/style.css" type="text/css" media="screen" />
+
+
+</head>
+
+<body>
+
+ <div id="header" class="container_12 clearfix">
+ <div id="logo" class="grid_6">
+ <a href="/"><em>The</em> Rubyist</a>
+ </div>
+ <div id="menu" class="grid_6">
+ <ul id="nav" class="clearfix">
+ </ul>
+ </div>
+ </div>
+
+ <hr class="single separator_12" />
+
+ <div id="content" class="container_12 clearfix">
+ <div id="main" class="grid_8">
+ <h2 id="coding-style">Coding Style</h2>
+
+<h3 id="operators">Operators</h3>
+
+<h4 id="making-sense-with-rubys-unless">Making sense with Ruby’s “unless”</h4>
+
+<p>Some rules of thumb when using unless:</p>
+
+<ul>
+<li>Avoid using more than a single logical condition. <code>unless foo?</code> is fine. <code>unless foo? &amp;&amp; bar?</code> is harder to parse.</li>
+ <li>Avoid negation. “Unless” is already negative. Piling more on only makes it worse.</li>
+ <li>Never, ever, ever use an <code>else</code> clause with an <code>unless</code> statement.</li>
+</ul><h5 id="good-example">Good example</h5>
+
+<pre><code>i += 1 unless i &gt; 10
+
+unless person.present?
+ puts "There's no such person"
+end
+</code></pre>
+
+<h5 id="bad-example">Bad example</h5>
+
+<pre><code>unless !person.present? &amp;&amp; !company.present?
+ puts "do you even know what you're doing?"
+else
+ puts "and now we're really confused"
+end
+</code></pre>
+
+<p><em>Inspired by <a href="http://37signals.com/svn/posts/2699-making-sense-with-rubys-unless">37signals</a></em>.</p>
+
+<h3 id="blocks">Blocks</h3>
+
+<h4 id="blocks-versus-do--end-blocks">{ … } blocks versus do … end blocks</h4>
+
+<p>There are two prevailing conventions on when to use curly braces for blocks versus the do … end keywords:</p>
+
+<ul>
+<li>You MUST use curly braces for one-line blocks, use do … end for multi-line blocks</li>
+ <li>You MUST use curly braces when the return value is desired (or chained), use `do … end when the side-effect is desired</li>
+</ul><p>The latter convention seems to be gaining in popularity, but there does not seem to be consensus on this issue at the time of this writing.</p>
+
+<p>Note: The two block notations have different precedence, so they are not always interchangeable unless parentheses are used.</p>
+
+<pre><code>class Post &lt; ActiveRecord::Base
+
+ # The following statement raises a compile error
+ scope :search_for, lambda { |query|
+ where("1 == 1")
+ }
+
+ # The following statement works
+ scope :search_for, lambda { |query|
+ where("1 == 1")
+ }
+
+end
+</code></pre>
+
+<h3 id="methods">Methods</h3>
+
+<h4 id="method-definition">Method Definition</h4>
+
+<table><tbody><tr>
+<td>Methods MUST be named according to [[method naming conventions</td>
+ <td>naming]].</td>
+ </tr></tbody></table><p>Method definition MUST always include parenthesis when the method has one or more parameters. Avoid parenthesis when the method definition has zero parameters.</p>
+
+<pre><code>def method_with_zero_parameters
+end
+
+def method_with_one_parameter(param1)
+end
+
+def method_with_many_parameters(param1, param2, param3)
+end
+</code></pre>
+
+<p>Never leave a space between the end of the method name and an open parenthesis, and between the parameter and a parenthesis. Butt the parameter list up tight against the name of the method.</p>
+
+<pre><code># good
+def method(param1, param2, param3)
+end
+
+# bad
+def method (param1, param2, param3)
+end
+
+# bad
+def method( param1, param2, param3 )
+end
+</code></pre>
+
+<p>Parameters MUST be separated by a single trailing space after the comma delimiter.</p>
+
+<pre><code># good
+def method(param1, param2, param3)
+end
+
+# bad
+def method(param1,param2,param3)
+end
+
+# bad
+def method(param1,param2, options)
+end
+</code></pre>
+
+<h4 id="method-invocation">Method Invocation</h4>
+
+<p>Don’t put spaces between a method name and its parameter list.</p>
+
+<p>Make the precedence rules clearer: never leave a space between the end of the method invocation and an open parenthesis. Butt the parameter list up tight against the name of the method.</p>
+
+<pre><code># parses visually the same way Ruby parses it
+Math.sqrt(2 + 2) * 3
+</code></pre>
+
+<p>but</p>
+
+<pre><code># is confusing
+Math.sqrt (2 + 2) * 3
+</code></pre>
+
+<p>The same applies to method definition</p>
+
+<pre><code># good version
+def say(message = "hello")
+end
+
+# bad version
+def say (message = "hello")
+end
+
+# bad version
+def say( message = "hello" )
+end
+</code></pre>
+
+<p>Put parentheses around non-trivial parameter lists.</p>
+
+<p>If you have a method parameter that involves any degree of complexity or that starts with a parenthesized expression, put the whole parameter list in parentheses.</p>
+
+<p>This can be a cause of some pretty subtle bugs, so it’s worth getting into the habit of using parenthesized parameter lists. Apart from a few common idioms such as</p>
+
+<ul>
+<li><code>require "name"</code></li>
+ <li><code>attr :name</code></li>
+</ul><p>where parentheses would seem strange, it’s rarely a mistake to add them.</p>
+
+<p><em>Inspired by Dave Thomas on RubyGardens.org.</em></p>
+
+<h4 id="method-visibility">Method Visibility</h4>
+
+<p>#TODO</p>
+ </div>
+ <div id="sidebar" class="grid_3 prefix_1">
+ <h2>Ruby</h2>
+
+<ul>
+ <li><a href="/ruby/editor/">Editor</a></li>
+ <li><a href="/ruby/naming/">Naming</a></li>
+ <li><a href="/ruby/style/">Naming</a></li>
+ <li><a href="/ruby/documentation/">Documentation</a></li>
+ <li><a href="/ruby/documentation/">Yardoc</a></li>
+</ul>
+
+<h2>Rails</h2>
+
+<ul>
+ <li><a href="/rails/design/">Design</a></li>
+ <li><a href="/rails/i18n/">I18n</a></li>
+ <li><a href="/rails/style/">Style</a></li>
+ <li><a href="/rails/documentation/">Documentation</a></li>
+ <li><a href="/rails/extensions/">Extensions</a></li>
+</ul>
+
+ </div>
+ </div>
+
+ <hr class="single separator_12" />
+
+ <div id="footer" class="container_12 clearfix">
+ <div id="copy">
+ Copyright &copy; 2011 <a href="http://www.simonecarletti.com">Simone Carletti</a>
+ </div>
+ </div>
+
+</body>
+</html>
View
135 output/ruby/yardoc/index.html
@@ -0,0 +1,135 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <title></title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+
+ <!-- docss -->
+ <link rel="stylesheet" href="/static/shared/css/all.css" type="text/css" media="screen" />
+ <!-- custom -->
+ <link rel="stylesheet" href="/static/css/style.css" type="text/css" media="screen" />
+
+
+</head>
+
+<body>
+
+ <div id="header" class="container_12 clearfix">
+ <div id="logo" class="grid_6">
+ <a href="/"><em>The</em> Rubyist</a>
+ </div>
+ <div id="menu" class="grid_6">
+ <ul id="nav" class="clearfix">
+ </ul>
+ </div>
+ </div>
+
+ <hr class="single separator_12" />
+
+ <div id="content" class="container_12 clearfix">
+ <div id="main" class="grid_8">
+ <h1 id="yard">YARD</h1>
+
+<p>YARD is a powerful Ruby documentation tool for generating API documentation from Ruby source code.</p>
+
+<h2 id="tag-conventions">Tag Conventions</h2>
+
+<p>YARD provides a <a href="http://rubydoc.info/docs/yard/file/docs/Tags.md">set of Javadoc-inspired tags</a> the developer can use to enrich the documentation with additional
+metadata.</p>
+
+<h3 id="order-of-tags">Order of Tags</h3>
+
+<p>Whilst YARD does not enforce a particular order, a common convention makes the source code more readable, especially when the documentation block contains more than 5 tags.</p>
+
+<p>Include tags in the following order:</p>
+
+<pre><code>Description block.
+
+@example
+
+@note
+@todo
+
+@param
+@return
+@raise
+
+@see
+
+@author
+@version
+@since
+
+@abstract
+@api
+@deprecated
+</code></pre>
+
+<h3 id="ordering-multiple-tags">Ordering Multiple Tags</h3>
+
+<p>We employ the following conventions when a tag appears more than once in a documentation block.</p>
+
+<ul>
+<li>Multiple <code>@author</code> tags should be listed in chronological order, with the creator of the class/method listed at the top.</li>
+ <li>Multiple <code>@param</code> tags should be listed in argument-declaration order. This makes it easier to visually match the list to the declaration.</li>
+ <li>Multiple <code>@raise</code> tags should be listed alphabetically by the exception names. </li>
+</ul><h3 id="required-tags">Required Tags</h3>
+
+<p>A <code>@param</code> tag is “required” (by convention) for every parameter. The description can be omitted if the meaning of the parameter is obvious.</p>
+
+<pre><code># Opens a socket connection and returns the TCPSocket instance.
+#
+# @param [String] host
+# @param [Integer] port
+# @return [TCPSocket]
+def connect(host, port)
+end
+</code></pre>
+
+<p>The <code>@return</code> tag is required for every method that returns something other than void. The description can be omitted if the meaning of the parameter is obvious. Whenever possible, find something non-redundant (ideally, more specific) to use for the tag comment.</p>
+
+<pre><code># Opens a socket connection and returns the TCPSocket instance.
+#
+# @param [String] host
+# @param [Integer] port
+# @return [TCPSocket] The socket connection,
+# preconfigured with the default set of options.
+def connect(host, port)
+end
+</code></pre>
+ </div>
+ <div id="sidebar" class="grid_3 prefix_1">
+ <h2>Ruby</h2>
+
+<ul>
+ <li><a href="/ruby/editor/">Editor</a></li>
+ <li><a href="/ruby/naming/">Naming</a></li>
+ <li><a href="/ruby/style/">Naming</a></li>
+ <li><a href="/ruby/documentation/">Documentation</a></li>
+ <li><a href="/ruby/documentation/">Yardoc</a></li>
+</ul>
+
+<h2>Rails</h2>
+
+<ul>
+ <li><a href="/rails/design/">Design</a></li>
+ <li><a href="/rails/i18n/">I18n</a></li>
+ <li><a href="/rails/style/">Style</a></li>
+ <li><a href="/rails/documentation/">Documentation</a></li>
+ <li><a href="/rails/extensions/">Extensions</a></li>
+</ul>
+
+ </div>
+ </div>
+
+ <hr class="single separator_12" />
+
+ <div id="footer" class="container_12 clearfix">
+ <div id="copy">
+ Copyright &copy; 2011 <a href="http://www.simonecarletti.com">Simone Carletti</a>
+ </div>
+ </div>
+
+</body>
+</html>
View
13 output/static/css/style.css
@@ -0,0 +1,13 @@
+/* -------------------------------
+ GLOBAL
+------------------------------- */
+
+body {
+ font-size: 12px;
+}
+
+
+/* reset margin-top if under main */
+#main > h1 {
+ margin-top: 0;
+}
View
254 output/static/shared/css/all.css
@@ -0,0 +1,254 @@
+a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,dialog,div,dl,dt,em,embed,fieldset,figcaption,figure,font,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,meter,nav,object,ol,output,p,pre,progress,q,rp,rt,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt</