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,52 @@
1
+ <div class="row">
2
+ <div class="span2">
3
+ <div class="poster ">
4
+ <a href="/whatson/the-royal-ballet-manon?cinema=3&amp;date=all">
5
+ <div class="image"><img src="/cw/assets/images/whatson/film.placeholder.poster.jpg" data-original="/assets/media/films/7322_poster_large.jpg" width="140" alt="Poster for Film The Royal Ballet - Manon"></div>
6
+ </a>
7
+ </div>
8
+ </div>
9
+ <div class="span7">
10
+ <h3 class="h1">
11
+ <a href="/whatson/the-royal-ballet-manon?cinema=3&amp;date=all">The Royal Ballet - Manon</a>
12
+ <a class="classification gb-12a tooltip" href="/classification" title="No-one younger than 12 may see a '12A' film in a cinema unless accompanied by an adult. Responsibility for allowing under-12s to view lies with the accompanying or supervising adult." data-classification="12A" data-territory="GB">(12A)</a>
13
+ </h3>
14
+ <div class="inline-children">
15
+ <h3>Release date:</h3>
16
+ <p>16th October 2014</p>
17
+ </div>
18
+ <div class="inline-children">
19
+ <h3>Running time:</h3> <p>155 mins</p>
20
+ </div>
21
+ <h3>Synopsis:</h3>
22
+ <p>A young girl desires love but is corrupted by wealth in Kenneth MacMillan's erotically charged ballet.</p>
23
+ <h3>Available screening types</h3>
24
+ <ul class="unstyled">
25
+ <li class="icon-service-2d">
26
+ </ul>
27
+ <a class="action primary" title="Find out more about The Royal Ballet - Manon" href="/whatson/the-royal-ballet-manon?cinema=3&amp;date=all">Find out more</a>
28
+ </div>
29
+ </div><div class="schedule row">
30
+ <div class="span9">
31
+ <div class="date row">
32
+ <div class="span2">
33
+ <h3>Thursday 16th Oct</h3>
34
+ </div>
35
+ <div class="span7">
36
+ <ol class="performances">
37
+ <li>
38
+ <a class="tooltip performance action" title="19:15" href="/booking?cinema=3&amp;filmEdi=446052&amp;date=20141016&amp;time=19:15" rel="nofollow">19:15</a>
39
+ <div class="tooltip-box performance">
40
+ <h3>Available screening types:</h3>
41
+ <hr class="thin">
42
+ <ul class="unstyled">
43
+ <li class="icon-service-2d">2D</li>
44
+ </ul>
45
+ </div>
46
+ </li>
47
+ </ol>
48
+ </div>
49
+ </div>
50
+ <a class="action secondary light" href="/whatson/the-royal-ballet-manon?cinema=3&amp;date=all">View all dates</a>
51
+ </div>
52
+ </div>