morse_contactable 1.0.9 → 1.1.0

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: bf2c3205adc34c5cfe6a15dd4116e52da9dd9a3b
4
- data.tar.gz: 9dc10b87a45c9e3c58c47d021541a0bd58ccb23d
3
+ metadata.gz: b4b0299ed8caf5dc2d79218c218e93a742b5183a
4
+ data.tar.gz: 3bd0c86b044557ca88058e3c3d49efd65f061887
5
5
  SHA512:
6
- metadata.gz: f5af1a639b6f80fc8ffb1607cc720b8a210191254f2d68ee06e0f14b4b71f252ecbb92e5b8d7d0e82596bd6c891fe32c79a86257198bccb9644235f0ecb8a2c8
7
- data.tar.gz: b8ec8bf816f17cdc6e83e5f2d0e6b6a4a9044dc46c3bada2acaa297b92a4c7de71a401a2e4038e051af80a3d21f64aafe33fc02746745fa5589488c63f31b951
6
+ metadata.gz: c4dbbc890186cb3cd090035da28ef77f04bb133d108fe9eb7a805dddf13def64c48d55141c95a59a3c6afe90c2b0f44b1157b37e8bf8b3906b1c77e93218ad67
7
+ data.tar.gz: 942d31f58fb4eacfafbe078618cfd46a1558035f609419963d083926993816c7ccce204dccabed90802ac8c4b2678354a40daf1218d9eb8091ef6f27080f1f3f
data/lib/addressable.rb CHANGED
@@ -1,7 +1,6 @@
1
1
  module Addressable
2
2
  extend ActiveSupport::Concern
3
3
  include FieldsValidator
4
- REQUIRED_DATABASE_FIELDS = [:address1, :address2, :address3, :town, :county, :country, :postcode]
5
4
 
6
5
  included do
7
6
  validate_required_attributes
@@ -15,7 +14,7 @@ module Addressable
15
14
 
16
15
  def required_database_fields
17
16
  result=defined?(super) ? super : []
18
- result+= REQUIRED_DATABASE_FIELDS
17
+ result+=[:title, :address1, :address2, :address3, :town, :county, :country, :postcode]
19
18
  end
20
19
 
21
20
  def required_addressable_attributes
@@ -26,7 +25,7 @@ module Addressable
26
25
  public
27
26
 
28
27
  def address_array
29
- Array.new.tap { |a| REQUIRED_DATABASE_FIELDS.select { |key| a<<self.send(key) } }
28
+ Array.new.tap { |a| required_database_fields.select { |key| a<<self.send(key) } }
30
29
  end
31
30
 
32
31
  def address_pretty
@@ -1,3 +1,3 @@
1
1
  module MorseContactable
2
- VERSION = "1.0.9"
2
+ VERSION = "1.1.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: morse_contactable
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.9
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - fredmcgroarty
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-25 00:00:00.000000000 Z
11
+ date: 2016-01-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: morse_fields_validator