nestling 0.1.2 → 0.1.3
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/Gemfile +9 -0
- data/lib/nestling/artist.rb +2 -1
- data/lib/nestling/client.rb +1 -1
- data/lib/nestling/version.rb +1 -1
- data/nestling.gemspec +2 -5
- data/test/helper.rb +1 -1
- data/test/test_artist.rb +96 -56
- data/test/test_client.rb +1 -1
- metadata +7 -55
data/Gemfile
CHANGED
data/lib/nestling/artist.rb
CHANGED
@@ -23,7 +23,8 @@ module Nestling
|
|
23
23
|
:top_hottt => { :collection => true, :key => "artists" },
|
24
24
|
:top_terms => { :collection => true, :key => "terms" },
|
25
25
|
:urls => { :collection => false },
|
26
|
-
:video => { :collection => true }
|
26
|
+
:video => { :collection => true },
|
27
|
+
:twitter => { :collection => false, :key => 'artist' }
|
27
28
|
})
|
28
29
|
|
29
30
|
def initialize(name, client)
|
data/lib/nestling/client.rb
CHANGED
@@ -35,7 +35,7 @@ module Nestling
|
|
35
35
|
def get(meth, params = {})
|
36
36
|
path = "/api/v4/#{meth}?" << convert_params(params)
|
37
37
|
response = @http.get(path, {'User-Agent' => USER_AGENT})
|
38
|
-
hash = MultiJson.
|
38
|
+
hash = MultiJson.load(response.body)
|
39
39
|
|
40
40
|
if (code = hash["response"]["status"]["code"].to_i) != 0
|
41
41
|
raise ERRNO[code], hash["response"]["status"]["message"]
|
data/lib/nestling/version.rb
CHANGED
data/nestling.gemspec
CHANGED
@@ -10,16 +10,13 @@ Gem::Specification.new do |s|
|
|
10
10
|
s.email = ["tob@tobiassvensson.co.uk"]
|
11
11
|
s.homepage = "http://github.com/tobiassvn/nestling"
|
12
12
|
s.summary = %q{Ruby wrapper for the EchoNest API}
|
13
|
-
s.description =
|
13
|
+
s.description = s.summary
|
14
14
|
|
15
15
|
s.files = `git ls-files`.split("\n")
|
16
16
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
17
17
|
s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
|
18
18
|
s.require_paths = ["lib"]
|
19
19
|
|
20
|
-
s.add_dependency "multi_json", "~> 1.
|
21
|
-
s.add_development_dependency "rake", "~> 0.9"
|
22
|
-
s.add_development_dependency "minitest", "~> 2.6.0"
|
23
|
-
s.add_development_dependency "mocha", "~> 0.9.12"
|
20
|
+
s.add_dependency "multi_json", "~> 1.3.7"
|
24
21
|
end
|
25
22
|
|
data/test/helper.rb
CHANGED
data/test/test_artist.rb
CHANGED
@@ -56,7 +56,7 @@ class TestArtist < MiniTest::Unit::TestCase
|
|
56
56
|
def test_biographies_method
|
57
57
|
assert_respond_to @artist, :biographies
|
58
58
|
end
|
59
|
-
|
59
|
+
|
60
60
|
def test_biographies_returns_collection
|
61
61
|
json = <<-EOS
|
62
62
|
{"response": {
|
@@ -75,7 +75,7 @@ class TestArtist < MiniTest::Unit::TestCase
|
|
75
75
|
assert_kind_of Nestling::Collection, response
|
76
76
|
assert_equal 'bar', response[0][:foo]
|
77
77
|
end
|
78
|
-
|
78
|
+
|
79
79
|
def test_biographies_passes_options
|
80
80
|
json = <<-EOS
|
81
81
|
{"response": {
|
@@ -92,11 +92,11 @@ class TestArtist < MiniTest::Unit::TestCase
|
|
92
92
|
expect_request json, "#{Nestling::Artist::METHOD_PREFIX}biographies", { :foo => :bar, :name => 'bar' }
|
93
93
|
@artist.biographies :foo => :bar
|
94
94
|
end
|
95
|
-
|
95
|
+
|
96
96
|
def test_blogs_method
|
97
97
|
assert_respond_to @artist, :blogs
|
98
98
|
end
|
99
|
-
|
99
|
+
|
100
100
|
def test_blogs_returns_collection
|
101
101
|
json = <<-EOS
|
102
102
|
{"response": {
|
@@ -115,7 +115,7 @@ class TestArtist < MiniTest::Unit::TestCase
|
|
115
115
|
assert_kind_of Nestling::Collection, response
|
116
116
|
assert_equal 'bar', response[0][:foo]
|
117
117
|
end
|
118
|
-
|
118
|
+
|
119
119
|
def test_blogs_passes_options
|
120
120
|
json = <<-EOS
|
121
121
|
{"response": {
|
@@ -132,11 +132,11 @@ class TestArtist < MiniTest::Unit::TestCase
|
|
132
132
|
expect_request json, "#{Nestling::Artist::METHOD_PREFIX}blogs", { :foo => :bar, :name => 'bar' }
|
133
133
|
@artist.blogs :foo => :bar
|
134
134
|
end
|
135
|
-
|
135
|
+
|
136
136
|
def test_familiarity_method
|
137
137
|
assert_respond_to @artist, :familiarity
|
138
138
|
end
|
139
|
-
|
139
|
+
|
140
140
|
def test_familiarity_returns_hash
|
141
141
|
json = <<-EOS
|
142
142
|
{"response": {
|
@@ -155,7 +155,7 @@ class TestArtist < MiniTest::Unit::TestCase
|
|
155
155
|
assert_kind_of Nestling::Hash, response
|
156
156
|
assert_equal 'bar', response[:foo]
|
157
157
|
end
|
158
|
-
|
158
|
+
|
159
159
|
def test_familiarity_passes_options
|
160
160
|
json = <<-EOS
|
161
161
|
{"response": {
|
@@ -172,11 +172,11 @@ class TestArtist < MiniTest::Unit::TestCase
|
|
172
172
|
expect_request json, "#{Nestling::Artist::METHOD_PREFIX}familiarity", { :foo => :bar, :name => 'bar' }
|
173
173
|
@artist.familiarity :foo => :bar
|
174
174
|
end
|
175
|
-
|
175
|
+
|
176
176
|
def test_hotttnesss_method
|
177
177
|
assert_respond_to @artist, :hotttnesss
|
178
178
|
end
|
179
|
-
|
179
|
+
|
180
180
|
def test_hotttnesss_returns_hash
|
181
181
|
json = <<-EOS
|
182
182
|
{"response": {
|
@@ -195,7 +195,7 @@ class TestArtist < MiniTest::Unit::TestCase
|
|
195
195
|
assert_kind_of Nestling::Hash, response
|
196
196
|
assert_equal 'bar', response[:foo]
|
197
197
|
end
|
198
|
-
|
198
|
+
|
199
199
|
def test_hotttnesss_passes_options
|
200
200
|
json = <<-EOS
|
201
201
|
{"response": {
|
@@ -212,11 +212,51 @@ class TestArtist < MiniTest::Unit::TestCase
|
|
212
212
|
expect_request json, "#{Nestling::Artist::METHOD_PREFIX}hotttnesss", { :foo => :bar, :name => 'bar' }
|
213
213
|
@artist.hotttnesss :foo => :bar
|
214
214
|
end
|
215
|
-
|
215
|
+
|
216
|
+
def test_twitter_method
|
217
|
+
assert_respond_to @artist, :twitter
|
218
|
+
end
|
219
|
+
|
220
|
+
def test_twitter_returns_hash
|
221
|
+
json = <<-EOS
|
222
|
+
{"response": {
|
223
|
+
"status": {
|
224
|
+
"code": "0",
|
225
|
+
"message": "Success",
|
226
|
+
"version": "4.2"
|
227
|
+
},
|
228
|
+
"artist": {
|
229
|
+
"foo": "bar"
|
230
|
+
}
|
231
|
+
}}
|
232
|
+
EOS
|
233
|
+
expect_request json, "#{Nestling::Artist::METHOD_PREFIX}twitter"
|
234
|
+
response = @artist.twitter
|
235
|
+
assert_kind_of Nestling::Hash, response
|
236
|
+
assert_equal 'bar', response[:foo]
|
237
|
+
end
|
238
|
+
|
239
|
+
def test_twitter_passes_options
|
240
|
+
json = <<-EOS
|
241
|
+
{"response": {
|
242
|
+
"status": {
|
243
|
+
"code": "0",
|
244
|
+
"message": "Success",
|
245
|
+
"version": "4.2"
|
246
|
+
},
|
247
|
+
"artist": {
|
248
|
+
"foo": "bar"
|
249
|
+
}
|
250
|
+
}}
|
251
|
+
EOS
|
252
|
+
expect_request json, "#{Nestling::Artist::METHOD_PREFIX}twitter", { :foo => :bar, :name => 'bar' }
|
253
|
+
@artist.twitter :foo => :bar
|
254
|
+
end
|
255
|
+
|
216
256
|
def test_images_method
|
217
257
|
assert_respond_to @artist, :images
|
218
258
|
end
|
219
|
-
|
259
|
+
|
220
260
|
def test_images_returns_collection
|
221
261
|
json = <<-EOS
|
222
262
|
{"response": {
|
@@ -235,7 +275,7 @@ class TestArtist < MiniTest::Unit::TestCase
|
|
235
275
|
assert_kind_of Nestling::Collection, response
|
236
276
|
assert_equal 'bar', response[0][:foo]
|
237
277
|
end
|
238
|
-
|
278
|
+
|
239
279
|
def test_images_passes_options
|
240
280
|
json = <<-EOS
|
241
281
|
{"response": {
|
@@ -252,11 +292,11 @@ class TestArtist < MiniTest::Unit::TestCase
|
|
252
292
|
expect_request json, "#{Nestling::Artist::METHOD_PREFIX}images", { :foo => :bar, :name => 'bar' }
|
253
293
|
@artist.images :foo => :bar
|
254
294
|
end
|
255
|
-
|
295
|
+
|
256
296
|
def test_list_terms_method
|
257
297
|
assert_respond_to @artist, :list_terms
|
258
298
|
end
|
259
|
-
|
299
|
+
|
260
300
|
def test_list_terms_returns_collection
|
261
301
|
json = <<-EOS
|
262
302
|
{"response": {
|
@@ -275,7 +315,7 @@ class TestArtist < MiniTest::Unit::TestCase
|
|
275
315
|
assert_kind_of Nestling::Collection, response
|
276
316
|
assert_equal 'bar', response[0][:foo]
|
277
317
|
end
|
278
|
-
|
318
|
+
|
279
319
|
def test_list_terms_passes_options
|
280
320
|
json = <<-EOS
|
281
321
|
{"response": {
|
@@ -292,11 +332,11 @@ class TestArtist < MiniTest::Unit::TestCase
|
|
292
332
|
expect_request json, "#{Nestling::Artist::METHOD_PREFIX}list_terms", { :foo => :bar, :name => 'bar' }
|
293
333
|
@artist.list_terms :foo => :bar
|
294
334
|
end
|
295
|
-
|
335
|
+
|
296
336
|
def test_news_method
|
297
337
|
assert_respond_to @artist, :news
|
298
338
|
end
|
299
|
-
|
339
|
+
|
300
340
|
def test_news_returns_collection
|
301
341
|
json = <<-EOS
|
302
342
|
{"response": {
|
@@ -315,7 +355,7 @@ class TestArtist < MiniTest::Unit::TestCase
|
|
315
355
|
assert_kind_of Nestling::Collection, response
|
316
356
|
assert_equal 'bar', response[0][:foo]
|
317
357
|
end
|
318
|
-
|
358
|
+
|
319
359
|
def test_news_passes_options
|
320
360
|
json = <<-EOS
|
321
361
|
{"response": {
|
@@ -332,11 +372,11 @@ class TestArtist < MiniTest::Unit::TestCase
|
|
332
372
|
expect_request json, "#{Nestling::Artist::METHOD_PREFIX}news", { :foo => :bar, :name => 'bar' }
|
333
373
|
@artist.news :foo => :bar
|
334
374
|
end
|
335
|
-
|
375
|
+
|
336
376
|
def test_profile_method
|
337
377
|
assert_respond_to @artist, :profile
|
338
378
|
end
|
339
|
-
|
379
|
+
|
340
380
|
def test_profile_returns_hash
|
341
381
|
json = <<-EOS
|
342
382
|
{"response": {
|
@@ -355,7 +395,7 @@ class TestArtist < MiniTest::Unit::TestCase
|
|
355
395
|
assert_kind_of Nestling::Hash, response
|
356
396
|
assert_equal 'bar', response[:foo]
|
357
397
|
end
|
358
|
-
|
398
|
+
|
359
399
|
def test_profile_passes_options
|
360
400
|
json = <<-EOS
|
361
401
|
{"response": {
|
@@ -372,11 +412,11 @@ class TestArtist < MiniTest::Unit::TestCase
|
|
372
412
|
expect_request json, "#{Nestling::Artist::METHOD_PREFIX}profile", { :foo => :bar, :name => 'bar' }
|
373
413
|
@artist.profile :foo => :bar
|
374
414
|
end
|
375
|
-
|
415
|
+
|
376
416
|
def test_reviews_method
|
377
417
|
assert_respond_to @artist, :reviews
|
378
418
|
end
|
379
|
-
|
419
|
+
|
380
420
|
def test_reviews_returns_collection
|
381
421
|
json = <<-EOS
|
382
422
|
{"response": {
|
@@ -395,7 +435,7 @@ class TestArtist < MiniTest::Unit::TestCase
|
|
395
435
|
assert_kind_of Nestling::Collection, response
|
396
436
|
assert_equal 'bar', response[0][:foo]
|
397
437
|
end
|
398
|
-
|
438
|
+
|
399
439
|
def test_reviews_passes_options
|
400
440
|
json = <<-EOS
|
401
441
|
{"response": {
|
@@ -412,11 +452,11 @@ class TestArtist < MiniTest::Unit::TestCase
|
|
412
452
|
expect_request json, "#{Nestling::Artist::METHOD_PREFIX}reviews", { :foo => :bar, :name => 'bar' }
|
413
453
|
@artist.reviews :foo => :bar
|
414
454
|
end
|
415
|
-
|
455
|
+
|
416
456
|
def test_search_method
|
417
457
|
assert_respond_to @artist, :search
|
418
458
|
end
|
419
|
-
|
459
|
+
|
420
460
|
def test_search_returns_collection
|
421
461
|
json = <<-EOS
|
422
462
|
{"response": {
|
@@ -435,7 +475,7 @@ class TestArtist < MiniTest::Unit::TestCase
|
|
435
475
|
assert_kind_of Nestling::Collection, response
|
436
476
|
assert_equal 'bar', response[0][:foo]
|
437
477
|
end
|
438
|
-
|
478
|
+
|
439
479
|
def test_search_passes_options
|
440
480
|
json = <<-EOS
|
441
481
|
{"response": {
|
@@ -452,11 +492,11 @@ class TestArtist < MiniTest::Unit::TestCase
|
|
452
492
|
expect_request json, "#{Nestling::Artist::METHOD_PREFIX}search", { :foo => :bar, :name => 'bar' }
|
453
493
|
@artist.search :foo => :bar
|
454
494
|
end
|
455
|
-
|
495
|
+
|
456
496
|
def test_extract_method
|
457
497
|
assert_respond_to @artist, :extract
|
458
498
|
end
|
459
|
-
|
499
|
+
|
460
500
|
def test_extract_returns_collection
|
461
501
|
json = <<-EOS
|
462
502
|
{"response": {
|
@@ -475,7 +515,7 @@ class TestArtist < MiniTest::Unit::TestCase
|
|
475
515
|
assert_kind_of Nestling::Collection, response
|
476
516
|
assert_equal 'bar', response[0][:foo]
|
477
517
|
end
|
478
|
-
|
518
|
+
|
479
519
|
def test_extract_passes_options
|
480
520
|
json = <<-EOS
|
481
521
|
{"response": {
|
@@ -492,11 +532,11 @@ class TestArtist < MiniTest::Unit::TestCase
|
|
492
532
|
expect_request json, "#{Nestling::Artist::METHOD_PREFIX}extract", { :foo => :bar, :name => 'bar' }
|
493
533
|
@artist.extract :foo => :bar
|
494
534
|
end
|
495
|
-
|
535
|
+
|
496
536
|
def test_songs_method
|
497
537
|
assert_respond_to @artist, :songs
|
498
538
|
end
|
499
|
-
|
539
|
+
|
500
540
|
def test_songs_returns_collection
|
501
541
|
json = <<-EOS
|
502
542
|
{"response": {
|
@@ -515,7 +555,7 @@ class TestArtist < MiniTest::Unit::TestCase
|
|
515
555
|
assert_kind_of Nestling::Collection, response
|
516
556
|
assert_equal 'bar', response[0][:foo]
|
517
557
|
end
|
518
|
-
|
558
|
+
|
519
559
|
def test_songs_passes_options
|
520
560
|
json = <<-EOS
|
521
561
|
{"response": {
|
@@ -532,11 +572,11 @@ class TestArtist < MiniTest::Unit::TestCase
|
|
532
572
|
expect_request json, "#{Nestling::Artist::METHOD_PREFIX}songs", { :foo => :bar, :name => 'bar' }
|
533
573
|
@artist.songs :foo => :bar
|
534
574
|
end
|
535
|
-
|
575
|
+
|
536
576
|
def test_similar_method
|
537
577
|
assert_respond_to @artist, :similar
|
538
578
|
end
|
539
|
-
|
579
|
+
|
540
580
|
def test_similar_returns_collection
|
541
581
|
json = <<-EOS
|
542
582
|
{"response": {
|
@@ -555,7 +595,7 @@ class TestArtist < MiniTest::Unit::TestCase
|
|
555
595
|
assert_kind_of Nestling::Collection, response
|
556
596
|
assert_equal 'bar', response[0][:foo]
|
557
597
|
end
|
558
|
-
|
598
|
+
|
559
599
|
def test_similar_passes_options
|
560
600
|
json = <<-EOS
|
561
601
|
{"response": {
|
@@ -572,11 +612,11 @@ class TestArtist < MiniTest::Unit::TestCase
|
|
572
612
|
expect_request json, "#{Nestling::Artist::METHOD_PREFIX}similar", { :foo => :bar, :name => 'bar' }
|
573
613
|
@artist.similar :foo => :bar
|
574
614
|
end
|
575
|
-
|
615
|
+
|
576
616
|
def test_suggest_method
|
577
617
|
assert_respond_to @artist, :suggest
|
578
618
|
end
|
579
|
-
|
619
|
+
|
580
620
|
def test_suggest_returns_collection
|
581
621
|
json = <<-EOS
|
582
622
|
{"response": {
|
@@ -595,7 +635,7 @@ class TestArtist < MiniTest::Unit::TestCase
|
|
595
635
|
assert_kind_of Nestling::Collection, response
|
596
636
|
assert_equal 'bar', response[0][:foo]
|
597
637
|
end
|
598
|
-
|
638
|
+
|
599
639
|
def test_suggest_passes_options
|
600
640
|
json = <<-EOS
|
601
641
|
{"response": {
|
@@ -612,11 +652,11 @@ class TestArtist < MiniTest::Unit::TestCase
|
|
612
652
|
expect_request json, "#{Nestling::Artist::METHOD_PREFIX}suggest", { :foo => :bar, :name => 'bar' }
|
613
653
|
@artist.suggest :foo => :bar
|
614
654
|
end
|
615
|
-
|
655
|
+
|
616
656
|
def test_terms_method
|
617
657
|
assert_respond_to @artist, :terms
|
618
658
|
end
|
619
|
-
|
659
|
+
|
620
660
|
def test_terms_returns_collection
|
621
661
|
json = <<-EOS
|
622
662
|
{"response": {
|
@@ -635,7 +675,7 @@ class TestArtist < MiniTest::Unit::TestCase
|
|
635
675
|
assert_kind_of Nestling::Collection, response
|
636
676
|
assert_equal 'bar', response[0][:foo]
|
637
677
|
end
|
638
|
-
|
678
|
+
|
639
679
|
def test_terms_passes_options
|
640
680
|
json = <<-EOS
|
641
681
|
{"response": {
|
@@ -652,11 +692,11 @@ class TestArtist < MiniTest::Unit::TestCase
|
|
652
692
|
expect_request json, "#{Nestling::Artist::METHOD_PREFIX}terms", { :foo => :bar, :name => 'bar' }
|
653
693
|
@artist.terms :foo => :bar
|
654
694
|
end
|
655
|
-
|
695
|
+
|
656
696
|
def test_top_hottt_method
|
657
697
|
assert_respond_to @artist, :top_hottt
|
658
698
|
end
|
659
|
-
|
699
|
+
|
660
700
|
def test_top_hottt_returns_collection
|
661
701
|
json = <<-EOS
|
662
702
|
{"response": {
|
@@ -675,7 +715,7 @@ class TestArtist < MiniTest::Unit::TestCase
|
|
675
715
|
assert_kind_of Nestling::Collection, response
|
676
716
|
assert_equal 'bar', response[0][:foo]
|
677
717
|
end
|
678
|
-
|
718
|
+
|
679
719
|
def test_top_hottt_passes_options
|
680
720
|
json = <<-EOS
|
681
721
|
{"response": {
|
@@ -692,11 +732,11 @@ class TestArtist < MiniTest::Unit::TestCase
|
|
692
732
|
expect_request json, "#{Nestling::Artist::METHOD_PREFIX}top_hottt", { :foo => :bar, :name => 'bar' }
|
693
733
|
@artist.top_hottt :foo => :bar
|
694
734
|
end
|
695
|
-
|
735
|
+
|
696
736
|
def test_top_terms_method
|
697
737
|
assert_respond_to @artist, :top_terms
|
698
738
|
end
|
699
|
-
|
739
|
+
|
700
740
|
def test_top_terms_returns_collection
|
701
741
|
json = <<-EOS
|
702
742
|
{"response": {
|
@@ -715,7 +755,7 @@ class TestArtist < MiniTest::Unit::TestCase
|
|
715
755
|
assert_kind_of Nestling::Collection, response
|
716
756
|
assert_equal 'bar', response[0][:foo]
|
717
757
|
end
|
718
|
-
|
758
|
+
|
719
759
|
def test_top_terms_passes_options
|
720
760
|
json = <<-EOS
|
721
761
|
{"response": {
|
@@ -732,11 +772,11 @@ class TestArtist < MiniTest::Unit::TestCase
|
|
732
772
|
expect_request json, "#{Nestling::Artist::METHOD_PREFIX}top_terms", { :foo => :bar, :name => 'bar' }
|
733
773
|
@artist.top_terms :foo => :bar
|
734
774
|
end
|
735
|
-
|
775
|
+
|
736
776
|
def test_urls_method
|
737
777
|
assert_respond_to @artist, :urls
|
738
778
|
end
|
739
|
-
|
779
|
+
|
740
780
|
def test_urls_returns_hash
|
741
781
|
json = <<-EOS
|
742
782
|
{"response": {
|
@@ -755,7 +795,7 @@ class TestArtist < MiniTest::Unit::TestCase
|
|
755
795
|
assert_kind_of Nestling::Hash, response
|
756
796
|
assert_equal 'bar', response[:foo]
|
757
797
|
end
|
758
|
-
|
798
|
+
|
759
799
|
def test_urls_passes_options
|
760
800
|
json = <<-EOS
|
761
801
|
{"response": {
|
@@ -772,11 +812,11 @@ class TestArtist < MiniTest::Unit::TestCase
|
|
772
812
|
expect_request json, "#{Nestling::Artist::METHOD_PREFIX}urls", { :foo => :bar, :name => 'bar' }
|
773
813
|
@artist.urls :foo => :bar
|
774
814
|
end
|
775
|
-
|
815
|
+
|
776
816
|
def test_video_method
|
777
817
|
assert_respond_to @artist, :video
|
778
818
|
end
|
779
|
-
|
819
|
+
|
780
820
|
def test_video_returns_collection
|
781
821
|
json = <<-EOS
|
782
822
|
{"response": {
|
@@ -795,7 +835,7 @@ class TestArtist < MiniTest::Unit::TestCase
|
|
795
835
|
assert_kind_of Nestling::Collection, response
|
796
836
|
assert_equal 'bar', response[0][:foo]
|
797
837
|
end
|
798
|
-
|
838
|
+
|
799
839
|
def test_video_passes_options
|
800
840
|
json = <<-EOS
|
801
841
|
{"response": {
|
data/test/test_client.rb
CHANGED
@@ -68,7 +68,7 @@ class TestClient < MiniTest::Unit::TestCase
|
|
68
68
|
}
|
69
69
|
EOS
|
70
70
|
stub_http_get response
|
71
|
-
assert_equal MultiJson.
|
71
|
+
assert_equal MultiJson.load(response), Client.new('foo').get('bar')
|
72
72
|
end
|
73
73
|
|
74
74
|
def test_sends_user_agent
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nestling
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-11-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: multi_json
|
@@ -18,7 +18,7 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 1.
|
21
|
+
version: 1.3.7
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -26,55 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ~>
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 1.
|
30
|
-
- !ruby/object:Gem::Dependency
|
31
|
-
name: rake
|
32
|
-
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
|
-
requirements:
|
35
|
-
- - ~>
|
36
|
-
- !ruby/object:Gem::Version
|
37
|
-
version: '0.9'
|
38
|
-
type: :development
|
39
|
-
prerelease: false
|
40
|
-
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
|
-
requirements:
|
43
|
-
- - ~>
|
44
|
-
- !ruby/object:Gem::Version
|
45
|
-
version: '0.9'
|
46
|
-
- !ruby/object:Gem::Dependency
|
47
|
-
name: minitest
|
48
|
-
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
|
-
requirements:
|
51
|
-
- - ~>
|
52
|
-
- !ruby/object:Gem::Version
|
53
|
-
version: 2.6.0
|
54
|
-
type: :development
|
55
|
-
prerelease: false
|
56
|
-
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
|
-
requirements:
|
59
|
-
- - ~>
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: 2.6.0
|
62
|
-
- !ruby/object:Gem::Dependency
|
63
|
-
name: mocha
|
64
|
-
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
|
-
requirements:
|
67
|
-
- - ~>
|
68
|
-
- !ruby/object:Gem::Version
|
69
|
-
version: 0.9.12
|
70
|
-
type: :development
|
71
|
-
prerelease: false
|
72
|
-
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
|
-
requirements:
|
75
|
-
- - ~>
|
76
|
-
- !ruby/object:Gem::Version
|
77
|
-
version: 0.9.12
|
29
|
+
version: 1.3.7
|
78
30
|
description: Ruby wrapper for the EchoNest API
|
79
31
|
email:
|
80
32
|
- tob@tobiassvensson.co.uk
|
@@ -125,7 +77,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
125
77
|
version: '0'
|
126
78
|
segments:
|
127
79
|
- 0
|
128
|
-
hash:
|
80
|
+
hash: 417120700315738069
|
129
81
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
130
82
|
none: false
|
131
83
|
requirements:
|
@@ -134,10 +86,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
134
86
|
version: '0'
|
135
87
|
segments:
|
136
88
|
- 0
|
137
|
-
hash:
|
89
|
+
hash: 417120700315738069
|
138
90
|
requirements: []
|
139
91
|
rubyforge_project:
|
140
|
-
rubygems_version: 1.8.
|
92
|
+
rubygems_version: 1.8.23
|
141
93
|
signing_key:
|
142
94
|
specification_version: 3
|
143
95
|
summary: Ruby wrapper for the EchoNest API
|