smartdown 0.11.3 → 0.11.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -20,10 +20,8 @@ module Smartdown
20
20
  postcode = UKPostcode.new(value)
21
21
  if !postcode.valid?
22
22
  @error = "Invalid postcode"
23
- return
24
23
  elsif !postcode.full?
25
24
  @error = "Please enter a full postcode"
26
- return
27
25
  end
28
26
  value
29
27
  end
@@ -1,3 +1,3 @@
1
1
  module Smartdown
2
- VERSION = "0.11.3"
2
+ VERSION = "0.11.4"
3
3
  end
@@ -16,11 +16,13 @@ describe Smartdown::Model::Answer::Postcode do
16
16
  context "partial postcodes are not allowed" do
17
17
  let(:answer_string) { "WC2B" }
18
18
  specify { expect(answer.error).to eql "Please enter a full postcode" }
19
+ specify { expect(answer.value).to eql "WC2B" }
19
20
  end
20
21
 
21
22
  context "invalid postcode" do
22
23
  let(:answer_string) { "invalid" }
23
24
  specify { expect(answer.error).to eql "Invalid postcode" }
25
+ specify { expect(answer.value).to eql "invalid" }
24
26
  end
25
27
 
26
28
  context "question not answered" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smartdown
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.3
4
+ version: 0.11.4
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: 2014-12-16 00:00:00.000000000 Z
12
+ date: 2014-12-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: parslet
16
- requirement: &22331140 !ruby/object:Gem::Requirement
16
+ requirement: &13913560 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 1.6.1
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *22331140
24
+ version_requirements: *13913560
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: uk_postcode
27
- requirement: &22330540 !ruby/object:Gem::Requirement
27
+ requirement: &13912820 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 1.0.1
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *22330540
35
+ version_requirements: *13912820
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rspec
38
- requirement: &22330040 !ruby/object:Gem::Requirement
38
+ requirement: &13912040 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 3.0.0
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *22330040
46
+ version_requirements: *13912040
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rake
49
- requirement: &22329660 !ruby/object:Gem::Requirement
49
+ requirement: &13911540 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '0'
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *22329660
57
+ version_requirements: *13911540
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: pry
60
- requirement: &22329160 !ruby/object:Gem::Requirement
60
+ requirement: &13910780 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: '0'
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *22329160
68
+ version_requirements: *13910780
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: gem_publisher
71
- requirement: &22328660 !ruby/object:Gem::Requirement
71
+ requirement: &13910100 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ! '>='
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: '0'
77
77
  type: :development
78
78
  prerelease: false
79
- version_requirements: *22328660
79
+ version_requirements: *13910100
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: timecop
82
- requirement: &22328220 !ruby/object:Gem::Requirement
82
+ requirement: &14198380 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ! '>='
@@ -87,7 +87,7 @@ dependencies:
87
87
  version: '0'
88
88
  type: :development
89
89
  prerelease: false
90
- version_requirements: *22328220
90
+ version_requirements: *14198380
91
91
  description:
92
92
  email: david.heath@digital.cabinet-office.gov.uk
93
93
  executables:
@@ -301,7 +301,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
301
301
  version: '0'
302
302
  segments:
303
303
  - 0
304
- hash: -2697176231460023822
304
+ hash: -4059470595308680197
305
305
  required_rubygems_version: !ruby/object:Gem::Requirement
306
306
  none: false
307
307
  requirements:
@@ -310,7 +310,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
310
310
  version: '0'
311
311
  segments:
312
312
  - 0
313
- hash: -2697176231460023822
313
+ hash: -4059470595308680197
314
314
  requirements: []
315
315
  rubyforge_project:
316
316
  rubygems_version: 1.8.11