diy_rails 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/Gemfile +8 -0
- data/Gemfile.lock +21 -0
- data/README.md +29 -0
- data/Rakefile +4 -0
- data/lib/diy_rails/version.rb +5 -0
- data/lib/diy_rails.rb +8 -0
- data/sig/diy_rails.rbs +4 -0
- data/vendor/bundle/ruby/3.0.0/bin/rackup +29 -0
- data/vendor/bundle/ruby/3.0.0/bin/rake +29 -0
- data/vendor/bundle/ruby/3.0.0/cache/rack-2.2.4.gem +0 -0
- data/vendor/bundle/ruby/3.0.0/cache/rake-13.0.6.gem +0 -0
- data/vendor/bundle/ruby/3.0.0/gems/rack-2.2.4/CHANGELOG.md +708 -0
- data/vendor/bundle/ruby/3.0.0/gems/rack-2.2.4/CONTRIBUTING.md +136 -0
- data/vendor/bundle/ruby/3.0.0/gems/rack-2.2.4/MIT-LICENSE +20 -0
- data/vendor/bundle/ruby/3.0.0/gems/rack-2.2.4/README.rdoc +306 -0
- data/vendor/bundle/ruby/3.0.0/gems/rack-2.2.4/Rakefile +130 -0
- data/vendor/bundle/ruby/3.0.0/gems/rack-2.2.4/SPEC.rdoc +288 -0
- data/vendor/bundle/ruby/3.0.0/gems/rack-2.2.4/bin/rackup +5 -0
- data/vendor/bundle/ruby/3.0.0/gems/rack-2.2.4/contrib/rack.png +0 -0
- data/vendor/bundle/ruby/3.0.0/gems/rack-2.2.4/contrib/rack.svg +150 -0
- data/vendor/bundle/ruby/3.0.0/gems/rack-2.2.4/contrib/rack_logo.svg +164 -0
- data/vendor/bundle/ruby/3.0.0/gems/rack-2.2.4/contrib/rdoc.css +412 -0
- data/vendor/bundle/ruby/3.0.0/gems/rack-2.2.4/example/lobster.ru +6 -0
- data/vendor/bundle/ruby/3.0.0/gems/rack-2.2.4/example/protectedlobster.rb +16 -0
- data/vendor/bundle/ruby/3.0.0/gems/rack-2.2.4/example/protectedlobster.ru +10 -0
- data/vendor/bundle/ruby/3.0.0/gems/rack-2.2.4/lib/rack/auth/abstract/handler.rb +39 -0
- data/vendor/bundle/ruby/3.0.0/gems/rack-2.2.4/lib/rack/auth/abstract/request.rb +47 -0
- data/vendor/bundle/ruby/3.0.0/gems/rack-2.2.4/lib/rack/auth/basic.rb +61 -0
- data/vendor/bundle/ruby/3.0.0/gems/rack-2.2.4/lib/rack/auth/digest/md5.rb +131 -0
- data/vendor/bundle/ruby/3.0.0/gems/rack-2.2.4/lib/rack/auth/digest/nonce.rb +54 -0
- data/vendor/bundle/ruby/3.0.0/gems/rack-2.2.4/lib/rack/auth/digest/params.rb +54 -0
- data/vendor/bundle/ruby/3.0.0/gems/rack-2.2.4/lib/rack/auth/digest/request.rb +43 -0
- data/vendor/bundle/ruby/3.0.0/gems/rack-2.2.4/lib/rack/body_proxy.rb +45 -0
- data/vendor/bundle/ruby/3.0.0/gems/rack-2.2.4/lib/rack/builder.rb +257 -0
- data/vendor/bundle/ruby/3.0.0/gems/rack-2.2.4/lib/rack/cascade.rb +68 -0
- data/vendor/bundle/ruby/3.0.0/gems/rack-2.2.4/lib/rack/chunked.rb +117 -0
- data/vendor/bundle/ruby/3.0.0/gems/rack-2.2.4/lib/rack/common_logger.rb +83 -0
- data/vendor/bundle/ruby/3.0.0/gems/rack-2.2.4/lib/rack/conditional_get.rb +83 -0
- data/vendor/bundle/ruby/3.0.0/gems/rack-2.2.4/lib/rack/config.rb +22 -0
- data/vendor/bundle/ruby/3.0.0/gems/rack-2.2.4/lib/rack/content_length.rb +38 -0
- data/vendor/bundle/ruby/3.0.0/gems/rack-2.2.4/lib/rack/content_type.rb +30 -0
- data/vendor/bundle/ruby/3.0.0/gems/rack-2.2.4/lib/rack/core_ext/regexp.rb +14 -0
- data/vendor/bundle/ruby/3.0.0/gems/rack-2.2.4/lib/rack/deflater.rb +144 -0
- data/vendor/bundle/ruby/3.0.0/gems/rack-2.2.4/lib/rack/directory.rb +199 -0
- data/vendor/bundle/ruby/3.0.0/gems/rack-2.2.4/lib/rack/etag.rb +77 -0
- data/vendor/bundle/ruby/3.0.0/gems/rack-2.2.4/lib/rack/events.rb +153 -0
- data/vendor/bundle/ruby/3.0.0/gems/rack-2.2.4/lib/rack/file.rb +7 -0
- data/vendor/bundle/ruby/3.0.0/gems/rack-2.2.4/lib/rack/files.rb +218 -0
- data/vendor/bundle/ruby/3.0.0/gems/rack-2.2.4/lib/rack/handler/cgi.rb +59 -0
- data/vendor/bundle/ruby/3.0.0/gems/rack-2.2.4/lib/rack/handler/fastcgi.rb +100 -0
- data/vendor/bundle/ruby/3.0.0/gems/rack-2.2.4/lib/rack/handler/lsws.rb +61 -0
- data/vendor/bundle/ruby/3.0.0/gems/rack-2.2.4/lib/rack/handler/scgi.rb +71 -0
- data/vendor/bundle/ruby/3.0.0/gems/rack-2.2.4/lib/rack/handler/thin.rb +36 -0
- data/vendor/bundle/ruby/3.0.0/gems/rack-2.2.4/lib/rack/handler/webrick.rb +129 -0
- data/vendor/bundle/ruby/3.0.0/gems/rack-2.2.4/lib/rack/handler.rb +104 -0
- data/vendor/bundle/ruby/3.0.0/gems/rack-2.2.4/lib/rack/head.rb +25 -0
- data/vendor/bundle/ruby/3.0.0/gems/rack-2.2.4/lib/rack/lint.rb +806 -0
- data/vendor/bundle/ruby/3.0.0/gems/rack-2.2.4/lib/rack/lobster.rb +70 -0
- data/vendor/bundle/ruby/3.0.0/gems/rack-2.2.4/lib/rack/lock.rb +32 -0
- data/vendor/bundle/ruby/3.0.0/gems/rack-2.2.4/lib/rack/logger.rb +20 -0
- data/vendor/bundle/ruby/3.0.0/gems/rack-2.2.4/lib/rack/media_type.rb +43 -0
- data/vendor/bundle/ruby/3.0.0/gems/rack-2.2.4/lib/rack/method_override.rb +52 -0
- data/vendor/bundle/ruby/3.0.0/gems/rack-2.2.4/lib/rack/mime.rb +685 -0
- data/vendor/bundle/ruby/3.0.0/gems/rack-2.2.4/lib/rack/mock.rb +273 -0
- data/vendor/bundle/ruby/3.0.0/gems/rack-2.2.4/lib/rack/multipart/generator.rb +97 -0
- data/vendor/bundle/ruby/3.0.0/gems/rack-2.2.4/lib/rack/multipart/parser.rb +365 -0
- data/vendor/bundle/ruby/3.0.0/gems/rack-2.2.4/lib/rack/multipart/uploaded_file.rb +41 -0
- data/vendor/bundle/ruby/3.0.0/gems/rack-2.2.4/lib/rack/multipart.rb +64 -0
- data/vendor/bundle/ruby/3.0.0/gems/rack-2.2.4/lib/rack/null_logger.rb +39 -0
- data/vendor/bundle/ruby/3.0.0/gems/rack-2.2.4/lib/rack/query_parser.rb +221 -0
- data/vendor/bundle/ruby/3.0.0/gems/rack-2.2.4/lib/rack/recursive.rb +64 -0
- data/vendor/bundle/ruby/3.0.0/gems/rack-2.2.4/lib/rack/reloader.rb +114 -0
- data/vendor/bundle/ruby/3.0.0/gems/rack-2.2.4/lib/rack/request.rb +659 -0
- data/vendor/bundle/ruby/3.0.0/gems/rack-2.2.4/lib/rack/response.rb +318 -0
- data/vendor/bundle/ruby/3.0.0/gems/rack-2.2.4/lib/rack/rewindable_input.rb +94 -0
- data/vendor/bundle/ruby/3.0.0/gems/rack-2.2.4/lib/rack/runtime.rb +34 -0
- data/vendor/bundle/ruby/3.0.0/gems/rack-2.2.4/lib/rack/sendfile.rb +162 -0
- data/vendor/bundle/ruby/3.0.0/gems/rack-2.2.4/lib/rack/server.rb +466 -0
- data/vendor/bundle/ruby/3.0.0/gems/rack-2.2.4/lib/rack/session/abstract/id.rb +523 -0
- data/vendor/bundle/ruby/3.0.0/gems/rack-2.2.4/lib/rack/session/cookie.rb +203 -0
- data/vendor/bundle/ruby/3.0.0/gems/rack-2.2.4/lib/rack/session/memcache.rb +10 -0
- data/vendor/bundle/ruby/3.0.0/gems/rack-2.2.4/lib/rack/session/pool.rb +85 -0
- data/vendor/bundle/ruby/3.0.0/gems/rack-2.2.4/lib/rack/show_exceptions.rb +390 -0
- data/vendor/bundle/ruby/3.0.0/gems/rack-2.2.4/lib/rack/show_status.rb +113 -0
- data/vendor/bundle/ruby/3.0.0/gems/rack-2.2.4/lib/rack/static.rb +187 -0
- data/vendor/bundle/ruby/3.0.0/gems/rack-2.2.4/lib/rack/tempfile_reaper.rb +22 -0
- data/vendor/bundle/ruby/3.0.0/gems/rack-2.2.4/lib/rack/urlmap.rb +97 -0
- data/vendor/bundle/ruby/3.0.0/gems/rack-2.2.4/lib/rack/utils.rb +616 -0
- data/vendor/bundle/ruby/3.0.0/gems/rack-2.2.4/lib/rack/version.rb +29 -0
- data/vendor/bundle/ruby/3.0.0/gems/rack-2.2.4/lib/rack.rb +141 -0
- data/vendor/bundle/ruby/3.0.0/gems/rack-2.2.4/rack.gemspec +46 -0
- data/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/History.rdoc +2403 -0
- data/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/MIT-LICENSE +21 -0
- data/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/README.rdoc +155 -0
- data/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/doc/command_line_usage.rdoc +158 -0
- data/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/doc/example/Rakefile1 +38 -0
- data/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/doc/example/Rakefile2 +35 -0
- data/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/doc/example/a.c +6 -0
- data/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/doc/example/b.c +6 -0
- data/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/doc/example/main.c +11 -0
- data/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/doc/glossary.rdoc +42 -0
- data/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/doc/jamis.rb +592 -0
- data/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/doc/proto_rake.rdoc +127 -0
- data/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/doc/rake.1 +156 -0
- data/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/doc/rakefile.rdoc +622 -0
- data/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/doc/rational.rdoc +151 -0
- data/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/exe/rake +27 -0
- data/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/application.rb +831 -0
- data/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/backtrace.rb +24 -0
- data/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/clean.rb +78 -0
- data/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/cloneable.rb +17 -0
- data/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/cpu_counter.rb +107 -0
- data/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/default_loader.rb +15 -0
- data/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/dsl_definition.rb +195 -0
- data/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/early_time.rb +22 -0
- data/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/ext/core.rb +26 -0
- data/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/ext/string.rb +176 -0
- data/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/file_creation_task.rb +25 -0
- data/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/file_list.rb +435 -0
- data/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/file_task.rb +54 -0
- data/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/file_utils.rb +134 -0
- data/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/file_utils_ext.rb +134 -0
- data/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/invocation_chain.rb +57 -0
- data/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/invocation_exception_mixin.rb +17 -0
- data/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/late_time.rb +18 -0
- data/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/linked_list.rb +112 -0
- data/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/loaders/makefile.rb +54 -0
- data/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/multi_task.rb +14 -0
- data/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/name_space.rb +38 -0
- data/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/packagetask.rb +222 -0
- data/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/phony.rb +16 -0
- data/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/private_reader.rb +21 -0
- data/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/promise.rb +100 -0
- data/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/pseudo_status.rb +30 -0
- data/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/rake_module.rb +67 -0
- data/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/rake_test_loader.rb +27 -0
- data/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/rule_recursion_overflow_error.rb +20 -0
- data/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/scope.rb +43 -0
- data/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/task.rb +434 -0
- data/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/task_argument_error.rb +8 -0
- data/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/task_arguments.rb +109 -0
- data/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/task_manager.rb +331 -0
- data/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/tasklib.rb +12 -0
- data/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/testtask.rb +189 -0
- data/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/thread_history_display.rb +49 -0
- data/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/thread_pool.rb +163 -0
- data/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/trace_output.rb +23 -0
- data/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/version.rb +10 -0
- data/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/win32.rb +51 -0
- data/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake.rb +71 -0
- data/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/rake.gemspec +100 -0
- data/vendor/bundle/ruby/3.0.0/specifications/rack-2.2.4.gemspec +41 -0
- data/vendor/bundle/ruby/3.0.0/specifications/rake-13.0.6.gemspec +26 -0
- metadata +210 -0
@@ -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,0 +1,16 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'rack'
|
4
|
+
require 'rack/lobster'
|
5
|
+
|
6
|
+
lobster = Rack::Lobster.new
|
7
|
+
|
8
|
+
protected_lobster = Rack::Auth::Basic.new(lobster) do |username, password|
|
9
|
+
Rack::Utils.secure_compare('secret', password)
|
10
|
+
end
|
11
|
+
|
12
|
+
protected_lobster.realm = 'Lobster 2.0'
|
13
|
+
|
14
|
+
pretty_protected_lobster = Rack::ShowStatus.new(Rack::ShowExceptions.new(protected_lobster))
|
15
|
+
|
16
|
+
Rack::Server.start app: pretty_protected_lobster, Port: 9292
|
@@ -0,0 +1,39 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Rack
|
4
|
+
module Auth
|
5
|
+
# Rack::Auth::AbstractHandler implements common authentication functionality.
|
6
|
+
#
|
7
|
+
# +realm+ should be set for all handlers.
|
8
|
+
|
9
|
+
class AbstractHandler
|
10
|
+
|
11
|
+
attr_accessor :realm
|
12
|
+
|
13
|
+
def initialize(app, realm = nil, &authenticator)
|
14
|
+
@app, @realm, @authenticator = app, realm, authenticator
|
15
|
+
end
|
16
|
+
|
17
|
+
|
18
|
+
private
|
19
|
+
|
20
|
+
def unauthorized(www_authenticate = challenge)
|
21
|
+
return [ 401,
|
22
|
+
{ CONTENT_TYPE => 'text/plain',
|
23
|
+
CONTENT_LENGTH => '0',
|
24
|
+
'WWW-Authenticate' => www_authenticate.to_s },
|
25
|
+
[]
|
26
|
+
]
|
27
|
+
end
|
28
|
+
|
29
|
+
def bad_request
|
30
|
+
return [ 400,
|
31
|
+
{ CONTENT_TYPE => 'text/plain',
|
32
|
+
CONTENT_LENGTH => '0' },
|
33
|
+
[]
|
34
|
+
]
|
35
|
+
end
|
36
|
+
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Rack
|
4
|
+
module Auth
|
5
|
+
class AbstractRequest
|
6
|
+
|
7
|
+
def initialize(env)
|
8
|
+
@env = env
|
9
|
+
end
|
10
|
+
|
11
|
+
def request
|
12
|
+
@request ||= Request.new(@env)
|
13
|
+
end
|
14
|
+
|
15
|
+
def provided?
|
16
|
+
!authorization_key.nil? && valid?
|
17
|
+
end
|
18
|
+
|
19
|
+
def valid?
|
20
|
+
!@env[authorization_key].nil?
|
21
|
+
end
|
22
|
+
|
23
|
+
def parts
|
24
|
+
@parts ||= @env[authorization_key].split(' ', 2)
|
25
|
+
end
|
26
|
+
|
27
|
+
def scheme
|
28
|
+
@scheme ||= parts.first && parts.first.downcase
|
29
|
+
end
|
30
|
+
|
31
|
+
def params
|
32
|
+
@params ||= parts.last
|
33
|
+
end
|
34
|
+
|
35
|
+
|
36
|
+
private
|
37
|
+
|
38
|
+
AUTHORIZATION_KEYS = ['HTTP_AUTHORIZATION', 'X-HTTP_AUTHORIZATION', 'X_HTTP_AUTHORIZATION']
|
39
|
+
|
40
|
+
def authorization_key
|
41
|
+
@authorization_key ||= AUTHORIZATION_KEYS.detect { |key| @env.has_key?(key) }
|
42
|
+
end
|
43
|
+
|
44
|
+
end
|
45
|
+
|
46
|
+
end
|
47
|
+
end
|
@@ -0,0 +1,61 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative 'abstract/handler'
|
4
|
+
require_relative 'abstract/request'
|
5
|
+
require 'base64'
|
6
|
+
|
7
|
+
module Rack
|
8
|
+
module Auth
|
9
|
+
# Rack::Auth::Basic implements HTTP Basic Authentication, as per RFC 2617.
|
10
|
+
#
|
11
|
+
# Initialize with the Rack application that you want protecting,
|
12
|
+
# and a block that checks if a username and password pair are valid.
|
13
|
+
#
|
14
|
+
# See also: <tt>example/protectedlobster.rb</tt>
|
15
|
+
|
16
|
+
class Basic < AbstractHandler
|
17
|
+
|
18
|
+
def call(env)
|
19
|
+
auth = Basic::Request.new(env)
|
20
|
+
|
21
|
+
return unauthorized unless auth.provided?
|
22
|
+
|
23
|
+
return bad_request unless auth.basic?
|
24
|
+
|
25
|
+
if valid?(auth)
|
26
|
+
env['REMOTE_USER'] = auth.username
|
27
|
+
|
28
|
+
return @app.call(env)
|
29
|
+
end
|
30
|
+
|
31
|
+
unauthorized
|
32
|
+
end
|
33
|
+
|
34
|
+
|
35
|
+
private
|
36
|
+
|
37
|
+
def challenge
|
38
|
+
'Basic realm="%s"' % realm
|
39
|
+
end
|
40
|
+
|
41
|
+
def valid?(auth)
|
42
|
+
@authenticator.call(*auth.credentials)
|
43
|
+
end
|
44
|
+
|
45
|
+
class Request < Auth::AbstractRequest
|
46
|
+
def basic?
|
47
|
+
"basic" == scheme && credentials.length == 2
|
48
|
+
end
|
49
|
+
|
50
|
+
def credentials
|
51
|
+
@credentials ||= Base64.decode64(params).split(':', 2)
|
52
|
+
end
|
53
|
+
|
54
|
+
def username
|
55
|
+
credentials.first
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
@@ -0,0 +1,131 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative '../abstract/handler'
|
4
|
+
require_relative 'request'
|
5
|
+
require_relative 'params'
|
6
|
+
require_relative 'nonce'
|
7
|
+
require 'digest/md5'
|
8
|
+
|
9
|
+
module Rack
|
10
|
+
module Auth
|
11
|
+
module Digest
|
12
|
+
# Rack::Auth::Digest::MD5 implements the MD5 algorithm version of
|
13
|
+
# HTTP Digest Authentication, as per RFC 2617.
|
14
|
+
#
|
15
|
+
# Initialize with the [Rack] application that you want protecting,
|
16
|
+
# and a block that looks up a plaintext password for a given username.
|
17
|
+
#
|
18
|
+
# +opaque+ needs to be set to a constant base64/hexadecimal string.
|
19
|
+
#
|
20
|
+
class MD5 < AbstractHandler
|
21
|
+
|
22
|
+
attr_accessor :opaque
|
23
|
+
|
24
|
+
attr_writer :passwords_hashed
|
25
|
+
|
26
|
+
def initialize(app, realm = nil, opaque = nil, &authenticator)
|
27
|
+
@passwords_hashed = nil
|
28
|
+
if opaque.nil? and realm.respond_to? :values_at
|
29
|
+
realm, opaque, @passwords_hashed = realm.values_at :realm, :opaque, :passwords_hashed
|
30
|
+
end
|
31
|
+
super(app, realm, &authenticator)
|
32
|
+
@opaque = opaque
|
33
|
+
end
|
34
|
+
|
35
|
+
def passwords_hashed?
|
36
|
+
!!@passwords_hashed
|
37
|
+
end
|
38
|
+
|
39
|
+
def call(env)
|
40
|
+
auth = Request.new(env)
|
41
|
+
|
42
|
+
unless auth.provided?
|
43
|
+
return unauthorized
|
44
|
+
end
|
45
|
+
|
46
|
+
if !auth.digest? || !auth.correct_uri? || !valid_qop?(auth)
|
47
|
+
return bad_request
|
48
|
+
end
|
49
|
+
|
50
|
+
if valid?(auth)
|
51
|
+
if auth.nonce.stale?
|
52
|
+
return unauthorized(challenge(stale: true))
|
53
|
+
else
|
54
|
+
env['REMOTE_USER'] = auth.username
|
55
|
+
|
56
|
+
return @app.call(env)
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
unauthorized
|
61
|
+
end
|
62
|
+
|
63
|
+
|
64
|
+
private
|
65
|
+
|
66
|
+
QOP = 'auth'
|
67
|
+
|
68
|
+
def params(hash = {})
|
69
|
+
Params.new do |params|
|
70
|
+
params['realm'] = realm
|
71
|
+
params['nonce'] = Nonce.new.to_s
|
72
|
+
params['opaque'] = H(opaque)
|
73
|
+
params['qop'] = QOP
|
74
|
+
|
75
|
+
hash.each { |k, v| params[k] = v }
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
def challenge(hash = {})
|
80
|
+
"Digest #{params(hash)}"
|
81
|
+
end
|
82
|
+
|
83
|
+
def valid?(auth)
|
84
|
+
valid_opaque?(auth) && valid_nonce?(auth) && valid_digest?(auth)
|
85
|
+
end
|
86
|
+
|
87
|
+
def valid_qop?(auth)
|
88
|
+
QOP == auth.qop
|
89
|
+
end
|
90
|
+
|
91
|
+
def valid_opaque?(auth)
|
92
|
+
H(opaque) == auth.opaque
|
93
|
+
end
|
94
|
+
|
95
|
+
def valid_nonce?(auth)
|
96
|
+
auth.nonce.valid?
|
97
|
+
end
|
98
|
+
|
99
|
+
def valid_digest?(auth)
|
100
|
+
pw = @authenticator.call(auth.username)
|
101
|
+
pw && Rack::Utils.secure_compare(digest(auth, pw), auth.response)
|
102
|
+
end
|
103
|
+
|
104
|
+
def md5(data)
|
105
|
+
::Digest::MD5.hexdigest(data)
|
106
|
+
end
|
107
|
+
|
108
|
+
alias :H :md5
|
109
|
+
|
110
|
+
def KD(secret, data)
|
111
|
+
H "#{secret}:#{data}"
|
112
|
+
end
|
113
|
+
|
114
|
+
def A1(auth, password)
|
115
|
+
"#{auth.username}:#{auth.realm}:#{password}"
|
116
|
+
end
|
117
|
+
|
118
|
+
def A2(auth)
|
119
|
+
"#{auth.method}:#{auth.uri}"
|
120
|
+
end
|
121
|
+
|
122
|
+
def digest(auth, password)
|
123
|
+
password_hash = passwords_hashed? ? password : H(A1(auth, password))
|
124
|
+
|
125
|
+
KD password_hash, "#{auth.nonce}:#{auth.nc}:#{auth.cnonce}:#{QOP}:#{H A2(auth)}"
|
126
|
+
end
|
127
|
+
|
128
|
+
end
|
129
|
+
end
|
130
|
+
end
|
131
|
+
end
|