picturehouse_uk 6.0.0-aarch64-linux-gnu
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 +7 -0
- data/.github/workflows/ci.yml +47 -0
- data/.github/workflows/release.yml +73 -0
- data/.gitignore +18 -0
- data/.ruby-version +1 -0
- data/.yardopts +4 -0
- data/CHANGELOG.md +213 -0
- data/COMM-LICENSE +22 -0
- data/Gemfile +4 -0
- data/LICENSE +617 -0
- data/README.md +175 -0
- data/Rakefile +37 -0
- data/lib/picturehouse_uk/cinema.rb +127 -0
- data/lib/picturehouse_uk/internal/api_response.rb +35 -0
- data/lib/picturehouse_uk/internal/guest_token.rb +28 -0
- data/lib/picturehouse_uk/internal/parser/api/showtime.rb +70 -0
- data/lib/picturehouse_uk/internal/title_sanitizer.rb +78 -0
- data/lib/picturehouse_uk/performance.rb +80 -0
- data/lib/picturehouse_uk/version.rb +6 -0
- data/lib/picturehouse_uk.rb +30 -0
- data/picturehouse_uk.gemspec +29 -0
- data/test/fixtures/api/showtimes-019.json +62 -0
- data/test/fixtures/api/sites.json +40 -0
- data/test/lib/picturehouse_uk/cinema_test.rb +85 -0
- data/test/lib/picturehouse_uk/internal/api_response_test.rb +52 -0
- data/test/lib/picturehouse_uk/internal/fixture_shape_test.rb +14 -0
- data/test/lib/picturehouse_uk/internal/guest_token_test.rb +71 -0
- data/test/lib/picturehouse_uk/internal/parser/api/showtime_test.rb +59 -0
- data/test/lib/picturehouse_uk/internal/title_sanitizer_test.rb +243 -0
- data/test/lib/picturehouse_uk/performance_test.rb +111 -0
- data/test/lib/picturehouse_uk/version_test.rb +7 -0
- data/test/live/api_shape_test.rb +19 -0
- data/test/live/integration_test.rb +27 -0
- data/test/live/live_helper.rb +11 -0
- data/test/package_test.rb +56 -0
- data/test/support/api_fixtures_helper.rb +17 -0
- data/test/support/api_shapes.rb +48 -0
- data/test/support/fake_api_response.rb +20 -0
- data/test/test_helper.rb +20 -0
- data/vendor/curl-impersonate/SOURCE +5 -0
- data/vendor/curl-impersonate/bin/curl-impersonate +0 -0
- data/vendor/curl-impersonate/licenses/LICENSE +21 -0
- data/vendor/curl-impersonate/licenses/LICENSE_BORINGSSL +238 -0
- data/vendor/curl-impersonate/licenses/LICENSE_BROTLI +19 -0
- data/vendor/curl-impersonate/licenses/LICENSE_CARES +24 -0
- data/vendor/curl-impersonate/licenses/LICENSE_CURL +22 -0
- data/vendor/curl-impersonate/licenses/LICENSE_LIBIDN2_GPL2 +339 -0
- data/vendor/curl-impersonate/licenses/LICENSE_LIBIDN2_GPL3 +35 -0
- data/vendor/curl-impersonate/licenses/LICENSE_LIBIDN2_LGPL3 +165 -0
- data/vendor/curl-impersonate/licenses/LICENSE_LIBIDN2_UNICODE +91 -0
- data/vendor/curl-impersonate/licenses/LICENSE_NGHTTP2 +23 -0
- data/vendor/curl-impersonate/licenses/LICENSE_NGHTTP3 +22 -0
- data/vendor/curl-impersonate/licenses/LICENSE_NGTCP2 +22 -0
- data/vendor/curl-impersonate/licenses/LICENSE_ZLIB +22 -0
- data/vendor/curl-impersonate/licenses/LICENSE_ZSTD +30 -0
- metadata +225 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 1d853955e7f739dea18a77e725085a0fbced91f6a029e30fc997aa8ec301f748
|
|
4
|
+
data.tar.gz: 8f1e8a481cb19efeab8abc6a3184723ab3b6335a8908c26ad50bc8efc8fd62d2
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 941bede6871f950393c2e3c8b407fa999fb46df6dc71b62374e95bd5f0981445bc9b88d6a4b7f4a1c8e20fdd9af4abf6865a619f3359974eb03a1e291786f023
|
|
7
|
+
data.tar.gz: f482a1f0c5e8ba60b308cd9c8a79bab43966517e9017477e0cfeef83a91a74d49199181f267bdbbd8d225a9915e7112e4c9374d8337f59e84a019ad527c7c8e8
|
|
@@ -0,0 +1,47 @@
|
|
|
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
|
+
strategy:
|
|
13
|
+
matrix:
|
|
14
|
+
ruby-version: ['3.4', '4.0']
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v4
|
|
17
|
+
- uses: ruby/setup-ruby@v1
|
|
18
|
+
with:
|
|
19
|
+
ruby-version: ${{ matrix.ruby-version }}
|
|
20
|
+
bundler-cache: true
|
|
21
|
+
- run: bundle exec rake test
|
|
22
|
+
|
|
23
|
+
package:
|
|
24
|
+
strategy:
|
|
25
|
+
matrix:
|
|
26
|
+
include:
|
|
27
|
+
- runner: ubuntu-latest
|
|
28
|
+
platform: x86_64-linux-gnu
|
|
29
|
+
- runner: ubuntu-24.04-arm
|
|
30
|
+
platform: aarch64-linux-gnu
|
|
31
|
+
- runner: macos-15
|
|
32
|
+
platform: arm64-darwin
|
|
33
|
+
- runner: macos-15-intel
|
|
34
|
+
platform: x86_64-darwin
|
|
35
|
+
runs-on: ${{ matrix.runner }}
|
|
36
|
+
steps:
|
|
37
|
+
- uses: actions/checkout@v4
|
|
38
|
+
- uses: ruby/setup-ruby@v1
|
|
39
|
+
with:
|
|
40
|
+
ruby-version: '4.0'
|
|
41
|
+
bundler-cache: true
|
|
42
|
+
- run: bundle exec rake 'package:native[${{ matrix.platform }}]'
|
|
43
|
+
- run: PICTUREHOUSE_PACKAGE="$(echo pkg/*.gem)" bundle exec ruby test/package_test.rb
|
|
44
|
+
- uses: actions/upload-artifact@v4
|
|
45
|
+
with:
|
|
46
|
+
name: gem-${{ matrix.platform }}
|
|
47
|
+
path: pkg/*.gem
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
name: Release Gem
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
|
|
6
|
+
jobs:
|
|
7
|
+
package:
|
|
8
|
+
strategy:
|
|
9
|
+
matrix:
|
|
10
|
+
include:
|
|
11
|
+
- runner: ubuntu-latest
|
|
12
|
+
platform: x86_64-linux-gnu
|
|
13
|
+
- runner: ubuntu-24.04-arm
|
|
14
|
+
platform: aarch64-linux-gnu
|
|
15
|
+
- runner: macos-15
|
|
16
|
+
platform: arm64-darwin
|
|
17
|
+
- runner: macos-15-intel
|
|
18
|
+
platform: x86_64-darwin
|
|
19
|
+
runs-on: ${{ matrix.runner }}
|
|
20
|
+
steps:
|
|
21
|
+
- uses: actions/checkout@v4
|
|
22
|
+
- uses: ruby/setup-ruby@v1
|
|
23
|
+
with:
|
|
24
|
+
ruby-version: '4.0'
|
|
25
|
+
bundler-cache: true
|
|
26
|
+
- run: bundle exec rake 'package:native[${{ matrix.platform }}]'
|
|
27
|
+
- run: PICTUREHOUSE_PACKAGE="$(echo pkg/*.gem)" bundle exec ruby test/package_test.rb
|
|
28
|
+
- uses: actions/upload-artifact@v4
|
|
29
|
+
with:
|
|
30
|
+
name: gem-${{ matrix.platform }}
|
|
31
|
+
path: pkg/*.gem
|
|
32
|
+
|
|
33
|
+
release:
|
|
34
|
+
needs: package
|
|
35
|
+
runs-on: ubuntu-latest
|
|
36
|
+
permissions:
|
|
37
|
+
id-token: write
|
|
38
|
+
contents: write
|
|
39
|
+
steps:
|
|
40
|
+
- uses: actions/checkout@v4
|
|
41
|
+
- uses: ruby/setup-ruby@v1
|
|
42
|
+
with:
|
|
43
|
+
ruby-version: '4.0'
|
|
44
|
+
bundler-cache: true
|
|
45
|
+
- run: bundle exec rake test
|
|
46
|
+
- run: bundle exec rake build
|
|
47
|
+
- uses: actions/download-artifact@v4
|
|
48
|
+
with:
|
|
49
|
+
path: pkg
|
|
50
|
+
pattern: gem-*
|
|
51
|
+
merge-multiple: true
|
|
52
|
+
- uses: rubygems/configure-rubygems-credentials@v1.0.0
|
|
53
|
+
- name: Push the source and platform gems
|
|
54
|
+
run: |
|
|
55
|
+
for gem in pkg/*.gem; do
|
|
56
|
+
if output=$(gem push "$gem" 2>&1); then
|
|
57
|
+
echo "$output"
|
|
58
|
+
elif echo "$output" | grep -q "Repushing of gem versions is not allowed"; then
|
|
59
|
+
echo "Already published: $gem"
|
|
60
|
+
else
|
|
61
|
+
echo "$output"
|
|
62
|
+
exit 1
|
|
63
|
+
fi
|
|
64
|
+
done
|
|
65
|
+
- name: Tag the release
|
|
66
|
+
run: |
|
|
67
|
+
tag="v$(ruby -e 'print Gem::Specification.load(Dir["*.gemspec"].first).version')"
|
|
68
|
+
if git ls-remote --exit-code --tags origin "$tag" >/dev/null; then
|
|
69
|
+
echo "$tag already exists"
|
|
70
|
+
else
|
|
71
|
+
git tag "$tag"
|
|
72
|
+
git push origin "$tag"
|
|
73
|
+
fi
|
data/.gitignore
ADDED
data/.ruby-version
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.4.7
|
data/.yardopts
ADDED
data/CHANGELOG.md
ADDED
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
# Change Log
|
|
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
|
+
## [6.0.0] - 2026-10-22
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
- Retrieve cinemas and performances from the Vista API behind picturehouses.com, as cineworld_uk and odeon_uk do, instead of scraping HTML pages and the `get-movies-ajax` endpoint.
|
|
9
|
+
- **BREAKING**: Cinema ids are Vista site ids, zero-padded strings such as `'019'` for Duke's at Komedia, instead of page slugs such as `'duke-s-at-komedia'`.
|
|
10
|
+
- **BREAKING**: `Performance.at` accepts inclusive `from:` and `to:` business dates, defaulting to today in London and the following 13 days. One request per day.
|
|
11
|
+
- **BREAKING**: Require cinebase 5.4, and so Ruby 3.3 or newer. Nokogiri is no longer needed.
|
|
12
|
+
- `Cinema#adr` comes from the API's address lines; `region` is no longer given. `Cinema#url` points at the current cinema pages.
|
|
13
|
+
- Film titles also use cinebase's common rules and lose `Dog-Friendly -`, `Relaxed-Screening:`, `LMF Presents:`, `Green Screen:` and `FFQ:` prefixes.
|
|
14
|
+
- Tests use hand-written fixtures in place of recorded pages and API responses.
|
|
15
|
+
|
|
16
|
+
### Added
|
|
17
|
+
- `PicturehouseUk.token` and `PicturehouseUk.acquire_token!`, with platform gems that bundle curl-impersonate 2.2.3.
|
|
18
|
+
- `Performance#film_year`, `#subtitled?` and `#festival`.
|
|
19
|
+
- Variants from the current Vista attributes: `audio_described`, `baby`, `kids`, `q&a`, `relaxed`, `senior`, `subtitled` and `arts`.
|
|
20
|
+
- Live API shape tests that check real responses without storing them.
|
|
21
|
+
|
|
22
|
+
### Fixed
|
|
23
|
+
- Performance times were London local times labelled as UTC, an hour out during British Summer Time. They now use Vista's explicit offsets.
|
|
24
|
+
- Booking links used the cinema slug and now use Vista's showtime id, as in `https://web.picturehouses.com/order/showtimes/019-41632/seats`.
|
|
25
|
+
- Performances could include other cinemas' films returned by the old endpoint.
|
|
26
|
+
- Unit tests failed under Minitest 6, which moved `stub` into `minitest-mock`.
|
|
27
|
+
|
|
28
|
+
### Removed
|
|
29
|
+
- HTML scraping, the `fixtures` rake task, and live tests in CI.
|
|
30
|
+
|
|
31
|
+
## [5.0.0] - 2025-10-31
|
|
32
|
+
|
|
33
|
+
### Added
|
|
34
|
+
- JSON API client for fetching performance data from `/api/get-movies-ajax` endpoint
|
|
35
|
+
- `PicturehouseUk::Internal::Api` for making API requests
|
|
36
|
+
- `PicturehouseUk::Internal::Parser::Screenings` for parsing JSON responses (replaced old HTML parser)
|
|
37
|
+
- Comprehensive tests for JSON API functionality
|
|
38
|
+
- Sample JSON fixtures for testing
|
|
39
|
+
|
|
40
|
+
### Changed
|
|
41
|
+
- `Performance.at()` now uses JSON API instead of HTML parsing
|
|
42
|
+
- Improved variant detection (arts, baby, kids, senior, imax)
|
|
43
|
+
- Booking URLs now use Vista format: `https://web.picturehouses.com/order/showtimes/{cinema_id}-{session_id}/seats`
|
|
44
|
+
- Enhanced 3D film detection from both title and attributes
|
|
45
|
+
- Increased test coverage to 98.65%
|
|
46
|
+
|
|
47
|
+
### Removed
|
|
48
|
+
- Old HTML parser `Parser::Screenings` (completely replaced with JSON API version)
|
|
49
|
+
- Test file for old HTML parser
|
|
50
|
+
|
|
51
|
+
### Technical Details
|
|
52
|
+
- The Picturehouse website now dynamically populates screening data via AJAX calls to their JSON API
|
|
53
|
+
- The `#show_all_date_list` div is populated client-side with data from the API endpoint
|
|
54
|
+
- HTML parsing approach replaced with direct API consumption for better reliability
|
|
55
|
+
|
|
56
|
+
## 4.0.0 - 2016-02-10
|
|
57
|
+
|
|
58
|
+
The cinebase standardisation release.
|
|
59
|
+
|
|
60
|
+
### Added
|
|
61
|
+
- cinebase
|
|
62
|
+
|
|
63
|
+
### Removed
|
|
64
|
+
- Remove film concept
|
|
65
|
+
|
|
66
|
+
### Changes
|
|
67
|
+
- New `rake fixtures` command and implementation
|
|
68
|
+
- TitleSanitizer uses `cinebase`
|
|
69
|
+
- Cinema uses `cinebase`
|
|
70
|
+
- Screening becomes Performance
|
|
71
|
+
- Performance uses `cinebase`
|
|
72
|
+
- Badges in SVG
|
|
73
|
+
|
|
74
|
+
## [3.0.14] - 2015-05-17
|
|
75
|
+
|
|
76
|
+
### Fixed
|
|
77
|
+
- Films for the following year incorrectly dated
|
|
78
|
+
|
|
79
|
+
### Changed
|
|
80
|
+
- Internal date calculation method changed for screenings
|
|
81
|
+
|
|
82
|
+
## [3.0.13] - 2015-05-06
|
|
83
|
+
|
|
84
|
+
### Added
|
|
85
|
+
- title sanitizer for Bolshoi Ballet
|
|
86
|
+
|
|
87
|
+
## [3.0.12] - 2015-05-03
|
|
88
|
+
|
|
89
|
+
### Fixed
|
|
90
|
+
- no duplicate 'arts' for NT Live
|
|
91
|
+
|
|
92
|
+
## [3.0.11] - 2015-05-03
|
|
93
|
+
|
|
94
|
+
### Added
|
|
95
|
+
- Variants work. 'arts', 'baby', 'kids', 'imax', 'senior'
|
|
96
|
+
- Test for screening booking urls
|
|
97
|
+
- Test for screenings at National Museum IMAX picturehouse
|
|
98
|
+
|
|
99
|
+
## [3.0.10] - 2015-04-12
|
|
100
|
+
|
|
101
|
+
### Changed
|
|
102
|
+
- Use 'NT Live'
|
|
103
|
+
|
|
104
|
+
## [3.0.9] - 2015-04-12
|
|
105
|
+
|
|
106
|
+
### Fixed
|
|
107
|
+
- Date parsing was busted, it's not anymore
|
|
108
|
+
|
|
109
|
+
### Changed
|
|
110
|
+
- Better use of Struct
|
|
111
|
+
|
|
112
|
+
## [3.0.8] - 2015-04-07
|
|
113
|
+
|
|
114
|
+
### Fixed
|
|
115
|
+
- Screening parsing broken by HTML change
|
|
116
|
+
|
|
117
|
+
## [3.0.7] - 2015-04-05
|
|
118
|
+
|
|
119
|
+
### Added
|
|
120
|
+
- Defensive behaviour for 'upcoming' cinemas with no address
|
|
121
|
+
|
|
122
|
+
## [3.0.6] - 2015-03-20
|
|
123
|
+
|
|
124
|
+
### Added
|
|
125
|
+
- title sanitization for R18, N/A and (Theatre)
|
|
126
|
+
|
|
127
|
+
## [3.0.5] - 2015-03-19
|
|
128
|
+
|
|
129
|
+
### Fixed
|
|
130
|
+
- tests for website class
|
|
131
|
+
- updated fixtures
|
|
132
|
+
- loosened parsers to allow for sold out performances
|
|
133
|
+
|
|
134
|
+
## [3.0.4] - 2015-02-17
|
|
135
|
+
|
|
136
|
+
### Fixed
|
|
137
|
+
- do not verify SSL
|
|
138
|
+
|
|
139
|
+
## [3.0.3] - 2015-02-17
|
|
140
|
+
|
|
141
|
+
### Fixed
|
|
142
|
+
- Actually require OpenSSL
|
|
143
|
+
|
|
144
|
+
## [3.0.2] - 2015-02-17
|
|
145
|
+
|
|
146
|
+
### Fixed
|
|
147
|
+
- SSL everywhere
|
|
148
|
+
|
|
149
|
+
## [3.0.1] - 2015-02-16
|
|
150
|
+
|
|
151
|
+
### Fixed
|
|
152
|
+
- bug in parsing variants
|
|
153
|
+
|
|
154
|
+
## [3.0.0] - 2015-02-15
|
|
155
|
+
|
|
156
|
+
### Fixed
|
|
157
|
+
- the whole damn parsing, we now look at picturehouses.com
|
|
158
|
+
|
|
159
|
+
## [2.0.5] - 2015-01-03
|
|
160
|
+
|
|
161
|
+
### Added
|
|
162
|
+
- parents and babies screening title
|
|
163
|
+
- subtitled screening
|
|
164
|
+
|
|
165
|
+
## [2.0.4] - 2015-01-01
|
|
166
|
+
|
|
167
|
+
### Added
|
|
168
|
+
- remove imax from film title
|
|
169
|
+
- remove 'Discover Tuesday' from film title
|
|
170
|
+
- remove 'toddler time' from film title
|
|
171
|
+
- remove 'singalong' from film title
|
|
172
|
+
|
|
173
|
+
## [2.0.3] - 2014-10-19
|
|
174
|
+
|
|
175
|
+
### Added
|
|
176
|
+
- Better Q&A/panel removal from titles
|
|
177
|
+
- deal with various title edge cases
|
|
178
|
+
- remove years from titles
|
|
179
|
+
|
|
180
|
+
## [2.0.2] - 2014-10-19
|
|
181
|
+
|
|
182
|
+
### Added
|
|
183
|
+
- No screenings in York for 'basement events'
|
|
184
|
+
- more flexible 2d removal
|
|
185
|
+
- better title sanitizations
|
|
186
|
+
- deal with ROH Encore
|
|
187
|
+
- better spacing on 'event' titles
|
|
188
|
+
|
|
189
|
+
## [2.0.1] - 2014-10-19
|
|
190
|
+
|
|
191
|
+
### Added
|
|
192
|
+
- Better parsing of ampersands in film titles
|
|
193
|
+
- Better parsing of autism screening film titles
|
|
194
|
+
- Better parsing of bad spacing in film titles
|
|
195
|
+
- Better parsing of Q&A events
|
|
196
|
+
- Better parsing of rogue screening types
|
|
197
|
+
- Better parsing of free screening types
|
|
198
|
+
|
|
199
|
+
## [2.0.0] - 2014-10-16
|
|
200
|
+
|
|
201
|
+
### Added
|
|
202
|
+
- Live testing rake task
|
|
203
|
+
- Ruby 2.1.3 on Travis
|
|
204
|
+
|
|
205
|
+
### Changed
|
|
206
|
+
- Internal structure of parsers
|
|
207
|
+
- Title sanitization
|
|
208
|
+
- Broke up monolith of Cinema class
|
|
209
|
+
- Fixture update
|
|
210
|
+
- Rubocop
|
|
211
|
+
|
|
212
|
+
### Removed
|
|
213
|
+
- Only the badness
|
data/COMM-LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
Copyright (c) 2013 Andy Croll
|
|
2
|
+
|
|
3
|
+
MIT License
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
6
|
+
a copy of this software and associated documentation files (the
|
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
11
|
+
the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be
|
|
14
|
+
included in all copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/Gemfile
ADDED