luchadeer 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +2 -0
  3. data/Gemfile.lock +1 -1
  4. data/README.md +29 -33
  5. data/lib/luchadeer.rb +0 -12
  6. data/lib/luchadeer/api.rb +42 -22
  7. data/lib/luchadeer/client.rb +2 -2
  8. data/lib/luchadeer/error.rb +4 -11
  9. data/lib/luchadeer/resource.rb +14 -2
  10. data/lib/luchadeer/resources.rb +135 -0
  11. data/lib/luchadeer/search.rb +1 -9
  12. data/lib/luchadeer/version.rb +1 -1
  13. data/spec/luchadeer/resources_spec.rb +6 -0
  14. data/spec/luchadeer_spec.rb +3 -6
  15. data/spec/spec_helper.rb +3 -0
  16. data/spec/support/shared_resource.rb +40 -0
  17. data/spec/support/shared_searchable.rb +65 -0
  18. metadata +11 -57
  19. data/lib/luchadeer/api/characters.rb +0 -11
  20. data/lib/luchadeer/api/companies.rb +0 -11
  21. data/lib/luchadeer/api/concepts.rb +0 -11
  22. data/lib/luchadeer/api/franchises.rb +0 -11
  23. data/lib/luchadeer/api/games.rb +0 -11
  24. data/lib/luchadeer/api/locations.rb +0 -11
  25. data/lib/luchadeer/api/objects.rb +0 -11
  26. data/lib/luchadeer/api/people.rb +0 -11
  27. data/lib/luchadeer/api/videos.rb +0 -11
  28. data/lib/luchadeer/character.rb +0 -13
  29. data/lib/luchadeer/company.rb +0 -13
  30. data/lib/luchadeer/concept.rb +0 -13
  31. data/lib/luchadeer/franchise.rb +0 -13
  32. data/lib/luchadeer/game.rb +0 -13
  33. data/lib/luchadeer/location.rb +0 -13
  34. data/lib/luchadeer/object.rb +0 -13
  35. data/lib/luchadeer/person.rb +0 -13
  36. data/lib/luchadeer/video.rb +0 -13
  37. data/spec/luchadeer/api/characters_spec.rb +0 -28
  38. data/spec/luchadeer/api/companies_spec.rb +0 -28
  39. data/spec/luchadeer/api/concepts_spec.rb +0 -28
  40. data/spec/luchadeer/api/franchises_spec.rb +0 -28
  41. data/spec/luchadeer/api/games_spec.rb +0 -28
  42. data/spec/luchadeer/api/locations_spec.rb +0 -28
  43. data/spec/luchadeer/api/objects_spec.rb +0 -28
  44. data/spec/luchadeer/api/people_spec.rb +0 -28
  45. data/spec/luchadeer/api/videos_spec.rb +0 -28
  46. data/spec/luchadeer/character_spec.rb +0 -27
  47. data/spec/luchadeer/company_spec.rb +0 -27
  48. data/spec/luchadeer/concept_spec.rb +0 -27
  49. data/spec/luchadeer/franchise_spec.rb +0 -27
  50. data/spec/luchadeer/game_spec.rb +0 -27
  51. data/spec/luchadeer/location_spec.rb +0 -27
  52. data/spec/luchadeer/object_spec.rb +0 -27
  53. data/spec/luchadeer/person_spec.rb +0 -27
  54. 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