odeon_uk 0.0.1 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/README.md +46 -2
- data/Rakefile +9 -1
- data/lib/odeon_uk.rb +10 -1
- data/lib/odeon_uk/cinema.rb +152 -0
- data/lib/odeon_uk/film.rb +18 -0
- data/lib/odeon_uk/internal/film_with_screenings_parser.rb +51 -0
- data/lib/odeon_uk/screening.rb +34 -0
- data/lib/odeon_uk/version.rb +1 -1
- data/odeon_uk.gemspec +7 -0
- data/test/fixtures/brighton-showtimes/about-time.html +175 -0
- data/test/fixtures/brighton-showtimes/autism-friendly-planes.html +75 -0
- data/test/fixtures/brighton-showtimes/bolshoi-spartacus-live.html +67 -0
- data/test/fixtures/brighton-showtimes/cinemagic-echo-planet.html +67 -0
- data/test/fixtures/brighton-showtimes/globe-on-screen-twelfth-night.html +67 -0
- data/test/fixtures/brighton-showtimes/met-opera-eugene-onegin.html +67 -0
- data/test/fixtures/brighton-showtimes/national-theatre-live-frankenstein.html +78 -0
- data/test/fixtures/brighton-showtimes/nt-live-war-horse.html +67 -0
- data/test/fixtures/brighton-showtimes/royal-opera-house-turandot.html +66 -0
- data/test/fixtures/brighton-showtimes/rsc-richard-ii.html +67 -0
- data/test/fixtures/brighton-showtimes/star-trek-into-darkness-2d.html +83 -0
- data/test/fixtures/brighton-showtimes/ukjff-from-cable-street-to-brick-lane.html +67 -0
- data/test/fixtures/manchester-showtimes/thor-the-dark-world.html +300 -0
- data/test/fixtures/odeon-brighton-showtimes.html +1238 -0
- data/test/fixtures/odeon-brighton.html +2706 -0
- data/test/fixtures/odeon-sitemap.html +1263 -0
- data/test/lib/odeon_uk/cinema_test.rb +185 -0
- data/test/lib/odeon_uk/film_test.rb +13 -0
- data/test/lib/odeon_uk/internal/film_with_screenings_parser_test.rb +167 -0
- data/test/lib/odeon_uk/screening_test.rb +32 -0
- data/test/test_helper.rb +3 -0
- metadata +126 -2
@@ -0,0 +1,185 @@
|
|
1
|
+
require_relative '../../test_helper'
|
2
|
+
|
3
|
+
describe OdeonUk::Cinema do
|
4
|
+
|
5
|
+
before { WebMock.disable_net_connect! }
|
6
|
+
|
7
|
+
describe '.all' do
|
8
|
+
subject { OdeonUk::Cinema.all }
|
9
|
+
|
10
|
+
before do
|
11
|
+
sitemap_body = File.read( File.join(File.dirname(__FILE__), '..', '..', 'fixtures', 'odeon-sitemap.html') )
|
12
|
+
stub_request(:get, 'http://www.odeon.co.uk/sitemap/').to_return( status: 200, body: sitemap_body, headers: {} )
|
13
|
+
end
|
14
|
+
|
15
|
+
it 'returns an Array of Odeon::Cinemas' do
|
16
|
+
subject.must_be_instance_of(Array)
|
17
|
+
subject.each do |value|
|
18
|
+
value.must_be_instance_of(OdeonUk::Cinema)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
it 'returns the correctly sized array' do
|
23
|
+
subject.size.must_equal 114
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
describe '.find(id)' do
|
28
|
+
let(:id) { 71 }
|
29
|
+
|
30
|
+
subject { OdeonUk::Cinema.find(id) }
|
31
|
+
|
32
|
+
before do
|
33
|
+
sitemap_body = File.read( File.join(File.dirname(__FILE__), '..', '..', 'fixtures', 'odeon-sitemap.html') )
|
34
|
+
stub_request(:get, 'http://www.odeon.co.uk/sitemap/').to_return( status: 200, body: sitemap_body, headers: {} )
|
35
|
+
|
36
|
+
# cinema_page_body = File.read( File.join(File.dirname(__FILE__), '..', '..', 'fixtures', 'odeon-brighton.html') )
|
37
|
+
# stub_request(:get, 'http://www.odeon.co.uk/cinema/brighton/23/').to_return( status: 200, body: cinema_page_body, headers: {} )
|
38
|
+
end
|
39
|
+
|
40
|
+
it 'returns a cinema' do
|
41
|
+
subject.must_be_instance_of(OdeonUk::Cinema)
|
42
|
+
|
43
|
+
subject.id.must_equal 71
|
44
|
+
subject.brand.must_equal 'Odeon'
|
45
|
+
subject.name.must_equal 'Brighton'
|
46
|
+
subject.slug.must_equal 'brighton'
|
47
|
+
subject.url.must_equal 'http://www.odeon.co.uk/cinemas/brighton/71/'
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
describe '.new id, name, url' do
|
52
|
+
it 'stores id, name, slug and url' do
|
53
|
+
cinema = OdeonUk::Cinema.new '23', 'Brighton & Hove', '/cinemas/brighton/71/'
|
54
|
+
cinema.id.must_equal 23
|
55
|
+
cinema.brand.must_equal 'Odeon'
|
56
|
+
cinema.name.must_equal 'Brighton & Hove'
|
57
|
+
cinema.slug.must_equal 'brighton-hove'
|
58
|
+
cinema.url.must_equal 'http://www.odeon.co.uk/cinemas/brighton/71/'
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
describe '#films' do
|
63
|
+
let(:cinema) { OdeonUk::Cinema.new('71', 'Brighton & Hove', '/cinemas/brighton/71/') }
|
64
|
+
subject { cinema.films }
|
65
|
+
|
66
|
+
before do
|
67
|
+
brighton_screenings_body = File.read( File.join(File.dirname(__FILE__), '..', '..', 'fixtures', 'odeon-brighton-showtimes.html') )
|
68
|
+
stub_request(:get, 'http://www.odeon.co.uk/showtimes/week/71?siteId=71').to_return( status: 200, body: brighton_screenings_body, headers: {} )
|
69
|
+
end
|
70
|
+
|
71
|
+
it 'returns an array of films' do
|
72
|
+
subject.must_be_instance_of(Array)
|
73
|
+
subject.each do |item|
|
74
|
+
item.must_be_instance_of(OdeonUk::Film)
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
it 'returns correct number of films' do
|
79
|
+
subject.count.must_equal 17
|
80
|
+
end
|
81
|
+
|
82
|
+
it 'returns film objects with correct names' do
|
83
|
+
subject.first.name.must_equal 'About Time'
|
84
|
+
subject.last.name.must_equal 'White House Down'
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
88
|
+
describe '#screenings' do
|
89
|
+
let(:cinema) { OdeonUk::Cinema.new('71', 'Brighton', '/cinemas/brighton/71/') }
|
90
|
+
subject { cinema.screenings }
|
91
|
+
|
92
|
+
before do
|
93
|
+
brighton_screenings_body = File.read( File.join(File.dirname(__FILE__), '..', '..', 'fixtures', 'odeon-brighton-showtimes.html') )
|
94
|
+
stub_request(:get, 'http://www.odeon.co.uk/showtimes/week/71?siteId=71').to_return( status: 200, body: brighton_screenings_body, headers: {} )
|
95
|
+
end
|
96
|
+
|
97
|
+
it 'returns an array of screenings' do
|
98
|
+
subject.must_be_instance_of(Array)
|
99
|
+
subject.each do |item|
|
100
|
+
item.must_be_instance_of(OdeonUk::Screening)
|
101
|
+
end
|
102
|
+
end
|
103
|
+
|
104
|
+
it 'returns screening objects with correct film names' do
|
105
|
+
subject.first.film_name.must_equal 'About Time'
|
106
|
+
subject.last.film_name.must_equal 'White House Down'
|
107
|
+
end
|
108
|
+
|
109
|
+
it 'returns screening objects with correct cinema name' do
|
110
|
+
subject.each { |s| s.cinema_name.must_equal 'Brighton' }
|
111
|
+
end
|
112
|
+
|
113
|
+
it 'returns screening objects with correct UTC times' do
|
114
|
+
subject.first.when.must_equal Time.utc(2013, 9, 14, 11, 20, 0)
|
115
|
+
subject.last.when.must_equal Time.utc(2013, 9, 19, 19, 40, 0)
|
116
|
+
end
|
117
|
+
end
|
118
|
+
|
119
|
+
describe '#screenings_of(film_or_string)' do
|
120
|
+
let(:cinema) { OdeonUk::Cinema.new('71', 'Brighton', '/cinemas/brighton/71/') }
|
121
|
+
subject { cinema.screenings_of(film_or_string) }
|
122
|
+
|
123
|
+
before do
|
124
|
+
brighton_screenings_body = File.read( File.join(File.dirname(__FILE__), '..', '..', 'fixtures', 'odeon-brighton-showtimes.html') )
|
125
|
+
stub_request(:get, 'http://www.odeon.co.uk/showtimes/week/71?siteId=71').to_return( status: 200, body: brighton_screenings_body, headers: {} )
|
126
|
+
end
|
127
|
+
|
128
|
+
describe 'passed string' do
|
129
|
+
let(:film_or_string) { 'About Time' }
|
130
|
+
|
131
|
+
it 'returns an array of screenings' do
|
132
|
+
subject.must_be_instance_of(Array)
|
133
|
+
subject.each do |item|
|
134
|
+
item.must_be_instance_of(OdeonUk::Screening)
|
135
|
+
end
|
136
|
+
end
|
137
|
+
|
138
|
+
it 'returns the correct number of screening objects' do
|
139
|
+
subject.count.must_equal 21
|
140
|
+
end
|
141
|
+
|
142
|
+
it 'returns screening objects with correct film names' do
|
143
|
+
subject.each { |s| s.film_name.must_equal 'About Time' }
|
144
|
+
end
|
145
|
+
|
146
|
+
it 'returns screening objects with correct cinema name' do
|
147
|
+
subject.each { |s| s.cinema_name.must_equal 'Brighton' }
|
148
|
+
end
|
149
|
+
|
150
|
+
it 'returns screening objects with correct UTC times' do
|
151
|
+
subject.first.when.must_equal Time.utc(2013, 9, 14, 11, 20, 0)
|
152
|
+
subject.last.when.must_equal Time.utc(2013, 9, 19, 19, 30, 0)
|
153
|
+
end
|
154
|
+
end
|
155
|
+
|
156
|
+
describe 'passed OdeonUk::Film' do
|
157
|
+
let(:film_or_string) { OdeonUk::Film.new 'About Time' }
|
158
|
+
|
159
|
+
it 'returns an array of screenings' do
|
160
|
+
subject.must_be_instance_of(Array)
|
161
|
+
subject.each do |item|
|
162
|
+
item.must_be_instance_of(OdeonUk::Screening)
|
163
|
+
end
|
164
|
+
end
|
165
|
+
|
166
|
+
it 'returns the correct number of screening objects' do
|
167
|
+
subject.count.must_equal 21
|
168
|
+
end
|
169
|
+
|
170
|
+
it 'returns screening objects with correct film names' do
|
171
|
+
subject.each { |s| s.film_name.must_equal 'About Time' }
|
172
|
+
end
|
173
|
+
|
174
|
+
it 'returns screening objects with correct cinema name' do
|
175
|
+
subject.each { |s| s.cinema_name.must_equal 'Brighton' }
|
176
|
+
end
|
177
|
+
|
178
|
+
it 'returns screening objects with correct UTC times' do
|
179
|
+
subject.first.when.must_equal Time.utc(2013, 9, 14, 11, 20, 0)
|
180
|
+
subject.last.when.must_equal Time.utc(2013, 9, 19, 19, 30, 0)
|
181
|
+
end
|
182
|
+
end
|
183
|
+
end
|
184
|
+
|
185
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
require_relative '../../test_helper'
|
2
|
+
|
3
|
+
describe OdeonUk::Film do
|
4
|
+
|
5
|
+
before { WebMock.disable_net_connect! }
|
6
|
+
|
7
|
+
describe '.new(name)' do
|
8
|
+
it 'stores name' do
|
9
|
+
film = OdeonUk::Film.new 'Iron Man 3'
|
10
|
+
film.name.must_equal 'Iron Man 3'
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,167 @@
|
|
1
|
+
require_relative '../../../test_helper'
|
2
|
+
|
3
|
+
describe OdeonUk::Internal::FilmWithScreeningsParser do
|
4
|
+
|
5
|
+
describe '#film_name' do
|
6
|
+
subject { OdeonUk::Internal::FilmWithScreeningsParser.new(film_html).film_name }
|
7
|
+
|
8
|
+
describe 'passed valid film html with simple name' do
|
9
|
+
let(:film_html) { read_film_html('about-time') }
|
10
|
+
|
11
|
+
it 'returns the film name' do
|
12
|
+
subject.must_equal('About Time')
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
describe 'passed valid film html with 2d name' do
|
17
|
+
let(:film_html) { read_film_html('star-trek-into-darkness-2d') }
|
18
|
+
|
19
|
+
it 'returns the film name' do
|
20
|
+
subject.must_equal('Star Trek Into Darkness')
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
describe 'passed valid film html with autism text' do
|
25
|
+
let(:film_html) { read_film_html('autism-friendly-planes') }
|
26
|
+
|
27
|
+
it 'returns the film name' do
|
28
|
+
subject.must_equal('Planes')
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
describe 'passed valid film html with ROH live screening' do
|
33
|
+
let(:film_html) { read_film_html('royal-opera-house-turandot') }
|
34
|
+
|
35
|
+
it 'returns the film name' do
|
36
|
+
subject.must_equal('Royal Opera House: Turandot 2013')
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
describe 'passed valid film html with Met Opera screening' do
|
41
|
+
let(:film_html) { read_film_html('met-opera-eugene-onegin') }
|
42
|
+
|
43
|
+
it 'returns the film name' do
|
44
|
+
subject.must_equal('Met Opera: Eugene Onegin 2013')
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
describe 'passed valid film html with Met Opera screening' do
|
49
|
+
let(:film_html) { read_film_html('cinemagic-echo-planet') }
|
50
|
+
|
51
|
+
it 'returns the film name' do
|
52
|
+
subject.must_equal('Echo Planet')
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
describe 'passed valid film html with UK Jewish Film Festival' do
|
57
|
+
let(:film_html) { read_film_html('ukjff-from-cable-street-to-brick-lane') }
|
58
|
+
|
59
|
+
it 'returns the film name' do
|
60
|
+
subject.must_equal('From Cable Street To Brick Lane')
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
describe 'passed valid film html with NT Encore' do
|
65
|
+
let(:film_html) { read_film_html('national-theatre-live-frankenstein') }
|
66
|
+
|
67
|
+
it 'returns the film name' do
|
68
|
+
subject.must_equal('National Theatre: Frankenstein')
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
describe 'passed valid film html with NT Encore' do
|
73
|
+
let(:film_html) { read_film_html('nt-live-war-horse') }
|
74
|
+
|
75
|
+
it 'returns the film name' do
|
76
|
+
subject.must_equal('National Theatre: War Horse')
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
80
|
+
describe 'passed valid film html with Bolshoi Ballet' do
|
81
|
+
let(:film_html) { read_film_html('bolshoi-spartacus-live') }
|
82
|
+
|
83
|
+
it 'returns the film name' do
|
84
|
+
subject.must_equal('Bolshoi: Spartacus')
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
88
|
+
describe 'passed valid film html with Globe' do
|
89
|
+
let(:film_html) { read_film_html('globe-on-screen-twelfth-night') }
|
90
|
+
|
91
|
+
it 'returns the film name' do
|
92
|
+
subject.must_equal('Globe: Twelfth Night')
|
93
|
+
end
|
94
|
+
end
|
95
|
+
|
96
|
+
describe 'passed valid film html with RSC' do
|
97
|
+
let(:film_html) { read_film_html('rsc-richard-ii') }
|
98
|
+
|
99
|
+
it 'returns the film name' do
|
100
|
+
subject.must_equal('Royal Shakespeare Company: Richard II')
|
101
|
+
end
|
102
|
+
end
|
103
|
+
end
|
104
|
+
|
105
|
+
describe '#showings' do
|
106
|
+
subject { OdeonUk::Internal::FilmWithScreeningsParser.new(film_html).showings }
|
107
|
+
|
108
|
+
describe 'passed valid film html' do
|
109
|
+
let(:film_html) { read_film_html('about-time') }
|
110
|
+
|
111
|
+
it 'returns an hash of varients => array of times' do
|
112
|
+
subject.must_be_instance_of Hash
|
113
|
+
subject.each do |key, value|
|
114
|
+
key.must_equal '2D'
|
115
|
+
value.must_be_instance_of Array
|
116
|
+
value.each do |element|
|
117
|
+
element.must_be_instance_of Time
|
118
|
+
element.zone.must_equal 'UTC'
|
119
|
+
end
|
120
|
+
end
|
121
|
+
end
|
122
|
+
|
123
|
+
it 'returns the correct number of screenings' do
|
124
|
+
subject['2D'].count.must_equal 21
|
125
|
+
end
|
126
|
+
|
127
|
+
it 'returns UTC times for showings' do
|
128
|
+
# about times are from British Summer Time UTC+1
|
129
|
+
# the actual show time is 20:30 from the fixture
|
130
|
+
subject['2D'].last.must_equal Time.utc(2013, 9, 19, 19, 30, 0)
|
131
|
+
end
|
132
|
+
end
|
133
|
+
|
134
|
+
describe 'passed valid film html for multi varients' do
|
135
|
+
let(:film_html) { read_film_html('thor-the-dark-world', 'manchester') }
|
136
|
+
|
137
|
+
it 'returns an hash of varients => array of times' do
|
138
|
+
subject.must_be_instance_of Hash
|
139
|
+
subject.keys.must_equal ['2D', 'IMAX 3D', '3D']
|
140
|
+
subject.values.each do |value|
|
141
|
+
value.must_be_instance_of Array
|
142
|
+
value.each do |element|
|
143
|
+
element.must_be_instance_of Time
|
144
|
+
element.zone.must_equal 'UTC'
|
145
|
+
end
|
146
|
+
end
|
147
|
+
end
|
148
|
+
|
149
|
+
it 'returns the correct number of screenings' do
|
150
|
+
subject['2D'].count.must_equal 1
|
151
|
+
subject['3D'].count.must_equal 1
|
152
|
+
subject['IMAX 3D'].count.must_equal 37
|
153
|
+
end
|
154
|
+
|
155
|
+
it 'returns UTC times for showings' do
|
156
|
+
# about times are from GMT
|
157
|
+
# the actual show time is 00:01 from the fixture
|
158
|
+
subject['2D'].last.must_equal Time.utc(2013, 10, 30, 0, 1, 0)
|
159
|
+
end
|
160
|
+
end
|
161
|
+
end
|
162
|
+
|
163
|
+
def read_film_html(filename, cinema='brighton')
|
164
|
+
path = "../../../../fixtures/#{cinema}-showtimes"
|
165
|
+
File.read(File.expand_path("#{path}/#{filename}.html", __FILE__))
|
166
|
+
end
|
167
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
require_relative '../../test_helper'
|
2
|
+
|
3
|
+
describe OdeonUk::Screening do
|
4
|
+
|
5
|
+
before { WebMock.disable_net_connect! }
|
6
|
+
|
7
|
+
describe '#new film_name, cinema_name, date, time, varient' do
|
8
|
+
it 'stores film_name, cinema_name & when (in UTC)' do
|
9
|
+
screening = OdeonUk::Screening.new 'Iron Man 3', 'Brighton', '2013-09-12', '11:00'
|
10
|
+
screening.film_name.must_equal 'Iron Man 3'
|
11
|
+
screening.cinema_name.must_equal 'Brighton'
|
12
|
+
screening.when.must_equal Time.utc(2013, 9, 12, 11, 0)
|
13
|
+
screening.varient.must_equal nil
|
14
|
+
end
|
15
|
+
|
16
|
+
it 'stores varient if passed' do
|
17
|
+
screening = OdeonUk::Screening.new 'Iron Man 3', 'Brighton', '2013-09-12', '11:00', '3d'
|
18
|
+
screening.film_name.must_equal 'Iron Man 3'
|
19
|
+
screening.cinema_name.must_equal 'Brighton'
|
20
|
+
screening.when.must_equal Time.utc(2013, 9, 12, 11, 0)
|
21
|
+
screening.varient.must_equal '3d'
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
describe '#date' do
|
26
|
+
subject { OdeonUk::Screening.new('Iron Man 3', 'Brighton', '2013-09-12', '11:30', '3d').date }
|
27
|
+
it 'should return date of showing' do
|
28
|
+
subject.must_be_instance_of(Date)
|
29
|
+
subject.must_equal Date.new(2013, 9, 12)
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
data/test/test_helper.rb
CHANGED
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: 0.0
|
4
|
+
version: 1.0.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-10-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
@@ -27,6 +27,86 @@ dependencies:
|
|
27
27
|
- - ! '>='
|
28
28
|
- !ruby/object:Gem::Version
|
29
29
|
version: '0'
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: webmock
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ! '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0'
|
38
|
+
type: :development
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: httparty
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ! '>='
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
54
|
+
type: :runtime
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: nokogiri
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
66
|
+
requirements:
|
67
|
+
- - ! '>='
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0'
|
70
|
+
type: :runtime
|
71
|
+
prerelease: false
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ! '>='
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '0'
|
78
|
+
- !ruby/object:Gem::Dependency
|
79
|
+
name: tzinfo
|
80
|
+
requirement: !ruby/object:Gem::Requirement
|
81
|
+
none: false
|
82
|
+
requirements:
|
83
|
+
- - ! '>='
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: '0'
|
86
|
+
type: :runtime
|
87
|
+
prerelease: false
|
88
|
+
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
90
|
+
requirements:
|
91
|
+
- - ! '>='
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: '0'
|
94
|
+
- !ruby/object:Gem::Dependency
|
95
|
+
name: tzinfo-data
|
96
|
+
requirement: !ruby/object:Gem::Requirement
|
97
|
+
none: false
|
98
|
+
requirements:
|
99
|
+
- - ! '>='
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
version: '0'
|
102
|
+
type: :runtime
|
103
|
+
prerelease: false
|
104
|
+
version_requirements: !ruby/object:Gem::Requirement
|
105
|
+
none: false
|
106
|
+
requirements:
|
107
|
+
- - ! '>='
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '0'
|
30
110
|
description: An API to pull movie information from the ODEON.co.uk website
|
31
111
|
email:
|
32
112
|
- andycroll@deepcalm.com
|
@@ -40,8 +120,32 @@ files:
|
|
40
120
|
- README.md
|
41
121
|
- Rakefile
|
42
122
|
- lib/odeon_uk.rb
|
123
|
+
- lib/odeon_uk/cinema.rb
|
124
|
+
- lib/odeon_uk/film.rb
|
125
|
+
- lib/odeon_uk/internal/film_with_screenings_parser.rb
|
126
|
+
- lib/odeon_uk/screening.rb
|
43
127
|
- lib/odeon_uk/version.rb
|
44
128
|
- odeon_uk.gemspec
|
129
|
+
- test/fixtures/brighton-showtimes/about-time.html
|
130
|
+
- test/fixtures/brighton-showtimes/autism-friendly-planes.html
|
131
|
+
- test/fixtures/brighton-showtimes/bolshoi-spartacus-live.html
|
132
|
+
- test/fixtures/brighton-showtimes/cinemagic-echo-planet.html
|
133
|
+
- test/fixtures/brighton-showtimes/globe-on-screen-twelfth-night.html
|
134
|
+
- test/fixtures/brighton-showtimes/met-opera-eugene-onegin.html
|
135
|
+
- test/fixtures/brighton-showtimes/national-theatre-live-frankenstein.html
|
136
|
+
- test/fixtures/brighton-showtimes/nt-live-war-horse.html
|
137
|
+
- test/fixtures/brighton-showtimes/royal-opera-house-turandot.html
|
138
|
+
- test/fixtures/brighton-showtimes/rsc-richard-ii.html
|
139
|
+
- test/fixtures/brighton-showtimes/star-trek-into-darkness-2d.html
|
140
|
+
- test/fixtures/brighton-showtimes/ukjff-from-cable-street-to-brick-lane.html
|
141
|
+
- test/fixtures/manchester-showtimes/thor-the-dark-world.html
|
142
|
+
- test/fixtures/odeon-brighton-showtimes.html
|
143
|
+
- test/fixtures/odeon-brighton.html
|
144
|
+
- test/fixtures/odeon-sitemap.html
|
145
|
+
- test/lib/odeon_uk/cinema_test.rb
|
146
|
+
- test/lib/odeon_uk/film_test.rb
|
147
|
+
- test/lib/odeon_uk/internal/film_with_screenings_parser_test.rb
|
148
|
+
- test/lib/odeon_uk/screening_test.rb
|
45
149
|
- test/lib/odeon_uk/version_test.rb
|
46
150
|
- test/test_helper.rb
|
47
151
|
homepage: http://github.com/andycroll/odeon_uk
|
@@ -69,5 +173,25 @@ signing_key:
|
|
69
173
|
specification_version: 3
|
70
174
|
summary: It's a scraper, but a nice one
|
71
175
|
test_files:
|
176
|
+
- test/fixtures/brighton-showtimes/about-time.html
|
177
|
+
- test/fixtures/brighton-showtimes/autism-friendly-planes.html
|
178
|
+
- test/fixtures/brighton-showtimes/bolshoi-spartacus-live.html
|
179
|
+
- test/fixtures/brighton-showtimes/cinemagic-echo-planet.html
|
180
|
+
- test/fixtures/brighton-showtimes/globe-on-screen-twelfth-night.html
|
181
|
+
- test/fixtures/brighton-showtimes/met-opera-eugene-onegin.html
|
182
|
+
- test/fixtures/brighton-showtimes/national-theatre-live-frankenstein.html
|
183
|
+
- test/fixtures/brighton-showtimes/nt-live-war-horse.html
|
184
|
+
- test/fixtures/brighton-showtimes/royal-opera-house-turandot.html
|
185
|
+
- test/fixtures/brighton-showtimes/rsc-richard-ii.html
|
186
|
+
- test/fixtures/brighton-showtimes/star-trek-into-darkness-2d.html
|
187
|
+
- test/fixtures/brighton-showtimes/ukjff-from-cable-street-to-brick-lane.html
|
188
|
+
- test/fixtures/manchester-showtimes/thor-the-dark-world.html
|
189
|
+
- test/fixtures/odeon-brighton-showtimes.html
|
190
|
+
- test/fixtures/odeon-brighton.html
|
191
|
+
- test/fixtures/odeon-sitemap.html
|
192
|
+
- test/lib/odeon_uk/cinema_test.rb
|
193
|
+
- test/lib/odeon_uk/film_test.rb
|
194
|
+
- test/lib/odeon_uk/internal/film_with_screenings_parser_test.rb
|
195
|
+
- test/lib/odeon_uk/screening_test.rb
|
72
196
|
- test/lib/odeon_uk/version_test.rb
|
73
197
|
- test/test_helper.rb
|