picturehouse_uk 6.1.0 → 6.3.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 +4 -4
- data/CHANGELOG.md +20 -0
- data/lib/picturehouse_uk/internal/parser/api/showtime.rb +5 -1
- data/lib/picturehouse_uk/internal/title_sanitizer.rb +8 -1
- data/lib/picturehouse_uk/version.rb +2 -2
- data/picturehouse_uk.gemspec +1 -1
- data/test/lib/picturehouse_uk/internal/parser/api/showtime_test.rb +10 -2
- data/test/lib/picturehouse_uk/internal/title_sanitizer_test.rb +67 -3
- data/test/lib/picturehouse_uk/performance_test.rb +14 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ac3de07bd0a83c3193c3c0f1bfbc1bc5e44f8b970595f45cc4cf251bfddc6029
|
|
4
|
+
data.tar.gz: 805b5e50d2abc5560227755fa247f7e67248696f89b40897366e1dacdf8f7b8f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 74b6e76c6fe7f4c1986b6629249b1d4f19d5d61439d06bc8b97924af3ed0dbba3edcdc0dafaa53c96a2473834a738ca8464c76f7b96c3a4e5fc68efe7eb33a7b
|
|
7
|
+
data.tar.gz: af648ea272321b69fb428a747e917f58d90e0e403f300775507dbb7009d6f0423c9bf9847b8c5391a58da3ab8d1643059cff59df57febd8fd54d2e19913aeff0
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,26 @@
|
|
|
2
2
|
All notable changes to this project will be documented in this file.
|
|
3
3
|
This project adheres to [Semantic Versioning](http://semver.org/).
|
|
4
4
|
|
|
5
|
+
## [6.3.0] - 2026-11-03
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
- Uses cinebase 5.10. `NFF` titles name the Norwich Film Festival, which Cinema City hosts.
|
|
9
|
+
- `+ Mulled Wine and Carols` screenings are the plain film, with the `mulled_wine` variant.
|
|
10
|
+
|
|
11
|
+
## [6.2.0] - 2026-11-03
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
- Uses cinebase 5.9: performances take the raw `title:`, so audience labels become variants, and series prefixes such as `Met Opera:` become the performance's `event`.
|
|
15
|
+
- National Theatre Live and Bolshoi screenings are named `National Theatre Live: ` and `Bolshoi Ballet: `, the prefixes cinebase moves to `event`.
|
|
16
|
+
|
|
17
|
+
### Fixed
|
|
18
|
+
- `Harbour Highlights: Arrival 10th Anniversary` is now `Arrival`.
|
|
19
|
+
- `Little Theatre's 90th - Mr. Deeds Goes to Town` and `Little Theatre's 90th Anniversary: The Third Man` lose the birthday prefix.
|
|
20
|
+
- `The Devils + Live Q+A with Mark Kermode` and `A Long Winter Livestream Q+A` lose the Q&A.
|
|
21
|
+
- `The Trip to the Northern Lights: Broadcast Q&A` and `…: Preview and Q&A` are now `The Trip to the Northern Lights`.
|
|
22
|
+
- `Book Club: Elif Shafak In Conversation-Broadcast` loses `-Broadcast`.
|
|
23
|
+
- `Raise The Red Lantern 1991` loses its trailing release year. Years before 2020, after a word other than "of", are removed, so `Blade Runner 2049`, `1917` and `2046` keep theirs.
|
|
24
|
+
|
|
5
25
|
## [6.1.0] - 2026-10-31
|
|
6
26
|
|
|
7
27
|
### Added
|
|
@@ -25,6 +25,9 @@ module PicturehouseUk
|
|
|
25
25
|
"Watch with Baby" => "baby"
|
|
26
26
|
}.freeze
|
|
27
27
|
|
|
28
|
+
# Cinema City in Norwich hosts the Norwich Film Festival
|
|
29
|
+
FESTIVAL_NAMES = { "NFF" => "Norwich Film Festival" }.freeze
|
|
30
|
+
|
|
28
31
|
# @param [Hash] data one showtime
|
|
29
32
|
# @param [Hash{String => Hash}] films related films keyed by id
|
|
30
33
|
# @param [Hash{String => Hash}] attributes related attributes keyed by id
|
|
@@ -39,10 +42,11 @@ module PicturehouseUk
|
|
|
39
42
|
{
|
|
40
43
|
booking_url: format(BOOKING_URL, @data.fetch("id")),
|
|
41
44
|
dimension: @data["requires3dGlasses"] ? "3d" : "2d",
|
|
42
|
-
festival: Cinebase::Festival.from_title(title, year: starting_at.year),
|
|
45
|
+
festival: Cinebase::Festival.from_title(title, year: starting_at.year, names: FESTIVAL_NAMES),
|
|
43
46
|
film_name: TitleSanitizer.new(title).sanitized,
|
|
44
47
|
film_year: Cinebase::TitleSanitizer.film_year(title),
|
|
45
48
|
starting_at: starting_at,
|
|
49
|
+
title: title,
|
|
46
50
|
variant: variant
|
|
47
51
|
}
|
|
48
52
|
end
|
|
@@ -54,7 +54,14 @@ module PicturehouseUk
|
|
|
54
54
|
/\ARelaxed-Screening: /, # relaxed screening
|
|
55
55
|
/\ALMF Presents: /, # LMF strand
|
|
56
56
|
/\AGreen Screen: /, # Green Screen strand
|
|
57
|
-
/\AFFQ:
|
|
57
|
+
/\AFFQ: /, # FFQ strand
|
|
58
|
+
/\AHarbour Highlights: /, # Harbour Highlights strand
|
|
59
|
+
/\ALittle Theatre['’]s \d+(?:st|nd|rd|th)(?: Anniversary)?\s*[-:]\s*/, # Little Theatre birthday
|
|
60
|
+
/\s*\+\s*(?:Live )?Q[&+]A with .+\z/i, # Q&A with a guest
|
|
61
|
+
/\s+Livestream Q[&+]A\z/i, # livestream Q&A
|
|
62
|
+
/:\s*(?:Broadcast|Preview and) Q[&+]A\z/i, # broadcast Q&A
|
|
63
|
+
/\s*-\s*Broadcast\z/i, # broadcast
|
|
64
|
+
/(?<=\p{L})(?<! of) (?:19\d{2}|20[01]\d)\z/ # release year, not "Blade Runner 2049"
|
|
58
65
|
] + COMMON_REMOVE
|
|
59
66
|
end
|
|
60
67
|
|
data/picturehouse_uk.gemspec
CHANGED
|
@@ -3,7 +3,8 @@ require_relative '../../../../../test_helper'
|
|
|
3
3
|
class PicturehouseUk::Internal::Parser::Api::ShowtimeTest < Minitest::Test
|
|
4
4
|
FILMS = {
|
|
5
5
|
'HO1' => { 'title' => { 'text' => 'Sense and Sensibility (2026)' } },
|
|
6
|
-
'HO2' => { 'title' => { 'text' => 'CFF: Rocket Girl' } }
|
|
6
|
+
'HO2' => { 'title' => { 'text' => 'CFF: Rocket Girl' } },
|
|
7
|
+
'HO3' => { 'title' => { 'text' => 'NFF 2026: Comedy Shorts' } }
|
|
7
8
|
}.freeze
|
|
8
9
|
|
|
9
10
|
ATTRIBUTES = {
|
|
@@ -21,6 +22,7 @@ class PicturehouseUk::Internal::Parser::Api::ShowtimeTest < Minitest::Test
|
|
|
21
22
|
film_name: 'Sense and Sensibility',
|
|
22
23
|
film_year: 2026,
|
|
23
24
|
starting_at: Time.utc(2026, 10, 24, 17, 30),
|
|
25
|
+
title: 'Sense and Sensibility (2026)',
|
|
24
26
|
variant: []
|
|
25
27
|
}
|
|
26
28
|
|
|
@@ -38,10 +40,16 @@ class PicturehouseUk::Internal::Parser::Api::ShowtimeTest < Minitest::Test
|
|
|
38
40
|
def test_festival
|
|
39
41
|
showtime = parse(film_id: 'HO2')
|
|
40
42
|
|
|
41
|
-
assert_equal Cinebase::Festival.new(name: '
|
|
43
|
+
assert_equal Cinebase::Festival.new(name: 'Cambridge Film Festival', year: 2026), showtime[:festival]
|
|
42
44
|
assert_equal 'Rocket Girl', showtime[:film_name]
|
|
43
45
|
end
|
|
44
46
|
|
|
47
|
+
def test_nff_is_the_norwich_film_festival
|
|
48
|
+
showtime = parse(film_id: 'HO3')
|
|
49
|
+
|
|
50
|
+
assert_equal Cinebase::Festival.new(name: 'Norwich Film Festival', year: 2026), showtime[:festival]
|
|
51
|
+
end
|
|
52
|
+
|
|
45
53
|
private
|
|
46
54
|
|
|
47
55
|
def parse(attribute_ids: [], requires3d: false, film_id: 'HO1')
|
|
@@ -138,12 +138,12 @@ class PicturehouseUkInternalTitleSanitizerTest < Minitest::Test
|
|
|
138
138
|
|
|
139
139
|
def test_sanitized_with_bolshoi_screening
|
|
140
140
|
sanitizer = PicturehouseUk::Internal::TitleSanitizer.new('Bolshoi: Spartacus [NO CERT]')
|
|
141
|
-
assert_equal 'Bolshoi: Spartacus', sanitizer.sanitized
|
|
141
|
+
assert_equal 'Bolshoi Ballet: Spartacus', sanitizer.sanitized
|
|
142
142
|
end
|
|
143
143
|
|
|
144
144
|
def test_sanitized_with_bolshoi_with_captured
|
|
145
145
|
sanitizer = PicturehouseUk::Internal::TitleSanitizer.new('Bolshoi: La Bayadere (Captured Live in 2012)')
|
|
146
|
-
assert_equal 'Bolshoi: La Bayadere', sanitizer.sanitized
|
|
146
|
+
assert_equal 'Bolshoi Ballet: La Bayadere', sanitizer.sanitized
|
|
147
147
|
end
|
|
148
148
|
|
|
149
149
|
def test_sanitized_with_glyndebourne
|
|
@@ -168,7 +168,7 @@ class PicturehouseUkInternalTitleSanitizerTest < Minitest::Test
|
|
|
168
168
|
|
|
169
169
|
def test_sanitized_with_nt_live_screening
|
|
170
170
|
sanitizer = PicturehouseUk::Internal::TitleSanitizer.new('National Theatre: Hamlet [PG]')
|
|
171
|
-
assert_equal '
|
|
171
|
+
assert_equal 'National Theatre Live: Hamlet', sanitizer.sanitized
|
|
172
172
|
end
|
|
173
173
|
|
|
174
174
|
def test_sanitized_with_ourscreen
|
|
@@ -240,4 +240,68 @@ class PicturehouseUkInternalTitleSanitizerTest < Minitest::Test
|
|
|
240
240
|
sanitizer = PicturehouseUk::Internal::TitleSanitizer.new('Spartacus (Bolshoi Ballet)')
|
|
241
241
|
assert_equal 'Bolshoi Ballet: Spartacus', sanitizer.sanitized
|
|
242
242
|
end
|
|
243
|
+
|
|
244
|
+
def test_sanitized_removes_harbour_highlights_strand
|
|
245
|
+
sanitizer = PicturehouseUk::Internal::TitleSanitizer.new('Harbour Highlights: Arrival 10th Anniversary')
|
|
246
|
+
assert_equal 'Arrival', sanitizer.sanitized
|
|
247
|
+
end
|
|
248
|
+
|
|
249
|
+
def test_sanitized_removes_little_theatre_birthday
|
|
250
|
+
sanitizer = PicturehouseUk::Internal::TitleSanitizer.new("Little Theatre's 90th - Mr. Deeds Goes to Town")
|
|
251
|
+
assert_equal 'Mr. Deeds Goes to Town', sanitizer.sanitized
|
|
252
|
+
end
|
|
253
|
+
|
|
254
|
+
def test_sanitized_removes_little_theatre_anniversary
|
|
255
|
+
sanitizer = PicturehouseUk::Internal::TitleSanitizer.new("Little Theatre's 90th Anniversary: The Third Man")
|
|
256
|
+
assert_equal 'The Third Man', sanitizer.sanitized
|
|
257
|
+
end
|
|
258
|
+
|
|
259
|
+
def test_sanitized_removes_q_and_a_with_guest
|
|
260
|
+
sanitizer = PicturehouseUk::Internal::TitleSanitizer.new('The Devils + Live Q+A with Mark Kermode')
|
|
261
|
+
assert_equal 'The Devils', sanitizer.sanitized
|
|
262
|
+
end
|
|
263
|
+
|
|
264
|
+
def test_sanitized_removes_livestream_q_and_a
|
|
265
|
+
sanitizer = PicturehouseUk::Internal::TitleSanitizer.new('A Long Winter Livestream Q+A')
|
|
266
|
+
assert_equal 'A Long Winter', sanitizer.sanitized
|
|
267
|
+
end
|
|
268
|
+
|
|
269
|
+
def test_sanitized_removes_broadcast_q_and_a
|
|
270
|
+
sanitizer = PicturehouseUk::Internal::TitleSanitizer.new('The Trip to the Northern Lights: Broadcast Q&A')
|
|
271
|
+
assert_equal 'The Trip to the Northern Lights', sanitizer.sanitized
|
|
272
|
+
end
|
|
273
|
+
|
|
274
|
+
def test_sanitized_removes_preview_and_q_and_a
|
|
275
|
+
sanitizer = PicturehouseUk::Internal::TitleSanitizer.new('The Trip to the Northern Lights: Preview and Q&A')
|
|
276
|
+
assert_equal 'The Trip to the Northern Lights', sanitizer.sanitized
|
|
277
|
+
end
|
|
278
|
+
|
|
279
|
+
def test_sanitized_removes_broadcast_suffix
|
|
280
|
+
sanitizer = PicturehouseUk::Internal::TitleSanitizer.new('Book Club: Elif Shafak In Conversation-Broadcast')
|
|
281
|
+
assert_equal 'Book Club: Elif Shafak In Conversation', sanitizer.sanitized
|
|
282
|
+
end
|
|
283
|
+
|
|
284
|
+
def test_sanitized_removes_trailing_release_year
|
|
285
|
+
sanitizer = PicturehouseUk::Internal::TitleSanitizer.new('Raise The Red Lantern 1991')
|
|
286
|
+
assert_equal 'Raise The Red Lantern', sanitizer.sanitized
|
|
287
|
+
end
|
|
288
|
+
|
|
289
|
+
def test_sanitized_keeps_years_that_name_films
|
|
290
|
+
['Blade Runner 2049', '1917', '2046'].each do |title|
|
|
291
|
+
assert_equal title, PicturehouseUk::Internal::TitleSanitizer.new(title).sanitized
|
|
292
|
+
end
|
|
293
|
+
end
|
|
294
|
+
|
|
295
|
+
def test_sanitized_removes_mulled_wine
|
|
296
|
+
assert_equal 'Elf', PicturehouseUk::Internal::TitleSanitizer.new('Elf + Mulled Wine and Carols').sanitized
|
|
297
|
+
end
|
|
298
|
+
|
|
299
|
+
def test_sanitized_keeps_events_with_their_films
|
|
300
|
+
[
|
|
301
|
+
'Hocus Pocus + Pumpkin Party',
|
|
302
|
+
'Rammstein - Live in Mexico City'
|
|
303
|
+
].each do |title|
|
|
304
|
+
assert_equal title, PicturehouseUk::Internal::TitleSanitizer.new(title).sanitized
|
|
305
|
+
end
|
|
306
|
+
end
|
|
243
307
|
end
|
|
@@ -36,6 +36,19 @@ class PicturehouseUk::PerformanceTest < Minitest::Test
|
|
|
36
36
|
performance.booking_url
|
|
37
37
|
end
|
|
38
38
|
|
|
39
|
+
def test_at_reads_audience_from_title
|
|
40
|
+
@api_response.define_singleton_method(:showtimes) do |cinema_id, date|
|
|
41
|
+
super(cinema_id, date).tap do |data|
|
|
42
|
+
data.dig('relatedData', 'films', 0, 'title')['text'] = 'Relaxed Screening: Wildwood'
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
performance = performances_at(19).first
|
|
46
|
+
|
|
47
|
+
assert_equal 'Relaxed Screening: Wildwood', performance.title
|
|
48
|
+
assert_equal 'Wildwood', performance.film_name
|
|
49
|
+
assert_equal %w(audio_described relaxed), performance.variant
|
|
50
|
+
end
|
|
51
|
+
|
|
39
52
|
def test_at_parses_3d_silver_screen
|
|
40
53
|
performance = performances_at(19)[1]
|
|
41
54
|
|
|
@@ -63,7 +76,7 @@ class PicturehouseUk::PerformanceTest < Minitest::Test
|
|
|
63
76
|
performance = performances_at(19)[4]
|
|
64
77
|
|
|
65
78
|
assert_equal 'Made Up Matinee', performance.film_name
|
|
66
|
-
assert_equal Cinebase::Festival.new(name: '
|
|
79
|
+
assert_equal Cinebase::Festival.new(name: 'Cambridge Film Festival', year: 2026), performance.festival
|
|
67
80
|
assert_equal %w(arts subtitled), performance.variant
|
|
68
81
|
end
|
|
69
82
|
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: picturehouse_uk
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 6.
|
|
4
|
+
version: 6.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Andy Croll
|
|
@@ -113,14 +113,14 @@ dependencies:
|
|
|
113
113
|
requirements:
|
|
114
114
|
- - "~>"
|
|
115
115
|
- !ruby/object:Gem::Version
|
|
116
|
-
version: '5.
|
|
116
|
+
version: '5.10'
|
|
117
117
|
type: :runtime
|
|
118
118
|
prerelease: false
|
|
119
119
|
version_requirements: !ruby/object:Gem::Requirement
|
|
120
120
|
requirements:
|
|
121
121
|
- - "~>"
|
|
122
122
|
- !ruby/object:Gem::Version
|
|
123
|
-
version: '5.
|
|
123
|
+
version: '5.10'
|
|
124
124
|
description: Pull movie & cinema information from the Picturehouse Vista API
|
|
125
125
|
email:
|
|
126
126
|
- andy@goodscary.com
|