luchadeer 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -0
- data/Gemfile.lock +1 -1
- data/README.md +29 -33
- data/lib/luchadeer.rb +0 -12
- data/lib/luchadeer/api.rb +42 -22
- data/lib/luchadeer/client.rb +2 -2
- data/lib/luchadeer/error.rb +4 -11
- data/lib/luchadeer/resource.rb +14 -2
- data/lib/luchadeer/resources.rb +135 -0
- data/lib/luchadeer/search.rb +1 -9
- data/lib/luchadeer/version.rb +1 -1
- data/spec/luchadeer/resources_spec.rb +6 -0
- data/spec/luchadeer_spec.rb +3 -6
- data/spec/spec_helper.rb +3 -0
- data/spec/support/shared_resource.rb +40 -0
- data/spec/support/shared_searchable.rb +65 -0
- metadata +11 -57
- data/lib/luchadeer/api/characters.rb +0 -11
- data/lib/luchadeer/api/companies.rb +0 -11
- data/lib/luchadeer/api/concepts.rb +0 -11
- data/lib/luchadeer/api/franchises.rb +0 -11
- data/lib/luchadeer/api/games.rb +0 -11
- data/lib/luchadeer/api/locations.rb +0 -11
- data/lib/luchadeer/api/objects.rb +0 -11
- data/lib/luchadeer/api/people.rb +0 -11
- data/lib/luchadeer/api/videos.rb +0 -11
- data/lib/luchadeer/character.rb +0 -13
- data/lib/luchadeer/company.rb +0 -13
- data/lib/luchadeer/concept.rb +0 -13
- data/lib/luchadeer/franchise.rb +0 -13
- data/lib/luchadeer/game.rb +0 -13
- data/lib/luchadeer/location.rb +0 -13
- data/lib/luchadeer/object.rb +0 -13
- data/lib/luchadeer/person.rb +0 -13
- data/lib/luchadeer/video.rb +0 -13
- data/spec/luchadeer/api/characters_spec.rb +0 -28
- data/spec/luchadeer/api/companies_spec.rb +0 -28
- data/spec/luchadeer/api/concepts_spec.rb +0 -28
- data/spec/luchadeer/api/franchises_spec.rb +0 -28
- data/spec/luchadeer/api/games_spec.rb +0 -28
- data/spec/luchadeer/api/locations_spec.rb +0 -28
- data/spec/luchadeer/api/objects_spec.rb +0 -28
- data/spec/luchadeer/api/people_spec.rb +0 -28
- data/spec/luchadeer/api/videos_spec.rb +0 -28
- data/spec/luchadeer/character_spec.rb +0 -27
- data/spec/luchadeer/company_spec.rb +0 -27
- data/spec/luchadeer/concept_spec.rb +0 -27
- data/spec/luchadeer/franchise_spec.rb +0 -27
- data/spec/luchadeer/game_spec.rb +0 -27
- data/spec/luchadeer/location_spec.rb +0 -27
- data/spec/luchadeer/object_spec.rb +0 -27
- data/spec/luchadeer/person_spec.rb +0 -27
- data/spec/luchadeer/video_spec.rb +0 -27
@@ -1,27 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
describe Luchadeer::Location do
|
4
|
-
|
5
|
-
it 'is a resource' do
|
6
|
-
expect(described_class.new).to be_a Luchadeer::Resource
|
7
|
-
end
|
8
|
-
|
9
|
-
describe '.find' do
|
10
|
-
let(:client) { Luchadeer::Client.new }
|
11
|
-
|
12
|
-
before :each do
|
13
|
-
Luchadeer.client = client
|
14
|
-
end
|
15
|
-
|
16
|
-
it 'forwards to Client#location with arguments' do
|
17
|
-
expect(client).to receive(:location).with(1, true)
|
18
|
-
described_class.find(1, true)
|
19
|
-
end
|
20
|
-
|
21
|
-
it 'forwards to Client#location with default refresh' do
|
22
|
-
expect(client).to receive(:location).with(1, false)
|
23
|
-
described_class.find(1)
|
24
|
-
end
|
25
|
-
end
|
26
|
-
|
27
|
-
end
|
@@ -1,27 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
describe Luchadeer::Object do
|
4
|
-
|
5
|
-
it 'is a resource' do
|
6
|
-
expect(described_class.new).to be_a Luchadeer::Resource
|
7
|
-
end
|
8
|
-
|
9
|
-
describe '.find' do
|
10
|
-
let(:client) { Luchadeer::Client.new }
|
11
|
-
|
12
|
-
before :each do
|
13
|
-
Luchadeer.client = client
|
14
|
-
end
|
15
|
-
|
16
|
-
it 'forwards to Client#object with arguments' do
|
17
|
-
expect(client).to receive(:object).with(1, true)
|
18
|
-
described_class.find(1, true)
|
19
|
-
end
|
20
|
-
|
21
|
-
it 'forwards to Client#object with default refresh' do
|
22
|
-
expect(client).to receive(:object).with(1, false)
|
23
|
-
described_class.find(1)
|
24
|
-
end
|
25
|
-
end
|
26
|
-
|
27
|
-
end
|
@@ -1,27 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
describe Luchadeer::Person do
|
4
|
-
|
5
|
-
it 'is a resource' do
|
6
|
-
expect(described_class.new).to be_a Luchadeer::Resource
|
7
|
-
end
|
8
|
-
|
9
|
-
describe '.find' do
|
10
|
-
let(:client) { Luchadeer::Client.new }
|
11
|
-
|
12
|
-
before :each do
|
13
|
-
Luchadeer.client = client
|
14
|
-
end
|
15
|
-
|
16
|
-
it 'forwards to Client#person with arguments' do
|
17
|
-
expect(client).to receive(:person).with(1, true)
|
18
|
-
described_class.find(1, true)
|
19
|
-
end
|
20
|
-
|
21
|
-
it 'forwards to Client#person with default refresh' do
|
22
|
-
expect(client).to receive(:person).with(1, false)
|
23
|
-
described_class.find(1)
|
24
|
-
end
|
25
|
-
end
|
26
|
-
|
27
|
-
end
|
@@ -1,27 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
describe Luchadeer::Video do
|
4
|
-
|
5
|
-
it 'is a resource' do
|
6
|
-
expect(described_class.new).to be_a Luchadeer::Resource
|
7
|
-
end
|
8
|
-
|
9
|
-
describe '.find' do
|
10
|
-
let(:client) { Luchadeer::Client.new }
|
11
|
-
|
12
|
-
before :each do
|
13
|
-
Luchadeer.client = client
|
14
|
-
end
|
15
|
-
|
16
|
-
it 'forwards to Client#video with arguments' do
|
17
|
-
expect(client).to receive(:video).with(1, true)
|
18
|
-
described_class.find(1, true)
|
19
|
-
end
|
20
|
-
|
21
|
-
it 'forwards to Client#video with default refresh' do
|
22
|
-
expect(client).to receive(:video).with(1, false)
|
23
|
-
described_class.find(1)
|
24
|
-
end
|
25
|
-
end
|
26
|
-
|
27
|
-
end
|