cineworld_uk 1.0.5 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +1 -1
  3. data/CHANGELOG.md +64 -0
  4. data/README.md +2 -1
  5. data/cineworld_uk.gemspec +3 -3
  6. data/lib/cineworld_uk/cinema.rb +60 -69
  7. data/lib/cineworld_uk/film.rb +25 -7
  8. data/lib/cineworld_uk/internal/film_with_screenings_parser.rb +29 -71
  9. data/lib/cineworld_uk/internal/name_parser.rb +20 -18
  10. data/lib/cineworld_uk/internal/screening_parser.rb +132 -0
  11. data/lib/cineworld_uk/internal/titleize.rb +19 -19
  12. data/lib/cineworld_uk/internal/website.rb +33 -0
  13. data/lib/cineworld_uk/internal/whatson_parser.rb +44 -0
  14. data/lib/cineworld_uk/screening.rb +65 -20
  15. data/lib/cineworld_uk/version.rb +2 -2
  16. data/lib/cineworld_uk.rb +4 -0
  17. data/test/fixture_updater.rb +64 -0
  18. data/test/fixtures/cinemas.html +134 -41
  19. data/test/fixtures/{cinemas/bury-st-edmunds.html → information/brighton.html} +488 -437
  20. data/test/fixtures/{cinemas → information}/bristol.html +463 -410
  21. data/test/fixtures/whatson/brighton/film_first.html +775 -0
  22. data/test/fixtures/whatson/brighton/film_last.html +52 -0
  23. data/test/fixtures/whatson/brighton/film_second.html +645 -0
  24. data/test/fixtures/whatson/brighton.html +3564 -2690
  25. data/test/fixtures/whatson/glasgow-imax-at-gsc/film_first.html +140 -0
  26. data/test/fixtures/whatson/the-o2-greenwich/film_first.html +1242 -0
  27. data/test/lib/cineworld_uk/cinema_test.rb +104 -301
  28. data/test/lib/cineworld_uk/film_test.rb +49 -2
  29. data/test/lib/cineworld_uk/internal/film_with_screenings_parser_test.rb +83 -81
  30. data/test/lib/cineworld_uk/internal/titleize_test.rb +12 -5
  31. data/test/lib/cineworld_uk/internal/website_test.rb +57 -0
  32. data/test/lib/cineworld_uk/internal/whatson_parser_test.rb +58 -0
  33. data/test/lib/cineworld_uk/screening_test.rb +155 -23
  34. data/test/lib/cineworld_uk/version_test.rb +1 -1
  35. data/test/test_helper.rb +3 -1
  36. metadata +30 -33
  37. data/test/fixtures/cinemas/brighton.html +0 -8
  38. data/test/fixtures/cinemas/chelsea.html +0 -1030
  39. data/test/fixtures/cinemas/glasgow-imax-at-gsc.html +0 -916
  40. data/test/fixtures/cinemas/the-o2-grenwich.html +0 -1191
  41. data/test/fixtures/whatson/brighton/gravity.html +0 -2129
  42. data/test/fixtures/whatson/glasgow-imax-at-gsc/the-hunger-games-catching-fire.html +0 -498
  43. data/test/fixtures/whatson/glasgow-imax-at-gsc-cinema.html +0 -3160
  44. data/test/fixtures/whatson/the-o2-greenwich/gravity.html +0 -784
  45. data/test/fixtures/whatson/the-o2-greenwich/the-hobbit-desolation-of-smaug.html +0 -764
  46. data/test/fixtures/whatson/the-o2-greenwich.html +0 -6854
  47. data/test/fixtures/whatson/wandsworth.html +0 -13729
@@ -0,0 +1,140 @@
1
+ <div class="row">
2
+ <div class="span4">
3
+ <div class="poster ">
4
+ <a href="/whatson/how-to-train-your-dragon-2?cinema=88&amp;date=all">
5
+ <div class="image"><img src="/cw/assets/images/whatson/film.placeholder.poster.jpg" data-original="/assets/media/films/6670_poster_iphone.jpg" width="300" alt="Poster for Film How To Train Your Dragon 2"></div>
6
+ </a>
7
+ </div>
8
+ </div>
9
+ <div class="span5">
10
+ <h3 class="h1">
11
+ <a href="/whatson/how-to-train-your-dragon-2?cinema=88&amp;date=all">How To Train Your Dragon 2</a>
12
+ <a class="classification gb-pg tooltip" href="/classification" title="Unaccompanied children of any age may watch. A 'PG' film should not disturb a child aged around eight or older. However, parents are advised to consider whether the content may upset younger or more sensitive children." data-classification="PG" data-territory="GB">(PG)</a>
13
+ </h3>
14
+ <div class="inline-children">
15
+ <h3>Release date:</h3>
16
+ <p>10th July 2014</p>
17
+ </div>
18
+ <div class="inline-children">
19
+ <h3>Running time:</h3> <p>102 mins</p>
20
+ </div>
21
+ <h3>Synopsis:</h3>
22
+ <p>SCOTLAND RELEASE DATE: 27 JUNE! - Hiccup the Viking and Toothless the dragon take on a sinister new foe in this fun-packed sequel! </p>
23
+ <h3>Cast:</h3>
24
+ <p>Gerard Butler, Cate Blanchett, Djimon Hounsou, America Ferrera, Christopher Mintz-Plasse, Jonah Hill, Kristen Wiig, Craig Ferguson, T.J. Miller, Kit Harington</p>
25
+ <h3>Director:</h3>
26
+ <p>Dean DeBlois</p>
27
+ <h3>Available screening types</h3>
28
+ <ul class="unstyled">
29
+ <li class="icon-service-ix">
30
+ <li class="icon-service-3d">
31
+ </ul>
32
+ <a class="action primary" title="Find out more about How To Train Your Dragon 2" href="/whatson/how-to-train-your-dragon-2?cinema=88&amp;date=all">Find out more</a>
33
+ </div>
34
+ </div><div class="schedule row">
35
+ <div class="span9">
36
+ <div class="date row">
37
+ <div class="span2">
38
+ <h3>Wednesday 23rd Jul</h3>
39
+ </div>
40
+ <div class="span7">
41
+ <ol class="performances">
42
+ <li>
43
+ <a class="tooltip performance action" title="11:00" href="/booking?cinema=88&amp;filmEdi=123043&amp;date=20140723&amp;time=11:00" rel="nofollow">11:00</a>
44
+ <div class="tooltip-box performance">
45
+ <h3>Available screening types:</h3>
46
+ <hr class="thin">
47
+ <ul class="unstyled">
48
+ <li class="icon-service-3d">3D</li>
49
+ <li class="icon-service-ix">IMAX</li>
50
+ </ul>
51
+ </div>
52
+ </li>
53
+ <li>
54
+ <a class="tooltip performance action" title="13:40" href="/booking?cinema=88&amp;filmEdi=123043&amp;date=20140723&amp;time=13:40" rel="nofollow">13:40</a>
55
+ <div class="tooltip-box performance">
56
+ <h3>Available screening types:</h3>
57
+ <hr class="thin">
58
+ <ul class="unstyled">
59
+ <li class="icon-service-3d">3D</li>
60
+ <li class="icon-service-ix">IMAX</li>
61
+ </ul>
62
+ </div>
63
+ </li>
64
+ </ol>
65
+ </div>
66
+ </div>
67
+ <div class="date row">
68
+ <div class="span2">
69
+ <h3>Thursday 24th Jul</h3>
70
+ </div>
71
+ <div class="span7">
72
+ <ol class="performances">
73
+ <li>
74
+ <a class="tooltip performance action" title="11:00" href="/booking?cinema=88&amp;filmEdi=123043&amp;date=20140724&amp;time=11:00" rel="nofollow">11:00</a>
75
+ <div class="tooltip-box performance">
76
+ <h3>Available screening types:</h3>
77
+ <hr class="thin">
78
+ <ul class="unstyled">
79
+ <li class="icon-service-3d">3D</li>
80
+ <li class="icon-service-ix">IMAX</li>
81
+ </ul>
82
+ </div>
83
+ </li>
84
+ <li>
85
+ <a class="tooltip performance action" title="13:40" href="/booking?cinema=88&amp;filmEdi=123043&amp;date=20140724&amp;time=13:40" rel="nofollow">13:40</a>
86
+ <div class="tooltip-box performance">
87
+ <h3>Available screening types:</h3>
88
+ <hr class="thin">
89
+ <ul class="unstyled">
90
+ <li class="icon-service-3d">3D</li>
91
+ <li class="icon-service-ix">IMAX</li>
92
+ </ul>
93
+ </div>
94
+ </li>
95
+ </ol>
96
+ </div>
97
+ </div>
98
+ <div class="date row">
99
+ <div class="span2">
100
+ <h3>Friday 25th Jul</h3>
101
+ </div>
102
+ <div class="span7">
103
+ <ol class="performances">
104
+ <li>
105
+ <a class="tooltip performance action" title="14:00" href="/booking?cinema=88&amp;filmEdi=123043&amp;date=20140725&amp;time=14:00" rel="nofollow">14:00</a>
106
+ <div class="tooltip-box performance">
107
+ <h3>Available screening types:</h3>
108
+ <hr class="thin">
109
+ <ul class="unstyled">
110
+ <li class="icon-service-3d">3D</li>
111
+ <li class="icon-service-ix">IMAX</li>
112
+ </ul>
113
+ </div>
114
+ </li>
115
+ </ol>
116
+ </div>
117
+ </div>
118
+ <div class="date row">
119
+ <div class="span2">
120
+ <h3>Saturday 26th Jul</h3>
121
+ </div>
122
+ <div class="span7">
123
+ <ol class="performances">
124
+ <li>
125
+ <a class="tooltip performance action" title="14:30" href="/booking?cinema=88&amp;filmEdi=123043&amp;date=20140726&amp;time=14:30" rel="nofollow">14:30</a>
126
+ <div class="tooltip-box performance">
127
+ <h3>Available screening types:</h3>
128
+ <hr class="thin">
129
+ <ul class="unstyled">
130
+ <li class="icon-service-3d">3D</li>
131
+ <li class="icon-service-ix">IMAX</li>
132
+ </ul>
133
+ </div>
134
+ </li>
135
+ </ol>
136
+ </div>
137
+ </div>
138
+ <a class="action secondary light" href="/whatson/how-to-train-your-dragon-2?cinema=88&amp;date=all">View all dates</a>
139
+ </div>
140
+ </div>