odeon_uk 5.0.0-arm64-darwin

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.
Files changed (50) hide show
  1. checksums.yaml +7 -0
  2. data/.github/workflows/test.yml +43 -0
  3. data/.gitignore +18 -0
  4. data/.ruby-version +1 -0
  5. data/CHANGELOG.md +132 -0
  6. data/COMM-LICENSE +22 -0
  7. data/Gemfile +4 -0
  8. data/LICENSE +617 -0
  9. data/README.md +174 -0
  10. data/Rakefile +38 -0
  11. data/lib/odeon_uk/cinema.rb +181 -0
  12. data/lib/odeon_uk/internal/api_response.rb +36 -0
  13. data/lib/odeon_uk/internal/guest_token.rb +23 -0
  14. data/lib/odeon_uk/internal/parser/api/showtime.rb +80 -0
  15. data/lib/odeon_uk/internal/title_sanitizer.rb +42 -0
  16. data/lib/odeon_uk/performance.rb +81 -0
  17. data/lib/odeon_uk/version.rb +6 -0
  18. data/lib/odeon_uk.rb +30 -0
  19. data/odeon_uk.gemspec +31 -0
  20. data/test/fixtures/api/showtimes-824.json +66 -0
  21. data/test/fixtures/api/sites.json +32 -0
  22. data/test/lib/odeon_uk/cinema_test.rb +113 -0
  23. data/test/lib/odeon_uk/internal/api_response_test.rb +66 -0
  24. data/test/lib/odeon_uk/internal/fixture_shape_test.rb +14 -0
  25. data/test/lib/odeon_uk/internal/guest_token_test.rb +84 -0
  26. data/test/lib/odeon_uk/internal/parser/api/showtime_test.rb +68 -0
  27. data/test/lib/odeon_uk/internal/title_sanitizer_test.rb +141 -0
  28. data/test/lib/odeon_uk/performance_test.rb +150 -0
  29. data/test/lib/odeon_uk/version_test.rb +7 -0
  30. data/test/live/api_shape_test.rb +19 -0
  31. data/test/live/integration_test.rb +21 -0
  32. data/test/live/live_helper.rb +11 -0
  33. data/test/package_test.rb +56 -0
  34. data/test/support/api_fixtures_helper.rb +16 -0
  35. data/test/support/api_shapes.rb +46 -0
  36. data/test/support/fake_api_response.rb +20 -0
  37. data/test/test_helper.rb +20 -0
  38. data/vendor/curl-impersonate/SOURCE +5 -0
  39. data/vendor/curl-impersonate/bin/curl-impersonate +0 -0
  40. data/vendor/curl-impersonate/licenses/LICENSE +21 -0
  41. data/vendor/curl-impersonate/licenses/LICENSE_BORINGSSL +238 -0
  42. data/vendor/curl-impersonate/licenses/LICENSE_BROTLI +19 -0
  43. data/vendor/curl-impersonate/licenses/LICENSE_CARES +24 -0
  44. data/vendor/curl-impersonate/licenses/LICENSE_CURL +22 -0
  45. data/vendor/curl-impersonate/licenses/LICENSE_NGHTTP2 +23 -0
  46. data/vendor/curl-impersonate/licenses/LICENSE_NGHTTP3 +22 -0
  47. data/vendor/curl-impersonate/licenses/LICENSE_NGTCP2 +22 -0
  48. data/vendor/curl-impersonate/licenses/LICENSE_ZLIB +22 -0
  49. data/vendor/curl-impersonate/licenses/LICENSE_ZSTD +30 -0
  50. metadata +219 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 7c7c3263a739a5be98f96f848f773877c1ac3de70da0a62799121667275927dc
4
+ data.tar.gz: 6249849e7455439d4c2fdb73a8f8822842d62e388d89da4bcd47c8ee96e7e5e6
5
+ SHA512:
6
+ metadata.gz: f3fcb9d7506f0e165ff44201603afd4fffd200bf7279d4416a20f9e5eafc9f765240ce06d34863b451e4d11d79ca8ad3b6051a8ee0f8f472c7b452fffd1cb2f4
7
+ data.tar.gz: 9bd95886ccd4449f7d599194bfab23dcf5caec82a8f748e1cc696611aad58ed614b485febf9df1f6aaec531de8654e8249366ce5a938acc999e6a2e18d469fb4
@@ -0,0 +1,43 @@
1
+ name: Tests
2
+
3
+ on: [push, pull_request]
4
+
5
+ jobs:
6
+ test:
7
+ runs-on: ubuntu-latest
8
+ strategy:
9
+ matrix:
10
+ ruby-version: ['3.4', '4.0']
11
+ steps:
12
+ - uses: actions/checkout@v4
13
+ - uses: ruby/setup-ruby@v1
14
+ with:
15
+ ruby-version: ${{ matrix.ruby-version }}
16
+ bundler-cache: true
17
+ - run: bundle exec rake test
18
+
19
+ package:
20
+ strategy:
21
+ matrix:
22
+ include:
23
+ - runner: ubuntu-latest
24
+ platform: x86_64-linux-gnu
25
+ - runner: ubuntu-24.04-arm
26
+ platform: aarch64-linux-gnu
27
+ - runner: macos-15
28
+ platform: arm64-darwin
29
+ - runner: macos-15-intel
30
+ platform: x86_64-darwin
31
+ runs-on: ${{ matrix.runner }}
32
+ steps:
33
+ - uses: actions/checkout@v4
34
+ - uses: ruby/setup-ruby@v1
35
+ with:
36
+ ruby-version: '4.0'
37
+ bundler-cache: true
38
+ - run: bundle exec rake 'package:native[${{ matrix.platform }}]'
39
+ - run: ODEON_PACKAGE="$(echo pkg/*.gem)" bundle exec ruby test/package_test.rb
40
+ - uses: actions/upload-artifact@v4
41
+ with:
42
+ name: gem-${{ matrix.platform }}
43
+ path: pkg/*.gem
data/.gitignore ADDED
@@ -0,0 +1,18 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
18
+ .DS_Storevendor/curl-impersonate
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 4.0.7
data/CHANGELOG.md ADDED
@@ -0,0 +1,132 @@
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
+ ## 5.0.0 - 2026-10-22
6
+
7
+ ### Changed
8
+ - Retrieve cinemas and performances from the Vista API behind odeon.co.uk instead of the retired iOS plist API.
9
+ - Cinema ids are Vista site ids, zero-padded strings such as `'017'` and `'824'` (Brighton was `71`).
10
+ - `Cinema.all` returns UK cinemas only.
11
+ - `Cinema#adr` includes the second address line. Postcodes are no longer available.
12
+ - `Cinema#url` points at the current cinema pages.
13
+ - `Performance.at` accepts inclusive `from:` and `to:` business dates, defaulting to today in London and the following 13 days. One request per day.
14
+ - Performance times come from Vista's explicit UTC offsets.
15
+ - Title sanitizer handles Met Opera and RBO season prefixes, language and encore suffixes.
16
+ - Require Ruby 3.4 or newer and cinebase 5.2, which now holds the shared Vista client, guest token retrieval, packaging task and common title rules.
17
+ - Film titles drop dub, subtitle, language, anniversary and Q&A markers, and festival prefixes.
18
+ - Convert tests from minitest spec syntax to plain `Minitest::Test` classes.
19
+
20
+ ### Added
21
+ - `OdeonUk.token` for a caller-supplied guest JWT, and `OdeonUk.acquire_token!` to fetch one with `curl-impersonate`.
22
+ - Platform gems that bundle curl-impersonate 2.2.3.
23
+ - `OdeonUk::AuthenticationError` for missing, expired and rejected tokens.
24
+ - `Performance#booking_url`, `Performance#language`, `Performance#subtitled?` and `Performance#festival` (a `Cinebase::Festival` with `name` and `year`).
25
+ - `audio_described`, `autism_friendly` and `subtitled` variants.
26
+ - Live integration tests and GitHub Actions CI on Ruby 3.4 and 4.0.
27
+ - Live API shape tests that check real responses without storing them.
28
+
29
+ ### Removed
30
+ - CFPropertyList dependency, Travis CI and Code Climate.
31
+ - Recorded API fixtures and the `fixtures` rake task. Fixtures are hand-written.
32
+
33
+ ## 4.0.1 - 2016-02-11
34
+
35
+ ### Fixed
36
+ - pass an `to_int`able `String` to methods and live success
37
+
38
+ ## 4.0.0 - 2016-02-09
39
+
40
+ ### Removed
41
+ - HTML parsing
42
+
43
+ ### Added
44
+ - Use the `cinebase` gem to fix an common API across all gems
45
+ - Screening becomes Performance in cinebase 3.0.
46
+ - license to AGPL for free usage, MIT for commercial
47
+
48
+ ## 3.0.6 - 2015-07-05
49
+
50
+ ### Fixed
51
+ - Protect HTTP use against 500
52
+
53
+ ## 3.0.5 - 2015-07-04
54
+
55
+ ### Fixed
56
+ - API use for screenings
57
+
58
+ ## 3.0.4 - 2015-05-06
59
+
60
+ ### Added
61
+ - URLs created for api cinemas
62
+
63
+ ## 3.0.3 - 2015-04-09
64
+
65
+ ### Added
66
+ - Variants if using the API
67
+
68
+ ## 3.0.2 - 2015-04-09
69
+
70
+ - fix HTML ampersands in film titles
71
+
72
+ ## 3.0.1 - 2015-04-09
73
+
74
+ - fix cinema parsing over API
75
+
76
+ ## 3.0.0 - 2015-03-15
77
+
78
+ - complete internal re-architecture ready for use of API
79
+ - include API source
80
+ - remove Film model (not used)
81
+
82
+ ## 2.0.4 - 2015-02-18
83
+
84
+ - protect against unopened cinemas
85
+
86
+ ## 2.0.3, _3rd January 2015_
87
+
88
+ - singalong sanitization
89
+
90
+ ## 2.0.2, _28th September 2014_
91
+
92
+ - Default to 2d for IMAX film tech
93
+
94
+ ## 2.0.1, _28th September 2014_
95
+
96
+ - you can pass strings to screening#variant
97
+
98
+ ## 2.0.0, _22nd September 2014_
99
+
100
+ - add website utility class
101
+ - break up film parsing into internal classes
102
+ - Film#at builds films not cinema
103
+ - fixture update script
104
+ - title sanitizer class
105
+ - updated fixtures
106
+ - Added changelog
107
+
108
+ ## 1.1.3, _8th Nov 2013_
109
+
110
+ - MIT license
111
+
112
+ ## 1.1.2, _6th Nov 2013_
113
+
114
+ - version bump for fixing CI
115
+ - using UTC parsing
116
+
117
+ ## 1.1.1, _6th Nov 2013_
118
+
119
+ - version bump for fixing CI
120
+
121
+ ## 1.1.0, _5th Nov 2013_
122
+
123
+ First ready-for-public release
124
+
125
+ - added booking url to screenings
126
+ - screenings created with UTC Time objects not strings
127
+ - Removed 'London -' prefix from some cinema names
128
+ - added cinema addresses
129
+
130
+ ## 1.0.0
131
+
132
+ - Get films and screenings out of a cinema
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
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in odeon_uk.gemspec
4
+ gemspec