cineworld_uk 2.1.6 → 3.0.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 +22 -3
- data/README.md +56 -14
- data/Rakefile +57 -1
- data/cineworld_uk.gemspec +1 -2
- data/lib/cineworld_uk/cinema.rb +113 -182
- data/lib/cineworld_uk/internal/api_response.rb +74 -0
- data/lib/cineworld_uk/internal/parser/api/cinema_address.rb +81 -0
- data/lib/cineworld_uk/internal/parser/api/film.rb +46 -0
- data/lib/cineworld_uk/internal/parser/api/film_lookup.rb +38 -0
- data/lib/cineworld_uk/internal/parser/api/performance.rb +46 -0
- data/lib/cineworld_uk/internal/parser/api/performances_by_day.rb +50 -0
- data/lib/cineworld_uk/internal/title_sanitizer.rb +56 -52
- data/lib/cineworld_uk/performance.rb +78 -0
- data/lib/cineworld_uk/version.rb +2 -2
- data/lib/cineworld_uk.rb +11 -8
- data/test/fixtures/api/cinema-detail-10.json +1 -0
- data/test/fixtures/api/cinema-detail-21.json +1 -0
- data/test/fixtures/api/cinema-detail-3.json +1 -0
- data/test/fixtures/api/cinema-detail-96.json +1 -0
- data/test/fixtures/api/cinema-list.json +1 -0
- data/test/fixtures/api/dates-3.json +1 -0
- data/test/fixtures/api/film-list-comingsoon.json +1 -0
- data/test/fixtures/api/film-list.json +1 -0
- data/test/fixtures/api/performances-tomorrow-3.json +1 -0
- data/test/lib/cineworld_uk/cinema_test.rb +96 -197
- data/test/lib/cineworld_uk/internal/api_response_test.rb +85 -0
- data/test/lib/cineworld_uk/internal/parser/api/cinema_address_test.rb +93 -0
- data/test/lib/cineworld_uk/internal/parser/api/film_lookup_test.rb +30 -0
- data/test/lib/cineworld_uk/internal/parser/api/film_test.rb +169 -0
- data/test/lib/cineworld_uk/internal/parser/api/performance_test.rb +62 -0
- data/test/lib/cineworld_uk/internal/title_sanitizer_test.rb +1 -1
- data/test/lib/cineworld_uk/{screening_test.rb → performance_test.rb} +36 -48
- data/test/support/fixture_reader.rb +44 -0
- metadata +48 -59
- data/lib/cineworld_uk/film.rb +0 -65
- data/lib/cineworld_uk/internal/film_with_screenings_parser.rb +0 -69
- data/lib/cineworld_uk/internal/screening_parser.rb +0 -132
- data/lib/cineworld_uk/internal/website.rb +0 -35
- data/lib/cineworld_uk/internal/whatson_parser.rb +0 -36
- data/lib/cineworld_uk/screening.rb +0 -87
- data/test/fixture_updater.rb +0 -64
- data/test/fixtures/cinemas.html +0 -513
- data/test/fixtures/information/brighton.html +0 -1268
- data/test/fixtures/information/bristol.html +0 -1265
- data/test/fixtures/whatson/brighton/film_first.html +0 -207
- data/test/fixtures/whatson/brighton/film_last.html +0 -62
- data/test/fixtures/whatson/brighton/film_second.html +0 -347
- data/test/fixtures/whatson/brighton.html +0 -7508
- data/test/fixtures/whatson/glasgow-imax-at-gsc/film_first.html +0 -182
- data/test/fixtures/whatson/the-o2-greenwich/film_first.html +0 -167
- data/test/lib/cineworld_uk/film_test.rb +0 -142
- data/test/lib/cineworld_uk/internal/film_with_screenings_parser_test.rb +0 -101
- data/test/lib/cineworld_uk/internal/website_test.rb +0 -57
- data/test/lib/cineworld_uk/internal/whatson_parser_test.rb +0 -58
@@ -0,0 +1,169 @@
|
|
1
|
+
require_relative '../../../../../test_helper'
|
2
|
+
require_relative '../../../../../support/fixture_reader'
|
3
|
+
|
4
|
+
describe CineworldUk::Internal::Parser::Api::Film do
|
5
|
+
include Support::FixtureReader
|
6
|
+
|
7
|
+
let(:described_class) { CineworldUk::Internal::Parser::Api::Film }
|
8
|
+
let(:data) { random_film }
|
9
|
+
|
10
|
+
describe '#id' do
|
11
|
+
subject { described_class.new(data).id }
|
12
|
+
|
13
|
+
it 'is an integer' do
|
14
|
+
subject.must_be_instance_of(Fixnum)
|
15
|
+
end
|
16
|
+
|
17
|
+
it 'is the film id from the data' do
|
18
|
+
subject.must_equal(data['edi'])
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
describe '#dimension' do
|
23
|
+
subject { described_class.new(data).dimension }
|
24
|
+
|
25
|
+
it 'is a string' do
|
26
|
+
subject.must_be_instance_of(String)
|
27
|
+
end
|
28
|
+
|
29
|
+
it 'is 2d or 3d' do
|
30
|
+
subject.must_match(/[23]d/)
|
31
|
+
end
|
32
|
+
|
33
|
+
describe 'hash["format"] is "2D"' do
|
34
|
+
let(:data) { random_film.merge('format' => '2D') }
|
35
|
+
|
36
|
+
it 'is 2d' do
|
37
|
+
subject.must_equal('2d')
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
describe 'hash["format"] is "3D"' do
|
42
|
+
let(:data) { random_film.merge('format' => '3D') }
|
43
|
+
|
44
|
+
it 'is 3d' do
|
45
|
+
subject.must_equal('3d')
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
describe 'hash["format"] is "IMAX"' do
|
50
|
+
let(:data) { random_film.merge('format' => 'IMAX') }
|
51
|
+
|
52
|
+
it 'is 2d' do
|
53
|
+
subject.must_equal('2d')
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
describe 'hash["format"] is "IMAX3D"' do
|
58
|
+
let(:data) { random_film.merge('format' => 'IMAX3D') }
|
59
|
+
|
60
|
+
it 'is 3d' do
|
61
|
+
subject.must_equal('3d')
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
describe '#name' do
|
67
|
+
subject { described_class.new(data).name }
|
68
|
+
|
69
|
+
it 'is a string' do
|
70
|
+
subject.must_be_instance_of(String)
|
71
|
+
end
|
72
|
+
|
73
|
+
describe 'hash["originalTitle"] is different' do
|
74
|
+
let(:data) do
|
75
|
+
random_film.merge('originalTitle' => 'Original Title',
|
76
|
+
'title' => 'Title')
|
77
|
+
end
|
78
|
+
|
79
|
+
it 'is the original title' do
|
80
|
+
subject.must_equal('Original Title')
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
84
|
+
describe 'original title is unsanitized' do
|
85
|
+
let(:data) { random_film.merge('originalTitle' => 'ROH: Something') }
|
86
|
+
|
87
|
+
it 'is sanitized' do
|
88
|
+
subject.must_equal('Royal Opera House: Something')
|
89
|
+
end
|
90
|
+
end
|
91
|
+
end
|
92
|
+
|
93
|
+
describe '#variant' do
|
94
|
+
subject { described_class.new(data).variant }
|
95
|
+
|
96
|
+
it 'is a sorted array of strings' do
|
97
|
+
subject.must_be_instance_of(Array)
|
98
|
+
subject.each { |element| element.must_be_instance_of(String) }
|
99
|
+
subject.sort.must_equal(subject)
|
100
|
+
end
|
101
|
+
|
102
|
+
describe 'hash["title"] includes "Movies For Juniors"' do
|
103
|
+
let(:data) do
|
104
|
+
random_film.merge('title' => 'Movies For Juniors - Something')
|
105
|
+
end
|
106
|
+
|
107
|
+
it 'includes "kids"' do
|
108
|
+
subject.must_include('kids')
|
109
|
+
end
|
110
|
+
end
|
111
|
+
|
112
|
+
describe 'hash["format"] is "IMAX3D"' do
|
113
|
+
let(:data) do
|
114
|
+
random_film.merge('title' => 'nothing', 'format' => 'IMAX3D')
|
115
|
+
end
|
116
|
+
|
117
|
+
it 'includes "imax"' do
|
118
|
+
subject.must_include('imax')
|
119
|
+
end
|
120
|
+
end
|
121
|
+
|
122
|
+
describe 'hash["format"] is "IMAX"' do
|
123
|
+
let(:data) do
|
124
|
+
random_film.merge('format' => 'IMAX')
|
125
|
+
end
|
126
|
+
|
127
|
+
it 'includes "imax"' do
|
128
|
+
subject.must_include('imax')
|
129
|
+
end
|
130
|
+
end
|
131
|
+
|
132
|
+
describe 'hash["title"] includes "Unlimited Screening"' do
|
133
|
+
let(:data) do
|
134
|
+
random_film.merge('title' => 'Something Unlimited Screening')
|
135
|
+
end
|
136
|
+
|
137
|
+
it 'includes "members"' do
|
138
|
+
subject.must_include('members')
|
139
|
+
end
|
140
|
+
end
|
141
|
+
|
142
|
+
describe 'hash["title"] includes "with Live Q And A"' do
|
143
|
+
let(:data) do
|
144
|
+
random_film.merge('title' => 'Something With Live Q And A')
|
145
|
+
end
|
146
|
+
|
147
|
+
it 'includes "q&a"' do
|
148
|
+
subject.must_include('q&a')
|
149
|
+
end
|
150
|
+
end
|
151
|
+
|
152
|
+
describe 'combination' do
|
153
|
+
let(:data) do
|
154
|
+
random_film.merge('format' => 'IMAX',
|
155
|
+
'title' => 'Something Unlimited Screening')
|
156
|
+
end
|
157
|
+
|
158
|
+
it 'includes "members"' do
|
159
|
+
subject.must_include('imax', 'members')
|
160
|
+
end
|
161
|
+
end
|
162
|
+
end
|
163
|
+
|
164
|
+
private
|
165
|
+
|
166
|
+
def random_film
|
167
|
+
JSON.parse(film_list_json)['films'].sample
|
168
|
+
end
|
169
|
+
end
|
@@ -0,0 +1,62 @@
|
|
1
|
+
require_relative '../../../../../test_helper'
|
2
|
+
require_relative '../../../../../support/fixture_reader'
|
3
|
+
|
4
|
+
describe CineworldUk::Internal::Parser::Api::Performance do
|
5
|
+
include Support::FixtureReader
|
6
|
+
|
7
|
+
let(:described_class) { CineworldUk::Internal::Parser::Api::Performance }
|
8
|
+
let(:data) { random_performance }
|
9
|
+
|
10
|
+
before { WebMock.disable_net_connect! }
|
11
|
+
|
12
|
+
describe '#booking_url' do
|
13
|
+
subject { described_class.new(data).booking_url }
|
14
|
+
|
15
|
+
it 'should be a url on the cineworld website' do
|
16
|
+
subject.must_match(%r{cineworld.co.uk/booking\?})
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
describe '#film_id' do
|
21
|
+
subject { described_class.new(data).film_id }
|
22
|
+
|
23
|
+
it 'should be a six digit integer' do
|
24
|
+
subject.must_be_instance_of(Fixnum)
|
25
|
+
subject.must_be :>, 10_000
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
describe '#starting_at' do
|
30
|
+
subject { described_class.new(data).starting_at }
|
31
|
+
|
32
|
+
it 'should be a time' do
|
33
|
+
subject.must_be_instance_of(Time)
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
describe '#variant' do
|
38
|
+
subject { described_class.new(data).variant }
|
39
|
+
|
40
|
+
describe 'has "ad" => true' do
|
41
|
+
let(:data) { random_performance.merge('ad' => true) }
|
42
|
+
|
43
|
+
it 'includes "audio_described"' do
|
44
|
+
subject.must_include('audio_described')
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
describe 'has "ss" => true' do
|
49
|
+
let(:data) { random_performance.merge('subtitled' => true) }
|
50
|
+
|
51
|
+
it 'includes "subtitled"' do
|
52
|
+
subject.must_include('subtitled')
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
private
|
58
|
+
|
59
|
+
def random_performance
|
60
|
+
JSON.parse(performances_tomorrow_json(3))['performances'].sample
|
61
|
+
end
|
62
|
+
end
|
@@ -50,7 +50,7 @@ describe CineworldUk::Internal::TitleSanitizer do
|
|
50
50
|
let(:title) { 'Bolshoi Ballet: The Legend of Love' }
|
51
51
|
|
52
52
|
it 'removes prefix' do
|
53
|
-
subject.must_equal('Bolshoi: The Legend of Love')
|
53
|
+
subject.must_equal('Bolshoi Ballet: The Legend of Love')
|
54
54
|
end
|
55
55
|
end
|
56
56
|
|
@@ -1,38 +1,45 @@
|
|
1
1
|
require_relative '../../test_helper'
|
2
|
+
require_relative '../../support/fixture_reader'
|
2
3
|
|
3
|
-
describe CineworldUk::
|
4
|
-
|
4
|
+
describe CineworldUk::Performance do
|
5
|
+
include Support::FixtureReader
|
5
6
|
|
6
|
-
|
7
|
-
|
8
|
-
|
7
|
+
let(:described_class) { CineworldUk::Performance }
|
8
|
+
let(:api_response) { Minitest::Mock.new }
|
9
|
+
|
10
|
+
before { WebMock.disable_net_connect! }
|
9
11
|
|
10
12
|
describe '.at(cinema_id)' do
|
11
|
-
subject {
|
13
|
+
subject { described_class.at(3) }
|
12
14
|
|
13
15
|
before do
|
14
|
-
|
15
|
-
|
16
|
+
api_response.expect(:cinema_list, cinema_list_json)
|
17
|
+
api_response.expect(:film_list, film_list_json)
|
18
|
+
api_response.expect(:film_list_comingsoon, film_list_comingsoon_json)
|
19
|
+
api_response.expect(:dates, fake_dates_tomorrow_json, [3])
|
20
|
+
api_response.expect(:performances,
|
21
|
+
performances_tomorrow_json(3),
|
22
|
+
[3, Date.today + 1])
|
16
23
|
end
|
17
24
|
|
18
|
-
it 'returns an array of
|
19
|
-
CineworldUk::Internal::
|
25
|
+
it 'returns an array of performances' do
|
26
|
+
CineworldUk::Internal::ApiResponse.stub :new, api_response do
|
20
27
|
subject.must_be_instance_of(Array)
|
21
|
-
subject.each do |
|
22
|
-
|
28
|
+
subject.each do |performance|
|
29
|
+
performance.must_be_instance_of(described_class)
|
23
30
|
end
|
24
31
|
end
|
25
32
|
end
|
26
33
|
|
27
|
-
it 'returns
|
28
|
-
CineworldUk::Internal::
|
29
|
-
subject.count.
|
34
|
+
it 'returns at least a sensible number' do
|
35
|
+
CineworldUk::Internal::ApiResponse.stub :new, api_response do
|
36
|
+
subject.count.must_be :>, 5
|
30
37
|
end
|
31
38
|
end
|
32
39
|
end
|
33
40
|
|
34
41
|
describe '.new' do
|
35
|
-
subject {
|
42
|
+
subject { described_class.new(options) }
|
36
43
|
|
37
44
|
describe 'simple' do
|
38
45
|
let(:options) do
|
@@ -40,7 +47,7 @@ describe CineworldUk::Screening do
|
|
40
47
|
film_name: 'Iron Man 3',
|
41
48
|
cinema_id: 3,
|
42
49
|
cinema_name: 'Cineworld Brighton',
|
43
|
-
|
50
|
+
starting_at: Time.utc(2013, 9, 12, 11, 0)
|
44
51
|
}
|
45
52
|
end
|
46
53
|
|
@@ -64,11 +71,11 @@ describe CineworldUk::Screening do
|
|
64
71
|
dimension: '3d',
|
65
72
|
cinema_id: 3,
|
66
73
|
cinema_name: 'Cineworld Brighton',
|
67
|
-
|
74
|
+
starting_at: Time.utc(2013, 9, 12, 11, 0)
|
68
75
|
}
|
69
76
|
end
|
70
77
|
|
71
|
-
subject {
|
78
|
+
subject { described_class.new(options).dimension }
|
72
79
|
|
73
80
|
it 'returns 2d or 3d' do
|
74
81
|
subject.must_be_instance_of(String)
|
@@ -76,8 +83,8 @@ describe CineworldUk::Screening do
|
|
76
83
|
end
|
77
84
|
end
|
78
85
|
|
79
|
-
describe '#
|
80
|
-
subject {
|
86
|
+
describe '#starting_at' do
|
87
|
+
subject { described_class.new(options).starting_at }
|
81
88
|
|
82
89
|
describe 'with utc time' do
|
83
90
|
let(:options) do
|
@@ -85,7 +92,7 @@ describe CineworldUk::Screening do
|
|
85
92
|
film_name: 'Iron Man 3',
|
86
93
|
cinema_id: 3,
|
87
94
|
cinema_name: 'Cineworld Brighton',
|
88
|
-
|
95
|
+
starting_at: Time.utc(2013, 9, 12, 11, 0)
|
89
96
|
}
|
90
97
|
end
|
91
98
|
|
@@ -101,13 +108,14 @@ describe CineworldUk::Screening do
|
|
101
108
|
film_name: 'Iron Man 3',
|
102
109
|
cinema_id: 3,
|
103
110
|
cinema_name: 'Cineworld Brighton',
|
104
|
-
|
111
|
+
starting_at: Time.new(2013, 9, 12, 11, 0)
|
105
112
|
}
|
106
113
|
end
|
107
114
|
|
108
115
|
it 'returns UTC time' do
|
109
116
|
subject.must_be_instance_of Time
|
110
117
|
subject.must_equal Time.utc(2013, 9, 12, 10, 0)
|
118
|
+
subject.utc?.must_equal(true)
|
111
119
|
end
|
112
120
|
end
|
113
121
|
end
|
@@ -118,11 +126,11 @@ describe CineworldUk::Screening do
|
|
118
126
|
film_name: 'Iron Man 3',
|
119
127
|
cinema_id: 3,
|
120
128
|
cinema_name: 'Cineworld Brighton',
|
121
|
-
|
129
|
+
starting_at: Time.utc(2013, 9, 12, 11, 0)
|
122
130
|
}
|
123
131
|
end
|
124
132
|
|
125
|
-
subject {
|
133
|
+
subject { described_class.new(options).showing_on }
|
126
134
|
|
127
135
|
it 'returns date of showing' do
|
128
136
|
subject.must_be_instance_of(Date)
|
@@ -131,42 +139,22 @@ describe CineworldUk::Screening do
|
|
131
139
|
end
|
132
140
|
|
133
141
|
describe '#variant' do
|
134
|
-
subject {
|
142
|
+
subject { described_class.new(options).variant }
|
135
143
|
|
136
144
|
let(:options) do
|
137
145
|
{
|
138
146
|
film_name: 'Iron Man 3',
|
139
147
|
cinema_id: 3,
|
140
148
|
cinema_name: 'Cineworld Brighton',
|
141
|
-
|
149
|
+
starting_at: Time.utc(2013, 9, 12, 11, 0),
|
142
150
|
variant: ['Kids']
|
143
151
|
}
|
144
152
|
end
|
145
153
|
|
146
154
|
it 'is an alphabetically ordered array of lower-cased strings' do
|
147
155
|
subject.must_be_instance_of Array
|
148
|
-
subject.each
|
149
|
-
tag.must_be_instance_of String
|
150
|
-
end
|
156
|
+
subject.each { |element| element.must_be_instance_of String }
|
151
157
|
subject.must_equal %w(kids)
|
152
158
|
end
|
153
159
|
end
|
154
|
-
|
155
|
-
private
|
156
|
-
|
157
|
-
def cinemas_html
|
158
|
-
read_file('../../../fixtures/cinemas.html')
|
159
|
-
end
|
160
|
-
|
161
|
-
def information_html(filename)
|
162
|
-
read_file("../../../fixtures/information/#{filename}.html")
|
163
|
-
end
|
164
|
-
|
165
|
-
def read_file(filepath)
|
166
|
-
File.read(File.expand_path(filepath, __FILE__))
|
167
|
-
end
|
168
|
-
|
169
|
-
def whatson_html(filename)
|
170
|
-
read_file("../../../fixtures/whatson/#{filename}.html")
|
171
|
-
end
|
172
160
|
end
|
@@ -0,0 +1,44 @@
|
|
1
|
+
module Support
|
2
|
+
# Read fixture files from disk, for test support
|
3
|
+
module FixtureReader
|
4
|
+
private
|
5
|
+
|
6
|
+
FIXTURE_PATH = '../../fixtures/api'
|
7
|
+
|
8
|
+
def cinema_list_json
|
9
|
+
read_file("#{FIXTURE_PATH}/cinema-list.json")
|
10
|
+
end
|
11
|
+
|
12
|
+
def cinema_detail_json(num)
|
13
|
+
read_file("#{FIXTURE_PATH}/cinema-detail-#{num}.json")
|
14
|
+
end
|
15
|
+
|
16
|
+
def dates_json(num)
|
17
|
+
read_file("#{FIXTURE_PATH}/dates-#{num}.json")
|
18
|
+
end
|
19
|
+
|
20
|
+
def fake_dates_tomorrow_json
|
21
|
+
{ "dates": [tomorrow_s] }.to_json
|
22
|
+
end
|
23
|
+
|
24
|
+
def film_list_comingsoon_json
|
25
|
+
read_file("#{FIXTURE_PATH}/film-list-comingsoon.json")
|
26
|
+
end
|
27
|
+
|
28
|
+
def film_list_json
|
29
|
+
read_file("#{FIXTURE_PATH}/film-list.json")
|
30
|
+
end
|
31
|
+
|
32
|
+
def performances_tomorrow_json(num)
|
33
|
+
read_file("#{FIXTURE_PATH}/performances-tomorrow-#{num}.json")
|
34
|
+
end
|
35
|
+
|
36
|
+
def read_file(filepath)
|
37
|
+
File.read(File.expand_path(filepath, __FILE__))
|
38
|
+
end
|
39
|
+
|
40
|
+
def tomorrow_s
|
41
|
+
(Date.today + 1).strftime('%Y%m%d')
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
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:
|
4
|
+
version: 3.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andy Croll
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-02-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -67,35 +67,21 @@ dependencies:
|
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: cinebase
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- - "
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: '0'
|
76
|
-
type: :runtime
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - ">="
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: '0'
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: tzinfo
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - ">="
|
73
|
+
- - "~>"
|
88
74
|
- !ruby/object:Gem::Version
|
89
|
-
version:
|
75
|
+
version: 3.0.0
|
90
76
|
type: :runtime
|
91
77
|
prerelease: false
|
92
78
|
version_requirements: !ruby/object:Gem::Requirement
|
93
79
|
requirements:
|
94
|
-
- - "
|
80
|
+
- - "~>"
|
95
81
|
- !ruby/object:Gem::Version
|
96
|
-
version:
|
82
|
+
version: 3.0.0
|
97
83
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
84
|
+
name: nokogiri
|
99
85
|
requirement: !ruby/object:Gem::Requirement
|
100
86
|
requirements:
|
101
87
|
- - ">="
|
@@ -125,32 +111,34 @@ files:
|
|
125
111
|
- cineworld_uk.gemspec
|
126
112
|
- lib/cineworld_uk.rb
|
127
113
|
- lib/cineworld_uk/cinema.rb
|
128
|
-
- lib/cineworld_uk/
|
129
|
-
- lib/cineworld_uk/internal/
|
130
|
-
- lib/cineworld_uk/internal/
|
114
|
+
- lib/cineworld_uk/internal/api_response.rb
|
115
|
+
- lib/cineworld_uk/internal/parser/api/cinema_address.rb
|
116
|
+
- lib/cineworld_uk/internal/parser/api/film.rb
|
117
|
+
- lib/cineworld_uk/internal/parser/api/film_lookup.rb
|
118
|
+
- lib/cineworld_uk/internal/parser/api/performance.rb
|
119
|
+
- lib/cineworld_uk/internal/parser/api/performances_by_day.rb
|
131
120
|
- lib/cineworld_uk/internal/title_sanitizer.rb
|
132
|
-
- lib/cineworld_uk/
|
133
|
-
- lib/cineworld_uk/internal/whatson_parser.rb
|
134
|
-
- lib/cineworld_uk/screening.rb
|
121
|
+
- lib/cineworld_uk/performance.rb
|
135
122
|
- lib/cineworld_uk/version.rb
|
136
|
-
- test/
|
137
|
-
- test/fixtures/
|
138
|
-
- test/fixtures/
|
139
|
-
- test/fixtures/
|
140
|
-
- test/fixtures/
|
141
|
-
- test/fixtures/
|
142
|
-
- test/fixtures/
|
143
|
-
- test/fixtures/
|
144
|
-
- test/fixtures/
|
145
|
-
- test/fixtures/whatson/the-o2-greenwich/film_first.html
|
123
|
+
- test/fixtures/api/cinema-detail-10.json
|
124
|
+
- test/fixtures/api/cinema-detail-21.json
|
125
|
+
- test/fixtures/api/cinema-detail-3.json
|
126
|
+
- test/fixtures/api/cinema-detail-96.json
|
127
|
+
- test/fixtures/api/cinema-list.json
|
128
|
+
- test/fixtures/api/dates-3.json
|
129
|
+
- test/fixtures/api/film-list-comingsoon.json
|
130
|
+
- test/fixtures/api/film-list.json
|
131
|
+
- test/fixtures/api/performances-tomorrow-3.json
|
146
132
|
- test/lib/cineworld_uk/cinema_test.rb
|
147
|
-
- test/lib/cineworld_uk/
|
148
|
-
- test/lib/cineworld_uk/internal/
|
133
|
+
- test/lib/cineworld_uk/internal/api_response_test.rb
|
134
|
+
- test/lib/cineworld_uk/internal/parser/api/cinema_address_test.rb
|
135
|
+
- test/lib/cineworld_uk/internal/parser/api/film_lookup_test.rb
|
136
|
+
- test/lib/cineworld_uk/internal/parser/api/film_test.rb
|
137
|
+
- test/lib/cineworld_uk/internal/parser/api/performance_test.rb
|
149
138
|
- test/lib/cineworld_uk/internal/title_sanitizer_test.rb
|
150
|
-
- test/lib/cineworld_uk/
|
151
|
-
- test/lib/cineworld_uk/internal/whatson_parser_test.rb
|
152
|
-
- test/lib/cineworld_uk/screening_test.rb
|
139
|
+
- test/lib/cineworld_uk/performance_test.rb
|
153
140
|
- test/lib/cineworld_uk/version_test.rb
|
141
|
+
- test/support/fixture_reader.rb
|
154
142
|
- test/test_helper.rb
|
155
143
|
homepage: https://github.com/andycroll/cineworld_uk
|
156
144
|
licenses:
|
@@ -172,28 +160,29 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
172
160
|
version: '0'
|
173
161
|
requirements: []
|
174
162
|
rubyforge_project:
|
175
|
-
rubygems_version: 2.
|
163
|
+
rubygems_version: 2.4.5
|
176
164
|
signing_key:
|
177
165
|
specification_version: 4
|
178
166
|
summary: Parses cinema and showing data from the cineworld.co.uk website
|
179
167
|
test_files:
|
180
|
-
- test/
|
181
|
-
- test/fixtures/
|
182
|
-
- test/fixtures/
|
183
|
-
- test/fixtures/
|
184
|
-
- test/fixtures/
|
185
|
-
- test/fixtures/
|
186
|
-
- test/fixtures/
|
187
|
-
- test/fixtures/
|
188
|
-
- test/fixtures/
|
189
|
-
- test/fixtures/whatson/the-o2-greenwich/film_first.html
|
168
|
+
- test/fixtures/api/cinema-detail-10.json
|
169
|
+
- test/fixtures/api/cinema-detail-21.json
|
170
|
+
- test/fixtures/api/cinema-detail-3.json
|
171
|
+
- test/fixtures/api/cinema-detail-96.json
|
172
|
+
- test/fixtures/api/cinema-list.json
|
173
|
+
- test/fixtures/api/dates-3.json
|
174
|
+
- test/fixtures/api/film-list-comingsoon.json
|
175
|
+
- test/fixtures/api/film-list.json
|
176
|
+
- test/fixtures/api/performances-tomorrow-3.json
|
190
177
|
- test/lib/cineworld_uk/cinema_test.rb
|
191
|
-
- test/lib/cineworld_uk/
|
192
|
-
- test/lib/cineworld_uk/internal/
|
178
|
+
- test/lib/cineworld_uk/internal/api_response_test.rb
|
179
|
+
- test/lib/cineworld_uk/internal/parser/api/cinema_address_test.rb
|
180
|
+
- test/lib/cineworld_uk/internal/parser/api/film_lookup_test.rb
|
181
|
+
- test/lib/cineworld_uk/internal/parser/api/film_test.rb
|
182
|
+
- test/lib/cineworld_uk/internal/parser/api/performance_test.rb
|
193
183
|
- test/lib/cineworld_uk/internal/title_sanitizer_test.rb
|
194
|
-
- test/lib/cineworld_uk/
|
195
|
-
- test/lib/cineworld_uk/internal/whatson_parser_test.rb
|
196
|
-
- test/lib/cineworld_uk/screening_test.rb
|
184
|
+
- test/lib/cineworld_uk/performance_test.rb
|
197
185
|
- test/lib/cineworld_uk/version_test.rb
|
186
|
+
- test/support/fixture_reader.rb
|
198
187
|
- test/test_helper.rb
|
199
188
|
has_rdoc:
|