cineworld_uk 4.1.0-x86_64-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.
Files changed (56) hide show
  1. checksums.yaml +7 -0
  2. data/.agents/setup +51 -0
  3. data/.github/workflows/test.yml +43 -0
  4. data/.gitignore +18 -0
  5. data/.ruby-version +1 -0
  6. data/CHANGELOG.md +225 -0
  7. data/COMM-LICENSE +22 -0
  8. data/Gemfile +4 -0
  9. data/LICENSE +617 -0
  10. data/README.md +225 -0
  11. data/Rakefile +59 -0
  12. data/cineworld_uk.gemspec +30 -0
  13. data/lib/cineworld_uk/cinema.rb +168 -0
  14. data/lib/cineworld_uk/internal/api_response.rb +116 -0
  15. data/lib/cineworld_uk/internal/guest_token.rb +73 -0
  16. data/lib/cineworld_uk/internal/parser/api/cinema_address.rb +81 -0
  17. data/lib/cineworld_uk/internal/parser/api/film.rb +48 -0
  18. data/lib/cineworld_uk/internal/parser/api/performance.rb +41 -0
  19. data/lib/cineworld_uk/internal/title_sanitizer.rb +68 -0
  20. data/lib/cineworld_uk/performance.rb +104 -0
  21. data/lib/cineworld_uk/version.rb +6 -0
  22. data/lib/cineworld_uk.rb +31 -0
  23. data/tasks/package.rake +84 -0
  24. data/test/fixtures/api/cinema-list.json +1 -0
  25. data/test/fixtures/api/dates-14.json +1 -0
  26. data/test/fixtures/api/performances-tomorrow-14.json +1 -0
  27. data/test/fixtures/api/vista-showtimes-brighton.json +1 -0
  28. data/test/lib/cineworld_uk/cinema_test.rb +249 -0
  29. data/test/lib/cineworld_uk/internal/api_response_test.rb +207 -0
  30. data/test/lib/cineworld_uk/internal/parser/api/cinema_address_test.rb +94 -0
  31. data/test/lib/cineworld_uk/internal/parser/api/film_test.rb +160 -0
  32. data/test/lib/cineworld_uk/internal/parser/api/performance_test.rb +62 -0
  33. data/test/lib/cineworld_uk/internal/title_sanitizer_test.rb +153 -0
  34. data/test/lib/cineworld_uk/performance_test.rb +183 -0
  35. data/test/lib/cineworld_uk/version_test.rb +7 -0
  36. data/test/live/integration_test.rb +51 -0
  37. data/test/package_test.rb +49 -0
  38. data/test/support/fixture_reader.rb +32 -0
  39. data/test/test_helper.rb +12 -0
  40. data/vendor/curl-impersonate/SOURCE +5 -0
  41. data/vendor/curl-impersonate/bin/curl-impersonate +0 -0
  42. data/vendor/curl-impersonate/licenses/LICENSE +21 -0
  43. data/vendor/curl-impersonate/licenses/LICENSE_BORINGSSL +238 -0
  44. data/vendor/curl-impersonate/licenses/LICENSE_BROTLI +19 -0
  45. data/vendor/curl-impersonate/licenses/LICENSE_CARES +24 -0
  46. data/vendor/curl-impersonate/licenses/LICENSE_CURL +22 -0
  47. data/vendor/curl-impersonate/licenses/LICENSE_LIBIDN2_GPL2 +339 -0
  48. data/vendor/curl-impersonate/licenses/LICENSE_LIBIDN2_GPL3 +35 -0
  49. data/vendor/curl-impersonate/licenses/LICENSE_LIBIDN2_LGPL3 +165 -0
  50. data/vendor/curl-impersonate/licenses/LICENSE_LIBIDN2_UNICODE +91 -0
  51. data/vendor/curl-impersonate/licenses/LICENSE_NGHTTP2 +23 -0
  52. data/vendor/curl-impersonate/licenses/LICENSE_NGHTTP3 +22 -0
  53. data/vendor/curl-impersonate/licenses/LICENSE_NGTCP2 +22 -0
  54. data/vendor/curl-impersonate/licenses/LICENSE_ZLIB +22 -0
  55. data/vendor/curl-impersonate/licenses/LICENSE_ZSTD +30 -0
  56. metadata +237 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 669623c4a3d4425cceaa08696d210aaf10fd16f1c83725f16b8e1daad86acd04
4
+ data.tar.gz: b05570a081206029e254d1eb603fee52eb4f00d9f1b21d001f2cff196e303a00
5
+ SHA512:
6
+ metadata.gz: 7843880c18b17d058fa9248843b49681cf62348925d8e67caabb97b06ba11f11cbaba475be8b69579252bab52d3a18769400a65c82ac993186757e6782dd7f35
7
+ data.tar.gz: 2b3fccc0ca9a555133e5867d5cf0d78cac4927bd90bb954735ee6b61a61150bf017969da929530704cd9e1d3bc5d887ccfa091850eb1468a19cadc2a4a14014d
data/.agents/setup ADDED
@@ -0,0 +1,51 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+
4
+ repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
5
+ cd "$repo_root"
6
+
7
+ echo 'Checking native gem build prerequisites'
8
+ missing=()
9
+ for package in ca-certificates curl build-essential pkg-config libyaml-dev libssl-dev zlib1g-dev; do
10
+ if ! dpkg-query -W -f='${Status}' "$package" 2>/dev/null | grep -q 'install ok installed'; then
11
+ missing+=("$package")
12
+ fi
13
+ done
14
+ if ((${#missing[@]})); then
15
+ sudo apt-get update -qq
16
+ sudo env DEBIAN_FRONTEND=noninteractive apt-get install -y "${missing[@]}"
17
+ fi
18
+
19
+ export PATH="$HOME/.local/bin:$PATH"
20
+ if ! command -v mise >/dev/null; then
21
+ echo 'Installing mise'
22
+ curl --fail --silent --show-error --location https://mise.run | sh
23
+ fi
24
+
25
+ ruby_version="$(tr -d '[:space:]' < .ruby-version)"
26
+ echo "Installing Ruby $ruby_version"
27
+ MISE_RUBY_COMPILE=false mise install "ruby@$ruby_version"
28
+
29
+ # Make the pinned Ruby available to later Amp commands in login shells.
30
+ if [[ ! -f "$HOME/.bash_profile" ]]; then
31
+ printf '[ ! -f "$HOME/.profile" ] || . "$HOME/.profile"\n' > "$HOME/.bash_profile"
32
+ fi
33
+ marker="# Cineworld orb Ruby environment: $repo_root"
34
+ if ! grep -Fqx "$marker" "$HOME/.bash_profile"; then
35
+ cat >> "$HOME/.bash_profile" <<EOF
36
+
37
+ $marker
38
+ case "\$PWD" in
39
+ "$repo_root"|"$repo_root"/*)
40
+ export PATH="\$HOME/.local/share/mise/shims:\$HOME/.local/bin:\$PATH"
41
+ export MISE_IDIOMATIC_VERSION_FILE_ENABLE_TOOLS=ruby
42
+ ;;
43
+ esac
44
+ EOF
45
+ fi
46
+
47
+ echo 'Installing gem dependencies (no Cineworld token required)'
48
+ mise exec "ruby@$ruby_version" -- bundle config set --local path "$HOME/.cache/cineworld_uk/bundle"
49
+ mise exec "ruby@$ruby_version" -- bundle check || mise exec "ruby@$ruby_version" -- bundle install --jobs 4 --retry 3
50
+ mise reshim
51
+ mise exec "ruby@$ruby_version" -- ruby --version
@@ -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.3', '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: '3.4'
37
+ bundler-cache: true
38
+ - run: bundle exec rake 'package:native[${{ matrix.platform }}]'
39
+ - run: CINEWORLD_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
+ .amp/portals/*
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 3.4.7
data/CHANGELOG.md ADDED
@@ -0,0 +1,225 @@
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
+ ## 4.1.0 - 2026-10-15
6
+
7
+ ### Added
8
+ - Explicit guest token acquisition and renewal with `CineworldUk.acquire_token!`, using the standalone `curl-impersonate` CLI without Python or a browser.
9
+ - Platform-specific gems bundle curl-impersonate 2.2.3 for x86-64/ARM64 glibc Linux and macOS, with pinned archive checksums, upstream notices, and native package CI checks. No separate executable installation is needed on these platforms.
10
+ - Optional executable path for token acquisition. Existing caller-supplied tokens continue to work without the CLI.
11
+ - Expiry checks and authentication errors for unavailable commands, blocked pages, and missing or invalid page tokens; failed acquisition preserves the previous token.
12
+
13
+ ## 4.0.0 - 2026-10-15
14
+
15
+ ### Changed
16
+ - Retrieve cinemas and performances from the Vista API instead of the retired iOS API.
17
+ - Require a caller-supplied guest JWT through `CineworldUk.token`; token acquisition and renewal remain the caller's responsibility.
18
+ - `Performance.at` accepts inclusive `from:` and `to:` business dates, defaulting to today in London and the following 13 days rather than discovering all screening dates.
19
+ - Use one request per cinema per requested day, reusing related film, cinema and attribute data. Share cached cinema data with address lookups.
20
+ - Convert advertised session times to UTC using Vista's explicit offsets and preserve session-specific formats.
21
+
22
+ ### Added
23
+ - `CineworldUk::AuthenticationError` for missing tokens and HTTP 401 responses.
24
+ - Orb setup for the pinned Ruby version and gem dependencies.
25
+
26
+ ## 3.1.0 - 2016-09-11
27
+
28
+ ### Fixed
29
+ - Use of www2 domain, set to HTTPS and www
30
+
31
+ ### Added
32
+ - Tests against live server, using `rake live`
33
+
34
+ ## 3.0.4 - 2016-04-26
35
+
36
+ ### Fixed
37
+ - Unforgiving use of #fetch in film for API
38
+
39
+ ## 3.0.3 - 2016-02-10
40
+
41
+ ### Changed
42
+ - Performance.at uses a Fixnum internally
43
+
44
+ ## 3.0.2 - 2016-02-09
45
+
46
+ ### Added
47
+ - private class methods on `Performance` & `Cinema`
48
+ - improved documentation
49
+
50
+ ### Changed
51
+ - readme badges
52
+ - code climate coverage
53
+ - non-commercial license is AGPL
54
+
55
+ ## 3.0.1 - 2016-02-03
56
+
57
+ ### Removed
58
+ - Removed redundant nokogiri dependency
59
+
60
+ ## 3.0.0 - 2016-02-03
61
+
62
+ The cinebase standardisation release.
63
+
64
+ ### Removed
65
+ - Remove website as data source
66
+ - Remove film concept
67
+
68
+ ### Added
69
+ - Use iOS api as a data source
70
+
71
+ ### Changed
72
+ - Parse cinema address from iOS api
73
+ - Screening becomes Performance in cinebase 2.0.0
74
+ - Parse performances & films iOS API
75
+ - Use the `cinebase` gem to fix an common API across all gems
76
+
77
+ ## 2.1.6 - 2015-05-06
78
+
79
+ # Fixed
80
+ - whats on page is the cinema url
81
+
82
+ ## 2.1.5 - 2015-02-18
83
+
84
+ # Fixed
85
+ - more defensive against closing cinemas
86
+
87
+ ## 2.1.4 - 2015-01-03
88
+
89
+ ### Added
90
+ - title sanitation
91
+ - movies for juniors
92
+ - singalong
93
+
94
+ ## 2.1.3 - 2014-12-31
95
+
96
+ ### Fixed
97
+ - better title sanitization of:
98
+ - movies for juniors
99
+ - additional languages: Punjabi, Turkish
100
+ - Q&A
101
+
102
+ ## 2.1.2 - 2014-10-20
103
+
104
+ ### Added
105
+ - better title sanitization
106
+ - ENO -> English National Opera
107
+
108
+ ### Fixed
109
+ - typos in the test suite
110
+
111
+
112
+ ## 2.1.1 - 2014-09-30
113
+
114
+ ### Fixed
115
+ - pilot error
116
+
117
+
118
+ ## 2.1.0 2014-09-30
119
+
120
+ ### Added
121
+ - Name Sanitization
122
+
123
+ ### Fixed
124
+ - Films with no 'link' on the screenings page now parsed
125
+
126
+
127
+ ## 2.0.5 2014-09-28
128
+
129
+ ### Fixed
130
+ - fix cinema parsing call to website class
131
+
132
+
133
+ ## 2.0.4 2014-09-05
134
+
135
+ ### Fixed
136
+ - fix the parsing
137
+
138
+
139
+ ## 2.0.3 2014-09-05
140
+
141
+ ### Fixed
142
+ - fix the Website class and use `open-uri`
143
+
144
+
145
+ ## 2.0.2 2014-07-25
146
+
147
+ ### Fixed
148
+ - bad behaviour for screening#variant
149
+
150
+
151
+ ## 2.0.1 2014-07-25
152
+
153
+ ### Fixed
154
+ - httparty still required, oops
155
+
156
+
157
+ ## 2.0.0 2014-07-25
158
+
159
+ ### Fixed
160
+ - Cineworld changed their markup
161
+ - General Rubocop improvements
162
+
163
+ ### Added
164
+ - Less logic in the Cinema class. Moved to `Film` and `Screening`.
165
+ - Introduce `Internal::Website` class for all website comms
166
+ - Rewrite Parsers and tests to be less exact but less fragile
167
+ - Screening now uses the `FilmWithScreeningsParser`
168
+ - Build `WhatsonParser` to break into 'films with screenings'
169
+ - `FilmWithScreenings` then uses `ScreeningParser` class to get individual screening info
170
+ - `ruby test/fixture_updator.rb` produces new fixtures from the live website
171
+ - documentation
172
+ - Travis gets Ruby 2.1.2
173
+
174
+ ### Removed
175
+ - Remove dependancy on HTTParty
176
+
177
+
178
+ ## 1.0.6 2014-02-28
179
+
180
+ ### Fixed
181
+ - UTF encoding in Titleize internal class for ruby 1.9.3
182
+
183
+
184
+ ## 1.0.5 2014-02-28
185
+
186
+ ### Fixed
187
+ - Vestigal require of titleize gem
188
+
189
+
190
+ ## 1.0.4 2014-02-27
191
+
192
+ ### Added
193
+ - Standardizing film names using modified titlecase from `titlecase` gem
194
+ - Film name parsing now moved to seperate class
195
+ - `rake console` task added
196
+ - MRI 2.1.0 support on Travis CI
197
+
198
+
199
+ ## 1.0.3 2014-01-16
200
+
201
+ ### Added
202
+ - cinema#full_name including cinema brand
203
+ - tidy up cinema naming to use colons
204
+
205
+
206
+ ## 1.0.2 2014-01-03
207
+
208
+ ### Added
209
+ - deal with HFR screenings, bloody hobbitses
210
+
211
+
212
+ ## 1.0.1 2014-01-03
213
+
214
+ ### Added
215
+ - screening#variant for spelling win, #varient maintained for compatability
216
+
217
+
218
+ ## 1.0.0 2013-12-06
219
+
220
+ ### Added
221
+ - Added changelog
222
+ - added booking url to screenings
223
+ - screenings created with UTC Time objects not strings
224
+ - added cinema addresses
225
+ - 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 cineworld_uk.gemspec
4
+ gemspec