mushikago-sdk 0.1.8 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. data/LICENSE +10 -17
  2. data/README.md +5 -3
  3. data/doc/Mushikago.html +7 -20
  4. data/doc/Mushikago/Auth.html +2 -4
  5. data/doc/Mushikago/Auth/Signature.html +8 -28
  6. data/doc/Mushikago/Auth/Signer.html +13 -37
  7. data/doc/Mushikago/Config.html +6 -16
  8. data/doc/Mushikago/Http.html +2 -4
  9. data/doc/Mushikago/Http/Client.html +15 -43
  10. data/doc/Mushikago/Http/Request.html +48 -124
  11. data/doc/Mushikago/Http/Response.html +23 -76
  12. data/doc/Mushikago/Tombo.html +2 -4
  13. data/doc/Mushikago/Tombo/CaptureRequest.html +11 -29
  14. data/doc/Mushikago/Tombo/CapturesRequest.html +10 -28
  15. data/doc/Mushikago/Tombo/Client.html +30 -88
  16. data/doc/Mushikago/Tombo/DeleteRequest.html +7 -17
  17. data/doc/Mushikago/Tombo/InfoRequest.html +5 -13
  18. data/doc/Mushikago/Tombo/Request.html +6 -16
  19. data/doc/_index.html +1 -1
  20. data/doc/file.README.html +8 -4
  21. data/doc/index.html +8 -4
  22. data/doc/method_list.html +24 -24
  23. data/doc/top-level-namespace.html +1 -1
  24. data/lib/mushikago/http/request.rb +16 -1
  25. data/lib/mushikago/tombo/capture_request.rb +1 -1
  26. data/lib/mushikago/tombo/delete_request.rb +1 -1
  27. data/lib/mushikago/version.rb +1 -1
  28. data/spec/mushikago/auth/signature_spec.rb +2 -2
  29. data/spec/mushikago/configuration_spec.rb +9 -9
  30. data/spec/mushikago/http/client_spec.rb +2 -2
  31. data/spec/mushikago/http/request_spec.rb +8 -8
  32. data/spec/mushikago/http/response_spec.rb +3 -3
  33. data/spec/mushikago/tombo/capture_request_spec.rb +11 -11
  34. data/spec/mushikago/tombo/captures_request_spec.rb +9 -9
  35. data/spec/mushikago/tombo/client_spec.rb +22 -22
  36. data/spec/mushikago/tombo/delete_request_spec.rb +4 -4
  37. data/spec/mushikago/tombo/info_request_spec.rb +3 -3
  38. data/spec/mushikago/tombo/request_spec.rb +3 -3
  39. metadata +4 -4
data/doc/_index.html CHANGED
@@ -269,7 +269,7 @@
269
269
  </div>
270
270
 
271
271
  <div id="footer">
272
- Generated on Tue Sep 6 18:27:42 2011 by
272
+ Generated on Thu Sep 8 10:06:59 2011 by
273
273
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
274
274
  0.7.2 (ruby-1.8.7).
275
275
  </div>
data/doc/file.README.html CHANGED
@@ -63,11 +63,11 @@
63
63
 
64
64
  <li><strong>Copyright</strong>: 2011</li>
65
65
 
66
- <li><strong>License</strong>: MIT License</li>
66
+ <li><strong>License</strong>: Apache License, Version 2.0</li>
67
67
 
68
- <li><strong>Latest Version</strong>: 0.1.8</li>
68
+ <li><strong>Latest Version</strong>: 0.2.1</li>
69
69
 
70
- <li><strong>Release Date</strong>: September 6th 2011</li>
70
+ <li><strong>Release Date</strong>: September 8th 2011</li>
71
71
  </ul>
72
72
 
73
73
  <h2 id='id6'>概要</h2>
@@ -168,6 +168,10 @@ $ export MUSHIKAGO_SECRET_KEY=&lt;シークレットキー&gt;
168
168
  <h2 id='id10'>変更履歴</h2>
169
169
 
170
170
  <ul>
171
+ <li>
172
+ <p><strong>Sep.8.11</strong>: 0.2.1 release - ライセンスをApache License, Version 2.0に変更</p>
173
+ </li>
174
+
171
175
  <li>
172
176
  <p><strong>Sep.6.11</strong>: 0.1.8 release</p>
173
177
 
@@ -180,7 +184,7 @@ $ export MUSHIKAGO_SECRET_KEY=&lt;シークレットキー&gt;
180
184
  </ul></div></div>
181
185
 
182
186
  <div id="footer">
183
- Generated on Tue Sep 6 18:27:42 2011 by
187
+ Generated on Thu Sep 8 10:06:59 2011 by
184
188
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
185
189
  0.7.2 (ruby-1.8.7).
186
190
  </div>
data/doc/index.html CHANGED
@@ -63,11 +63,11 @@
63
63
 
64
64
  <li><strong>Copyright</strong>: 2011</li>
65
65
 
66
- <li><strong>License</strong>: MIT License</li>
66
+ <li><strong>License</strong>: Apache License, Version 2.0</li>
67
67
 
68
- <li><strong>Latest Version</strong>: 0.1.8</li>
68
+ <li><strong>Latest Version</strong>: 0.2.1</li>
69
69
 
70
- <li><strong>Release Date</strong>: September 6th 2011</li>
70
+ <li><strong>Release Date</strong>: September 8th 2011</li>
71
71
  </ul>
72
72
 
73
73
  <h2 id='id1'>概要</h2>
@@ -168,6 +168,10 @@ $ export MUSHIKAGO_SECRET_KEY=&lt;シークレットキー&gt;
168
168
  <h2 id='id5'>変更履歴</h2>
169
169
 
170
170
  <ul>
171
+ <li>
172
+ <p><strong>Sep.8.11</strong>: 0.2.1 release - ライセンスをApache License, Version 2.0に変更</p>
173
+ </li>
174
+
171
175
  <li>
172
176
  <p><strong>Sep.6.11</strong>: 0.1.8 release</p>
173
177
 
@@ -180,7 +184,7 @@ $ export MUSHIKAGO_SECRET_KEY=&lt;シークレットキー&gt;
180
184
  </ul></div></div>
181
185
 
182
186
  <div id="footer">
183
- Generated on Tue Sep 6 18:27:42 2011 by
187
+ Generated on Thu Sep 8 10:06:59 2011 by
184
188
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
185
189
  0.7.2 (ruby-1.8.7).
186
190
  </div>
data/doc/method_list.html CHANGED
@@ -145,17 +145,17 @@
145
145
 
146
146
 
147
147
  <li class="r2 ">
148
- <span class='object_link'><a href="Mushikago/Tombo/InfoRequest.html#initialize-instance_method" title="Mushikago::Tombo::InfoRequest#initialize (method)">#initialize</a></span>
148
+ <span class='object_link'><a href="Mushikago/Tombo/CapturesRequest.html#initialize-instance_method" title="Mushikago::Tombo::CapturesRequest#initialize (method)">#initialize</a></span>
149
149
 
150
- <small>Mushikago::Tombo::InfoRequest</small>
150
+ <small>Mushikago::Tombo::CapturesRequest</small>
151
151
 
152
152
  </li>
153
153
 
154
154
 
155
155
  <li class="r1 ">
156
- <span class='object_link'><a href="Mushikago/Tombo/Request.html#initialize-instance_method" title="Mushikago::Tombo::Request#initialize (method)">#initialize</a></span>
156
+ <span class='object_link'><a href="Mushikago/Tombo/CaptureRequest.html#initialize-instance_method" title="Mushikago::Tombo::CaptureRequest#initialize (method)">#initialize</a></span>
157
157
 
158
- <small>Mushikago::Tombo::Request</small>
158
+ <small>Mushikago::Tombo::CaptureRequest</small>
159
159
 
160
160
  </li>
161
161
 
@@ -169,17 +169,17 @@
169
169
 
170
170
 
171
171
  <li class="r1 ">
172
- <span class='object_link'><a href="Mushikago/Auth/Signer.html#initialize-instance_method" title="Mushikago::Auth::Signer#initialize (method)">#initialize</a></span>
172
+ <span class='object_link'><a href="Mushikago/Tombo/DeleteRequest.html#initialize-instance_method" title="Mushikago::Tombo::DeleteRequest#initialize (method)">#initialize</a></span>
173
173
 
174
- <small>Mushikago::Auth::Signer</small>
174
+ <small>Mushikago::Tombo::DeleteRequest</small>
175
175
 
176
176
  </li>
177
177
 
178
178
 
179
179
  <li class="r2 ">
180
- <span class='object_link'><a href="Mushikago/Tombo/DeleteRequest.html#initialize-instance_method" title="Mushikago::Tombo::DeleteRequest#initialize (method)">#initialize</a></span>
180
+ <span class='object_link'><a href="Mushikago/Tombo/InfoRequest.html#initialize-instance_method" title="Mushikago::Tombo::InfoRequest#initialize (method)">#initialize</a></span>
181
181
 
182
- <small>Mushikago::Tombo::DeleteRequest</small>
182
+ <small>Mushikago::Tombo::InfoRequest</small>
183
183
 
184
184
  </li>
185
185
 
@@ -193,25 +193,25 @@
193
193
 
194
194
 
195
195
  <li class="r2 ">
196
- <span class='object_link'><a href="Mushikago/Tombo/CaptureRequest.html#initialize-instance_method" title="Mushikago::Tombo::CaptureRequest#initialize (method)">#initialize</a></span>
196
+ <span class='object_link'><a href="Mushikago/Auth/Signer.html#initialize-instance_method" title="Mushikago::Auth::Signer#initialize (method)">#initialize</a></span>
197
197
 
198
- <small>Mushikago::Tombo::CaptureRequest</small>
198
+ <small>Mushikago::Auth::Signer</small>
199
199
 
200
200
  </li>
201
201
 
202
202
 
203
203
  <li class="r1 ">
204
- <span class='object_link'><a href="Mushikago/Tombo/CapturesRequest.html#initialize-instance_method" title="Mushikago::Tombo::CapturesRequest#initialize (method)">#initialize</a></span>
204
+ <span class='object_link'><a href="Mushikago/Http/Response.html#initialize-instance_method" title="Mushikago::Http::Response#initialize (method)">#initialize</a></span>
205
205
 
206
- <small>Mushikago::Tombo::CapturesRequest</small>
206
+ <small>Mushikago::Http::Response</small>
207
207
 
208
208
  </li>
209
209
 
210
210
 
211
211
  <li class="r2 ">
212
- <span class='object_link'><a href="Mushikago/Http/Response.html#initialize-instance_method" title="Mushikago::Http::Response#initialize (method)">#initialize</a></span>
212
+ <span class='object_link'><a href="Mushikago/Tombo/Request.html#initialize-instance_method" title="Mushikago::Tombo::Request#initialize (method)">#initialize</a></span>
213
213
 
214
- <small>Mushikago::Http::Response</small>
214
+ <small>Mushikago::Tombo::Request</small>
215
215
 
216
216
  </li>
217
217
 
@@ -241,9 +241,9 @@
241
241
 
242
242
 
243
243
  <li class="r2 ">
244
- <span class='object_link'><a href="Mushikago/Tombo/CaptureRequest.html#method_name-instance_method" title="Mushikago::Tombo::CaptureRequest#method_name (method)">#method_name</a></span>
244
+ <span class='object_link'><a href="Mushikago/Tombo/InfoRequest.html#method_name-instance_method" title="Mushikago::Tombo::InfoRequest#method_name (method)">#method_name</a></span>
245
245
 
246
- <small>Mushikago::Tombo::CaptureRequest</small>
246
+ <small>Mushikago::Tombo::InfoRequest</small>
247
247
 
248
248
  </li>
249
249
 
@@ -257,33 +257,33 @@
257
257
 
258
258
 
259
259
  <li class="r2 ">
260
- <span class='object_link'><a href="Mushikago/Tombo/CapturesRequest.html#method_name-instance_method" title="Mushikago::Tombo::CapturesRequest#method_name (method)">#method_name</a></span>
260
+ <span class='object_link'><a href="Mushikago/Tombo/CaptureRequest.html#method_name-instance_method" title="Mushikago::Tombo::CaptureRequest#method_name (method)">#method_name</a></span>
261
261
 
262
- <small>Mushikago::Tombo::CapturesRequest</small>
262
+ <small>Mushikago::Tombo::CaptureRequest</small>
263
263
 
264
264
  </li>
265
265
 
266
266
 
267
267
  <li class="r1 ">
268
- <span class='object_link'><a href="Mushikago/Tombo/InfoRequest.html#method_name-instance_method" title="Mushikago::Tombo::InfoRequest#method_name (method)">#method_name</a></span>
268
+ <span class='object_link'><a href="Mushikago/Tombo/CapturesRequest.html#method_name-instance_method" title="Mushikago::Tombo::CapturesRequest#method_name (method)">#method_name</a></span>
269
269
 
270
- <small>Mushikago::Tombo::InfoRequest</small>
270
+ <small>Mushikago::Tombo::CapturesRequest</small>
271
271
 
272
272
  </li>
273
273
 
274
274
 
275
275
  <li class="r2 ">
276
- <span class='object_link'><a href="Mushikago/Tombo/CaptureRequest.html#new_http_request-instance_method" title="Mushikago::Tombo::CaptureRequest#new_http_request (method)">#new_http_request</a></span>
276
+ <span class='object_link'><a href="Mushikago/Tombo/DeleteRequest.html#new_http_request-instance_method" title="Mushikago::Tombo::DeleteRequest#new_http_request (method)">#new_http_request</a></span>
277
277
 
278
- <small>Mushikago::Tombo::CaptureRequest</small>
278
+ <small>Mushikago::Tombo::DeleteRequest</small>
279
279
 
280
280
  </li>
281
281
 
282
282
 
283
283
  <li class="r1 ">
284
- <span class='object_link'><a href="Mushikago/Tombo/DeleteRequest.html#new_http_request-instance_method" title="Mushikago::Tombo::DeleteRequest#new_http_request (method)">#new_http_request</a></span>
284
+ <span class='object_link'><a href="Mushikago/Tombo/CaptureRequest.html#new_http_request-instance_method" title="Mushikago::Tombo::CaptureRequest#new_http_request (method)">#new_http_request</a></span>
285
285
 
286
- <small>Mushikago::Tombo::DeleteRequest</small>
286
+ <small>Mushikago::Tombo::CaptureRequest</small>
287
287
 
288
288
  </li>
289
289
 
@@ -94,7 +94,7 @@
94
94
  </div>
95
95
 
96
96
  <div id="footer">
97
- Generated on Tue Sep 6 18:27:44 2011 by
97
+ Generated on Thu Sep 8 10:07:02 2011 by
98
98
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
99
99
  0.7.2 (ruby-1.8.7).
100
100
  </div>
@@ -59,7 +59,7 @@ module Mushikago
59
59
  # @return [Net::HTTPRequest] HTTPリクエスト
60
60
  protected
61
61
  def new_http_request
62
- Net::HTTP::Get.new("#{path}?#{url_encoded_params}")
62
+ new_http_get_request("#{path}?#{url_encoded_params}")
63
63
  end
64
64
 
65
65
  # URLエンコードされた文字列を取得する
@@ -71,6 +71,21 @@ module Mushikago
71
71
  CGI.escape(s).gsub('+', '%20')
72
72
  end
73
73
 
74
+ private
75
+ def new_http_get_request(request_path)
76
+ Net::HTTP::Get.new(request_path)
77
+ end
78
+
79
+ private
80
+ def new_http_post_request(request_path)
81
+ Net::HTTP::Post.new(request_path)
82
+ end
83
+
84
+ private
85
+ def new_http_delete_request(request_path)
86
+ Net::HTTP::Delete.new(request_path)
87
+ end
88
+
74
89
  class << self
75
90
  # リクエストパラメータへのアクセサを定義する
76
91
  # @param [String] name パラメータ名
@@ -28,7 +28,7 @@ module Mushikago
28
28
 
29
29
  # @private
30
30
  def new_http_request
31
- Net::HTTP::Post.new(path)
31
+ new_http_post_request(path)
32
32
  end
33
33
  end
34
34
  end
@@ -15,7 +15,7 @@ module Mushikago
15
15
 
16
16
  # @private
17
17
  def new_http_request
18
- Net::HTTP::Delete.new("#{path}?#{url_encoded_params}")
18
+ new_http_delete_request("#{path}?#{url_encoded_params}")
19
19
  end
20
20
  end
21
21
  end
@@ -1,4 +1,4 @@
1
1
  module Mushikago
2
2
  # Mushikago SDK for Ruby のバージョン
3
- VERSION = '0.1.8'
3
+ VERSION = '0.2.1'
4
4
  end
@@ -23,7 +23,7 @@ describe Mushikago::Auth::Signature do
23
23
  before do
24
24
  @request.add_signature!(Mushikago::Auth::Signer.new('secret_key'))
25
25
  end
26
- subject{ @request }
27
- it{ subject.get_param('signature').should == 'sJSFFQREYbNPd2kJK3kuAR3uSgvcbuWtxGFjan+R3w8=' }
26
+ subject{ @request.get_param('signature') }
27
+ it{ should == 'sJSFFQREYbNPd2kJK3kuAR3uSgvcbuWtxGFjan+R3w8=' }
28
28
  end
29
29
  end
@@ -24,9 +24,9 @@ describe Mushikago::Config do
24
24
  # Mushikago::Configはデフォルトの値を持っている
25
25
  context 'has default value' do
26
26
  subject{ Mushikago::Config.instance }
27
- it{ subject.api_key.should == (ENV['MUSHIKAGO_API_KEY'] || ENV['MUSHIKAGO_API_KEY_ID']) }
28
- it{ subject.secret_key.should == (ENV['MUSHIKAGO_SECRET_KEY'] || ENV['MUSHIKAGO_SECRET_ACCESS_KEY']) }
29
- it{ subject.tombo_endpoint.should == 'tombo.mushikago.org' }
27
+ its(:api_key){ should == (ENV['MUSHIKAGO_API_KEY'] || ENV['MUSHIKAGO_API_KEY_ID']) }
28
+ its(:secret_key){ should == (ENV['MUSHIKAGO_SECRET_KEY'] || ENV['MUSHIKAGO_SECRET_ACCESS_KEY']) }
29
+ its(:tombo_endpoint){ should == 'tombo.mushikago.org' }
30
30
  end
31
31
 
32
32
  # Mushikago::Configは値をロードすることができる
@@ -40,9 +40,9 @@ describe Mushikago::Config do
40
40
  end
41
41
 
42
42
  subject{ Mushikago::Config.instance }
43
- it{ subject.api_key.should == 'api_key' }
44
- it{ subject.secret_key.should == 'secret_key' }
45
- it{ subject.tombo_endpoint.should == 'tombo.mushikago.org' }
43
+ its(:api_key){ should == 'api_key' }
44
+ its(:secret_key){ should == 'secret_key' }
45
+ its(:tombo_endpoint){ should == 'tombo.mushikago.org' }
46
46
 
47
47
  # ロードする際のキーは文字列でもOK
48
48
  context 'loading options key can be string' do
@@ -55,9 +55,9 @@ describe Mushikago::Config do
55
55
  end
56
56
 
57
57
  subject{ Mushikago::Config.instance }
58
- it{ subject.api_key.should == 'api_key' }
59
- it{ subject.secret_key.should == 'secret_key' }
60
- it{ subject.tombo_endpoint.should == 'tombo.mushikago.org' }
58
+ its(:api_key){ should == 'api_key' }
59
+ its(:secret_key){ should == 'secret_key' }
60
+ its(:tombo_endpoint){ should == 'tombo.mushikago.org' }
61
61
  end
62
62
  end
63
63
 
@@ -13,7 +13,7 @@ describe Mushikago::Http::Client do
13
13
 
14
14
  subject{ @client }
15
15
 
16
- it{ subject.api_key.should == Mushikago.config.api_key.to_s }
16
+ its(:api_key){ should == Mushikago.config.api_key.to_s }
17
17
  end
18
18
 
19
19
  context 'construct with options' do
@@ -25,7 +25,7 @@ describe Mushikago::Http::Client do
25
25
 
26
26
  subject{ @client }
27
27
 
28
- it{ subject.api_key.should == 'mushikago api key' }
28
+ its(:api_key){ should == 'mushikago api key' }
29
29
  end
30
30
 
31
31
  context 'send test request' do
@@ -28,11 +28,11 @@ describe Mushikago::Http::Request do
28
28
  it{ should respond_to(:set_param) }
29
29
  it{ should respond_to(:get_param) }
30
30
 
31
- it{ subject.http_method.should == 'GET' }
32
- it{ subject.host.should == 'tombo.ap-northeast-1.mushikago.org' }
33
- it{ subject.port.to_i.should == 80 }
34
- it{ subject.path.should == '/1/list.json' }
35
- it{ subject.headers.should be_a_kind_of(Hash) }
31
+ its(:http_method){ should == 'GET' }
32
+ its(:host){ should == 'tombo.ap-northeast-1.mushikago.org' }
33
+ its('port.to_i'){ should == 80 }
34
+ its(:path){ should == '/1/list.json' }
35
+ its(:headers){ should be_a_kind_of(Hash) }
36
36
  it{ subject.headers['hoge'].should == 'fuga' }
37
37
  it{ subject.get_param('param1').should == 'p1' }
38
38
  it{ subject.get_param('param2').should == 'p2' }
@@ -58,9 +58,9 @@ describe Mushikago::Http::Request do
58
58
  it{ should respond_to(:sample1, :sample1=) }
59
59
  it{ should respond_to(:sample2, :sample2=) }
60
60
 
61
- it{ subject.sample1.should == 'hoge' }
62
- it{ subject.sample2.should == 20 }
63
- it{ subject.sample3.should == 'sample3' }
61
+ its(:sample1){ should == 'hoge' }
62
+ its(:sample2){ should == 20 }
63
+ its(:sample3){ should == 'sample3' }
64
64
  end
65
65
  end
66
66
 
@@ -21,9 +21,9 @@ describe Mushikago::Http::Response do
21
21
  it{ should respond_to(:[]) }
22
22
 
23
23
  it{ subject.meta[:status].should == 200 }
24
- it{ subject.status.should == 200 }
24
+ its(:status){ should == 200 }
25
25
  it{ subject.meta[:message].should == 'OK' }
26
- it{ subject.message.should == 'OK' }
26
+ its(:message){ should == 'OK' }
27
27
  it{ subject.response[:hello].should == 'world' }
28
- it{ subject[:hello].should == 'world' }
28
+ its([:hello]){ should == 'world' }
29
29
  end
@@ -27,16 +27,16 @@ describe Mushikago::Tombo::CaptureRequest do
27
27
 
28
28
  subject{ @request }
29
29
 
30
- it{ subject.host.should == Mushikago.config.tombo_endpoint }
31
- it{ subject.http_method.should == 'POST' }
32
- it{ subject.path.should == '/1/capture.json' }
33
- it{ subject.url.should == 'http://www.mushikago.org/' }
34
- it{ subject.image_format.should == 'png' }
35
- it{ subject.image_quality.should == '20' }
36
- it{ subject.thumbnail.should == '1' }
37
- it{ subject.tags.should == 'hoge,fuga' }
30
+ its(:host){ should == Mushikago.config.tombo_endpoint }
31
+ its(:http_method){ should == 'POST' }
32
+ its(:path){ should == '/1/capture.json' }
33
+ its(:url){ should == 'http://www.mushikago.org/' }
34
+ its(:image_format){ should == 'png' }
35
+ its(:image_quality){ should == '20' }
36
+ its(:thumbnail){ should == '1' }
37
+ its(:tags){ should == 'hoge,fuga' }
38
38
  it{ subject.headers['Content-type'].should == 'application/x-www-form-urlencoded; charset=utf-8' }
39
- it{ subject.url_encoded_params.should == 'image_format=png&image_quality=20&tags=hoge%2Cfuga&thumbnail=1&url=http%3A%2F%2Fwww.mushikago.org%2F' }
39
+ its(:url_encoded_params){ should == 'image_format=png&image_quality=20&tags=hoge%2Cfuga&thumbnail=1&url=http%3A%2F%2Fwww.mushikago.org%2F' }
40
40
  end
41
41
 
42
42
  context 'tags can be array and thumbnail is false' do
@@ -49,7 +49,7 @@ describe Mushikago::Tombo::CaptureRequest do
49
49
  end
50
50
 
51
51
  subject{ @request }
52
- it{ subject.thumbnail.should == '0' }
53
- it{ subject.tags.should == 'hoge,fuga' }
52
+ its(:thumbnail){ should == '0' }
53
+ its(:tags){ should == 'hoge,fuga' }
54
54
  end
55
55
  end
@@ -27,14 +27,14 @@ describe Mushikago::Tombo::CapturesRequest do
27
27
 
28
28
  subject{ @request }
29
29
 
30
- it{ subject.host.should == Mushikago.config.tombo_endpoint }
31
- it{ subject.http_method.should == 'GET' }
32
- it{ subject.path.should == '/1/captures.json' }
33
- it{ subject.id.should == 'id' }
34
- it{ subject.limit.should == '2' }
35
- it{ subject.offset.should == '5' }
36
- it{ subject.domain.should == 'hogehoge.com' }
37
- it{ subject.tag.should == 'tag' }
38
- it{ subject.url_encoded_params.should == 'domain=hogehoge.com&id=id&limit=2&offset=5&tag=tag' }
30
+ its(:host){ should == Mushikago.config.tombo_endpoint }
31
+ its(:http_method){ should == 'GET' }
32
+ its(:path){ should == '/1/captures.json' }
33
+ its(:id){ should == 'id' }
34
+ its(:limit){ should == '2' }
35
+ its(:offset){ should == '5' }
36
+ its(:domain){ should == 'hogehoge.com' }
37
+ its(:tag){ should == 'tag' }
38
+ its(:url_encoded_params){ should == 'domain=hogehoge.com&id=id&limit=2&offset=5&tag=tag' }
39
39
  end
40
40
  end