odeon_uk 5.2.0 → 5.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0b86173e729613c9f78da8d99b25e324d6f340ed019eb0f9f4ac110eae3fdd30
4
- data.tar.gz: 419568e7f465a60568b123ce4c788c9a44d6f3506628a4d0e63a6b52b8932de1
3
+ metadata.gz: 7b7adde593e7cd44da4725a5b517aee8b1fbb1da5795dbc0c392c74dd7bd383c
4
+ data.tar.gz: 9bc5f78b5c254899b3dae460263853ac3040ee61af29ac386b007ec12058b7f9
5
5
  SHA512:
6
- metadata.gz: e6cacb74f634a0950112fe06223417826ffc9b5740048e4480f8341746b34308d27638b79f8508abebcbad5dee1ad38a5314f8b62f6640d78fd29884b80e57a3
7
- data.tar.gz: fa0c976be0739ff59b00e4a7b4eb1eb5799e00dfefe2682c56453188eb3f3adc30cc0fa4898b59eaef8e6cbfb88fd94ecab6e3310aa6e440f21d75fe93ee9739
6
+ metadata.gz: 8c06a69a2f1a142c96590259ce3614e053fc0945939b76702c6af4ada601999ace0bfdc2b69b0b66c7e18583f62933f44d28188a796d82a121af8f8af444f48d
7
+ data.tar.gz: 1a189b53570e278e0dff65a3b270a1d7bcf0d55ad241239d8707b9946ef9d35128646b14451bf1eda5a28d409711c9eec17478a3527c35941711fe7abc0e5777
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
+ ## [5.3.0] - 2026-11-03
6
+
7
+ ### Changed
8
+ - 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`.
9
+ - National Theatre Live and Bolshoi screenings are named `National Theatre Live: ` and `Bolshoi Ballet: `, the prefixes cinebase moves to `event`. Titles listed in capitals, such as `SCREAM`, are title cased.
10
+
11
+ ### Fixed
12
+ - `ODEON Pride Nights - A Wolf Among the Swans` is now `A Wolf Among the Swans`.
13
+ - `Charity Screening - Inside Out` is now `Inside Out`.
14
+
5
15
  ## 5.2.0 - 2026-10-31
6
16
 
7
17
  ### Added
@@ -43,6 +43,7 @@ module OdeonUk
43
43
  film_year: Cinebase::TitleSanitizer.film_year(title),
44
44
  language: language,
45
45
  starting_at: starting_at,
46
+ title: title,
46
47
  variant: variant
47
48
  }
48
49
  end
@@ -21,7 +21,9 @@ module OdeonUk
21
21
  'Autism Friendly Screening -', # autism screening
22
22
  /\(encore.+\)/i, # encore for NT Live
23
23
  /\(live\)/i, # live in brackets
24
- 'Autism Friendly - ' # autism friendly
24
+ 'Autism Friendly - ', # autism friendly
25
+ /\AODEON Pride Nights\s*-\s*/, # pride season
26
+ /\ACharity Screening\s*-\s*/ # charity screening
25
27
  ] + COMMON_REMOVE
26
28
  end
27
29
 
@@ -1,6 +1,6 @@
1
1
  # Ruby interface for https://www.odeon.co.uk
2
- # @version 5.2.0
2
+ # @version 5.3.0
3
3
  module OdeonUk
4
4
  # Gem version
5
- VERSION = '5.2.0'.freeze
5
+ VERSION = '5.3.0'.freeze
6
6
  end
data/odeon_uk.gemspec CHANGED
@@ -27,5 +27,5 @@ Gem::Specification.new do |spec|
27
27
  spec.add_development_dependency 'simplecov', '< 1'
28
28
  spec.add_development_dependency 'webmock'
29
29
 
30
- spec.add_runtime_dependency 'cinebase', '~> 5.6'
30
+ spec.add_runtime_dependency 'cinebase', '~> 5.9'
31
31
  end
@@ -24,6 +24,7 @@ class OdeonUk::Internal::Parser::Api::ShowtimeTest < Minitest::Test
24
24
  film_year: nil,
25
25
  language: nil,
26
26
  starting_at: Time.utc(2026, 10, 24, 17, 30),
27
+ title: 'Jailer 2 (Tamil)',
27
28
  variant: []
28
29
  }
29
30
 
@@ -14,7 +14,7 @@ class OdeonUk::Internal::TitleSanitizerTest < Minitest::Test
14
14
  end
15
15
 
16
16
  def test_bolshoi
17
- assert_sanitized 'Bolshoi: Spartacus', 'Bolshoi - Spartacus (Live)'
17
+ assert_sanitized 'Bolshoi Ballet: Spartacus', 'Bolshoi - Spartacus (Live)'
18
18
  end
19
19
 
20
20
  def test_removes_cinemagic_prefix
@@ -35,11 +35,11 @@ class OdeonUk::Internal::TitleSanitizerTest < Minitest::Test
35
35
  end
36
36
 
37
37
  def test_nt_live
38
- assert_sanitized 'National Theatre: War Horse', 'NT Live - War Horse'
38
+ assert_sanitized 'National Theatre Live: War Horse', 'NT Live - War Horse'
39
39
  end
40
40
 
41
41
  def test_national_theatre_encore
42
- assert_sanitized 'National Theatre: Frankenstein',
42
+ assert_sanitized 'National Theatre Live: Frankenstein',
43
43
  'National Theatre Live - Frankenstein (Encore Screening)'
44
44
  end
45
45
 
@@ -103,7 +103,7 @@ class OdeonUk::Internal::TitleSanitizerTest < Minitest::Test
103
103
  end
104
104
 
105
105
  def test_removes_q_and_a
106
- assert_sanitized 'NAZA', 'NAZA + Q&A'
106
+ assert_sanitized 'Naza', 'NAZA + Q&A'
107
107
  end
108
108
 
109
109
  def test_removes_in_person_q_and_a
@@ -115,7 +115,15 @@ class OdeonUk::Internal::TitleSanitizerTest < Minitest::Test
115
115
  end
116
116
 
117
117
  def test_removes_anniversary
118
- assert_sanitized 'SCREAM', 'SCREAM (30th Anniversary)'
118
+ assert_sanitized 'Scream', 'SCREAM (30th Anniversary)'
119
+ end
120
+
121
+ def test_removes_pride_nights_prefix
122
+ assert_sanitized 'A Wolf Among the Swans', 'ODEON Pride Nights - A Wolf Among the Swans'
123
+ end
124
+
125
+ def test_removes_charity_screening_prefix
126
+ assert_sanitized 'Inside Out', 'Charity Screening - Inside Out'
119
127
  end
120
128
 
121
129
  def test_world_tour_is_not_capitalised
@@ -128,11 +136,15 @@ class OdeonUk::Internal::TitleSanitizerTest < Minitest::Test
128
136
  'Spider-Man: Brand New Day',
129
137
  'Hadestown: The Musical',
130
138
  'Rammstein - Live in Mexico City',
131
- 'Ozzy & Black Sabbath: Back to the Beginning',
132
- "BTS 'ARIRANG' IN BUENOS AIRES: LIVE VIEWING"
139
+ 'Ozzy & Black Sabbath: Back to the Beginning'
133
140
  ].each { |title| assert_sanitized title, title }
134
141
  end
135
142
 
143
+ def test_title_cases_capitals
144
+ assert_sanitized "BTS 'Arirang' in Buenos Aires: Live Viewing",
145
+ "BTS 'ARIRANG' IN BUENOS AIRES: LIVE VIEWING"
146
+ end
147
+
136
148
  private
137
149
 
138
150
  def assert_sanitized(expected, title)
@@ -36,6 +36,20 @@ class OdeonUk::PerformanceTest < Minitest::Test
36
36
  performance.booking_url
37
37
  end
38
38
 
39
+ def test_at_names_event_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'] = 'Met Opera - Eugene Onegin'
43
+ end
44
+ end
45
+ performance = performances_at(824).first
46
+
47
+ assert_equal 'Met Opera - Eugene Onegin', performance.title
48
+ assert_equal 'Eugene Onegin', performance.film_name
49
+ assert_equal Cinebase::Event.new(name: 'Met Opera'), performance.event
50
+ assert_equal %w(arts audio_described), performance.variant
51
+ end
52
+
39
53
  def test_at_parses_3d_imax
40
54
  performance = performances_at(824)[1]
41
55
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: odeon_uk
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.2.0
4
+ version: 5.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.6'
116
+ version: '5.9'
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.6'
123
+ version: '5.9'
124
124
  description: Pull movie & cinema information from the ODEON Vista API
125
125
  email:
126
126
  - andy@goodscary.com