fandango 0.1.8 → 0.1.9

Sign up to get free protection for your applications and to get access to all the features.
data/lib/fandango.rb CHANGED
@@ -8,6 +8,7 @@ module Fandango
8
8
  class << self
9
9
 
10
10
  def movies_near(postal_code)
11
+ raise ArgumentError, "postal code cannot be blank" if postal_code.nil? || postal_code == ''
11
12
  feed = fetch_and_parse(postal_code)
12
13
  feed.entries.map do |entry|
13
14
  parser = Parser.new(entry)
@@ -1,3 +1,3 @@
1
1
  module Fandango
2
- VERSION = "0.1.8"
2
+ VERSION = "0.1.9"
3
3
  end
@@ -21,6 +21,10 @@ describe Fandango do
21
21
  movies_atts.first[:title].must_equal 'Happy Feet Two'
22
22
  end
23
23
 
24
+ it 'raises error if postal code nil' do
25
+ proc { Fandango.movies_near(nil) }.must_raise(ArgumentError)
26
+ end
27
+
24
28
  end
25
29
 
26
30
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fandango
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.9
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-03-02 00:00:00.000000000Z
12
+ date: 2012-03-10 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
16
- requirement: &70169646212480 !ruby/object:Gem::Requirement
16
+ requirement: &70293687779240 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -24,10 +24,10 @@ dependencies:
24
24
  version: 3.2.0
25
25
  type: :runtime
26
26
  prerelease: false
27
- version_requirements: *70169646212480
27
+ version_requirements: *70293687779240
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: nokogiri
30
- requirement: &70169646209200 !ruby/object:Gem::Requirement
30
+ requirement: &70293687778460 !ruby/object:Gem::Requirement
31
31
  none: false
32
32
  requirements:
33
33
  - - ! '>='
@@ -35,10 +35,10 @@ dependencies:
35
35
  version: 1.4.4
36
36
  type: :runtime
37
37
  prerelease: false
38
- version_requirements: *70169646209200
38
+ version_requirements: *70293687778460
39
39
  - !ruby/object:Gem::Dependency
40
40
  name: sax-machine
41
- requirement: &70169646207520 !ruby/object:Gem::Requirement
41
+ requirement: &70293687777920 !ruby/object:Gem::Requirement
42
42
  none: false
43
43
  requirements:
44
44
  - - ~>
@@ -46,10 +46,10 @@ dependencies:
46
46
  version: 0.1.0
47
47
  type: :runtime
48
48
  prerelease: false
49
- version_requirements: *70169646207520
49
+ version_requirements: *70293687777920
50
50
  - !ruby/object:Gem::Dependency
51
51
  name: curb
52
- requirement: &70169646206920 !ruby/object:Gem::Requirement
52
+ requirement: &70293687777340 !ruby/object:Gem::Requirement
53
53
  none: false
54
54
  requirements:
55
55
  - - ~>
@@ -57,10 +57,10 @@ dependencies:
57
57
  version: 0.7.15
58
58
  type: :runtime
59
59
  prerelease: false
60
- version_requirements: *70169646206920
60
+ version_requirements: *70293687777340
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: builder
63
- requirement: &70169646206320 !ruby/object:Gem::Requirement
63
+ requirement: &70293687776780 !ruby/object:Gem::Requirement
64
64
  none: false
65
65
  requirements:
66
66
  - - ! '>='
@@ -68,10 +68,10 @@ dependencies:
68
68
  version: 2.1.2
69
69
  type: :runtime
70
70
  prerelease: false
71
- version_requirements: *70169646206320
71
+ version_requirements: *70293687776780
72
72
  - !ruby/object:Gem::Dependency
73
73
  name: loofah
74
- requirement: &70169646205720 !ruby/object:Gem::Requirement
74
+ requirement: &70293687776040 !ruby/object:Gem::Requirement
75
75
  none: false
76
76
  requirements:
77
77
  - - ~>
@@ -79,10 +79,10 @@ dependencies:
79
79
  version: 1.2.0
80
80
  type: :runtime
81
81
  prerelease: false
82
- version_requirements: *70169646205720
82
+ version_requirements: *70293687776040
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: rdoc
85
- requirement: &70169646205120 !ruby/object:Gem::Requirement
85
+ requirement: &70293687775140 !ruby/object:Gem::Requirement
86
86
  none: false
87
87
  requirements:
88
88
  - - ~>
@@ -90,10 +90,10 @@ dependencies:
90
90
  version: '3.8'
91
91
  type: :runtime
92
92
  prerelease: false
93
- version_requirements: *70169646205120
93
+ version_requirements: *70293687775140
94
94
  - !ruby/object:Gem::Dependency
95
95
  name: rake
96
- requirement: &70169646204520 !ruby/object:Gem::Requirement
96
+ requirement: &70293687774660 !ruby/object:Gem::Requirement
97
97
  none: false
98
98
  requirements:
99
99
  - - ! '>='
@@ -101,10 +101,10 @@ dependencies:
101
101
  version: 0.8.7
102
102
  type: :runtime
103
103
  prerelease: false
104
- version_requirements: *70169646204520
104
+ version_requirements: *70293687774660
105
105
  - !ruby/object:Gem::Dependency
106
106
  name: i18n
107
- requirement: &70169646203920 !ruby/object:Gem::Requirement
107
+ requirement: &70293687774100 !ruby/object:Gem::Requirement
108
108
  none: false
109
109
  requirements:
110
110
  - - ! '>='
@@ -112,10 +112,10 @@ dependencies:
112
112
  version: 0.5.0
113
113
  type: :runtime
114
114
  prerelease: false
115
- version_requirements: *70169646203920
115
+ version_requirements: *70293687774100
116
116
  - !ruby/object:Gem::Dependency
117
117
  name: awesome_print
118
- requirement: &70169646203540 !ruby/object:Gem::Requirement
118
+ requirement: &70293687773500 !ruby/object:Gem::Requirement
119
119
  none: false
120
120
  requirements:
121
121
  - - ! '>='
@@ -123,10 +123,10 @@ dependencies:
123
123
  version: '0'
124
124
  type: :development
125
125
  prerelease: false
126
- version_requirements: *70169646203540
126
+ version_requirements: *70293687773500
127
127
  - !ruby/object:Gem::Dependency
128
128
  name: mocha
129
- requirement: &70169646202820 !ruby/object:Gem::Requirement
129
+ requirement: &70293687772720 !ruby/object:Gem::Requirement
130
130
  none: false
131
131
  requirements:
132
132
  - - =
@@ -134,10 +134,10 @@ dependencies:
134
134
  version: 0.10.3
135
135
  type: :development
136
136
  prerelease: false
137
- version_requirements: *70169646202820
137
+ version_requirements: *70293687772720
138
138
  - !ruby/object:Gem::Dependency
139
139
  name: minitest
140
- requirement: &70169646186620 !ruby/object:Gem::Requirement
140
+ requirement: &70293687772000 !ruby/object:Gem::Requirement
141
141
  none: false
142
142
  requirements:
143
143
  - - =
@@ -145,7 +145,7 @@ dependencies:
145
145
  version: 2.11.1
146
146
  type: :development
147
147
  prerelease: false
148
- version_requirements: *70169646186620
148
+ version_requirements: *70293687772000
149
149
  description: Find theaters and movies on sale near a given postal code
150
150
  email:
151
151
  - jared@redningja.com