freesound_ruby 0.1.2 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6bdf10dac7328f57f4ca69ce1a302ce13f7317c7
4
- data.tar.gz: ba834b5fe46d843f6967cc9e9657acc99657a606
3
+ metadata.gz: 22adeae1c267c4c50ad77b028473ec13160862c9
4
+ data.tar.gz: 93d41dd08dece115b004f15425b5aea1ec6ff2f3
5
5
  SHA512:
6
- metadata.gz: 67c99376aa1f0ee082c0c83adb194334a99d480732922e32259449b12169f4216cfb15c14737bdbf2804ce316d0be8aecc42f970af721a8d2daf7f6925520692
7
- data.tar.gz: 3dfca1879a9616c23a3fff721b3591ab2ff7cc25340cd9ce7b196068f5923576e07ade609307b4c79c5d1e73bd16fdfa0730ed83f9f42c64b9a4ced58dd4a20b
6
+ metadata.gz: 601521ce21f80be707c9c2294929b50e4100f587eaf2531840a720e365f833c5993924e71a5243176dffbef81614600e6170449f18a7d23e12bd32ff54b61dfa
7
+ data.tar.gz: 1b0597c1ed2721d27274841042a6d8c085f21d719215568852b04da7bb5f431c845c06d3711758541bf68728014b21dfd43e4b2a3f33ae0706bdb647c13c1fb9
data/.gitignore CHANGED
@@ -51,3 +51,6 @@ spec/fixtures/vcr_cassettes
51
51
 
52
52
  # Gem integration script
53
53
  script/gem_integration_test.sh
54
+
55
+ # Gemfile.lock
56
+ Gemfile.lock
@@ -28,8 +28,8 @@ module Freesound
28
28
  end
29
29
  end
30
30
 
31
- def search(query)
32
- params = query_params(q: query)
31
+ def search(query, _params={})
32
+ params = query_params(q: query).merge(_params)
33
33
  Resources::Sound.find(:all, from: :search, params: params)
34
34
  end
35
35
 
@@ -1,3 +1,3 @@
1
1
  module Freesound
2
- VERSION = "0.1.2"
2
+ VERSION = "0.2.0"
3
3
  end
@@ -11,4 +11,21 @@ describe "searching for a sound" do
11
11
  expect(sounds.size).to be > 0
12
12
  expect(sounds.first.tags).to respond_to(:to_ary)
13
13
  end
14
+
15
+ it "accepts additional query parameters" do
16
+ sounds = VCR.use_cassette(:search_bass_3_results) do
17
+ client.search("bass", p: 1, sounds_per_page: 2)
18
+ end
19
+
20
+ expect(sounds.size).to be(2)
21
+ expect(sounds.first.tags).to respond_to(:to_ary)
22
+ end
23
+
24
+ it "ignores unrecognized query parameters" do
25
+ expect {
26
+ VCR.use_cassette(:search_bass_invalid_query) do
27
+ client.search("bass", lol: :hi)
28
+ end
29
+ }.not_to raise_error
30
+ end
14
31
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: freesound_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Genco
@@ -105,7 +105,6 @@ files:
105
105
  - .gitignore
106
106
  - .travis.yml
107
107
  - Gemfile
108
- - Gemfile.lock
109
108
  - LICENSE.txt
110
109
  - README.md
111
110
  - Rakefile
@@ -1,61 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- freesound_ruby (0.1.2)
5
- activeresource (~> 4.0.0)
6
-
7
- GEM
8
- remote: https://rubygems.org/
9
- specs:
10
- activemodel (4.0.2)
11
- activesupport (= 4.0.2)
12
- builder (~> 3.1.0)
13
- activeresource (4.0.0)
14
- activemodel (~> 4.0)
15
- activesupport (~> 4.0)
16
- rails-observers (~> 0.1.1)
17
- activesupport (4.0.2)
18
- i18n (~> 0.6, >= 0.6.4)
19
- minitest (~> 4.2)
20
- multi_json (~> 1.3)
21
- thread_safe (~> 0.1)
22
- tzinfo (~> 0.3.37)
23
- addressable (2.3.5)
24
- atomic (1.1.14)
25
- builder (3.1.4)
26
- crack (0.4.1)
27
- safe_yaml (~> 0.9.0)
28
- diff-lcs (1.2.5)
29
- i18n (0.6.9)
30
- minitest (4.7.5)
31
- multi_json (1.8.2)
32
- rails-observers (0.1.2)
33
- activemodel (~> 4.0)
34
- rake (10.1.0)
35
- rspec (2.14.1)
36
- rspec-core (~> 2.14.0)
37
- rspec-expectations (~> 2.14.0)
38
- rspec-mocks (~> 2.14.0)
39
- rspec-core (2.14.7)
40
- rspec-expectations (2.14.4)
41
- diff-lcs (>= 1.1.3, < 2.0)
42
- rspec-mocks (2.14.4)
43
- safe_yaml (0.9.7)
44
- thread_safe (0.1.3)
45
- atomic
46
- tzinfo (0.3.38)
47
- vcr (2.8.0)
48
- webmock (1.8.11)
49
- addressable (>= 2.2.7)
50
- crack (>= 0.1.7)
51
-
52
- PLATFORMS
53
- ruby
54
-
55
- DEPENDENCIES
56
- bundler
57
- freesound_ruby!
58
- rake
59
- rspec
60
- vcr (~> 2.8.0)
61
- webmock (~> 1.8.0)