tvdb_party 0.8.0 → 0.8.1

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: e0ca8655b38ca5ed50a2b55de562a97037b4ce23
4
- data.tar.gz: ea7ce6069f71fa0b5bc88733cb831434fa06267f
3
+ metadata.gz: 9a4f1f41d21093d84a729c6b483fcadd3318ead5
4
+ data.tar.gz: cebafe8a86384dd515a8fb94939e872147ead8f6
5
5
  SHA512:
6
- metadata.gz: edd8df1966ee2c28cac009a8796fe6bc584cd02db1669c8b2c96423b79025c7f595e80248f1616de5186a808630467f5f9968bd322f795937671f8e2d9bae807
7
- data.tar.gz: e8c12829e43ba8c35655183d9b989dc911eced61c0a74df9a9240613b6dd3f34c2cf8567eff9390661d0a3f4fcf8fdc3d7e401d7ecb351dfa0e0a351b8334b9b
6
+ metadata.gz: 7e025690623c1da3d2dc1414ba2ea4abec7870c6f8ed4033dca5f77ba7d193e284d5eecdad22ea4773b427db2aa9480ca78952e386ab8a777fb77b70050a6efc
7
+ data.tar.gz: 482bbc6219fb50e918956fd6006b9d49ee86e297866fc6b7a3610180906f78e5dbd4c9b0259e3018b345d7305e0b811d196145d47db36f6631134258daee6825
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.8.0
1
+ 0.8.1
@@ -1,7 +1,7 @@
1
1
  module TvdbParty
2
2
  class Episode
3
3
  attr_reader :client
4
- attr_accessor :id, :season_number, :number, :name, :overview, :air_date, :thumb, :guest_stars, :director, :writer
4
+ attr_accessor :id, :season_number, :number, :name, :overview, :air_date, :thumb, :guest_stars, :director, :writer, :rating, :rating_count
5
5
 
6
6
  def initialize(client, options={})
7
7
  @client = client
@@ -14,12 +14,25 @@ module TvdbParty
14
14
  @director = options["Director"]
15
15
  @writer = options["Writer"]
16
16
  @series_id = options["seriesid"]
17
+ @rating_count = options["RatingCount"]
17
18
  if options["GuestStars"]
18
19
  @guest_stars = options["GuestStars"][1..-1].split("|")
19
20
  else
20
21
  @guest_stars = []
21
22
  end
22
23
 
24
+ if options["Rating"] && options["Rating"].size > 0
25
+ @rating = options["Rating"].to_f
26
+ else
27
+ @rating = 0
28
+ end
29
+
30
+ if options["RatingCount"] && options["RatingCount"].size > 0
31
+ @rating_count = options["RatingCount"].to_f
32
+ else
33
+ @rating_count = 0
34
+ end
35
+
23
36
  begin
24
37
  @air_date = Date.parse(options["FirstAired"])
25
38
  rescue
@@ -1,7 +1,7 @@
1
1
  module TvdbParty
2
2
  class Series
3
3
  attr_reader :client
4
- attr_accessor :id, :name, :overview, :seasons, :first_aired, :genres, :network, :rating, :runtime,
4
+ attr_accessor :id, :name, :overview, :seasons, :first_aired, :genres, :network, :rating, :rating_count, :runtime,
5
5
  :actors, :banners, :air_time, :imdb_id, :content_rating, :status
6
6
 
7
7
  def initialize(client, options={})
@@ -28,6 +28,12 @@ module TvdbParty
28
28
  @rating = 0
29
29
  end
30
30
 
31
+ if options["RatingCount"] && options["RatingCount"].size > 0
32
+ @rating_count = options["RatingCount"].to_f
33
+ else
34
+ @rating_count = 0
35
+ end
36
+
31
37
  begin
32
38
  @first_aired = Date.parse(options["FirstAired"])
33
39
  rescue
data/tvdb_party.gemspec CHANGED
@@ -2,16 +2,16 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: tvdb_party 0.8.0 ruby lib
5
+ # stub: tvdb_party 0.8.1 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "tvdb_party"
9
- s.version = "0.8.0"
9
+ s.version = "0.8.1"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
13
13
  s.authors = ["Jon Maddox"]
14
- s.date = "2014-11-11"
14
+ s.date = "2015-01-13"
15
15
  s.description = "Simple Ruby library to talk to thetvdb.com's api"
16
16
  s.email = "jon@mustacheinc.com"
17
17
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tvdb_party
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jon Maddox
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-11 00:00:00.000000000 Z
11
+ date: 2015-01-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thoughtbot-shoulda