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.
- checksums.yaml +5 -5
- data/.github/workflows/ci.yml +26 -0
- data/.github/workflows/release.yml +26 -0
- data/.gitignore +1 -0
- data/.ruby-version +1 -0
- data/CHANGELOG.md +44 -0
- data/LICENSE +617 -0
- data/README.md +5 -4
- data/Rakefile +12 -0
- data/lib/picturehouse_uk/cinema.rb +152 -127
- data/lib/picturehouse_uk/internal/api.rb +42 -0
- data/lib/picturehouse_uk/internal/parser/address.rb +36 -9
- data/lib/picturehouse_uk/internal/parser/screenings.rb +89 -95
- data/lib/picturehouse_uk/internal/title_sanitizer.rb +61 -65
- data/lib/picturehouse_uk/internal/website.rb +10 -12
- data/lib/picturehouse_uk/performance.rb +60 -0
- data/lib/picturehouse_uk/version.rb +2 -2
- data/lib/picturehouse_uk.rb +3 -4
- data/picturehouse_uk.gemspec +5 -7
- data/rake/fixture_creator.rb +62 -0
- data/test/fixtures/cinemas.html +4262 -0
- data/test/fixtures/duke-of-york-s-picturehouse/cinema.html +6187 -0
- data/test/fixtures/duke-of-york-s-picturehouse/get_movies.json +120552 -0
- data/test/fixtures/duke-of-york-s-picturehouse/information.html +3725 -0
- data/test/fixtures/duke-s-at-komedia/cinema.html +6138 -0
- data/test/fixtures/duke-s-at-komedia/get_movies.json +112 -0
- data/test/fixtures/duke-s-at-komedia/information.html +3690 -0
- data/test/fixtures/home.html +6236 -565
- data/test/fixtures/phoenix-picturehouse/cinema.html +6089 -0
- data/test/fixtures/phoenix-picturehouse/get_movies.json +120552 -0
- data/test/fixtures/phoenix-picturehouse/information.html +3630 -0
- data/test/lib/picturehouse_uk/cinema_test.rb +113 -142
- data/test/lib/picturehouse_uk/internal/api_test.rb +92 -0
- data/test/lib/picturehouse_uk/internal/parser/{address_parser_test.rb → address_test.rb} +11 -11
- data/test/lib/picturehouse_uk/internal/parser/screenings_test.rb +100 -48
- data/test/lib/picturehouse_uk/internal/title_sanitizer_test.rb +48 -48
- data/test/lib/picturehouse_uk/internal/website_test.rb +15 -31
- data/test/lib/picturehouse_uk/performance_test.rb +197 -0
- data/test/lib/picturehouse_uk/version_test.rb +1 -1
- data/test/live/integration_test.rb +15 -32
- data/test/support/fake_api.rb +16 -0
- data/test/support/fake_website.rb +24 -0
- data/test/test_helper.rb +13 -2
- metadata +52 -67
- data/.rdoc_options +0 -16
- data/.travis.yml +0 -5
- data/lib/picturehouse_uk/film.rb +0 -59
- data/lib/picturehouse_uk/screening.rb +0 -70
- data/test/fixture_updater.rb +0 -73
- data/test/fixtures/cinema/Duke_Of_Yorks.html +0 -2984
- data/test/fixtures/cinema/Dukes_At_Komedia.html +0 -5518
- data/test/fixtures/cinema/National_Media_Museum.html +0 -10266
- data/test/fixtures/cinema/Phoenix_Picturehouse.html +0 -5202
- data/test/fixtures/info/Duke_Of_Yorks.html +0 -549
- data/test/fixtures/info/Dukes_At_Komedia.html +0 -537
- data/test/fixtures/info/Phoenix_Picturehouse.html +0 -553
- data/test/fixtures/whats_on/Duke_Of_Yorks.html +0 -2737
- data/test/fixtures/whats_on/Dukes_At_Komedia.html +0 -5132
- data/test/fixtures/whats_on/National_Media_Museum.html +0 -9690
- data/test/fixtures/whats_on/Phoenix_Picturehouse.html +0 -4916
- data/test/lib/picturehouse_uk/film_test.rb +0 -141
- data/test/lib/picturehouse_uk/screening_test.rb +0 -181
- /data/{LICENSE.txt → COMM-LICENSE} +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 5c4c71062363f2efdabda5696692051f79c7915f250367ff8c16536e058c821b
|
|
4
|
+
data.tar.gz: a76bf492b267b7ae89cbbe829b4269dea9ac0207add6b41fe47685d1df76fbb9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
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
|
|