picturehouse_uk 3.0.7 → 3.0.8

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: 3309c319847ba5789dd2836342f99ebfb635bc0c
4
- data.tar.gz: db0322dc4951aeb778d15f6f8f0bef744630f3b0
3
+ metadata.gz: 4f6fb1d47bad9c9222aa24f5782e3dacf9dfdf4f
4
+ data.tar.gz: 0c4675d6002c48e5a3d060ae77f14286df40dc16
5
5
  SHA512:
6
- metadata.gz: fdec9a405a28e8601653c0459f7bc060eead1b6daeb01f492c9e83017ea68ced65fbb0147b50dfc340289b49f54b0e776c65019b698dcd38905ac05c8336dcfe
7
- data.tar.gz: 3ec01f064dce248f89045591858967e0775533f9ac347fe5738c477a677a94273577ddb11fcbf7c81c276b963ef4099984adb3d9f0b494460761d9e09788d68c
6
+ metadata.gz: 724b00074362866f62645fb0ee3cdce265e2ed50566e72a0bbcd9dab474ce247e67ee76a7c4e0dfd9fe4bd20aa7e6e3954e197349f33f48a0a68a3c68156cdd4
7
+ data.tar.gz: 1880388a8387f29b76d005477195d59aea20c789bd121b3901cbb2e1d083fa83ad2779bf1c52102d68124e4c3d39bf3872be7f6498fcdb5e0109ae2343ff6924
data/CHANGELOG.md CHANGED
@@ -1,6 +1,11 @@
1
1
  # Change Log
2
2
  All notable changes to this project will be documented in this file.
3
3
 
4
+ ## [3.0.8] - 2015-04-07
5
+
6
+ ### Fixed
7
+ - Screening parsing broken by HTML change
8
+
4
9
  ## [3.0.7] - 2015-04-05
5
10
 
6
11
  ### Added
@@ -13,8 +13,8 @@ module PicturehouseUk
13
13
  def to_a
14
14
  date = nil
15
15
  doc.css(LISTINGS).each_with_object([]) do |node, result|
16
- if node.attribute('title') != nil
17
- date = Date.parse(node.attribute('title').value)
16
+ if date_parse(node.text)
17
+ date = date_parse(node.text)
18
18
  else
19
19
  result << FilmWithShowtimes.new(node, date).to_a
20
20
  end
@@ -23,6 +23,12 @@ module PicturehouseUk
23
23
 
24
24
  private
25
25
 
26
+ def date_parse(text)
27
+ Date.parse(text)
28
+ rescue ArgumentError
29
+ nil
30
+ end
31
+
26
32
  def doc
27
33
  @doc ||= Nokogiri::HTML(page)
28
34
  end
@@ -1,6 +1,6 @@
1
1
  # Ruby interface for http://www.picturehouses.co.uk
2
- # @version 3.0.7
2
+ # @version 3.0.8
3
3
  module PicturehouseUk
4
4
  # Gem version
5
- VERSION = '3.0.7'
5
+ VERSION = '3.0.8'
6
6
  end