cineworld_uk 2.1.1 → 2.1.2
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 +50 -40
- data/lib/cineworld_uk/internal/film_with_screenings_parser.rb +2 -0
- data/lib/cineworld_uk/internal/title_sanitizer.rb +3 -0
- data/lib/cineworld_uk/screening.rb +2 -2
- data/lib/cineworld_uk/version.rb +2 -2
- data/test/lib/cineworld_uk/cinema_test.rb +0 -4
- data/test/lib/cineworld_uk/internal/title_sanitizer_test.rb +33 -9
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 20a09c3d7ac65fa3cbed58f12ddea318eb5b4278
|
|
4
|
+
data.tar.gz: dbe8959a56d9051b3cdb843a0d042f30a2ab22b9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5efe8ed183e87ce42d3436d48a9107b65d6d3e999a6b4e634aa65537dce8ffed5bcb047e15df6d79256808291676475539592248d83a15ebd2c974e1b6f3c113
|
|
7
|
+
data.tar.gz: 2bc533fecfdcfa5e15b50d84fd062f930072d9f9d6fc41b6b7b4fb6c2d5bb279d81f9ae073ec2b0f5a938afd2988c569cfa822663f8f7caf6b9eea27701bf8f6
|
data/CHANGELOG.md
CHANGED
|
@@ -1,57 +1,70 @@
|
|
|
1
|
-
|
|
1
|
+
# Change Log
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
+
|
|
6
|
+
## 2.1.2 - 2014-10-20
|
|
7
|
+
|
|
8
|
+
### Added
|
|
9
|
+
- better title sanitization
|
|
10
|
+
- ENO -> English National Opera
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
- typos in the test suite
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
## 2.1.1 - 2014-09-30
|
|
17
|
+
|
|
18
|
+
### Fixed
|
|
5
19
|
- pilot error
|
|
6
20
|
|
|
7
|
-
## 2.1.0 _30th September 2014_
|
|
8
21
|
|
|
9
|
-
|
|
22
|
+
## 2.1.0 2014-09-30
|
|
10
23
|
|
|
24
|
+
### Added
|
|
11
25
|
- Name Sanitization
|
|
12
26
|
|
|
13
|
-
|
|
14
|
-
|
|
27
|
+
### Fixed
|
|
15
28
|
- Films with no 'link' on the screenings page now parsed
|
|
16
29
|
|
|
17
|
-
## 2.0.5 _28th September 2014_
|
|
18
30
|
|
|
19
|
-
|
|
31
|
+
## 2.0.5 2014-09-28
|
|
20
32
|
|
|
33
|
+
### Fixed
|
|
21
34
|
- fix cinema parsing call to website class
|
|
22
35
|
|
|
23
|
-
## 2.0.4 _5th September 2014_
|
|
24
36
|
|
|
25
|
-
|
|
37
|
+
## 2.0.4 2014-09-05
|
|
26
38
|
|
|
39
|
+
### Fixed
|
|
27
40
|
- fix the parsing
|
|
28
41
|
|
|
29
|
-
## 2.0.3 _5th September 2014_
|
|
30
42
|
|
|
31
|
-
|
|
43
|
+
## 2.0.3 2014-09-05
|
|
32
44
|
|
|
45
|
+
### Fixed
|
|
33
46
|
- fix the Website class and use `open-uri`
|
|
34
47
|
|
|
35
|
-
## 2.0.2 _25th July 2014_
|
|
36
48
|
|
|
37
|
-
|
|
49
|
+
## 2.0.2 2014-07-25
|
|
38
50
|
|
|
51
|
+
### Fixed
|
|
39
52
|
- bad behaviour for screening#variant
|
|
40
53
|
|
|
41
|
-
## 2.0.1 _25th July 2014_
|
|
42
54
|
|
|
43
|
-
|
|
55
|
+
## 2.0.1 2014-07-25
|
|
44
56
|
|
|
57
|
+
### Fixed
|
|
45
58
|
- httparty still required, oops
|
|
46
59
|
|
|
47
|
-
## 2.0.0 _25th July 2014_
|
|
48
60
|
|
|
49
|
-
|
|
61
|
+
## 2.0.0 2014-07-25
|
|
50
62
|
|
|
63
|
+
### Fixed
|
|
51
64
|
- Cineworld changed their markup
|
|
65
|
+
- General Rubocop improvements
|
|
52
66
|
|
|
53
|
-
|
|
54
|
-
|
|
67
|
+
### Added
|
|
55
68
|
- Less logic in the Cinema class. Moved to `Film` and `Screening`.
|
|
56
69
|
- Introduce `Internal::Website` class for all website comms
|
|
57
70
|
- Rewrite Parsers and tests to be less exact but less fragile
|
|
@@ -59,59 +72,56 @@ Features
|
|
|
59
72
|
- Build `WhatsonParser` to break into 'films with screenings'
|
|
60
73
|
- `FilmWithScreenings` then uses `ScreeningParser` class to get individual screening info
|
|
61
74
|
- `ruby test/fixture_updator.rb` produces new fixtures from the live website
|
|
62
|
-
- it will break a few tests when run and committed but most should be ok
|
|
63
75
|
- documentation
|
|
76
|
+
- Travis gets Ruby 2.1.2
|
|
64
77
|
|
|
65
|
-
|
|
66
|
-
|
|
78
|
+
### Removed
|
|
67
79
|
- Remove dependancy on HTTParty
|
|
68
|
-
- Travis gets Ruby 2.1.2
|
|
69
|
-
- General Rubocop improvements
|
|
70
80
|
|
|
71
|
-
## 1.0.6 _28th Feb 2014_
|
|
72
81
|
|
|
73
|
-
|
|
82
|
+
## 1.0.6 2014-02-28
|
|
74
83
|
|
|
84
|
+
### Fixed
|
|
75
85
|
- UTF encoding in Titleize internal class for ruby 1.9.3
|
|
76
86
|
|
|
77
|
-
## 1.0.5 _28th Feb 2014_
|
|
78
87
|
|
|
79
|
-
|
|
88
|
+
## 1.0.5 2014-02-28
|
|
80
89
|
|
|
90
|
+
### Fixed
|
|
81
91
|
- Vestigal require of titleize gem
|
|
82
92
|
|
|
83
|
-
## 1.0.4 _27th Feb 2014_
|
|
84
93
|
|
|
85
|
-
|
|
94
|
+
## 1.0.4 2014-02-27
|
|
86
95
|
|
|
96
|
+
### Added
|
|
87
97
|
- Standardizing film names using modified titlecase from `titlecase` gem
|
|
88
98
|
- Film name parsing now moved to seperate class
|
|
89
|
-
- rake console task added
|
|
99
|
+
- `rake console` task added
|
|
90
100
|
- MRI 2.1.0 support on Travis CI
|
|
91
101
|
|
|
92
|
-
## 1.0.3, _16th Jan 2014_
|
|
93
102
|
|
|
94
|
-
|
|
103
|
+
## 1.0.3 2014-01-16
|
|
95
104
|
|
|
105
|
+
### Added
|
|
96
106
|
- cinema#full_name including cinema brand
|
|
97
107
|
- tidy up cinema naming to use colons
|
|
98
108
|
|
|
99
|
-
## 1.0.2, _3rd Jan 2014_
|
|
100
109
|
|
|
101
|
-
|
|
110
|
+
## 1.0.2 2014-01-03
|
|
102
111
|
|
|
112
|
+
### Added
|
|
103
113
|
- deal with HFR screenings, bloody hobbitses
|
|
104
114
|
|
|
105
|
-
## 1.0.1, _3rd Jan 2014_
|
|
106
115
|
|
|
107
|
-
|
|
116
|
+
## 1.0.1 2014-01-03
|
|
108
117
|
|
|
118
|
+
### Added
|
|
109
119
|
- screening#variant for spelling win, #varient maintained for compatability
|
|
110
120
|
|
|
111
|
-
## 1.0.0, _6th Dec 2013_
|
|
112
121
|
|
|
113
|
-
|
|
122
|
+
## 1.0.0 2013-12-06
|
|
114
123
|
|
|
124
|
+
### Added
|
|
115
125
|
- Added changelog
|
|
116
126
|
- added booking url to screenings
|
|
117
127
|
- screenings created with UTC Time objects not strings
|
|
@@ -23,6 +23,8 @@ module CineworldUk
|
|
|
23
23
|
# attributes of all the screenings
|
|
24
24
|
# @return [Array<Hash>]
|
|
25
25
|
def to_a
|
|
26
|
+
return [] unless performances_doc
|
|
27
|
+
|
|
26
28
|
performances_doc.map do |node|
|
|
27
29
|
next unless screening_parser_hash(node)
|
|
28
30
|
screening_parser_hash(node).merge(film_hash)
|
|
@@ -19,11 +19,14 @@ module CineworldUk
|
|
|
19
19
|
'- Special Performance', # special performance
|
|
20
20
|
/\ATake 2 -/, # take 2
|
|
21
21
|
' - Movies for Juniors', # movies for juniors
|
|
22
|
+
'(IMAX)', # IMAX
|
|
23
|
+
'SciScreen: ', # SciScreen
|
|
22
24
|
]
|
|
23
25
|
|
|
24
26
|
# regexes and their replacements
|
|
25
27
|
REPLACE = {
|
|
26
28
|
/Bolshoi Ballet: (.*)/ => 'Bolshoi: ',
|
|
29
|
+
/ENO: (.*)/i => 'English National Opera: ',
|
|
27
30
|
/Guardian Live - (.*)/ => 'The Guardian: ',
|
|
28
31
|
/Met Opera - (.*)/i => 'Met Opera: ',
|
|
29
32
|
/NT Live: (.*)/ => 'National Theatre: ',
|
|
@@ -32,9 +32,9 @@ module CineworldUk
|
|
|
32
32
|
# @param [Integer] cinema_id id of the cinema on the website
|
|
33
33
|
# @return [Array<CineworldUk::Screening>]
|
|
34
34
|
def self.at(cinema_id)
|
|
35
|
-
whatson_parser(cinema_id).films_with_screenings.
|
|
35
|
+
whatson_parser(cinema_id).films_with_screenings.flat_map do |html|
|
|
36
36
|
create_for_single_film(html, cinema_id)
|
|
37
|
-
end
|
|
37
|
+
end
|
|
38
38
|
end
|
|
39
39
|
|
|
40
40
|
# The date of the screening
|
data/lib/cineworld_uk/version.rb
CHANGED
|
@@ -46,7 +46,7 @@ describe CineworldUk::Internal::TitleSanitizer do
|
|
|
46
46
|
end
|
|
47
47
|
end
|
|
48
48
|
|
|
49
|
-
describe 'Bolshoi
|
|
49
|
+
describe 'Bolshoi screening' do
|
|
50
50
|
let(:title) { 'Bolshoi Ballet: The Legend of Love' }
|
|
51
51
|
|
|
52
52
|
it 'removes prefix' do
|
|
@@ -54,7 +54,23 @@ describe CineworldUk::Internal::TitleSanitizer do
|
|
|
54
54
|
end
|
|
55
55
|
end
|
|
56
56
|
|
|
57
|
-
describe '
|
|
57
|
+
describe 'English National Opera screening' do
|
|
58
|
+
let(:title) { 'ENO: La Traviata ' }
|
|
59
|
+
|
|
60
|
+
it 'removes prefix' do
|
|
61
|
+
subject.must_equal('English National Opera: La Traviata')
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
describe 'with IMAX' do
|
|
66
|
+
let(:title) { '(IMAX) Fury' }
|
|
67
|
+
|
|
68
|
+
it 'removes prefix' do
|
|
69
|
+
subject.must_equal('Fury')
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
describe 'Met Opera screening' do
|
|
58
74
|
let(:title) { 'MET Opera - Le Nozze Di Figaro' }
|
|
59
75
|
|
|
60
76
|
it 'removes prefix' do
|
|
@@ -62,7 +78,7 @@ describe CineworldUk::Internal::TitleSanitizer do
|
|
|
62
78
|
end
|
|
63
79
|
end
|
|
64
80
|
|
|
65
|
-
describe 'NT Live
|
|
81
|
+
describe 'NT Live screening' do
|
|
66
82
|
let(:title) { 'NT Live Encore: Frankenstein (starring Benedict Cumberbatch)' }
|
|
67
83
|
|
|
68
84
|
it 'removes prefix' do
|
|
@@ -70,7 +86,7 @@ describe CineworldUk::Internal::TitleSanitizer do
|
|
|
70
86
|
end
|
|
71
87
|
end
|
|
72
88
|
|
|
73
|
-
describe 'National Theatre
|
|
89
|
+
describe 'National Theatre screening' do
|
|
74
90
|
let(:title) { 'NT Live: Treasure Island' }
|
|
75
91
|
|
|
76
92
|
it 'removes prefix' do
|
|
@@ -78,7 +94,7 @@ describe CineworldUk::Internal::TitleSanitizer do
|
|
|
78
94
|
end
|
|
79
95
|
end
|
|
80
96
|
|
|
81
|
-
describe 'National Theatre Encore
|
|
97
|
+
describe 'National Theatre Encore screening' do
|
|
82
98
|
let(:title) { 'NT Live: A Streetcar Named Desire (Young Vic) - Encore' }
|
|
83
99
|
|
|
84
100
|
it 'removes prefix' do
|
|
@@ -86,7 +102,7 @@ describe CineworldUk::Internal::TitleSanitizer do
|
|
|
86
102
|
end
|
|
87
103
|
end
|
|
88
104
|
|
|
89
|
-
describe 'ROH
|
|
105
|
+
describe 'ROH screening' do
|
|
90
106
|
let(:title) { 'ROH - I Due Foscari' }
|
|
91
107
|
|
|
92
108
|
it 'removes prefix' do
|
|
@@ -94,7 +110,7 @@ describe CineworldUk::Internal::TitleSanitizer do
|
|
|
94
110
|
end
|
|
95
111
|
end
|
|
96
112
|
|
|
97
|
-
describe 'RSC
|
|
113
|
+
describe 'RSC screening' do
|
|
98
114
|
let(:title) { "RSC Live: Love's Labour's Lost" }
|
|
99
115
|
|
|
100
116
|
it 'removes prefix' do
|
|
@@ -102,7 +118,15 @@ describe CineworldUk::Internal::TitleSanitizer do
|
|
|
102
118
|
end
|
|
103
119
|
end
|
|
104
120
|
|
|
105
|
-
describe '
|
|
121
|
+
describe 'SciScreen screening' do
|
|
122
|
+
let(:title) { 'SciScreen: Dallas Buyers Club' }
|
|
123
|
+
|
|
124
|
+
it 'removes prefix' do
|
|
125
|
+
subject.must_equal('Dallas Buyers Club')
|
|
126
|
+
end
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
describe 'special screening' do
|
|
106
130
|
let(:title) { 'Billy Elliot The Musical Live - Special Performance' }
|
|
107
131
|
|
|
108
132
|
it 'removes prefix' do
|
|
@@ -110,7 +134,7 @@ describe CineworldUk::Internal::TitleSanitizer do
|
|
|
110
134
|
end
|
|
111
135
|
end
|
|
112
136
|
|
|
113
|
-
describe 'Take 2
|
|
137
|
+
describe 'Take 2 screening' do
|
|
114
138
|
let(:title) { 'Take 2 - Boyhood' }
|
|
115
139
|
|
|
116
140
|
it 'removes prefix' do
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: cineworld_uk
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.1.
|
|
4
|
+
version: 2.1.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Andy Croll
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-
|
|
11
|
+
date: 2014-10-20 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|