cineworld_uk 4.2.0 → 4.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 +10 -0
- data/README.md +4 -1
- data/cineworld_uk.gemspec +1 -1
- data/lib/cineworld_uk/internal/api_response.rb +2 -1
- data/lib/cineworld_uk/internal/parser/api/film.rb +8 -1
- data/lib/cineworld_uk/internal/title_sanitizer.rb +3 -0
- data/lib/cineworld_uk/performance.rb +1 -0
- data/lib/cineworld_uk/version.rb +2 -2
- data/test/fixtures/api/showtimes-014.json +11 -2
- data/test/lib/cineworld_uk/internal/parser/api/film_test.rb +16 -0
- data/test/lib/cineworld_uk/internal/title_sanitizer_test.rb +25 -0
- data/test/lib/cineworld_uk/performance_test.rb +15 -3
- 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: b966798e50231ceceb95b749b8c3e9e962db5cc12edc7fb31e98ee40e110078d
|
|
4
|
+
data.tar.gz: f26069f75b3de854af94f90758b0d479faa8ef7f2923dfb3c6ed66d16a681432
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2d38f7b625fe0625160948172925120d2763ba1f9235acc683f58bf5c4b1fdeca4a6176734884e400dadfa34ed53c5d1a745af7b11ecbf52468884c1bc92d378
|
|
7
|
+
data.tar.gz: 71d23a661ac05b7eb340877e6c371ceae53cc4b757048a75d3ebfa4d713258ca7faae8cb74d7c360ecdf5da8655351c7c1167b920c10125a1dc43d6f434b2405
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,16 @@
|
|
|
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
|
+
## 4.3.0 - 2026-10-22
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
- `Performance#film_year`, read from a trailing `(1996)` in the title, so a re-release gives the original year.
|
|
9
|
+
- `4dx` and `screenx` variants from Vista's `4DX`, `4DX 3D` and `ScreenX` attributes.
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
- Require cinebase 5.4. Titles also lose `+ ... Q&A` and `+ Discussion` add-ons, `(35mm)`, `(70mm)` and `4K` markers, and `CFF:` festival prefixes.
|
|
13
|
+
- Film titles lose their year suffix and the `(4DX)`, `(ScreenX)`, `M4J:`, `£2 Family Films :`, `Horror Season 2026` and `(Re-release)` markers, and Lithuanian versions. For example `Horror Season 2026 From Dusk Till Dawn (1996)` is now `From Dusk Till Dawn` with `film_year` 1996 and the Horror Season 2026 festival. Consumers matching films by name will see these names change.
|
|
14
|
+
|
|
5
15
|
## 4.2.0 - 2026-10-22
|
|
6
16
|
|
|
7
17
|
### Added
|
data/README.md
CHANGED
|
@@ -177,6 +177,9 @@ performance.dimension
|
|
|
177
177
|
performance.variant
|
|
178
178
|
#=> ['audio_described']
|
|
179
179
|
|
|
180
|
+
performance.film_year
|
|
181
|
+
#=> 1996 # from the title, nil when it has no year
|
|
182
|
+
|
|
180
183
|
performance.language
|
|
181
184
|
#=> 'Tamil' # audio language, nil when the cinema does not tag one
|
|
182
185
|
|
|
@@ -226,7 +229,7 @@ To build and check just one platform on a matching host:
|
|
|
226
229
|
|
|
227
230
|
```sh
|
|
228
231
|
bundle exec rake 'package:native[x86_64-linux-gnu]'
|
|
229
|
-
CINEWORLD_PACKAGE=pkg/cineworld_uk-4.
|
|
232
|
+
CINEWORLD_PACKAGE=pkg/cineworld_uk-4.3.0-x86_64-linux-gnu.gem bundle exec ruby test/package_test.rb
|
|
230
233
|
```
|
|
231
234
|
|
|
232
235
|
Native packaging downloads pinned upstream archives at **build time**, verifies
|
data/cineworld_uk.gemspec
CHANGED
|
@@ -25,6 +25,6 @@ Gem::Specification.new do |spec|
|
|
|
25
25
|
spec.add_development_dependency 'simplecov', '< 1'
|
|
26
26
|
spec.add_development_dependency 'webmock'
|
|
27
27
|
|
|
28
|
-
spec.add_runtime_dependency 'cinebase', '~> 5.
|
|
28
|
+
spec.add_runtime_dependency 'cinebase', '~> 5.4'
|
|
29
29
|
spec.add_runtime_dependency 'nokogiri', '>= 1.11'
|
|
30
30
|
end
|
|
@@ -14,7 +14,8 @@ module CineworldUk
|
|
|
14
14
|
"Subtitled" => "subbed", "Subtitles" => "subbed",
|
|
15
15
|
"Autism Friendly" => "autism-friendly",
|
|
16
16
|
"Movies for Juniors" => "junior",
|
|
17
|
-
"Unlimited Screening" => "unlimited-screening", "Q&A" => "qa"
|
|
17
|
+
"Unlimited Screening" => "unlimited-screening", "Q&A" => "qa",
|
|
18
|
+
"4DX" => "4dx", "4DX 3D" => "4dx", "ScreenX" => "screenx"
|
|
18
19
|
}.freeze
|
|
19
20
|
LANGUAGES = Cinebase::TitleSanitizer::LANGUAGES
|
|
20
21
|
|
|
@@ -27,6 +27,11 @@ module CineworldUk
|
|
|
27
27
|
Cinebase::Festival.from_title(@data['name'] || '', year: year)
|
|
28
28
|
end
|
|
29
29
|
|
|
30
|
+
# @return [Integer, nil] the year at the end of the title
|
|
31
|
+
def film_year
|
|
32
|
+
Cinebase::TitleSanitizer.film_year(@data['name'] || '')
|
|
33
|
+
end
|
|
34
|
+
|
|
30
35
|
# Sanitized film name
|
|
31
36
|
# @return [String]
|
|
32
37
|
def name
|
|
@@ -40,11 +45,13 @@ module CineworldUk
|
|
|
40
45
|
def variant
|
|
41
46
|
attrs = @data['attributeIds'] || []
|
|
42
47
|
[
|
|
48
|
+
attrs.include?('4dx') ? '4dx' : nil,
|
|
43
49
|
attrs.include?('autism-friendly') ? 'autism_friendly' : nil,
|
|
44
50
|
attrs.include?('imax') ? 'imax' : nil,
|
|
45
51
|
attrs.include?('junior') ? 'kids' : nil,
|
|
46
52
|
attrs.include?('unlimited-screening') ? 'members' : nil,
|
|
47
|
-
attrs.include?('qa') ? 'q&a' : nil
|
|
53
|
+
attrs.include?('qa') ? 'q&a' : nil,
|
|
54
|
+
attrs.include?('screenx') ? 'screenx' : nil
|
|
48
55
|
].compact
|
|
49
56
|
end
|
|
50
57
|
end
|
|
@@ -28,6 +28,9 @@ module CineworldUk
|
|
|
28
28
|
/\ATake 2 -/, # take 2
|
|
29
29
|
/ - (Subtitled) Movies for Juniors/i, # movies for juniors
|
|
30
30
|
'(IMAX)', # IMAX
|
|
31
|
+
/\A\((4DX|ScreenX)\)\s*/, # format, kept as a variant
|
|
32
|
+
/\AM4J: /, # movies for juniors
|
|
33
|
+
/\A£2 Family Films : /, # family pricing
|
|
31
34
|
'SciScreen: ', # SciScreen
|
|
32
35
|
/\s(-\s)*(With)*\sLive Q And A/i, # Live Q&A
|
|
33
36
|
/(\s+\-\s+)?MOVIES FOR JUNIORS/i, # movies for juniors
|
|
@@ -80,6 +80,7 @@ module CineworldUk
|
|
|
80
80
|
dimension: film.dimension,
|
|
81
81
|
festival: film.festival(starting_at.year),
|
|
82
82
|
film_name: film.name,
|
|
83
|
+
film_year: film.film_year,
|
|
83
84
|
language: performance.language,
|
|
84
85
|
starting_at: starting_at,
|
|
85
86
|
variant: (performance.variant + film.variant).sort
|
data/lib/cineworld_uk/version.rb
CHANGED
|
@@ -36,6 +36,13 @@
|
|
|
36
36
|
"attributeIds": ["A-AC"],
|
|
37
37
|
"requires3dGlasses": false
|
|
38
38
|
},
|
|
39
|
+
{
|
|
40
|
+
"id": "014-1007",
|
|
41
|
+
"filmId": "FILM-5",
|
|
42
|
+
"schedule": { "startsAt": "2026-10-24T21:00:00+01:00" },
|
|
43
|
+
"attributeIds": ["A-4DX"],
|
|
44
|
+
"requires3dGlasses": false
|
|
45
|
+
},
|
|
39
46
|
{
|
|
40
47
|
"id": "014-1006",
|
|
41
48
|
"filmId": "FILM-1",
|
|
@@ -49,7 +56,8 @@
|
|
|
49
56
|
{ "id": "FILM-1", "title": { "text": "The Example Film" } },
|
|
50
57
|
{ "id": "FILM-2", "title": { "text": "Imaginary Picture (Tamil)" } },
|
|
51
58
|
{ "id": "FILM-3", "title": { "text": "Pretend Pups - Movies For Juniors" } },
|
|
52
|
-
{ "id": "FILM-4", "title": { "text": "Cine-Excess 2026: Scum Of The Earth" } }
|
|
59
|
+
{ "id": "FILM-4", "title": { "text": "Cine-Excess 2026: Scum Of The Earth" } },
|
|
60
|
+
{ "id": "FILM-5", "title": { "text": "(4DX) Wildwood (2026)" } }
|
|
53
61
|
],
|
|
54
62
|
"attributes": [
|
|
55
63
|
{ "id": "A-2D", "shortName": { "text": "2D" }, "name": { "text": "2D Film" } },
|
|
@@ -58,7 +66,8 @@
|
|
|
58
66
|
{ "id": "A-TAMIL", "shortName": { "text": "Tamil" }, "name": { "text": "Tamil" } },
|
|
59
67
|
{ "id": "A-ST", "shortName": { "text": "ST" }, "name": { "text": "Subtitled" } },
|
|
60
68
|
{ "id": "A-M4J", "shortName": { "text": "M4J" }, "name": { "text": "Movies for Juniors" } },
|
|
61
|
-
{ "id": "A-AC", "shortName": { "text": "AC" }, "name": { "text": "Event Cinema" } }
|
|
69
|
+
{ "id": "A-AC", "shortName": { "text": "AC" }, "name": { "text": "Event Cinema" } },
|
|
70
|
+
{ "id": "A-4DX", "shortName": { "text": "4DX" }, "name": { "text": "4DX" } }
|
|
62
71
|
],
|
|
63
72
|
"sites": [
|
|
64
73
|
{ "id": "014", "name": { "text": "Brighton" } }
|
|
@@ -47,6 +47,22 @@ class CineworldUk::Internal::Parser::Api::FilmTest < Minitest::Test
|
|
|
47
47
|
assert_nil film.festival(2026)
|
|
48
48
|
end
|
|
49
49
|
|
|
50
|
+
def test_film_year
|
|
51
|
+
assert_equal 1996, film('name' => 'Horror Season 2026 From Dusk Till Dawn (1996)').film_year
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
def test_film_year_without_year
|
|
55
|
+
assert_nil film.film_year
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
def test_variant_4dx
|
|
59
|
+
assert_includes film('attributeIds' => ['4dx']).variant, '4dx'
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
def test_variant_screenx
|
|
63
|
+
assert_includes film('attributeIds' => ['screenx']).variant, 'screenx'
|
|
64
|
+
end
|
|
65
|
+
|
|
50
66
|
def test_variant_is_sorted
|
|
51
67
|
variant = film('attributeIds' => %w(qa junior imax)).variant
|
|
52
68
|
|
|
@@ -90,6 +90,31 @@ class CineworldUk::Internal::TitleSanitizerTest < Minitest::Test
|
|
|
90
90
|
assert_sanitized 'Bebefinn Sing-Along Movie', 'Bebefinn Sing-Along Movie'
|
|
91
91
|
end
|
|
92
92
|
|
|
93
|
+
def test_removes_format_prefix
|
|
94
|
+
assert_sanitized 'Wildwood', '(4DX) Wildwood'
|
|
95
|
+
assert_sanitized 'Wildwood', '(ScreenX) Wildwood'
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
def test_removes_movies_for_juniors_prefix
|
|
99
|
+
assert_sanitized 'Paw Patrol: The Mighty Movie', 'M4J: Paw Patrol: The Mighty Movie'
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
def test_removes_family_films_prefix
|
|
103
|
+
assert_sanitized 'Paw Patrol: The Dino Movie', '£2 Family Films : Paw Patrol: The Dino Movie'
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
def test_removes_film_year
|
|
107
|
+
assert_sanitized 'Street Fighter', 'Street Fighter (2026)'
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
def test_removes_season_prefix_and_year
|
|
111
|
+
assert_sanitized 'From Dusk Till Dawn', 'Horror Season 2026 From Dusk Till Dawn (1996)'
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
def test_removes_re_release
|
|
115
|
+
assert_sanitized 'Zindagi Na Milegi Dobara', 'Zindagi Na Milegi Dobara (Re-release) (Hindi)'
|
|
116
|
+
end
|
|
117
|
+
|
|
93
118
|
def test_removes_festival_prefix
|
|
94
119
|
assert_sanitized 'Scum Of The Earth', 'Cine-Excess 2026: Scum Of The Earth'
|
|
95
120
|
end
|
|
@@ -18,13 +18,13 @@ class CineworldUk::PerformanceTest < Minitest::Test
|
|
|
18
18
|
performances = performances_on_date
|
|
19
19
|
|
|
20
20
|
assert(performances.all? { |p| p.instance_of?(CineworldUk::Performance) })
|
|
21
|
-
assert_equal
|
|
21
|
+
assert_equal 7, performances.count
|
|
22
22
|
end
|
|
23
23
|
|
|
24
24
|
def test_at_accepts_string_id
|
|
25
25
|
stub_showtimes(DATE)
|
|
26
26
|
|
|
27
|
-
assert_equal
|
|
27
|
+
assert_equal 7, CineworldUk::Performance.at('014', from: DATE, to: DATE).count
|
|
28
28
|
end
|
|
29
29
|
|
|
30
30
|
def test_at_parses_first_performance
|
|
@@ -70,6 +70,18 @@ class CineworldUk::PerformanceTest < Minitest::Test
|
|
|
70
70
|
assert_equal Cinebase::Festival.new(name: 'Cine-Excess', year: 2026), performance.festival
|
|
71
71
|
end
|
|
72
72
|
|
|
73
|
+
def test_at_parses_format_and_film_year
|
|
74
|
+
performance = performances_on_date[5]
|
|
75
|
+
|
|
76
|
+
assert_equal 'Wildwood', performance.film_name
|
|
77
|
+
assert_equal 2026, performance.film_year
|
|
78
|
+
assert_equal %w(4dx), performance.variant
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
def test_new_sets_film_year
|
|
82
|
+
assert_equal 1996, CineworldUk::Performance.new(options(film_year: 1996)).film_year
|
|
83
|
+
end
|
|
84
|
+
|
|
73
85
|
def test_at_keeps_after_midnight_on_next_utc_day
|
|
74
86
|
assert_equal Time.utc(2026, 10, 24, 23, 15), performances_on_date.last.starting_at
|
|
75
87
|
end
|
|
@@ -80,7 +92,7 @@ class CineworldUk::PerformanceTest < Minitest::Test
|
|
|
80
92
|
|
|
81
93
|
performances = CineworldUk::Performance.at(14, from: DATE, to: DATE + 1)
|
|
82
94
|
|
|
83
|
-
assert_equal
|
|
95
|
+
assert_equal 7, performances.count
|
|
84
96
|
assert_not_requested :get, "#{BASE_URL}sites"
|
|
85
97
|
end
|
|
86
98
|
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: cineworld_uk
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 4.
|
|
4
|
+
version: 4.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.4'
|
|
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.4'
|
|
124
124
|
- !ruby/object:Gem::Dependency
|
|
125
125
|
name: nokogiri
|
|
126
126
|
requirement: !ruby/object:Gem::Requirement
|