viki 1.0.2 → 1.0.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/lib/viki/request.rb CHANGED
@@ -28,7 +28,7 @@ module Viki
28
28
  url_params = ""
29
29
  params.keys.each { |key| url_params += "#{key}=#{params[key]}&" }
30
30
 
31
- "#{path.chop}?#{url_params.chop}"
31
+ url_params.empty? ? path.chop : "#{path.chop}?#{url_params.chop}"
32
32
  end
33
33
 
34
34
  private
data/lib/viki/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Viki
2
- VERSION = "1.0.2"
2
+ VERSION = "1.0.3"
3
3
  end
@@ -39,6 +39,9 @@ describe Viki::Request do
39
39
  it "should return the right url for the method call" do
40
40
  req = client.movies(1234, { genre: 2, per_page: 3 })
41
41
  req.url.should == "movies/1234?genre=2&per_page=3"
42
+
43
+ req = client.series(1234)
44
+ req.url.should == "series/1234"
42
45
  end
43
46
  end
44
47
  end
@@ -152,7 +152,7 @@ describe "Viki" do
152
152
 
153
153
  describe ".prev" do
154
154
  it "should invoke direct_request with previous_url" do
155
- VCR.use_cassette("movies/list/pg2") do
155
+ VCR.use_cassette("movies/list/pg3") do
156
156
  movies_pg1 = client.movies.get
157
157
  movies_pg2 = movies_pg1.next
158
158
  previous_url = movies_pg2.instance_variable_get(:@previous_url)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: viki
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2012-07-11 00:00:00.000000000 Z
14
+ date: 2012-07-13 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rspec