odeon_uk 2.0.0 → 2.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: 59c9821b04dd9e8262c25557b82d95b51a9fdf7d
4
- data.tar.gz: b1950e1710b9a4bcda1dbe85611cb26ad3604c48
3
+ metadata.gz: ea3aeae6a45f951ac69b5399562663c2f264d59e
4
+ data.tar.gz: 066fbf41e0a2d9fa3099ff085501ce708f198642
5
5
  SHA512:
6
- metadata.gz: dc7ef841b0748d993a87b43e77cebf818cefa48698a3cd461bb57178f96dc677b5f0014d488d49857e76512912034a5e7c37092dcf1109ee5eb5fddb6d5a81aa
7
- data.tar.gz: 6be57bd2533423a9895ec6f9a4f6aed25c45721886ac244cbed0ab13720f3a31899d045f3d5fd09b936d556d732ece8f5636948b5787565fcb025e28506bc839
6
+ metadata.gz: 4372f457aa8132a9b0238abad6997a4f5b980729e6e504fe21c74ebddb71e022ec2670fb1534bbe6b0648d3e0132cbf679b26ee6e4c92a6d87371a197fed44c9
7
+ data.tar.gz: 5df2508b065b95de1f3997edb09fc906e6fe2da993c8cb6fafdca6a70593576631775c1c398a05e62f988dae68963b6439e0bb3eee05136eeabccb1efe4723e9
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 2.0.1, _28th September 2014_
2
+
3
+ - you can pass strings to screening#variant
4
+
1
5
  ## 2.0.0, _22nd September 2014_
2
6
 
3
7
  - add website utility class
@@ -54,6 +54,7 @@ module OdeonUk
54
54
  # The kinds of screening
55
55
  # @return <Array[String]>
56
56
  def variant
57
+ @variant = @variant.split(' ') if @variant.is_a?(String)
57
58
  @variant.map(&:downcase).sort
58
59
  end
59
60
 
@@ -1,6 +1,6 @@
1
1
  # Ruby interface for http://www.odeon.co.uk
2
- # @version 2.0.0
2
+ # @version 2.0.1
3
3
  module OdeonUk
4
4
  # Gem version
5
- VERSION = '2.0.0'
5
+ VERSION = '2.0.1'
6
6
  end
@@ -52,22 +52,44 @@ describe OdeonUk::Screening do
52
52
  describe '#variant' do
53
53
  subject { described_class.new(options).variant }
54
54
 
55
- let(:options) do
56
- {
57
- film_name: 'Guardians of the Galaxy',
58
- cinema_id: 71,
59
- cinema_name: 'Odeon Brighton',
60
- time: Time.utc(2014, 9, 12, 11, 0),
61
- variant: ['Kids', 'BABY']
62
- }
55
+ describe 'passed array' do
56
+ let(:options) do
57
+ {
58
+ film_name: 'Guardians of the Galaxy',
59
+ cinema_id: 71,
60
+ cinema_name: 'Odeon Brighton',
61
+ time: Time.utc(2014, 9, 12, 11, 0),
62
+ variant: %w(Kids BABY)
63
+ }
64
+ end
65
+
66
+ it 'is an alphabetically ordered array of lower-cased strings' do
67
+ subject.must_be_instance_of Array
68
+ subject.each do |tag|
69
+ tag.must_be_instance_of String
70
+ end
71
+ subject.must_equal %w(baby kids)
72
+ end
63
73
  end
64
74
 
65
- it 'is an alphabetically ordered array of lower-cased strings' do
66
- subject.must_be_instance_of Array
67
- subject.each do |tag|
68
- tag.must_be_instance_of String
75
+ describe 'passed string' do
76
+ let(:options) do
77
+ {
78
+ film_name: 'Guardians of the Galaxy',
79
+ cinema_id: 71,
80
+ cinema_name: 'Odeon Brighton',
81
+ time: Time.utc(2014, 9, 12, 11, 0),
82
+ variant: 'Kids BABY'
83
+ }
84
+ end
85
+
86
+ it 'is an alphabetically ordered array of lower-cased strings' do
87
+ subject.must_be_instance_of Array
88
+ subject.each do |tag|
89
+ tag.must_be_instance_of String
90
+ end
91
+ subject.must_equal %w(baby kids)
69
92
  end
70
- subject.must_equal %w(baby kids)
71
93
  end
72
94
  end
73
95
 
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: 2.0.0
4
+ version: 2.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: 2014-09-22 00:00:00.000000000 Z
11
+ date: 2014-09-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake