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 +4 -4
- data/lib/lol/match_list_request.rb +2 -2
- data/lib/lol/version.rb +1 -1
- data/spec/lol/match_list_request_spec.rb +11 -0
- data/spec/lol/request_spec.rb +1 -1
- data/spec/lol/team_request_spec.rb +1 -1
- data/spec/spec_helper.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d4b9a87dc12b623d51f0e9462d06954303232ecd
|
4
|
+
data.tar.gz: 0f23a33f44b023d85d1af3338f9281b7f52d45a5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
data/lib/lol/version.rb
CHANGED
@@ -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
|
data/spec/lol/request_spec.rb
CHANGED
@@ -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)
|
data/spec/spec_helper.rb
CHANGED
@@ -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.
|
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-
|
11
|
+
date: 2016-04-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|