mas-rad_core 0.0.110 → 0.0.111
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/app/models/office.rb +10 -1
- data/db/migrate/20161216141323_add_website_to_office.rb +5 -0
- data/lib/mas/rad_core/version.rb +1 -1
- data/spec/dummy/log/development.log +933 -18
- data/spec/dummy/log/test.log +173713 -1787
- data/spec/models/office_spec.rb +3 -3
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e869131245bd707351c3efa721f3de93e7e00ce0
|
4
|
+
data.tar.gz: 51d553bfaa928893fe47074df0a5973d7ae8ace6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 97cd9f852d360f37b0c13c1f7ce993caa348a01168c844a775eac52e26762a903ed80974127f348b231b044452b059aea6dfb95a77ca697d0d53a548c94ceab3
|
7
|
+
data.tar.gz: ab95f1e20eda24e7507e0e8e2195ae13b8eadd6080912f232827e49eb7d2e01496be15384c196434512c0dd19248a6cdfda274d9c6cfa96b6cc65d9d439ec44f
|
data/app/models/office.rb
CHANGED
@@ -67,8 +67,13 @@ class Office < ActiveRecord::Base
|
|
67
67
|
return format_telephone_number(cleanup_telephone_number(super))
|
68
68
|
end
|
69
69
|
|
70
|
+
# The Geocodable interface expect an object that responds to
|
71
|
+
# Geocodable#full_street_address. So, to respect the interface,
|
72
|
+
# we created internally the method postcode_only_address,
|
73
|
+
# to reflect what this object returns differently from the others.
|
74
|
+
#
|
70
75
|
def full_street_address
|
71
|
-
|
76
|
+
postcode_only_address
|
72
77
|
end
|
73
78
|
|
74
79
|
def has_address_changes?
|
@@ -92,6 +97,10 @@ class Office < ActiveRecord::Base
|
|
92
97
|
|
93
98
|
private
|
94
99
|
|
100
|
+
def postcode_only_address
|
101
|
+
[address_postcode, 'United Kingdom'].join(', ')
|
102
|
+
end
|
103
|
+
|
95
104
|
def postcode_is_valid
|
96
105
|
if address_postcode.nil? || !UKPostcode.parse(address_postcode).full_valid?
|
97
106
|
errors.add(:address_postcode, 'is invalid')
|
data/lib/mas/rad_core/version.rb
CHANGED