odeon_uk 4.0.0 → 4.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2cfbaab4a67b19a98fcf71294df4498b7aa003b5
4
- data.tar.gz: c672b4883b91b16fe1dcca96a0591e56aebca34b
3
+ metadata.gz: 1b827e99f44e531f573ee56fc4139cfa7224a6f6
4
+ data.tar.gz: 97351d6e122f0b61602d344ca85ba8a4998b5bfe
5
5
  SHA512:
6
- metadata.gz: fa4751ab47bd72bcba2e1ab741dbfea0d3d77f67ecb2bbe98bae322f763147ba9fc74442435aadd491e2fde023d08a98c47a85e2b3776cf95cfd2c6f10938e3a
7
- data.tar.gz: f4a35ffc91610b077221e2294f8cedfd0356dd8ef2865ece084b7829a013334738913e0dc717c71041eefac4c80e145e7c904ebcd8fe5a5dcff7b176591a1f6c
6
+ metadata.gz: bc897b79cea4d4a75bbba73d122243f0dd162c7f0449c5aee13dc0c834a6c57cf092ceaf9479bd672ffbac3ec1708d2a4288542e45d7f766dedd9882bc8e5854
7
+ data.tar.gz: 55fb07a9599281fd335da71a188827b8c1b98335fefd8fc0184722a3c2a35d6bd8c5db434439d372b3c1dc1327254e21ef516b4603807d373076c0862a530110
@@ -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
@@ -55,7 +55,7 @@ module OdeonUk
55
55
  # @example
56
56
  # cinema = OdeonUk::Cinema.new(3)
57
57
  # cinema.brand
58
- # #=> 'Cineworld'
58
+ # #=> 'Odeon'
59
59
  def brand
60
60
  'Odeon'.freeze
61
61
  end
@@ -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|
@@ -1,6 +1,6 @@
1
1
  # Ruby interface for http://www.odeon.co.uk
2
- # @version 4.0.0
2
+ # @version 4.0.1
3
3
  module OdeonUk
4
4
  # Gem version
5
- VERSION = '4.0.0'.freeze
5
+ VERSION = '4.0.1'.freeze
6
6
  end
@@ -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(71) }
11
+ subject { described_class.at(cinema_id) }
12
12
 
13
- it 'returns an array of performances' do
14
- OdeonUk::Internal::ApiResponse.stub :new, api_response do
15
- subject.must_be_instance_of(Array)
16
- subject.each do |element|
17
- element.must_be_instance_of(described_class)
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
- it 'returns at least a sensible number' do
23
- OdeonUk::Internal::ApiResponse.stub :new, api_response do
24
- subject.count.must_be :>, 110
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.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-09 00:00:00.000000000 Z
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