blinkbox_films 0.0.4 → 0.0.5

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: e695abee9304b0cde5c7193c45caaaba9e128104
4
- data.tar.gz: de8ce6b1da05feb99e1b98824953d5a18601c84b
3
+ metadata.gz: 6b58c31c4a27f0b5f3a70f26d6abe023cb5b9b7c
4
+ data.tar.gz: 80f1bf1a25df6676237227295ec73a795fa567ba
5
5
  SHA512:
6
- metadata.gz: 1132b4616635c34f1837e1b81428611e7e82a5282ca64949ac4ba9569e17c97532350f70b61d75d617e16d4b9e005ccf93fd0bf31c3125f8605421b91a6c5b8c
7
- data.tar.gz: 526309666d94232b4205956ff01c9794ef890fd0fdba60295bc77e6d020b533544afc9825a29822231b8c7dafd77a377a80876da1179e3984aeb047b639f72e7
6
+ metadata.gz: d9b610bddea333b49dd807d8c25d2f1a18044342ca9b39cc57e87a4d287c662a776bda2025a8a8d47eff87d8b8239b7fc1aa651be856c1ee914d77a73d9433c7
7
+ data.tar.gz: 615e5098620b724d8008afe7c495c3b05abbf76a95525f0ac61d24ed6cf00436312e01024539bcc0c9facf9450d05241777edcb1a82d8f2fbb7b596b1eb6ef94
@@ -30,7 +30,7 @@ module BlinkboxFilms
30
30
  end
31
31
 
32
32
  def title
33
- body.css('h1').first.content.strip
33
+ body.css('.g-assetTitle').first.content.strip
34
34
  end
35
35
 
36
36
  def image_url
@@ -2,15 +2,30 @@ require 'spec_helper'
2
2
  require 'blinkbox_films'
3
3
 
4
4
  describe 'A film page', :vcr do
5
- subject { BlinkboxFilms::FilmPage.from_url('http://www.blinkbox.com/movies/the-dark-knight-(28710)').film }
5
+ context 'A film' do
6
+ subject { BlinkboxFilms::FilmPage.from_url('http://www.blinkbox.com/movies/the-dark-knight-(28710)').film }
6
7
 
7
- it { expect(subject.title).to eq('The Dark Knight') }
8
- it { expect(subject.url).to eq('http://www.blinkbox.com/movies/the-dark-knight-(28710)') }
9
- it { expect(subject.image_url).to match(%r{http://cdn\d+.blinkboxmedia.com/i/contentasset3/000/028/710/gl0lloqf/v=317/w=215;h=306;rm=Crop;q=85/image.jpg}) }
10
- it { expect(subject.release_year).to eq(2008) }
11
- it { expect(subject.certificate).to eq('12') }
12
- it { expect(subject.running_time_in_minutes).to eq(152) }
13
- it { expect(subject.rental_price).to eq('£2.49') }
14
- it { expect(subject.buy_price).to eq('£6.99') }
8
+ it { expect(subject.title).to eq('The Dark Knight') }
9
+ it { expect(subject.url).to eq('http://www.blinkbox.com/movies/the-dark-knight-(28710)') }
10
+ it { expect(subject.image_url).to match(%r{http://cdn\d+.blinkboxmedia.com/i/contentasset3/000/028/710/gl0lloqf/v=317/w=215;h=306;rm=Crop;q=85/image.jpg}) }
11
+ it { expect(subject.release_year).to eq(2008) }
12
+ it { expect(subject.certificate).to eq('12') }
13
+ it { expect(subject.running_time_in_minutes).to eq(152) }
14
+ it { expect(subject.rental_price).to eq('£2.49') }
15
+ it { expect(subject.buy_price).to eq('£6.99') }
16
+ end
17
+
18
+ context 'A TV show' do
19
+ subject { BlinkboxFilms::FilmPage.from_url('http://www.blinkbox.com/tv/12-monkeys-(2313)/s01-(3555)').film }
20
+
21
+ it { expect(subject.title).to eq('12 Monkeys') }
22
+ it { expect(subject.url).to eq('http://www.blinkbox.com/tv/12-monkeys-(2313)/s01-(3555)') }
23
+ it { expect(subject.image_url).to match(%r{http://cdn\d+.blinkboxmedia.com/i/tvseries/000/002/313/yzr3t1rw/v=317/w=215;h=306;rm=Crop;q=85/image.jpg}) }
24
+ it { expect(subject.release_year).to eq(2015) }
25
+ it { expect(subject.certificate).to eq('15') }
26
+ it { expect(subject.running_time_in_minutes).to be_nil }
27
+ it { expect(subject.rental_price).to be_nil }
28
+ it { expect(subject.buy_price).to eq('£9.99') }
29
+ end
15
30
  end
16
31
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blinkbox_films
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joel Chippindale