mushikago-sdk 0.1.6 → 0.1.7
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.
- data/README +125 -0
- data/autotest/discover.rb +7 -0
- data/doc/Mushikago.html +243 -0
- data/doc/Mushikago/Auth.html +120 -0
- data/doc/Mushikago/Auth/Signature.html +305 -0
- data/doc/Mushikago/Auth/Signer.html +452 -0
- data/doc/Mushikago/Config.html +272 -0
- data/doc/Mushikago/Http.html +118 -0
- data/doc/Mushikago/Http/Client.html +551 -0
- data/doc/Mushikago/Http/Request.html +1264 -0
- data/doc/Mushikago/Http/Response.html +706 -0
- data/doc/Mushikago/Tombo.html +118 -0
- data/doc/Mushikago/Tombo/CaptureRequest.html +446 -0
- data/doc/Mushikago/Tombo/CapturesRequest.html +389 -0
- data/doc/Mushikago/Tombo/Client.html +770 -0
- data/doc/Mushikago/Tombo/DeleteRequest.html +391 -0
- data/doc/Mushikago/Tombo/InfoRequest.html +325 -0
- data/doc/Mushikago/Tombo/Request.html +287 -0
- data/doc/_index.html +278 -0
- data/doc/class_list.html +47 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +53 -0
- data/doc/css/style.css +320 -0
- data/doc/file.README.html +201 -0
- data/doc/file_list.html +49 -0
- data/doc/frames.html +13 -0
- data/doc/index.html +201 -0
- data/doc/js/app.js +205 -0
- data/doc/js/full_list.js +150 -0
- data/doc/js/jquery.js +16 -0
- data/doc/method_list.html +398 -0
- data/doc/top-level-namespace.html +103 -0
- data/lib/mushikago/tombo/capture_request.rb +1 -1
- data/lib/mushikago/tombo/client.rb +1 -1
- data/lib/mushikago/version.rb +1 -1
- data/spec/mushikago/tombo/capture_request_spec.rb +3 -3
- metadata +34 -3
@@ -0,0 +1,305 @@
|
|
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: Mushikago::Auth::Signature
|
8
|
+
|
9
|
+
— Documentation by YARD 0.7.2
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="../../css/style.css" type="text/css" media="screen" charset="utf-8" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="../../css/common.css" type="text/css" media="screen" charset="utf-8" />
|
16
|
+
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
18
|
+
relpath = '../..';
|
19
|
+
if (relpath != '') relpath += '/';
|
20
|
+
</script>
|
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
|
+
<script type="text/javascript" charset="utf-8">
|
30
|
+
if (window.top.frames.main) document.body.className = 'frames';
|
31
|
+
</script>
|
32
|
+
|
33
|
+
<div id="header">
|
34
|
+
<div id="menu">
|
35
|
+
|
36
|
+
<a href="../../_index.html">Index (S)</a> »
|
37
|
+
<span class='title'><span class='object_link'><a href="../../Mushikago.html" title="Mushikago (module)">Mushikago</a></span></span> » <span class='title'><span class='object_link'><a href="../Auth.html" title="Mushikago::Auth (module)">Auth</a></span></span>
|
38
|
+
»
|
39
|
+
<span class="title">Signature</span>
|
40
|
+
|
41
|
+
|
42
|
+
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
43
|
+
</div>
|
44
|
+
|
45
|
+
<div id="search">
|
46
|
+
|
47
|
+
<a id="class_list_link" href="#">Class List</a>
|
48
|
+
|
49
|
+
<a id="method_list_link" href="#">Method List</a>
|
50
|
+
|
51
|
+
<a id="file_list_link" href="#">File List</a>
|
52
|
+
|
53
|
+
</div>
|
54
|
+
<div class="clear"></div>
|
55
|
+
</div>
|
56
|
+
|
57
|
+
<iframe id="search_frame"></iframe>
|
58
|
+
|
59
|
+
<div id="content"><h1>Module: Mushikago::Auth::Signature
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
</h1>
|
64
|
+
|
65
|
+
<dl class="box">
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
<dt class="r1">Included in:</dt>
|
74
|
+
<dd class="r1"><span class='object_link'><a href="../Tombo/Request.html" title="Mushikago::Tombo::Request (class)">Tombo::Request</a></span></dd>
|
75
|
+
|
76
|
+
|
77
|
+
|
78
|
+
<dt class="r2 last">Defined in:</dt>
|
79
|
+
<dd class="r2 last">lib/mushikago/auth/signature.rb</dd>
|
80
|
+
|
81
|
+
</dl>
|
82
|
+
<div class="clear"></div>
|
83
|
+
|
84
|
+
<h2>Overview</h2><div class="docstring">
|
85
|
+
<div class="discussion">
|
86
|
+
|
87
|
+
<p>MushikagoのリクエストにMix-inして利用する</p>
|
88
|
+
|
89
|
+
|
90
|
+
</div>
|
91
|
+
</div>
|
92
|
+
<div class="tags">
|
93
|
+
|
94
|
+
</div>
|
95
|
+
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
<h2>
|
101
|
+
Instance Method Summary
|
102
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
103
|
+
</h2>
|
104
|
+
|
105
|
+
<ul class="summary">
|
106
|
+
|
107
|
+
<li class="public ">
|
108
|
+
<span class="summary_signature">
|
109
|
+
|
110
|
+
<a href="#add_signature%21-instance_method" title="#add_signature! (instance method)">- (Object) <strong>add_signature!</strong>(signer) </a>
|
111
|
+
|
112
|
+
|
113
|
+
|
114
|
+
</span>
|
115
|
+
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
<span class="summary_desc"><div class='inline'>
|
124
|
+
<p>リクエストに署名を追加する.</p>
|
125
|
+
</div></span>
|
126
|
+
|
127
|
+
</li>
|
128
|
+
|
129
|
+
|
130
|
+
<li class="public ">
|
131
|
+
<span class="summary_signature">
|
132
|
+
|
133
|
+
<a href="#string_to_sign-instance_method" title="#string_to_sign (instance method)">- (String) <strong>string_to_sign</strong> </a>
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
</span>
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
|
146
|
+
<span class="summary_desc"><div class='inline'>
|
147
|
+
<p>リクエストの情報から以下のような署名用文字列を作成する.</p>
|
148
|
+
</div></span>
|
149
|
+
|
150
|
+
</li>
|
151
|
+
|
152
|
+
|
153
|
+
</ul>
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
|
158
|
+
<div id="instance_method_details" class="method_details_list">
|
159
|
+
<h2>Instance Method Details</h2>
|
160
|
+
|
161
|
+
|
162
|
+
<div class="method_details first">
|
163
|
+
<p class="signature first" id="add_signature!-instance_method">
|
164
|
+
|
165
|
+
- (<tt>Object</tt>) <strong>add_signature!</strong>(signer)
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
</p><div class="docstring">
|
170
|
+
<div class="discussion">
|
171
|
+
|
172
|
+
<p>リクエストに署名を追加する</p>
|
173
|
+
|
174
|
+
|
175
|
+
</div>
|
176
|
+
</div>
|
177
|
+
<div class="tags">
|
178
|
+
<h3>Parameters:</h3>
|
179
|
+
<ul class="param">
|
180
|
+
|
181
|
+
<li>
|
182
|
+
|
183
|
+
<span class='name'>signer</span>
|
184
|
+
|
185
|
+
|
186
|
+
<span class='type'>(<tt><span class='object_link'><a href="Signer.html" title="Mushikago::Auth::Signer (class)">Mushikago::Auth::Signer</a></span></tt>)</span>
|
187
|
+
|
188
|
+
|
189
|
+
|
190
|
+
—
|
191
|
+
<div class='inline'>
|
192
|
+
<p>署名を作成するオブジェクト</p>
|
193
|
+
</div>
|
194
|
+
|
195
|
+
</li>
|
196
|
+
|
197
|
+
</ul>
|
198
|
+
|
199
|
+
</div><table class="source_code">
|
200
|
+
<tr>
|
201
|
+
<td>
|
202
|
+
<pre class="lines">
|
203
|
+
|
204
|
+
|
205
|
+
22
|
206
|
+
23
|
207
|
+
24</pre>
|
208
|
+
</td>
|
209
|
+
<td>
|
210
|
+
<pre class="code"><span class="info file"># File 'lib/mushikago/auth/signature.rb', line 22</span>
|
211
|
+
|
212
|
+
<span class='def def kw'>def</span> <span class='add_signature! fid id'>add_signature!</span> <span class='signer identifier id'>signer</span>
|
213
|
+
<span class='set_param identifier id'>set_param</span><span class='lparen token'>(</span><span class='string val'>'signature'</span><span class='comma token'>,</span> <span class='signer identifier id'>signer</span><span class='dot token'>.</span><span class='sign identifier id'>sign</span><span class='lparen token'>(</span><span class='string_to_sign identifier id'>string_to_sign</span><span class='rparen token'>)</span><span class='rparen token'>)</span>
|
214
|
+
<span class='end end kw'>end</span>
|
215
|
+
</pre>
|
216
|
+
</td>
|
217
|
+
</tr>
|
218
|
+
</table>
|
219
|
+
</div>
|
220
|
+
|
221
|
+
<div class="method_details ">
|
222
|
+
<p class="signature " id="string_to_sign-instance_method">
|
223
|
+
|
224
|
+
- (<tt>String</tt>) <strong>string_to_sign</strong>
|
225
|
+
|
226
|
+
|
227
|
+
|
228
|
+
</p><div class="docstring">
|
229
|
+
<div class="discussion">
|
230
|
+
|
231
|
+
<p>リクエストの情報から以下のような署名用文字列を作成する</p>
|
232
|
+
|
233
|
+
<pre class="code"><span class='GET constant id'>GET</span>
|
234
|
+
<span class='localhost identifier id'>localhost</span>
|
235
|
+
<span class='regexp val'>/1/i</span><span class='nfo identifier id'>nfo</span><span class='dot token'>.</span><span class='json identifier id'>json</span>
|
236
|
+
<span class='api_key identifier id'>api_key</span><span class='assign token'>=</span><span class='api_key identifier id'>api_key</span><span class='bitand op'>&</span><span class='timestamp identifier id'>timestamp</span><span class='assign token'>=</span><span class='integer val'>2011</span><span class='minus op'>-</span><span class='integer val'>0</span><span class='integer val'>9</span><span class='minus op'>-</span><span class='integer val'>01</span><span class='T00 constant id'>T00</span><span class='mod op'>%</span><span class='integer val'>3</span><span class='A00 constant id'>A00</span><span class='mod op'>%</span><span class='integer val'>3</span><span class='A00Z constant id'>A00Z</span>
|
237
|
+
</pre>
|
238
|
+
|
239
|
+
|
240
|
+
</div>
|
241
|
+
</div>
|
242
|
+
<div class="tags">
|
243
|
+
<h3>Returns:</h3>
|
244
|
+
<ul class="return">
|
245
|
+
|
246
|
+
<li>
|
247
|
+
|
248
|
+
|
249
|
+
<span class='type'>(<tt>String</tt>)</span>
|
250
|
+
|
251
|
+
|
252
|
+
|
253
|
+
—
|
254
|
+
<div class='inline'>
|
255
|
+
<p>署名用の文字列</p>
|
256
|
+
</div>
|
257
|
+
|
258
|
+
</li>
|
259
|
+
|
260
|
+
</ul>
|
261
|
+
|
262
|
+
</div><table class="source_code">
|
263
|
+
<tr>
|
264
|
+
<td>
|
265
|
+
<pre class="lines">
|
266
|
+
|
267
|
+
|
268
|
+
11
|
269
|
+
12
|
270
|
+
13
|
271
|
+
14
|
272
|
+
15
|
273
|
+
16
|
274
|
+
17
|
275
|
+
18</pre>
|
276
|
+
</td>
|
277
|
+
<td>
|
278
|
+
<pre class="code"><span class="info file"># File 'lib/mushikago/auth/signature.rb', line 11</span>
|
279
|
+
|
280
|
+
<span class='def def kw'>def</span> <span class='string_to_sign identifier id'>string_to_sign</span>
|
281
|
+
<span class='lbrack token'>[</span>
|
282
|
+
<span class='http_method identifier id'>http_method</span><span class='comma token'>,</span>
|
283
|
+
<span class='host identifier id'>host</span><span class='comma token'>,</span>
|
284
|
+
<span class='path identifier id'>path</span><span class='comma token'>,</span>
|
285
|
+
<span class='url_encoded_params identifier id'>url_encoded_params</span><span class='comma token'>,</span>
|
286
|
+
<span class='rbrack token'>]</span><span class='dot token'>.</span><span class='join identifier id'>join</span><span class='lparen token'>(</span><span class='string val'>"\n"</span><span class='rparen token'>)</span>
|
287
|
+
<span class='end end kw'>end</span>
|
288
|
+
</pre>
|
289
|
+
</td>
|
290
|
+
</tr>
|
291
|
+
</table>
|
292
|
+
</div>
|
293
|
+
|
294
|
+
</div>
|
295
|
+
|
296
|
+
</div>
|
297
|
+
|
298
|
+
<div id="footer">
|
299
|
+
Generated on Tue Sep 6 18:23:01 2011 by
|
300
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
301
|
+
0.7.2 (ruby-1.8.7).
|
302
|
+
</div>
|
303
|
+
|
304
|
+
</body>
|
305
|
+
</html>
|
@@ -0,0 +1,452 @@
|
|
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
|
+
Class: Mushikago::Auth::Signer
|
8
|
+
|
9
|
+
— Documentation by YARD 0.7.2
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="../../css/style.css" type="text/css" media="screen" charset="utf-8" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="../../css/common.css" type="text/css" media="screen" charset="utf-8" />
|
16
|
+
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
18
|
+
relpath = '../..';
|
19
|
+
if (relpath != '') relpath += '/';
|
20
|
+
</script>
|
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
|
+
<script type="text/javascript" charset="utf-8">
|
30
|
+
if (window.top.frames.main) document.body.className = 'frames';
|
31
|
+
</script>
|
32
|
+
|
33
|
+
<div id="header">
|
34
|
+
<div id="menu">
|
35
|
+
|
36
|
+
<a href="../../_index.html">Index (S)</a> »
|
37
|
+
<span class='title'><span class='object_link'><a href="../../Mushikago.html" title="Mushikago (module)">Mushikago</a></span></span> » <span class='title'><span class='object_link'><a href="../Auth.html" title="Mushikago::Auth (module)">Auth</a></span></span>
|
38
|
+
»
|
39
|
+
<span class="title">Signer</span>
|
40
|
+
|
41
|
+
|
42
|
+
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
43
|
+
</div>
|
44
|
+
|
45
|
+
<div id="search">
|
46
|
+
|
47
|
+
<a id="class_list_link" href="#">Class List</a>
|
48
|
+
|
49
|
+
<a id="method_list_link" href="#">Method List</a>
|
50
|
+
|
51
|
+
<a id="file_list_link" href="#">File List</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: Mushikago::Auth::Signer
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
</h1>
|
64
|
+
|
65
|
+
<dl class="box">
|
66
|
+
|
67
|
+
<dt class="r1">Inherits:</dt>
|
68
|
+
<dd class="r1">
|
69
|
+
<span class="inheritName">Object</span>
|
70
|
+
|
71
|
+
<ul class="fullTree">
|
72
|
+
<li>Object</li>
|
73
|
+
|
74
|
+
<li class="next">Mushikago::Auth::Signer</li>
|
75
|
+
|
76
|
+
</ul>
|
77
|
+
<a href="#" class="inheritanceTree">show all</a>
|
78
|
+
|
79
|
+
</dd>
|
80
|
+
|
81
|
+
|
82
|
+
|
83
|
+
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
<dt class="r2 last">Defined in:</dt>
|
90
|
+
<dd class="r2 last">lib/mushikago/auth/signer.rb</dd>
|
91
|
+
|
92
|
+
</dl>
|
93
|
+
<div class="clear"></div>
|
94
|
+
|
95
|
+
<h2>Overview</h2><div class="docstring">
|
96
|
+
<div class="discussion">
|
97
|
+
|
98
|
+
<p>署名を作成するクラス</p>
|
99
|
+
|
100
|
+
|
101
|
+
</div>
|
102
|
+
</div>
|
103
|
+
<div class="tags">
|
104
|
+
|
105
|
+
</div>
|
106
|
+
|
107
|
+
<h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
|
108
|
+
<ul class="summary">
|
109
|
+
|
110
|
+
<li class="public ">
|
111
|
+
<span class="summary_signature">
|
112
|
+
|
113
|
+
<a href="#secret_key-instance_method" title="#secret_key (instance method)">- (String) <strong>secret_key</strong> </a>
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
</span>
|
118
|
+
|
119
|
+
|
120
|
+
<span class="note title readonly">readonly</span>
|
121
|
+
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
<span class="summary_desc"><div class='inline'>
|
130
|
+
<p>シークレットキー.</p>
|
131
|
+
</div></span>
|
132
|
+
|
133
|
+
</li>
|
134
|
+
|
135
|
+
|
136
|
+
</ul>
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
<h2>
|
143
|
+
Instance Method Summary
|
144
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
145
|
+
</h2>
|
146
|
+
|
147
|
+
<ul class="summary">
|
148
|
+
|
149
|
+
<li class="public ">
|
150
|
+
<span class="summary_signature">
|
151
|
+
|
152
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">- (Signer) <strong>initialize</strong>(secret_key) </a>
|
153
|
+
|
154
|
+
|
155
|
+
|
156
|
+
</span>
|
157
|
+
|
158
|
+
<span class="note title constructor">constructor</span>
|
159
|
+
|
160
|
+
|
161
|
+
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
<span class="summary_desc"><div class='inline'>
|
168
|
+
<p>A new instance of Signer.</p>
|
169
|
+
</div></span>
|
170
|
+
|
171
|
+
</li>
|
172
|
+
|
173
|
+
|
174
|
+
<li class="public ">
|
175
|
+
<span class="summary_signature">
|
176
|
+
|
177
|
+
<a href="#sign-instance_method" title="#sign (instance method)">- (String) <strong>sign</strong>(string_to_sign, digest_method = 'sha256') </a>
|
178
|
+
|
179
|
+
|
180
|
+
|
181
|
+
</span>
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
|
190
|
+
<span class="summary_desc"><div class='inline'>
|
191
|
+
<p>署名.</p>
|
192
|
+
</div></span>
|
193
|
+
|
194
|
+
</li>
|
195
|
+
|
196
|
+
|
197
|
+
</ul>
|
198
|
+
|
199
|
+
|
200
|
+
<div id="constructor_details" class="method_details_list">
|
201
|
+
<h2>Constructor Details</h2>
|
202
|
+
|
203
|
+
<div class="method_details first">
|
204
|
+
<p class="signature first" id="initialize-instance_method">
|
205
|
+
|
206
|
+
- (<tt><span class='object_link'><a href="" title="Mushikago::Auth::Signer (class)">Signer</a></span></tt>) <strong>initialize</strong>(secret_key)
|
207
|
+
|
208
|
+
|
209
|
+
|
210
|
+
</p><div class="docstring">
|
211
|
+
<div class="discussion">
|
212
|
+
|
213
|
+
<p>A new instance of Signer</p>
|
214
|
+
|
215
|
+
|
216
|
+
</div>
|
217
|
+
</div>
|
218
|
+
<div class="tags">
|
219
|
+
<h3>Parameters:</h3>
|
220
|
+
<ul class="param">
|
221
|
+
|
222
|
+
<li>
|
223
|
+
|
224
|
+
<span class='name'>secret_key</span>
|
225
|
+
|
226
|
+
|
227
|
+
<span class='type'>(<tt>String</tt>)</span>
|
228
|
+
|
229
|
+
|
230
|
+
|
231
|
+
—
|
232
|
+
<div class='inline'>
|
233
|
+
<p>シークレットキー</p>
|
234
|
+
</div>
|
235
|
+
|
236
|
+
</li>
|
237
|
+
|
238
|
+
</ul>
|
239
|
+
|
240
|
+
</div><table class="source_code">
|
241
|
+
<tr>
|
242
|
+
<td>
|
243
|
+
<pre class="lines">
|
244
|
+
|
245
|
+
|
246
|
+
12
|
247
|
+
13
|
248
|
+
14</pre>
|
249
|
+
</td>
|
250
|
+
<td>
|
251
|
+
<pre class="code"><span class="info file"># File 'lib/mushikago/auth/signer.rb', line 12</span>
|
252
|
+
|
253
|
+
<span class='def def kw'>def</span> <span class='initialize identifier id'>initialize</span> <span class='secret_key identifier id'>secret_key</span>
|
254
|
+
<span class='@secret_key ivar id'>@secret_key</span> <span class='assign token'>=</span> <span class='secret_key identifier id'>secret_key</span>
|
255
|
+
<span class='end end kw'>end</span>
|
256
|
+
</pre>
|
257
|
+
</td>
|
258
|
+
</tr>
|
259
|
+
</table>
|
260
|
+
</div>
|
261
|
+
|
262
|
+
</div>
|
263
|
+
|
264
|
+
<div id="instance_attr_details" class="attr_details">
|
265
|
+
<h2>Instance Attribute Details</h2>
|
266
|
+
|
267
|
+
|
268
|
+
<span id=""></span>
|
269
|
+
<span id="secret_key-instance_method"></span>
|
270
|
+
<div class="method_details first">
|
271
|
+
<p class="signature first" id="secret_key-instance_method">
|
272
|
+
|
273
|
+
- (<tt>String</tt>) <strong>secret_key</strong> <span class="extras">(readonly)</span>
|
274
|
+
|
275
|
+
|
276
|
+
|
277
|
+
</p><div class="docstring">
|
278
|
+
<div class="discussion">
|
279
|
+
|
280
|
+
<p>シークレットキー</p>
|
281
|
+
|
282
|
+
|
283
|
+
</div>
|
284
|
+
</div>
|
285
|
+
<div class="tags">
|
286
|
+
<h3>Returns:</h3>
|
287
|
+
<ul class="return">
|
288
|
+
|
289
|
+
<li>
|
290
|
+
|
291
|
+
|
292
|
+
<span class='type'>(<tt>String</tt>)</span>
|
293
|
+
|
294
|
+
|
295
|
+
|
296
|
+
—
|
297
|
+
<div class='inline'>
|
298
|
+
<p>シークレットキー</p>
|
299
|
+
</div>
|
300
|
+
|
301
|
+
</li>
|
302
|
+
|
303
|
+
</ul>
|
304
|
+
|
305
|
+
</div><table class="source_code">
|
306
|
+
<tr>
|
307
|
+
<td>
|
308
|
+
<pre class="lines">
|
309
|
+
|
310
|
+
|
311
|
+
9
|
312
|
+
10
|
313
|
+
11</pre>
|
314
|
+
</td>
|
315
|
+
<td>
|
316
|
+
<pre class="code"><span class="info file"># File 'lib/mushikago/auth/signer.rb', line 9</span>
|
317
|
+
|
318
|
+
<span class='def def kw'>def</span> <span class='secret_key identifier id'>secret_key</span>
|
319
|
+
<span class='@secret_key ivar id'>@secret_key</span>
|
320
|
+
<span class='end end kw'>end</span>
|
321
|
+
</pre>
|
322
|
+
</td>
|
323
|
+
</tr>
|
324
|
+
</table>
|
325
|
+
</div>
|
326
|
+
|
327
|
+
</div>
|
328
|
+
|
329
|
+
|
330
|
+
<div id="instance_method_details" class="method_details_list">
|
331
|
+
<h2>Instance Method Details</h2>
|
332
|
+
|
333
|
+
|
334
|
+
<div class="method_details first">
|
335
|
+
<p class="signature first" id="sign-instance_method">
|
336
|
+
|
337
|
+
- (<tt>String</tt>) <strong>sign</strong>(string_to_sign, digest_method = 'sha256')
|
338
|
+
|
339
|
+
|
340
|
+
|
341
|
+
</p><div class="docstring">
|
342
|
+
<div class="discussion">
|
343
|
+
|
344
|
+
<p>署名</p>
|
345
|
+
|
346
|
+
|
347
|
+
</div>
|
348
|
+
</div>
|
349
|
+
<div class="tags">
|
350
|
+
<h3>Parameters:</h3>
|
351
|
+
<ul class="param">
|
352
|
+
|
353
|
+
<li>
|
354
|
+
|
355
|
+
<span class='name'>string_to_sign</span>
|
356
|
+
|
357
|
+
|
358
|
+
<span class='type'>(<tt>String</tt>)</span>
|
359
|
+
|
360
|
+
|
361
|
+
|
362
|
+
—
|
363
|
+
<div class='inline'>
|
364
|
+
<p>署名の元になる文字列</p>
|
365
|
+
</div>
|
366
|
+
|
367
|
+
</li>
|
368
|
+
|
369
|
+
<li>
|
370
|
+
|
371
|
+
<span class='name'>digest_method</span>
|
372
|
+
|
373
|
+
|
374
|
+
<span class='type'>(<tt>String</tt>)</span>
|
375
|
+
|
376
|
+
|
377
|
+
<em class="default">(defaults to: <tt>'sha256'</tt>)</em>
|
378
|
+
|
379
|
+
|
380
|
+
—
|
381
|
+
<div class='inline'>
|
382
|
+
<p>署名作成のアルゴリズム</p>
|
383
|
+
</div>
|
384
|
+
|
385
|
+
</li>
|
386
|
+
|
387
|
+
</ul>
|
388
|
+
<h3>Returns:</h3>
|
389
|
+
<ul class="return">
|
390
|
+
|
391
|
+
<li>
|
392
|
+
|
393
|
+
|
394
|
+
<span class='type'>(<tt>String</tt>)</span>
|
395
|
+
|
396
|
+
|
397
|
+
|
398
|
+
—
|
399
|
+
<div class='inline'>
|
400
|
+
<p>署名</p>
|
401
|
+
</div>
|
402
|
+
|
403
|
+
</li>
|
404
|
+
|
405
|
+
</ul>
|
406
|
+
|
407
|
+
</div><table class="source_code">
|
408
|
+
<tr>
|
409
|
+
<td>
|
410
|
+
<pre class="lines">
|
411
|
+
|
412
|
+
|
413
|
+
19
|
414
|
+
20
|
415
|
+
21
|
416
|
+
22
|
417
|
+
23
|
418
|
+
24
|
419
|
+
25
|
420
|
+
26
|
421
|
+
27</pre>
|
422
|
+
</td>
|
423
|
+
<td>
|
424
|
+
<pre class="code"><span class="info file"># File 'lib/mushikago/auth/signer.rb', line 19</span>
|
425
|
+
|
426
|
+
<span class='def def kw'>def</span> <span class='sign identifier id'>sign</span><span class='lparen token'>(</span><span class='string_to_sign identifier id'>string_to_sign</span><span class='comma token'>,</span> <span class='digest_method identifier id'>digest_method</span><span class='assign token'>=</span><span class='string val'>'sha256'</span><span class='rparen token'>)</span>
|
427
|
+
<span class='Base64 constant id'>Base64</span><span class='dot token'>.</span><span class='encode64 identifier id'>encode64</span><span class='lparen token'>(</span>
|
428
|
+
<span class='OpenSSL constant id'>OpenSSL</span><span class='colon2 op'>::</span><span class='HMAC constant id'>HMAC</span><span class='dot token'>.</span><span class='digest identifier id'>digest</span><span class='lparen token'>(</span>
|
429
|
+
<span class='OpenSSL constant id'>OpenSSL</span><span class='colon2 op'>::</span><span class='Digest constant id'>Digest</span><span class='colon2 op'>::</span><span class='Digest constant id'>Digest</span><span class='dot token'>.</span><span class='new identifier id'>new</span><span class='lparen token'>(</span><span class='digest_method identifier id'>digest_method</span><span class='rparen token'>)</span><span class='comma token'>,</span>
|
430
|
+
<span class='secret_key identifier id'>secret_key</span><span class='comma token'>,</span>
|
431
|
+
<span class='string_to_sign identifier id'>string_to_sign</span>
|
432
|
+
<span class='rparen token'>)</span>
|
433
|
+
<span class='rparen token'>)</span><span class='dot token'>.</span><span class='strip identifier id'>strip</span>
|
434
|
+
<span class='end end kw'>end</span>
|
435
|
+
</pre>
|
436
|
+
</td>
|
437
|
+
</tr>
|
438
|
+
</table>
|
439
|
+
</div>
|
440
|
+
|
441
|
+
</div>
|
442
|
+
|
443
|
+
</div>
|
444
|
+
|
445
|
+
<div id="footer">
|
446
|
+
Generated on Tue Sep 6 18:23:01 2011 by
|
447
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
448
|
+
0.7.2 (ruby-1.8.7).
|
449
|
+
</div>
|
450
|
+
|
451
|
+
</body>
|
452
|
+
</html>
|