thetvdb_party 0.0.12.pre → 0.0.13.pre

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.
@@ -1,13 +1,22 @@
1
1
  require 'rspec'
2
+ require 'thetvdb_party'
2
3
 
3
4
  describe 'TheTvDbParty' do
4
- client = TheTvDbParty::Client.new(ENV["TVDB_API_KEY"])
5
- let(:search_series_records) { client.search "The Mentalist" }
6
-
7
5
  it 'should find search results' do
8
- # client = TheTvDbParty::Client.new(ENV["TVDB_API_KEY"])
9
- # let(:results) { client.search "The Mentalist" }
10
- expect(search_series_records).to_not be_nil
11
- expect(search_series_records).to_not be_empty
6
+ client = TheTvDbParty::Client.new(ENV["TVDB_API_KEY"])
7
+ result_records = client.search "The Mentalist"
8
+ result_names = result_records.map { |record| record.seriesname }
9
+ expect(result_names).to include("The Mentalist")
10
+ end
11
+
12
+ it 'should find the Base Series Record for search results' do
13
+ client = TheTvDbParty::Client.new(ENV["TVDB_API_KEY"])
14
+ pending "No API key available, test cannot run. Configure .env file to include an api key." unless client.apikey
15
+ client.search("The Mentalist").each do |result_record|
16
+ expect(result_record).to be_a TheTvDbParty::SearchSeriesRecord
17
+ base_series_record = result_record.get_base_series_record
18
+ expect(base_series_record).to be_a TheTvDbParty::BaseSeriesRecord
19
+ expect(base_series_record.seriesid).to eq result_record.seriesid
20
+ end
12
21
  end
13
22
  end
@@ -30,4 +30,5 @@ Gem::Specification.new do |spec|
30
30
  spec.add_development_dependency "coderay", "~> 1.1"
31
31
 
32
32
  spec.add_dependency "httparty", "~> 0.6"
33
+ spec.add_dependency "rubyzip", "~> 1.1"
33
34
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thetvdb_party
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.12.pre
4
+ version: 0.0.13.pre
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fredrik Høisæther Rasch
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2015-02-24 00:00:00.000000000 Z
15
+ date: 2015-02-27 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: bundler
@@ -84,6 +84,20 @@ dependencies:
84
84
  - - "~>"
85
85
  - !ruby/object:Gem::Version
86
86
  version: '0.6'
87
+ - !ruby/object:Gem::Dependency
88
+ name: rubyzip
89
+ requirement: !ruby/object:Gem::Requirement
90
+ requirements:
91
+ - - "~>"
92
+ - !ruby/object:Gem::Version
93
+ version: '1.1'
94
+ type: :runtime
95
+ prerelease: false
96
+ version_requirements: !ruby/object:Gem::Requirement
97
+ requirements:
98
+ - - "~>"
99
+ - !ruby/object:Gem::Version
100
+ version: '1.1'
87
101
  description: |2
88
102
  NOTE: This Gem is currently in its pre-alpha development stadium and currently only supports minimal capability.
89
103
  The thetvdb_party gem accesses the TheTvDB programmers API as it is described on "http://thetvdb.com/wiki/index.php/Programmers_API".
@@ -117,6 +131,8 @@ files:
117
131
  - spec/thetvdb_party/banner_spec.rb
118
132
  - spec/thetvdb_party/baseepisoderecord_spec.rb
119
133
  - spec/thetvdb_party/baseseriesrecord_spec.rb
134
+ - spec/thetvdb_party/client_spec.rb
135
+ - spec/thetvdb_party/searchseriesrecord_spec.rb
120
136
  - spec/thetvdb_party_spec.rb
121
137
  - thetvdb_party.gemspec
122
138
  homepage: https://github.com/couven92/thetvdb_party
@@ -154,5 +170,7 @@ test_files:
154
170
  - spec/thetvdb_party/banner_spec.rb
155
171
  - spec/thetvdb_party/baseepisoderecord_spec.rb
156
172
  - spec/thetvdb_party/baseseriesrecord_spec.rb
173
+ - spec/thetvdb_party/client_spec.rb
174
+ - spec/thetvdb_party/searchseriesrecord_spec.rb
157
175
  - spec/thetvdb_party_spec.rb
158
176
  has_rdoc: