Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Documentation and Rakefile updates! Yay!

Conflicts:

	Rakefile
  • Loading branch information...
commit 49ed319210c0563b9db2e68f822153fecc46ba4b 1 parent 7d3c3fd
James Tucker authored March 18, 2012
2  .gitignore
... ...
@@ -1,4 +1,5 @@
1 1
 RDOX
  2
+ChangeLog
2 3
 *.gem
3 4
 lighttpd.errors
4 5
 *.rbc
@@ -6,3 +7,4 @@ stage
6 7
 *.tar.gz
7 8
 Gemfile.lock
8 9
 .rbx
  10
+doc
29  Rakefile
@@ -11,12 +11,12 @@ task :deps do
11 11
     reqs = dep.requirements_list
12 12
     reqs = (["-v"] * reqs.size).zip(reqs).flatten
13 13
     # Use system over sh, because we want to ignore errors!
14  
-    system "gem", "install", '--conservative', dep.name, *reqs
  14
+    system Gem.ruby, "-S", "gem", "install", '--conservative', dep.name, *reqs
15 15
   end
16 16
 end
17 17
 
18 18
 desc "Make an archive as .tar.gz"
19  
-task :dist => [:chmod, :changelog, :rdoc, "SPEC"] do
  19
+task :dist => %w[chmod ChangeLog SPEC rdoc] do
20 20
   sh "git archive --format=tar --prefix=#{release}/ HEAD^{tree} >#{release}.tar"
21 21
   sh "pax -waf #{release}.tar -s ':^:#{release}/:' SPEC ChangeLog doc rack.gemspec"
22 22
   sh "gzip -f -9 #{release}.tar"
@@ -31,7 +31,7 @@ task :officialrelease do
31 31
   sh "mv stage/#{release}.tar.gz stage/#{release}.gem ."
32 32
 end
33 33
 
34  
-task :officialrelease_really => ["SPEC", :dist, :gem] do
  34
+task :officialrelease_really => %w[SPEC dist gem] do
35 35
   sh "sha1sum #{release}.tar.gz #{release}.gem"
36 36
 end
37 37
 
@@ -46,7 +46,10 @@ task :chmod do
46 46
 end
47 47
 
48 48
 desc "Generate a ChangeLog"
49  
-task :changelog do
  49
+task :changelog => %w[ChangeLog]
  50
+
  51
+file '.git/index'
  52
+file "ChangeLog" => '.git/index' do
50 53
   File.open("ChangeLog", "w") { |out|
51 54
     `git log -z`.split("\0").map { |chunk|
52 55
       author = chunk[/Author: (.*)/, 1].strip
@@ -63,7 +66,6 @@ task :changelog do
63 66
   }
64 67
 end
65 68
 
66  
-
67 69
 file 'lib/rack/lint.rb'
68 70
 desc "Generate Rack Specification"
69 71
 file "SPEC" => 'lib/rack/lint.rb' do
@@ -99,17 +101,22 @@ task :gem => ["SPEC"] do
99 101
   sh "gem build rack.gemspec"
100 102
 end
101 103
 
  104
+task :doc => :rdoc
102 105
 desc "Generate RDoc documentation"
103  
-task :rdoc => ["SPEC"] do
  106
+task :rdoc => %w[ChangeLog SPEC] do
104 107
   sh(*%w{rdoc --line-numbers --main README.rdoc
105 108
               --title 'Rack\ Documentation' --charset utf-8 -U -o doc} +
106  
-              %w{README.rdoc KNOWN-ISSUES SPEC} +
107  
-              Dir["lib/**/*.rb"])
  109
+              %w{README.rdoc KNOWN-ISSUES SPEC ChangeLog} +
  110
+              `git ls-files lib/\*\*/\*.rb`.strip.split)
  111
+  cp "contrib/rdoc.css", "doc/rdoc.css"
  112
+end
  113
+
  114
+task :pushdoc => %w[rdoc] do
  115
+  sh "rsync -avz doc/ rack.rubyforge.org:/var/www/gforge-projects/rack/doc/"
108 116
 end
109 117
 
110  
-task :pushsite => [:rdoc] do
  118
+task :pushsite => %w[pushdoc] do
111 119
   sh "cd site && git gc"
112  
-  sh "rsync -avz doc/ chneukirchen@rack.rubyforge.org:/var/www/gforge-projects/rack/doc/"
113  
-  sh "rsync -avz site/ chneukirchen@rack.rubyforge.org:/var/www/gforge-projects/rack/"
  120
+  sh "rsync -avz site/ rack.rubyforge.org:/var/www/gforge-projects/rack/"
114 121
   sh "cd site && git push"
115 122
 end
412  contrib/rdoc.css
... ...
@@ -0,0 +1,412 @@
  1
+/* Forked from the Darkfish templates rdoc.css file, much hacked, probably
  2
+ * imperfect */
  3
+
  4
+html { max-width: 960px; margin: 0 auto; }
  5
+body {
  6
+  font: 14px "Helvetica Neue", Helvetica, Tahoma, sans-serif;
  7
+}
  8
+body.file-popup {
  9
+  font-size: 90%;
  10
+  margin-left: 0;
  11
+}
  12
+
  13
+h1 {
  14
+  color: #4183C4;
  15
+}
  16
+
  17
+:link,
  18
+:visited {
  19
+  color: #4183C4;
  20
+  text-decoration: none;
  21
+}
  22
+:link:hover,
  23
+:visited:hover {
  24
+  border-bottom: 1px dotted #4183C4;
  25
+}
  26
+
  27
+pre, pre.description {
  28
+  font: 12px Monaco,"Courier New","DejaVu Sans Mono","Bitstream Vera Sans Mono",monospace;
  29
+  padding: 1em;
  30
+  overflow: auto;
  31
+  line-height: 1.4;
  32
+}
  33
+
  34
+/* @group Generic Classes */
  35
+
  36
+.initially-hidden {
  37
+  display: none;
  38
+}
  39
+
  40
+#search-field {
  41
+  width: 98%;
  42
+}
  43
+
  44
+.missing-docs {
  45
+  font-size: 120%;
  46
+  background: white url(images/wrench_orange.png) no-repeat 4px center;
  47
+  color: #ccc;
  48
+  line-height: 2em;
  49
+  border: 1px solid #d00;
  50
+  opacity: 1;
  51
+  text-indent: 24px;
  52
+  letter-spacing: 3px;
  53
+  font-weight: bold;
  54
+  -webkit-border-radius: 5px;
  55
+  -moz-border-radius: 5px;
  56
+}
  57
+
  58
+.target-section {
  59
+  border: 2px solid #dcce90;
  60
+  border-left-width: 8px;
  61
+  background: #fff3c2;
  62
+}
  63
+
  64
+/* @end */
  65
+
  66
+/* @group Index Page, Standalone file pages */
  67
+.indexpage ul {
  68
+  line-height: 160%;
  69
+  list-style: none;
  70
+}
  71
+.indexpage ul :link,
  72
+.indexpage ul :visited {
  73
+  font-size: 16px;
  74
+}
  75
+
  76
+.indexpage li {
  77
+  padding-left: 20px;
  78
+}
  79
+
  80
+.indexpage ul > li {
  81
+  background: url(images/bullet_black.png) no-repeat left 4px;
  82
+}
  83
+.indexpage li.method {
  84
+  background: url(images/plugin.png) no-repeat left 4px;
  85
+}
  86
+.indexpage li.module {
  87
+  background: url(images/package.png) no-repeat left 4px;
  88
+}
  89
+.indexpage li.class {
  90
+  background: url(images/ruby.png) no-repeat left 4px;
  91
+}
  92
+.indexpage li.file {
  93
+  background: url(images/page_white_text.png) no-repeat left 4px;
  94
+}
  95
+.indexpage li li {
  96
+  background: url(images/tag_blue.png) no-repeat left 4px;
  97
+}
  98
+.indexpage li .toc-toggle {
  99
+  width: 16px;
  100
+  height: 16px;
  101
+  background: url(images/add.png) no-repeat;
  102
+}
  103
+
  104
+.indexpage li .toc-toggle.open {
  105
+  background: url(images/delete.png) no-repeat;
  106
+}
  107
+
  108
+/* @end */
  109
+
  110
+/* @group Top-Level Structure */
  111
+
  112
+.project-section, #file-metadata, #class-metadata {
  113
+  display: block;
  114
+  background: #f5f5f5;
  115
+  margin-bottom: 1em;
  116
+  padding: 0.5em;
  117
+}
  118
+.project-section h3, #file-metadata h3, #class-metadata h3 {
  119
+  margin: 0;
  120
+}
  121
+
  122
+#metadata {
  123
+  float: left;
  124
+  width: 280px;
  125
+}
  126
+
  127
+#documentation {
  128
+  margin: 2em 1em 2em 300px;
  129
+}
  130
+
  131
+#validator-badges {
  132
+  clear: both;
  133
+  margin: 1em 1em 2em;
  134
+  font-size: smaller;
  135
+}
  136
+
  137
+/* @end */
  138
+
  139
+/* @group Metadata Section */
  140
+
  141
+#metadata ul,
  142
+#metadata dl,
  143
+#metadata p {
  144
+  padding: 0px;
  145
+  list-style: none;
  146
+}
  147
+
  148
+dl.svninfo {
  149
+  color: #666;
  150
+  margin: 0;
  151
+}
  152
+dl.svninfo dt {
  153
+  font-weight: bold;
  154
+}
  155
+
  156
+ul.link-list li {
  157
+  white-space: nowrap;
  158
+}
  159
+ul.link-list .type {
  160
+  font-size: 8px;
  161
+  text-transform: uppercase;
  162
+  color: white;
  163
+  background: #969696;
  164
+}
  165
+
  166
+/* @end */
  167
+
  168
+/* @group Documentation Section */
  169
+
  170
+.note-list {
  171
+  margin: 8px 0;
  172
+}
  173
+
  174
+.label-list {
  175
+  margin: 8px 1.5em;
  176
+  border: 1px solid #ccc;
  177
+}
  178
+.description .label-list {
  179
+  font-size: 14px;
  180
+}
  181
+
  182
+.note-list dt {
  183
+  font-weight: bold;
  184
+}
  185
+.note-list dd {
  186
+}
  187
+
  188
+.label-list dt {
  189
+  font-weight: bold;
  190
+  background: #ddd;
  191
+}
  192
+.label-list dd {
  193
+}
  194
+.label-list dd + dt,
  195
+.note-list dd + dt {
  196
+  margin-top: 0.7em;
  197
+}
  198
+
  199
+#documentation .section {
  200
+  font-size: 90%;
  201
+}
  202
+
  203
+#documentation h2.section-header {
  204
+  color: #333;
  205
+  font-size: 175%;
  206
+}
  207
+
  208
+.documentation-section-title {
  209
+  position: relative;
  210
+}
  211
+.documentation-section-title .section-click-top {
  212
+  position: absolute;
  213
+  top: 6px;
  214
+  right: 12px;
  215
+  font-size: 10px;
  216
+  visibility: hidden;
  217
+}
  218
+
  219
+.documentation-section-title:hover .section-click-top {
  220
+  visibility: visible;
  221
+}
  222
+
  223
+#documentation h3.section-header {
  224
+  color: #333;
  225
+  font-size: 150%;
  226
+}
  227
+
  228
+#constants-list > dl,
  229
+#attributes-list > dl {
  230
+  margin: 1em 0 2em;
  231
+  border: 0;
  232
+}
  233
+#constants-list > dl dt,
  234
+#attributes-list > dl dt {
  235
+  font-weight: bold;
  236
+  font-family: Monaco, "Andale Mono";
  237
+  background: inherit;
  238
+}
  239
+#constants-list > dl dt a,
  240
+#attributes-list > dl dt a {
  241
+  color: inherit;
  242
+}
  243
+#constants-list > dl dd,
  244
+#attributes-list > dl dd {
  245
+  margin: 0 0 1em 0;
  246
+  color: #666;
  247
+}
  248
+
  249
+.documentation-section h2 {
  250
+  position: relative;
  251
+}
  252
+
  253
+.documentation-section h2 a {
  254
+  position: absolute;
  255
+  top: 8px;
  256
+  right: 10px;
  257
+  font-size: 12px;
  258
+  color: #9b9877;
  259
+  visibility: hidden;
  260
+}
  261
+
  262
+.documentation-section h2:hover a {
  263
+  visibility: visible;
  264
+}
  265
+
  266
+/* @group Method Details */
  267
+
  268
+#documentation .method-source-code {
  269
+  display: none;
  270
+}
  271
+
  272
+#documentation .method-detail {
  273
+  margin: 0.2em 0.2em;
  274
+  padding: 0.5em;
  275
+}
  276
+#documentation .method-detail:hover {
  277
+  background-color: #f5f5f5;
  278
+}
  279
+#documentation .method-heading {
  280
+  cursor: pointer;
  281
+  position: relative;
  282
+  font-size: 125%;
  283
+  line-height: 125%;
  284
+  font-weight: bold;
  285
+  color: #333;
  286
+  background: url(images/brick.png) no-repeat left bottom;
  287
+  padding-left: 20px;
  288
+}
  289
+#documentation .method-heading :link,
  290
+#documentation .method-heading :visited {
  291
+  color: inherit;
  292
+}
  293
+#documentation .method-click-advice {
  294
+  position: absolute;
  295
+  right: 5px;
  296
+  font-size: 10px;
  297
+  color: #aaa;
  298
+  visibility: hidden;
  299
+  background: url(images/zoom.png) no-repeat right 5px;
  300
+  padding-right: 20px;
  301
+  overflow: show;
  302
+}
  303
+#documentation .method-heading:hover .method-click-advice {
  304
+  visibility: visible;
  305
+}
  306
+
  307
+#documentation .method-alias .method-heading {
  308
+  color: #666;
  309
+  background: url(images/brick_link.png) no-repeat left bottom;
  310
+}
  311
+
  312
+#documentation .method-description,
  313
+#documentation .aliases {
  314
+  margin: 0 20px;
  315
+  color: #666;
  316
+}
  317
+
  318
+#documentation .method-description p,
  319
+#documentation .aliases p {
  320
+  line-height: 1.2em;
  321
+}
  322
+
  323
+#documentation .aliases {
  324
+  font-style: italic;
  325
+  cursor: default;
  326
+}
  327
+#documentation .method-description p {
  328
+  margin-bottom: 0.5em;
  329
+}
  330
+#documentation .method-description ul {
  331
+  margin-left: 1.5em;
  332
+}
  333
+
  334
+#documentation .attribute-method-heading {
  335
+  background: url(images/tag_green.png) no-repeat left bottom;
  336
+}
  337
+#documentation #attribute-method-details .method-detail:hover {
  338
+  background-color: transparent;
  339
+  cursor: default;
  340
+}
  341
+#documentation .attribute-access-type {
  342
+  font-size: 60%;
  343
+  text-transform: uppercase;
  344
+  vertical-align: super;
  345
+}
  346
+
  347
+.method-section .method-source-code {
  348
+  background: white;
  349
+}
  350
+
  351
+/* @group Source Code */
  352
+
  353
+.ruby-constant .ruby-keyword .ruby-ivar .ruby-operator .ruby-identifier
  354
+.ruby-node .ruby-comment .ruby-regexp .ruby-value {
  355
+  background: transparent;
  356
+}
  357
+
  358
+/* Thanks GitHub!!! */
  359
+.ruby-constant   { color: #458; font-weight: bold; }
  360
+.ruby-keyword    { color: black; font-weight: bold; }
  361
+.ruby-ivar       { color: teal; }
  362
+.ruby-operator   { color: #000; }
  363
+.ruby-identifier { color: black; }
  364
+.ruby-node       { color: red; }
  365
+.ruby-comment    { color: #998; font-weight: bold; }
  366
+.ruby-regexp     { color: #009926; }
  367
+.ruby-value      { color: #099; }
  368
+.ruby-string     { color: red; }
  369
+
  370
+/* @group search results */
  371
+
  372
+#search-section .section-header {
  373
+  margin: 0;
  374
+  padding: 0;
  375
+}
  376
+
  377
+#search-results {
  378
+  width: 100%;
  379
+  list-style: none;
  380
+  margin: 0;
  381
+  padding: 0;
  382
+}
  383
+
  384
+#search-results h1 {
  385
+  font-size: 1em;
  386
+  font-weight: normal;
  387
+  text-shadow: none;
  388
+}
  389
+
  390
+#search-results .current {
  391
+  background: #eee;
  392
+}
  393
+
  394
+#search-results li {
  395
+  list-style: none;
  396
+  line-height: 1em;
  397
+  padding: 0.5em;
  398
+  border-bottom: 1px solid black;
  399
+}
  400
+
  401
+#search-results .search-namespace {
  402
+  font-weight: bold;
  403
+}
  404
+
  405
+#search-results li em {
  406
+  background: yellow;
  407
+  font-style: normal;
  408
+}
  409
+
  410
+#search-results pre {
  411
+  margin: 0.5em;
  412
+}

0 notes on commit 49ed319

Please sign in to comment.
Something went wrong with that request. Please try again.