ruby-lol 0.11.5 → 0.11.6

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: 18df63d93c0a8bc0124478eff1f55fe5125b4e81
4
- data.tar.gz: 422e7750e22812f2f0e27f84cb6e08fd11f7077b
3
+ metadata.gz: d4b9a87dc12b623d51f0e9462d06954303232ecd
4
+ data.tar.gz: 0f23a33f44b023d85d1af3338f9281b7f52d45a5
5
5
  SHA512:
6
- metadata.gz: ceffd183e1b7d1ce23cb3f38f355ea9a4fd0bd918c30dfdb143b9776c5d723c5b8682d1cfb0f94096debf1b2279eac17c410f6b33e36652daaad5b30d60d2261
7
- data.tar.gz: b204aee024ca163fa9c21745daf91720581647d4df22006a8a02486bbb80d35ab0ba45128ce0602743361fd5f54c6838012bac4cf4d3e96b686893010302ab5e
6
+ metadata.gz: d35f8a5413e29da1766d57cc8d51d9218b3347521ffba0701105bc5432908daa6c3fd6f3b1e2ef4bcdcf14c3fa4f8db2ad8b2d60aa9a96c79cacf4cc9a2317f4
7
+ data.tar.gz: d545f853c78164b3b04bfa8c03b6e8b875f53e01429df886dbcb20fd675ae0367548f023690af236f4980fcfeaa1a5dc8f8f3f1f9e35f7d002623aadbf1067f8
@@ -8,8 +8,8 @@ module Lol
8
8
 
9
9
  # Returns match list for a summoner
10
10
  # @return []
11
- def get summoner_id
12
- perform_request(api_url("matchlist/by-summoner/#{summoner_id}"))
11
+ def get summoner_id, params = {}
12
+ perform_request(api_url("matchlist/by-summoner/#{summoner_id}", params))
13
13
  end
14
14
  end
15
15
  end
@@ -1,3 +1,3 @@
1
1
  module Lol
2
- VERSION = "0.11.5"
2
+ VERSION = "0.11.6"
3
3
  end
@@ -23,6 +23,17 @@ describe MatchListRequest do
23
23
  fixture = load_fixture('match_list', MatchListRequest.api_version)
24
24
  expect(subject.keys).to match_array fixture.keys
25
25
  end
26
+
27
+ end
28
+
29
+ describe "#get with params" do
30
+ subject { request.get(1, {foobar: "baz"}) }
31
+
32
+ before { stub_request(request, 'match_list', 'matchlist/by-summoner/1', { foobar: "baz"}) }
33
+
34
+ it "supports parameters" do
35
+ expect {subject}.not_to raise_error
36
+ end
26
37
  end
27
38
 
28
39
  end
@@ -46,7 +46,7 @@ describe Request do
46
46
  end
47
47
 
48
48
  it "handles 404" do
49
- expect(error401).to receive(:respond_to?).and_return(true)
49
+ expect(error401).to receive(:respond_to?).at_least(:once).and_return(true)
50
50
  expect(error401).to receive(:not_found?).and_return(true)
51
51
  expect(subject.class).to receive(:get).and_return(error401)
52
52
  expect { subject.perform_request "foo?api_key=asd"}.to raise_error(NotFound)
@@ -29,7 +29,7 @@ describe TeamRequest do
29
29
  describe "#get" do
30
30
 
31
31
  it 'requires a team id' do
32
- expect { request.get }.to raise_error
32
+ expect { request.get }.to raise_error(VCR::Errors::UnhandledHTTPRequestError)
33
33
  end
34
34
 
35
35
  context 'with team id' do
@@ -8,9 +8,9 @@ SPEC_ROOT = __dir__
8
8
 
9
9
  Dir[File.expand_path(File.join(File.dirname(__FILE__),'support','**','*.rb'))].each {|f| require f}
10
10
 
11
- SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
11
+ SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new [
12
12
  Coveralls::SimpleCov::Formatter,
13
- SimpleCov::Formatter::HTMLFormatter,
13
+ SimpleCov::Formatter::HTMLFormatter
14
14
  ]
15
15
 
16
16
  SimpleCov.start
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-lol
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.5
4
+ version: 0.11.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Giovanni Intini
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-29 00:00:00.000000000 Z
11
+ date: 2016-04-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler