odeon_uk 4.0.0 → 4.0.1
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 +5 -0
- data/lib/odeon_uk/cinema.rb +1 -1
- data/lib/odeon_uk/performance.rb +1 -0
- data/lib/odeon_uk/version.rb +2 -2
- data/test/lib/odeon_uk/performance_test.rb +32 -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: 1b827e99f44e531f573ee56fc4139cfa7224a6f6
|
4
|
+
data.tar.gz: 97351d6e122f0b61602d344ca85ba8a4998b5bfe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bc897b79cea4d4a75bbba73d122243f0dd162c7f0449c5aee13dc0c834a6c57cf092ceaf9479bd672ffbac3ec1708d2a4288542e45d7f766dedd9882bc8e5854
|
7
|
+
data.tar.gz: 55fb07a9599281fd335da71a188827b8c1b98335fefd8fc0184722a3c2a35d6bd8c5db434439d372b3c1dc1327254e21ef516b4603807d373076c0862a530110
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,11 @@
|
|
2
2
|
All notable changes to this project will be documented in this file.
|
3
3
|
This project adheres to [Semantic Versioning](http://semver.org/).
|
4
4
|
|
5
|
+
## 4.0.1 - 2016-02-11
|
6
|
+
|
7
|
+
### Fixed
|
8
|
+
- pass an `to_int`able `String` to methods and live success
|
9
|
+
|
5
10
|
## 4.0.0 - 2016-02-09
|
6
11
|
|
7
12
|
### Removed
|
data/lib/odeon_uk/cinema.rb
CHANGED
data/lib/odeon_uk/performance.rb
CHANGED
@@ -25,6 +25,7 @@ module OdeonUk
|
|
25
25
|
# @param [Integer] cinema_id id of the cinema on the website
|
26
26
|
# @return [Array<OdeonUk::Performance>]
|
27
27
|
def self.at(cinema_id)
|
28
|
+
cinema_id = cinema_id.to_i
|
28
29
|
film_ids_at(cinema_id).flat_map do |film_id|
|
29
30
|
api_response.film_times(cinema_id, film_id).flat_map do |day|
|
30
31
|
performance_days(day).map do |hash|
|
data/lib/odeon_uk/version.rb
CHANGED
@@ -8,20 +8,43 @@ describe OdeonUk::Performance do
|
|
8
8
|
after { WebMock.allow_net_connect! }
|
9
9
|
|
10
10
|
describe '.at(cinema_id)' do
|
11
|
-
subject { described_class.at(
|
11
|
+
subject { described_class.at(cinema_id) }
|
12
12
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
13
|
+
describe 'passed Fixnum' do
|
14
|
+
let(:cinema_id) { 71 }
|
15
|
+
|
16
|
+
it 'returns an array of performances' do
|
17
|
+
OdeonUk::Internal::ApiResponse.stub :new, api_response do
|
18
|
+
subject.must_be_instance_of(Array)
|
19
|
+
subject.each do |element|
|
20
|
+
element.must_be_instance_of(described_class)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
it 'returns at least a sensible number' do
|
26
|
+
OdeonUk::Internal::ApiResponse.stub :new, api_response do
|
27
|
+
subject.count.must_be :>, 110
|
18
28
|
end
|
19
29
|
end
|
20
30
|
end
|
21
31
|
|
22
|
-
|
23
|
-
|
24
|
-
|
32
|
+
describe 'passed String' do
|
33
|
+
let(:cinema_id) { '71' }
|
34
|
+
|
35
|
+
it 'returns an array of performances' do
|
36
|
+
OdeonUk::Internal::ApiResponse.stub :new, api_response do
|
37
|
+
subject.must_be_instance_of(Array)
|
38
|
+
subject.each do |element|
|
39
|
+
element.must_be_instance_of(described_class)
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
it 'returns at least a sensible number' do
|
45
|
+
OdeonUk::Internal::ApiResponse.stub :new, api_response do
|
46
|
+
subject.count.must_be :>, 110
|
47
|
+
end
|
25
48
|
end
|
26
49
|
end
|
27
50
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: odeon_uk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.
|
4
|
+
version: 4.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andy Croll
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-02-
|
11
|
+
date: 2016-02-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: codeclimate-test-reporter
|