rack-simple_auth 1.0.0rc → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (57) hide show
  1. checksums.yaml +7 -7
  2. data/MANIFEST +26 -26
  3. data/README.rdoc +121 -0
  4. data/checksum/rack-simple_auth-1.0.0.gem.sha512 +1 -0
  5. data/checksum/rack-simple_auth-1.0.0rc.gem.sha512 +1 -0
  6. data/doc/Rack.html +128 -0
  7. data/doc/Rack/SimpleAuth.html +252 -0
  8. data/doc/Rack/SimpleAuth/HMAC.html +128 -0
  9. data/doc/Rack/SimpleAuth/HMAC/Config.html +1003 -0
  10. data/doc/Rack/SimpleAuth/HMAC/Middleware.html +1418 -0
  11. data/doc/Rack/SimpleAuth/Logger.html +264 -0
  12. data/doc/_index.html +185 -0
  13. data/doc/class_list.html +54 -0
  14. data/doc/css/common.css +1 -0
  15. data/doc/css/full_list.css +57 -0
  16. data/doc/css/style.css +339 -0
  17. data/doc/examples/index.php +32 -0
  18. data/{test/rack/simple_auth/hmac/config.ru → doc/examples/rack_lobster.ru} +1 -2
  19. data/doc/file.README.html +221 -0
  20. data/doc/file_list.html +56 -0
  21. data/doc/frames.html +26 -0
  22. data/doc/index.html +221 -0
  23. data/doc/js/app.js +219 -0
  24. data/doc/js/full_list.js +178 -0
  25. data/doc/js/jquery.js +4 -0
  26. data/doc/method_list.html +179 -0
  27. data/doc/top-level-namespace.html +112 -0
  28. data/lib/rack/simple_auth.rb +3 -1
  29. data/lib/rack/simple_auth/hmac/config.rb +46 -8
  30. data/lib/rack/simple_auth/hmac/middleware.rb +102 -75
  31. data/lib/rack/simple_auth/logger.rb +8 -3
  32. data/lib/rack/simple_auth/version.rb +1 -1
  33. metadata +91 -105
  34. data/.gitignore +0 -18
  35. data/.rubocop.yml +0 -1
  36. data/.travis.yml +0 -22
  37. data/.yardopts +0 -1
  38. data/Gemfile +0 -4
  39. data/README.md +0 -68
  40. data/Rakefile +0 -8
  41. data/rubocop-todo.yml +0 -19
  42. data/task/build.rake +0 -4
  43. data/task/checksum.rake +0 -15
  44. data/task/console.rake +0 -7
  45. data/task/default.rake +0 -6
  46. data/task/floodtest.rake +0 -34
  47. data/task/manifest.rake +0 -8
  48. data/task/test.rake +0 -23
  49. data/test/rack/simple_auth/hmac/config_fail.ru +0 -23
  50. data/test/rack/simple_auth/hmac/config_fail_option.ru +0 -24
  51. data/test/rack/simple_auth/hmac/config_fail_run.ru +0 -22
  52. data/test/rack/simple_auth/hmac/config_fail_step.ru +0 -23
  53. data/test/rack/simple_auth/hmac/config_fail_tolerance.ru +0 -23
  54. data/test/rack/simple_auth/hmac/hmac_fail_run_test.rb +0 -26
  55. data/test/rack/simple_auth/hmac/hmac_fail_test.rb +0 -38
  56. data/test/rack/simple_auth/hmac/hmac_test.rb +0 -128
  57. data/test/test_helper.rb +0 -50
@@ -0,0 +1,264 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>
7
+ Module: Rack::SimpleAuth::Logger
8
+
9
+ &mdash; Documentation by YARD 0.8.7.4
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../../css/style.css" type="text/css" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="../../css/common.css" type="text/css" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ hasFrames = window.top.frames.main ? true : false;
19
+ relpath = '../../';
20
+ framesUrl = "../../frames.html#!Rack/SimpleAuth/Logger.html";
21
+ </script>
22
+
23
+
24
+ <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
25
+
26
+ <script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
27
+
28
+
29
+ </head>
30
+ <body>
31
+ <div id="header">
32
+ <div id="menu">
33
+
34
+ <a href="../../_index.html">Index (L)</a> &raquo;
35
+ <span class='title'><span class='object_link'><a href="../../Rack.html" title="Rack (module)">Rack</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../SimpleAuth.html" title="Rack::SimpleAuth (module)">SimpleAuth</a></span></span>
36
+ &raquo;
37
+ <span class="title">Logger</span>
38
+
39
+
40
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
41
+ </div>
42
+
43
+ <div id="search">
44
+
45
+ <a class="full_list_link" id="class_list_link"
46
+ href="../../class_list.html">
47
+ Class List
48
+ </a>
49
+
50
+ <a class="full_list_link" id="method_list_link"
51
+ href="../../method_list.html">
52
+ Method List
53
+ </a>
54
+
55
+ <a class="full_list_link" id="file_list_link"
56
+ href="../../file_list.html">
57
+ File List
58
+ </a>
59
+
60
+ </div>
61
+ <div class="clear"></div>
62
+ </div>
63
+
64
+ <iframe id="search_frame"></iframe>
65
+
66
+ <div id="content"><h1>Module: Rack::SimpleAuth::Logger
67
+
68
+
69
+
70
+ </h1>
71
+
72
+ <dl class="box">
73
+
74
+
75
+
76
+
77
+
78
+
79
+
80
+
81
+ <dt class="r1 last">Defined in:</dt>
82
+ <dd class="r1 last">lib/rack/simple_auth/logger.rb</dd>
83
+
84
+ </dl>
85
+ <div class="clear"></div>
86
+
87
+ <h2>Overview</h2><div class="docstring">
88
+ <div class="discussion">
89
+
90
+ <p>class Logger This class receives a logpath, env and message and prints the
91
+ message to the specified logpath for the proper env file (eg.:
92
+ /path/to/file/test_error.log for test env)</p>
93
+
94
+
95
+ </div>
96
+ </div>
97
+ <div class="tags">
98
+
99
+
100
+ </div>
101
+
102
+
103
+
104
+
105
+
106
+
107
+
108
+ <h2>
109
+ Class Method Summary
110
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
111
+ </h2>
112
+
113
+ <ul class="summary">
114
+
115
+ <li class="public ">
116
+ <span class="summary_signature">
117
+
118
+ <a href="#log-class_method" title="log (class method)">+ (Object) <strong>log</strong>(logpath, verbose = false, env, msg) </a>
119
+
120
+
121
+
122
+ </span>
123
+
124
+
125
+
126
+
127
+
128
+
129
+
130
+
131
+
132
+ <span class="summary_desc"><div class='inline'>
133
+ <p>Create Logfile.</p>
134
+ </div></span>
135
+
136
+ </li>
137
+
138
+
139
+ </ul>
140
+
141
+
142
+
143
+
144
+ <div id="class_method_details" class="method_details_list">
145
+ <h2>Class Method Details</h2>
146
+
147
+
148
+ <div class="method_details first">
149
+ <h3 class="signature first" id="log-class_method">
150
+
151
+ + (<tt>Object</tt>) <strong>log</strong>(logpath, verbose = false, env, msg)
152
+
153
+
154
+
155
+
156
+
157
+ </h3><div class="docstring">
158
+ <div class="discussion">
159
+
160
+ <p>Create Logfile</p>
161
+
162
+
163
+ </div>
164
+ </div>
165
+ <div class="tags">
166
+ <p class="tag_title">Parameters:</p>
167
+ <ul class="param">
168
+
169
+ <li>
170
+
171
+ <span class='name'>logpath</span>
172
+
173
+
174
+ <span class='type'>(<tt>String</tt>)</span>
175
+
176
+
177
+
178
+ &mdash;
179
+ <div class='inline'><dl class="rdoc-list label-list"><dt>path to logfile
180
+ <dd></dd></dl>
181
+ </div>
182
+
183
+ </li>
184
+
185
+ <li>
186
+
187
+ <span class='name'>verbose</span>
188
+
189
+
190
+ <span class='type'>(<tt>TrueClass|FalseClass</tt>)</span>
191
+
192
+
193
+ <em class="default">(defaults to: <tt>false</tt>)</em>
194
+
195
+
196
+ &mdash;
197
+ <div class='inline'><dl class="rdoc-list label-list"><dt>if true print to stdout
198
+ <dd></dd></dl>
199
+ </div>
200
+
201
+ </li>
202
+
203
+ <li>
204
+
205
+ <span class='name'>msg</span>
206
+
207
+
208
+ <span class='type'>(<tt>String</tt>)</span>
209
+
210
+
211
+
212
+ &mdash;
213
+ <div class='inline'><dl class="rdoc-list label-list"><dt>Message defined by each Authorization class
214
+ <dd></dd></dl>
215
+ </div>
216
+
217
+ </li>
218
+
219
+ </ul>
220
+
221
+
222
+ </div><table class="source_code">
223
+ <tr>
224
+ <td>
225
+ <pre class="lines">
226
+
227
+
228
+ 13
229
+ 14
230
+ 15
231
+ 16
232
+ 17
233
+ 18
234
+ 19
235
+ 20</pre>
236
+ </td>
237
+ <td>
238
+ <pre class="code"><span class="info file"># File 'lib/rack/simple_auth/logger.rb', line 13</span>
239
+
240
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_log'>log</span><span class='lparen'>(</span><span class='id identifier rubyid_logpath'>logpath</span><span class='comma'>,</span> <span class='id identifier rubyid_verbose'>verbose</span> <span class='op'>=</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='id identifier rubyid_env'>env</span><span class='comma'>,</span> <span class='id identifier rubyid_msg'>msg</span><span class='rparen'>)</span>
241
+ <span class='id identifier rubyid_system'>system</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>mkdir </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_logpath'>logpath</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='const'>Dir</span><span class='period'>.</span><span class='id identifier rubyid_exist?'>exist?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_logpath'>logpath</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
242
+ <span class='id identifier rubyid_open'>open</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_logpath'>logpath</span><span class='embexpr_end'>}</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_env'>env</span><span class='embexpr_end'>}</span><span class='tstring_content'>_error.log</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>a</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_f'>f</span><span class='op'>|</span>
243
+ <span class='id identifier rubyid_f'>f</span> <span class='op'>&lt;&lt;</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_msg'>msg</span><span class='embexpr_end'>}</span><span class='tstring_content'>\n</span><span class='tstring_end'>&quot;</span></span>
244
+ <span class='kw'>end</span>
245
+
246
+ <span class='id identifier rubyid_puts'>puts</span> <span class='id identifier rubyid_msg'>msg</span> <span class='kw'>if</span> <span class='id identifier rubyid_verbose'>verbose</span>
247
+ <span class='kw'>end</span></pre>
248
+ </td>
249
+ </tr>
250
+ </table>
251
+ </div>
252
+
253
+ </div>
254
+
255
+ </div>
256
+
257
+ <div id="footer">
258
+ Generated on Wed Apr 30 09:50:21 2014 by
259
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
260
+ 0.8.7.4 (ruby-2.1.1).
261
+ </div>
262
+
263
+ </body>
264
+ </html>
data/doc/_index.html ADDED
@@ -0,0 +1,185 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>
7
+ Documentation by YARD 0.8.7.4
8
+
9
+ </title>
10
+
11
+ <link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
12
+
13
+ <link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
14
+
15
+ <script type="text/javascript" charset="utf-8">
16
+ hasFrames = window.top.frames.main ? true : false;
17
+ relpath = '';
18
+ framesUrl = "frames.html#!_index.html";
19
+ </script>
20
+
21
+
22
+ <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
23
+
24
+ <script type="text/javascript" charset="utf-8" src="js/app.js"></script>
25
+
26
+
27
+ </head>
28
+ <body>
29
+ <div id="header">
30
+ <div id="menu">
31
+
32
+
33
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
34
+ </div>
35
+
36
+ <div id="search">
37
+
38
+ <a class="full_list_link" id="class_list_link"
39
+ href="class_list.html">
40
+ Class List
41
+ </a>
42
+
43
+ <a class="full_list_link" id="method_list_link"
44
+ href="method_list.html">
45
+ Method List
46
+ </a>
47
+
48
+ <a class="full_list_link" id="file_list_link"
49
+ href="file_list.html">
50
+ File List
51
+ </a>
52
+
53
+ </div>
54
+ <div class="clear"></div>
55
+ </div>
56
+
57
+ <iframe id="search_frame"></iframe>
58
+
59
+ <div id="content"><h1 class="noborder title">Documentation by YARD 0.8.7.4</h1>
60
+ <div id="listing">
61
+ <h1 class="alphaindex">Alphabetic Index</h1>
62
+
63
+ <h2>File Listing</h2>
64
+ <ul id="files" class="index_inline_list">
65
+
66
+
67
+ <li class="r1"><a href="index.html" title="README">README</a></li>
68
+
69
+
70
+ </ul>
71
+
72
+ <div class="clear"></div>
73
+ <h2>Namespace Listing A-Z</h2>
74
+
75
+
76
+
77
+
78
+ <table>
79
+ <tr>
80
+ <td valign='top' width="33%">
81
+
82
+
83
+ <ul id="alpha_C" class="alpha">
84
+ <li class="letter">C</li>
85
+ <ul>
86
+
87
+ <li>
88
+ <span class='object_link'><a href="Rack/SimpleAuth/HMAC/Config.html" title="Rack::SimpleAuth::HMAC::Config (class)">Config</a></span>
89
+
90
+ <small>(Rack::SimpleAuth::HMAC)</small>
91
+
92
+ </li>
93
+
94
+ </ul>
95
+ </ul>
96
+
97
+
98
+ <ul id="alpha_H" class="alpha">
99
+ <li class="letter">H</li>
100
+ <ul>
101
+
102
+ <li>
103
+ <span class='object_link'><a href="Rack/SimpleAuth/HMAC.html" title="Rack::SimpleAuth::HMAC (module)">HMAC</a></span>
104
+
105
+ <small>(Rack::SimpleAuth)</small>
106
+
107
+ </li>
108
+
109
+ </ul>
110
+ </ul>
111
+
112
+
113
+ <ul id="alpha_L" class="alpha">
114
+ <li class="letter">L</li>
115
+ <ul>
116
+
117
+ <li>
118
+ <span class='object_link'><a href="Rack/SimpleAuth/Logger.html" title="Rack::SimpleAuth::Logger (module)">Logger</a></span>
119
+
120
+ <small>(Rack::SimpleAuth)</small>
121
+
122
+ </li>
123
+
124
+ </ul>
125
+ </ul>
126
+
127
+
128
+ <ul id="alpha_M" class="alpha">
129
+ <li class="letter">M</li>
130
+ <ul>
131
+
132
+ <li>
133
+ <span class='object_link'><a href="Rack/SimpleAuth/HMAC/Middleware.html" title="Rack::SimpleAuth::HMAC::Middleware (class)">Middleware</a></span>
134
+
135
+ <small>(Rack::SimpleAuth::HMAC)</small>
136
+
137
+ </li>
138
+
139
+ </ul>
140
+ </ul>
141
+
142
+
143
+ <ul id="alpha_R" class="alpha">
144
+ <li class="letter">R</li>
145
+ <ul>
146
+
147
+ <li>
148
+ <span class='object_link'><a href="Rack.html" title="Rack (module)">Rack</a></span>
149
+
150
+ </li>
151
+
152
+ </ul>
153
+ </ul>
154
+
155
+
156
+ <ul id="alpha_S" class="alpha">
157
+ <li class="letter">S</li>
158
+ <ul>
159
+
160
+ <li>
161
+ <span class='object_link'><a href="Rack/SimpleAuth.html" title="Rack::SimpleAuth (module)">SimpleAuth</a></span>
162
+
163
+ <small>(Rack)</small>
164
+
165
+ </li>
166
+
167
+ </ul>
168
+ </ul>
169
+
170
+ </td>
171
+ </tr>
172
+ </table>
173
+
174
+ </div>
175
+
176
+ </div>
177
+
178
+ <div id="footer">
179
+ Generated on Wed Apr 30 09:50:09 2014 by
180
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
181
+ 0.8.7.4 (ruby-2.1.1).
182
+ </div>
183
+
184
+ </body>
185
+ </html>
@@ -0,0 +1,54 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html>
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+
7
+ <link rel="stylesheet" href="css/full_list.css" type="text/css" media="screen" charset="utf-8" />
8
+
9
+ <link rel="stylesheet" href="css/common.css" type="text/css" media="screen" charset="utf-8" />
10
+
11
+
12
+
13
+ <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
14
+
15
+ <script type="text/javascript" charset="utf-8" src="js/full_list.js"></script>
16
+
17
+
18
+ <title>Class List</title>
19
+ <base id="base_target" target="_parent" />
20
+ </head>
21
+ <body>
22
+ <script type="text/javascript" charset="utf-8">
23
+ if (window.top.frames.main) {
24
+ document.getElementById('base_target').target = 'main';
25
+ document.body.className = 'frames';
26
+ }
27
+ </script>
28
+ <div id="content">
29
+ <h1 id="full_list_header">Class List</h1>
30
+ <div id="nav">
31
+
32
+ <span><a target="_self" href="class_list.html">
33
+ Classes
34
+ </a></span>
35
+
36
+ <span><a target="_self" href="method_list.html">
37
+ Methods
38
+ </a></span>
39
+
40
+ <span><a target="_self" href="file_list.html">
41
+ Files
42
+ </a></span>
43
+
44
+ </div>
45
+ <div id="search">Search: <input type="text" /></div>
46
+
47
+ <ul id="full_list" class="class">
48
+ <li><span class='object_link'><a href="top-level-namespace.html" title="Top Level Namespace (root)">Top Level Namespace</a></span></li>
49
+ <li><a class='toggle'></a> <span class='object_link'><a href="Rack.html" title="Rack (module)">Rack</a></span><small class='search_info'>Top Level Namespace</small></li><ul><li><a class='toggle'></a> <span class='object_link'><a href="Rack/SimpleAuth.html" title="Rack::SimpleAuth (module)">SimpleAuth</a></span><small class='search_info'>Rack</small></li><ul><li><a class='toggle'></a> <span class='object_link'><a href="Rack/SimpleAuth/HMAC.html" title="Rack::SimpleAuth::HMAC (module)">HMAC</a></span><small class='search_info'>Rack::SimpleAuth</small></li><ul><li><span class='object_link'><a href="Rack/SimpleAuth/HMAC/Config.html" title="Rack::SimpleAuth::HMAC::Config (class)">Config</a></span> &lt; Hash<small class='search_info'>Rack::SimpleAuth::HMAC</small></li><li><span class='object_link'><a href="Rack/SimpleAuth/HMAC/Middleware.html" title="Rack::SimpleAuth::HMAC::Middleware (class)">Middleware</a></span> &lt; Object<small class='search_info'>Rack::SimpleAuth::HMAC</small></li></ul><li><span class='object_link'><a href="Rack/SimpleAuth/Logger.html" title="Rack::SimpleAuth::Logger (module)">Logger</a></span><small class='search_info'>Rack::SimpleAuth</small></li></ul></ul>
50
+
51
+ </ul>
52
+ </div>
53
+ </body>
54
+ </html>