picturehouse_uk 3.0.14 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. checksums.yaml +5 -5
  2. data/.github/workflows/ci.yml +26 -0
  3. data/.github/workflows/release.yml +26 -0
  4. data/.gitignore +1 -0
  5. data/.ruby-version +1 -0
  6. data/CHANGELOG.md +44 -0
  7. data/LICENSE +617 -0
  8. data/README.md +5 -4
  9. data/Rakefile +12 -0
  10. data/lib/picturehouse_uk/cinema.rb +152 -127
  11. data/lib/picturehouse_uk/internal/api.rb +42 -0
  12. data/lib/picturehouse_uk/internal/parser/address.rb +36 -9
  13. data/lib/picturehouse_uk/internal/parser/screenings.rb +89 -95
  14. data/lib/picturehouse_uk/internal/title_sanitizer.rb +61 -65
  15. data/lib/picturehouse_uk/internal/website.rb +10 -12
  16. data/lib/picturehouse_uk/performance.rb +60 -0
  17. data/lib/picturehouse_uk/version.rb +2 -2
  18. data/lib/picturehouse_uk.rb +3 -4
  19. data/picturehouse_uk.gemspec +5 -7
  20. data/rake/fixture_creator.rb +62 -0
  21. data/test/fixtures/cinemas.html +4262 -0
  22. data/test/fixtures/duke-of-york-s-picturehouse/cinema.html +6187 -0
  23. data/test/fixtures/duke-of-york-s-picturehouse/get_movies.json +120552 -0
  24. data/test/fixtures/duke-of-york-s-picturehouse/information.html +3725 -0
  25. data/test/fixtures/duke-s-at-komedia/cinema.html +6138 -0
  26. data/test/fixtures/duke-s-at-komedia/get_movies.json +112 -0
  27. data/test/fixtures/duke-s-at-komedia/information.html +3690 -0
  28. data/test/fixtures/home.html +6236 -565
  29. data/test/fixtures/phoenix-picturehouse/cinema.html +6089 -0
  30. data/test/fixtures/phoenix-picturehouse/get_movies.json +120552 -0
  31. data/test/fixtures/phoenix-picturehouse/information.html +3630 -0
  32. data/test/lib/picturehouse_uk/cinema_test.rb +113 -142
  33. data/test/lib/picturehouse_uk/internal/api_test.rb +92 -0
  34. data/test/lib/picturehouse_uk/internal/parser/{address_parser_test.rb → address_test.rb} +11 -11
  35. data/test/lib/picturehouse_uk/internal/parser/screenings_test.rb +100 -48
  36. data/test/lib/picturehouse_uk/internal/title_sanitizer_test.rb +48 -48
  37. data/test/lib/picturehouse_uk/internal/website_test.rb +15 -31
  38. data/test/lib/picturehouse_uk/performance_test.rb +197 -0
  39. data/test/lib/picturehouse_uk/version_test.rb +1 -1
  40. data/test/live/integration_test.rb +15 -32
  41. data/test/support/fake_api.rb +16 -0
  42. data/test/support/fake_website.rb +24 -0
  43. data/test/test_helper.rb +13 -2
  44. metadata +52 -67
  45. data/.rdoc_options +0 -16
  46. data/.travis.yml +0 -5
  47. data/lib/picturehouse_uk/film.rb +0 -59
  48. data/lib/picturehouse_uk/screening.rb +0 -70
  49. data/test/fixture_updater.rb +0 -73
  50. data/test/fixtures/cinema/Duke_Of_Yorks.html +0 -2984
  51. data/test/fixtures/cinema/Dukes_At_Komedia.html +0 -5518
  52. data/test/fixtures/cinema/National_Media_Museum.html +0 -10266
  53. data/test/fixtures/cinema/Phoenix_Picturehouse.html +0 -5202
  54. data/test/fixtures/info/Duke_Of_Yorks.html +0 -549
  55. data/test/fixtures/info/Dukes_At_Komedia.html +0 -537
  56. data/test/fixtures/info/Phoenix_Picturehouse.html +0 -553
  57. data/test/fixtures/whats_on/Duke_Of_Yorks.html +0 -2737
  58. data/test/fixtures/whats_on/Dukes_At_Komedia.html +0 -5132
  59. data/test/fixtures/whats_on/National_Media_Museum.html +0 -9690
  60. data/test/fixtures/whats_on/Phoenix_Picturehouse.html +0 -4916
  61. data/test/lib/picturehouse_uk/film_test.rb +0 -141
  62. data/test/lib/picturehouse_uk/screening_test.rb +0 -181
  63. /data/{LICENSE.txt → COMM-LICENSE} +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 9b2b5301da3720096e032a4724f261260088819f
4
- data.tar.gz: 22d763115ac63d96bce5b56853c42a7c7ed7bf68
2
+ SHA256:
3
+ metadata.gz: 5c4c71062363f2efdabda5696692051f79c7915f250367ff8c16536e058c821b
4
+ data.tar.gz: a76bf492b267b7ae89cbbe829b4269dea9ac0207add6b41fe47685d1df76fbb9
5
5
  SHA512:
6
- metadata.gz: be35d4ae43654002ab6946598a660a5a3c52d0918305a4b7d958ca815567dbfa173e507c43b2797937486d4daa8881308ec4c500fa20a85461cdb07c0472529a
7
- data.tar.gz: 057eca9caad7fc07ef6c14b3af858ee954ea7176a956b04f1d2cf7c91ab8afda4ac53e1cd19995cfac814b371c47e99e5c4de9b5bea5b43217750b4e6fca8f73
6
+ metadata.gz: b1722850d1b2f161725a961f420b8122c404161050c794b02d93a8f735c5d7053745c2eb35de8d0200e5cc20cd2525024ed94a4cc63357fe2157fc9e149fdc11
7
+ data.tar.gz: d5225d4815b31cd31d072820f55e257e72cc415e619c8cbb3eaa6b5c7609d81b624107554d367036164f07da58d83bc5656d5e0ad42df154d955af02411d06fd
@@ -0,0 +1,26 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [ main ]
6
+ pull_request:
7
+ branches: [ main ]
8
+
9
+ jobs:
10
+ test:
11
+ runs-on: ubuntu-latest
12
+
13
+ steps:
14
+ - uses: actions/checkout@v4
15
+
16
+ - name: Set up Ruby
17
+ uses: ruby/setup-ruby@v1
18
+ with:
19
+ ruby-version: '3.4'
20
+ bundler-cache: true
21
+
22
+ - name: Run tests
23
+ run: bundle exec rake
24
+
25
+ - name: Run live tests
26
+ run: bundle exec rake live
@@ -0,0 +1,26 @@
1
+ name: Release Gem
2
+
3
+ on:
4
+ workflow_dispatch:
5
+
6
+ jobs:
7
+ release:
8
+ runs-on: ubuntu-latest
9
+ permissions:
10
+ id-token: write
11
+ contents: write
12
+
13
+ steps:
14
+ - uses: actions/checkout@v4
15
+
16
+ - name: Set up Ruby
17
+ uses: ruby/setup-ruby@v1
18
+ with:
19
+ ruby-version: '3.4'
20
+ bundler-cache: true
21
+
22
+ - name: Run tests
23
+ run: bundle exec rake test
24
+
25
+ - name: Release gem
26
+ uses: rubygems/release-gem@v1
data/.gitignore CHANGED
@@ -15,3 +15,4 @@ spec/reports
15
15
  test/tmp
16
16
  test/version_tmp
17
17
  tmp
18
+ vendor/*
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 3.4.7
data/CHANGELOG.md CHANGED
@@ -1,5 +1,49 @@
1
1
  # Change Log
2
2
  All notable changes to this project will be documented in this file.
3
+ This project adheres to [Semantic Versioning](http://semver.org/).
4
+
5
+ ## [5.0.0] - 2025-10-31
6
+
7
+ ### Added
8
+ - JSON API client for fetching performance data from `/api/get-movies-ajax` endpoint
9
+ - `PicturehouseUk::Internal::Api` for making API requests
10
+ - `PicturehouseUk::Internal::Parser::Screenings` for parsing JSON responses (replaced old HTML parser)
11
+ - Comprehensive tests for JSON API functionality
12
+ - Sample JSON fixtures for testing
13
+
14
+ ### Changed
15
+ - `Performance.at()` now uses JSON API instead of HTML parsing
16
+ - Improved variant detection (arts, baby, kids, senior, imax)
17
+ - Booking URLs now use Vista format: `https://web.picturehouses.com/order/showtimes/{cinema_id}-{session_id}/seats`
18
+ - Enhanced 3D film detection from both title and attributes
19
+ - Increased test coverage to 98.65%
20
+
21
+ ### Removed
22
+ - Old HTML parser `Parser::Screenings` (completely replaced with JSON API version)
23
+ - Test file for old HTML parser
24
+
25
+ ### Technical Details
26
+ - The Picturehouse website now dynamically populates screening data via AJAX calls to their JSON API
27
+ - The `#show_all_date_list` div is populated client-side with data from the API endpoint
28
+ - HTML parsing approach replaced with direct API consumption for better reliability
29
+
30
+ ## 4.0.0 - 2016-02-10
31
+
32
+ The cinebase standardisation release.
33
+
34
+ ### Added
35
+ - cinebase
36
+
37
+ ### Removed
38
+ - Remove film concept
39
+
40
+ ### Changes
41
+ - New `rake fixtures` command and implementation
42
+ - TitleSanitizer uses `cinebase`
43
+ - Cinema uses `cinebase`
44
+ - Screening becomes Performance
45
+ - Performance uses `cinebase`
46
+ - Badges in SVG
3
47
 
4
48
  ## [3.0.14] - 2015-05-17
5
49