jm81-dm-address 0.3.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -5,3 +5,6 @@ rdoc
5
5
  pkg
6
6
  .project
7
7
  .loadpath
8
+ *qt_temp*
9
+ *~
10
+ *.gem
data/Rakefile CHANGED
@@ -4,18 +4,21 @@ require 'rake'
4
4
  begin
5
5
  require 'jeweler'
6
6
  Jeweler::Tasks.new do |gem|
7
- gem.name = "dm-address"
8
- gem.summary = %Q{TODO}
7
+ gem.name = "jm81-dm-address"
8
+ gem.summary = %Q{Add address related fields to a DataMapper model}
9
+ gem.description = <<EOF
10
+ Add address fields to a DataMapper model. This includes optional validations,
11
+ and additional DM types for ZipCode and PhoneNumber.
12
+ EOF
9
13
  gem.email = "jmorgan@morgancreative.net"
10
14
  gem.homepage = "http://github.com/jm81/dm-address"
11
15
  gem.authors = ["Jared Morgan"]
12
- gem.add_dependency('extlib')
13
- gem.add_dependency('dm-core')
14
- gem.add_dependency('dm-types')
15
- gem.add_dependency('dm-validations')
16
+ gem.add_dependency('dm-core', '>= 0.10.0')
17
+ gem.add_dependency('dm-types', '>= 0.10.0')
18
+ gem.add_dependency('dm-validations', '>= 0.10.0')
16
19
  # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
17
20
  end
18
-
21
+ Jeweler::GemcutterTasks.new
19
22
  rescue LoadError
20
23
  puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
21
24
  end
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.0
1
+ 0.4.0
@@ -1,12 +1,18 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
1
4
  # -*- encoding: utf-8 -*-
2
5
 
3
6
  Gem::Specification.new do |s|
4
- s.name = %q{dm-address}
5
- s.version = "0.3.0"
7
+ s.name = %q{jm81-dm-address}
8
+ s.version = "0.4.0"
6
9
 
7
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
11
  s.authors = ["Jared Morgan"]
9
- s.date = %q{2009-07-28}
12
+ s.date = %q{2009-11-29}
13
+ s.description = %q{Add address fields to a DataMapper model. This includes optional validations,
14
+ and additional DM types for ZipCode and PhoneNumber.
15
+ }
10
16
  s.email = %q{jmorgan@morgancreative.net}
11
17
  s.extra_rdoc_files = [
12
18
  "LICENSE",
@@ -19,10 +25,11 @@ Gem::Specification.new do |s|
19
25
  "README.rdoc",
20
26
  "Rakefile",
21
27
  "VERSION",
22
- "dm-address.gemspec",
28
+ "jm81-dm-address.gemspec",
23
29
  "lib/dm-address.rb",
24
30
  "lib/dm-address/phone_number.rb",
25
31
  "lib/dm-address/polymorphic.rb",
32
+ "lib/dm-address/preferred.rb",
26
33
  "lib/dm-address/us.rb",
27
34
  "lib/dm-address/zip_code.rb",
28
35
  "lib/dm-types/phone_number.rb",
@@ -31,6 +38,8 @@ Gem::Specification.new do |s|
31
38
  "lib/dm-validations/formats/zip_code.rb",
32
39
  "spec/dm-address/phone_number_spec.rb",
33
40
  "spec/dm-address/polymorphic_spec.rb",
41
+ "spec/dm-address/preferred_spec.rb",
42
+ "spec/dm-address/samples.rb",
34
43
  "spec/dm-address/us_spec.rb",
35
44
  "spec/dm-address/zip_code_spec.rb",
36
45
  "spec/dm-address_spec.rb",
@@ -41,17 +50,19 @@ Gem::Specification.new do |s|
41
50
  s.homepage = %q{http://github.com/jm81/dm-address}
42
51
  s.rdoc_options = ["--charset=UTF-8"]
43
52
  s.require_paths = ["lib"]
44
- s.rubygems_version = %q{1.3.4}
45
- s.summary = %q{TODO}
53
+ s.rubygems_version = %q{1.3.5}
54
+ s.summary = %q{Add address related fields to a DataMapper model}
46
55
  s.test_files = [
47
- "spec/dm-address/phone_number_spec.rb",
48
- "spec/dm-address/polymorphic_spec.rb",
49
- "spec/dm-address/us_spec.rb",
50
- "spec/dm-address/zip_code_spec.rb",
56
+ "spec/spec_helper.rb",
51
57
  "spec/dm-address_spec.rb",
52
58
  "spec/dm-types/phone_number_spec.rb",
53
59
  "spec/dm-types/zip_code_spec.rb",
54
- "spec/spec_helper.rb"
60
+ "spec/dm-address/us_spec.rb",
61
+ "spec/dm-address/preferred_spec.rb",
62
+ "spec/dm-address/polymorphic_spec.rb",
63
+ "spec/dm-address/samples.rb",
64
+ "spec/dm-address/phone_number_spec.rb",
65
+ "spec/dm-address/zip_code_spec.rb"
55
66
  ]
56
67
 
57
68
  if s.respond_to? :specification_version then
@@ -59,20 +70,18 @@ Gem::Specification.new do |s|
59
70
  s.specification_version = 3
60
71
 
61
72
  if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
62
- s.add_runtime_dependency(%q<extlib>, [">= 0"])
63
- s.add_runtime_dependency(%q<dm-core>, [">= 0"])
64
- s.add_runtime_dependency(%q<dm-types>, [">= 0"])
65
- s.add_runtime_dependency(%q<dm-validations>, [">= 0"])
73
+ s.add_runtime_dependency(%q<dm-core>, [">= 0.10.0"])
74
+ s.add_runtime_dependency(%q<dm-types>, [">= 0.10.0"])
75
+ s.add_runtime_dependency(%q<dm-validations>, [">= 0.10.0"])
66
76
  else
67
- s.add_dependency(%q<extlib>, [">= 0"])
68
- s.add_dependency(%q<dm-core>, [">= 0"])
69
- s.add_dependency(%q<dm-types>, [">= 0"])
70
- s.add_dependency(%q<dm-validations>, [">= 0"])
77
+ s.add_dependency(%q<dm-core>, [">= 0.10.0"])
78
+ s.add_dependency(%q<dm-types>, [">= 0.10.0"])
79
+ s.add_dependency(%q<dm-validations>, [">= 0.10.0"])
71
80
  end
72
81
  else
73
- s.add_dependency(%q<extlib>, [">= 0"])
74
- s.add_dependency(%q<dm-core>, [">= 0"])
75
- s.add_dependency(%q<dm-types>, [">= 0"])
76
- s.add_dependency(%q<dm-validations>, [">= 0"])
82
+ s.add_dependency(%q<dm-core>, [">= 0.10.0"])
83
+ s.add_dependency(%q<dm-types>, [">= 0.10.0"])
84
+ s.add_dependency(%q<dm-validations>, [">= 0.10.0"])
77
85
  end
78
86
  end
87
+
data/lib/dm-address.rb CHANGED
@@ -3,12 +3,14 @@ require 'dm-types'
3
3
  require 'dm-validations'
4
4
 
5
5
  # Require dm-address files
6
- %w{ phone_number zip_code polymorphic us }.each do |file|
7
- require File.dirname(__FILE__) + '/dm-address/' + file
6
+ %w{ phone_number zip_code polymorphic preferred us }.each do |file|
7
+ require 'dm-address/' + file
8
8
  end
9
9
 
10
10
  module DataMapper
11
11
  module Address
12
+ VERSION = '0.4.0'
13
+
12
14
  DEFAULTS = {
13
15
  :phone_format => PhoneNumber::DEFAULT_FORMAT.dup,
14
16
  :include_country => false,
@@ -32,10 +34,10 @@ end
32
34
 
33
35
  # Require dm-types files
34
36
  %w{ phone_number zip_code }.each do |file|
35
- require File.dirname(__FILE__) + '/dm-types/' + file
37
+ require 'dm-types/' + file
36
38
  end
37
39
 
38
40
  # Require dm-validations/formats files
39
41
  %w{ phone_number zip_code }.each do |file|
40
- require File.dirname(__FILE__) + '/dm-validations/formats/' + file
42
+ require 'dm-validations/formats/' + file
41
43
  end
@@ -0,0 +1,53 @@
1
+ module DataMapper
2
+ module Address
3
+ # Helper for determining a Preferred (or default address) for something, for
4
+ # example a billing address, where multiple addresses belong to record.
5
+ #
6
+ # Adds the following Class method when included:
7
+ #
8
+ # preferred_address(+method_name+)
9
+ #
10
+ # This will create an Integer property: +{method_name}_id+ and add an
11
+ # instance method +method_name+.
12
+ #
13
+ # For example:
14
+ #
15
+ # class Person
16
+ # include DataMapper::Resource
17
+ # include DataMapper::Address::Preferred
18
+ # has n, :addresses
19
+ # preferred_address :default_billing
20
+ # end
21
+ #
22
+ # p = Person.new
23
+ # p.default_billing_id = Address.last.id
24
+ # p.default_billing # => Address.last
25
+ #
26
+ # If +{method_name}_id+ is not set, the self.addresses.first is returned.
27
+ module Preferred
28
+ class << self
29
+ def included(klass)
30
+ klass.extend(ClassMethods)
31
+ end
32
+ end # class << self
33
+
34
+ module ClassMethods
35
+
36
+ # Setup a preferred address, including +{method_name}_id property
37
+ #
38
+ # ==== Parameters
39
+ # method_name<~to_s>::
40
+ # Name of method used to access the preferred address.
41
+ def preferred_address(method_name)
42
+ property("#{method_name}_id".to_sym, Integer)
43
+
44
+ define_method(method_name) do
45
+ self.addresses.get(attribute_get("#{method_name}_id")) ||
46
+ self.addresses.first
47
+ end
48
+ end
49
+ end # module ClassMethods
50
+
51
+ end # module Preferred
52
+ end # module Address
53
+ end # module DataMapper
data/lib/dm-address/us.rb CHANGED
@@ -38,7 +38,7 @@ module DataMapper
38
38
  [:created_at, DateTime],
39
39
  [:updated_at, DateTime]
40
40
  ].each do |args|
41
- unless self.properties.has_property?(args[0])
41
+ unless self.properties.named?(args[0])
42
42
  args[0] = "#{options[:prefix]}#{args[0]}" if options[:prefix]
43
43
  args[2] ||= {}
44
44
  args[2][:nullable] = !reqs.include?(args[0])
@@ -1,4 +1,4 @@
1
- require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
1
+ require 'spec_helper'
2
2
 
3
3
  describe DataMapper::Address::PhoneNumber do
4
4
  before(:all) do
@@ -1,31 +1,5 @@
1
- require File.join( File.dirname(__FILE__), '..', "spec_helper" )
2
-
3
- DataMapper.setup(:default, 'sqlite3::memory:')
4
- require 'dm-timestamps' # Only needed to make #created_at and #updated_at auto-update
5
-
6
- module DataMapper::Address::Spec
7
- class Polymorphed
8
- include DataMapper::Resource
9
- include DataMapper::Address::Polymorphic
10
- property :id, Serial
11
- property :street, String
12
- end
13
-
14
- class Person
15
- include DataMapper::Resource
16
-
17
- property :id, Serial
18
- has n, :addresses, :class_name => 'DataMapper::Address::Spec::Polymorphed',
19
- :child_key => [:addressable_id],
20
- DataMapper::Address::Spec::Polymorphed.addressable_class =>
21
- 'DataMapper::Address::Spec::Person'
22
-
23
- property :name, String
24
- end
25
-
26
- Polymorphed.auto_migrate!
27
- Person.auto_migrate!
28
- end
1
+ require 'spec_helper'
2
+ require 'dm-address/samples'
29
3
 
30
4
  describe DataMapper::Address::Polymorphic do
31
5
  before(:each) do
@@ -0,0 +1,47 @@
1
+ require 'spec_helper'
2
+ require 'dm-address/samples'
3
+
4
+ describe DataMapper::Address::Preferred do
5
+ before(:each) do
6
+ @parent_class = DataMapper::Address::Spec::Person
7
+ @parent_class.all.destroy!
8
+ @parent = @parent_class.create(:name => 'Jane Doe')
9
+
10
+ @klass = DataMapper::Address::Spec::Polymorphed
11
+ @klass.all.destroy!
12
+
13
+ @address1 = @klass.create(:street => '123 Lane Ave.',
14
+ :addressable_class => @parent_class.name,
15
+ :addressable_id => @parent.id
16
+ )
17
+
18
+ @address2 = @klass.create(:street => '123 Lane Ave.',
19
+ :addressable_class => @parent_class.name,
20
+ :addressable_id => @parent.id
21
+ )
22
+
23
+ @parent.update("shipping_id" => @address2.id)
24
+ end
25
+
26
+ it 'should be based on #{@preferred_name}_id' do
27
+ address = @parent.shipping
28
+ address.should_not be_nil
29
+ address.id.should == @parent.shipping_id
30
+ end
31
+
32
+ it 'must belong to the parent record' do
33
+ @parent.should_not be_nil # Sanity check
34
+ @parent.shipping.addressable.should == @parent
35
+ end
36
+
37
+ it 'should default to first available' do
38
+ @parent.update(:shipping_id => nil)
39
+ @parent.shipping.should == @address1
40
+ end
41
+
42
+ it 'should be nil if none available' do
43
+ @address1.update(:addressable_id => (@parent.id + 1))
44
+ @address2.update(:addressable_class => "#{@parent_class.name}Other")
45
+ @parent.shipping.should be_nil
46
+ end
47
+ end
@@ -0,0 +1,33 @@
1
+ DataMapper.setup(:default, 'sqlite3::memory:')
2
+ require 'dm-timestamps' # Only needed to make #created_at and #updated_at auto-update
3
+
4
+ module DataMapper::Address::Spec
5
+ class US
6
+ include DataMapper::Resource
7
+ include DataMapper::Address::US
8
+ address_properties
9
+ end
10
+
11
+ class Polymorphed
12
+ include DataMapper::Resource
13
+ include DataMapper::Address::Polymorphic
14
+ property :id, Serial
15
+ property :street, String
16
+ end
17
+
18
+ class Person
19
+ include DataMapper::Resource
20
+ include DataMapper::Address::Preferred
21
+
22
+ property :id, Serial
23
+ has n, :addresses, :model => 'DataMapper::Address::Spec::Polymorphed',
24
+ :child_key => [:addressable_id],
25
+ DataMapper::Address::Spec::Polymorphed.addressable_class =>
26
+ 'DataMapper::Address::Spec::Person'
27
+
28
+ property :name, String
29
+ preferred_address :shipping
30
+ end
31
+ end
32
+
33
+ DataMapper.auto_migrate!
@@ -1,17 +1,5 @@
1
- require File.join( File.dirname(__FILE__), '..', "spec_helper" )
2
-
3
- DataMapper.setup(:default, 'sqlite3::memory:')
4
- require 'dm-timestamps' # Only needed to make #created_at and #updated_at auto-update
5
-
6
- module DataMapper::Address::Spec
7
- class US
8
- include DataMapper::Resource
9
- include DataMapper::Address::US
10
- address_properties
11
- end
12
-
13
- US.auto_migrate!
14
- end
1
+ require 'spec_helper'
2
+ require 'dm-address/samples'
15
3
 
16
4
  describe DataMapper::Address::US do
17
5
  before(:each) do
@@ -32,14 +20,14 @@ describe DataMapper::Address::US do
32
20
  @address = @klass.new(@attrs)
33
21
  end
34
22
 
35
- def should_validate(field, *values)
23
+ def assert_validate(field, *values)
36
24
  values.each do |v|
37
25
  @address.__send__("#{field}=", v)
38
26
  @address.should be_valid
39
27
  end
40
28
  end
41
29
 
42
- def should_not_validate(field, *values)
30
+ def assert_not_validate(field, *values)
43
31
  values.each do |v|
44
32
  @address.__send__("#{field}=", v)
45
33
  @address.should_not be_valid
@@ -51,38 +39,38 @@ describe DataMapper::Address::US do
51
39
  end
52
40
 
53
41
  describe '#name' do
54
- it 'should note be required' do
55
- should_validate(:name, '', nil)
42
+ it 'should not be required' do
43
+ assert_validate(:name, '', nil)
56
44
  end
57
45
  end
58
46
 
59
47
  describe '#street' do
60
48
  it 'should be required' do
61
- should_not_validate(:street, '', nil)
49
+ assert_not_validate(:street, '', nil)
62
50
  end
63
51
  end
64
52
 
65
53
  describe '#city' do
66
54
  it 'should be required' do
67
- should_not_validate(:city, '', nil)
55
+ assert_not_validate(:city, '', nil)
68
56
  end
69
57
  end
70
58
 
71
59
  describe '#state' do
72
60
  it 'should be required' do
73
- should_not_validate(:state, '', nil)
61
+ assert_not_validate(:state, '', nil)
74
62
  end
75
63
  end
76
64
 
77
65
  describe '#postal_code' do
78
66
  it 'should be required' do
79
- should_not_validate(:postal_code, '', nil)
67
+ assert_not_validate(:postal_code, '', nil)
80
68
  end
81
69
 
82
70
  it 'should be 5 or 9 characters' do
83
- should_not_validate(:postal_code, '1234', '123456', '12345678', '1234567890')
84
- should_not_validate(:postal_code, '12345-678') # would be valid if dashes weren't stripped
85
- should_validate(:postal_code, '12345', '123456789', '12345-6789')
71
+ assert_not_validate(:postal_code, '1234', '123456', '12345678', '1234567890')
72
+ assert_not_validate(:postal_code, '12345-678') # would be valid if dashes weren't stripped
73
+ assert_validate(:postal_code, '12345', '123456789', '12345-6789')
86
74
  end
87
75
  end
88
76
 
@@ -114,7 +102,7 @@ describe DataMapper::Address::US do
114
102
 
115
103
  describe '#country' do
116
104
  it 'should be required' do
117
- should_not_validate(:country, '', nil)
105
+ assert_not_validate(:country, '', nil)
118
106
  end
119
107
 
120
108
  it 'should default to USA' do
@@ -124,13 +112,13 @@ describe DataMapper::Address::US do
124
112
 
125
113
  describe '#phone' do
126
114
  it 'should not be required' do
127
- should_validate(:phone, '', nil)
115
+ assert_validate(:phone, '', nil)
128
116
  end
129
117
 
130
118
  it 'should be 10 characters' do
131
- should_not_validate(:phone, '123456789', '12345678900')
132
- should_not_validate(:phone, '123-456-89')
133
- should_validate(:phone, '1234567890')
119
+ assert_not_validate(:phone, '123456789', '12345678900')
120
+ assert_not_validate(:phone, '123-456-89')
121
+ assert_validate(:phone, '1234567890')
134
122
  end
135
123
  end
136
124
 
@@ -229,7 +217,7 @@ describe DataMapper::Address::US do
229
217
  klass.__send__(:include, DataMapper::Resource)
230
218
  klass.__send__(:include, DataMapper::Address::US)
231
219
  klass.address_properties(:polymorphic => true)
232
- klass.properties.has_property?(:addressable_class).should be_true
220
+ klass.properties.named?(:addressable_class).should be_true
233
221
  end
234
222
 
235
223
  it 'should not include Polymorphic module if nil' do
@@ -237,7 +225,7 @@ describe DataMapper::Address::US do
237
225
  klass.__send__(:include, DataMapper::Resource)
238
226
  klass.__send__(:include, DataMapper::Address::US)
239
227
  klass.address_properties
240
- klass.properties.has_property?(:addressable_class).should be_false
228
+ klass.properties.named?(:addressable_class).should be_false
241
229
  end
242
230
  end
243
231
  end
@@ -1,4 +1,4 @@
1
- require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
1
+ require 'spec_helper'
2
2
 
3
3
  describe DataMapper::Address::ZipCode do
4
4
  before(:all) do
@@ -1,4 +1,4 @@
1
- require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
1
+ require 'spec_helper'
2
2
 
3
3
  describe DataMapper::Address do
4
4
  describe ".config" do
@@ -1,4 +1,4 @@
1
- require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
1
+ require 'spec_helper'
2
2
 
3
3
  describe DataMapper::Types::PhoneNumber do
4
4
 
@@ -1,4 +1,4 @@
1
- require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
1
+ require 'spec_helper'
2
2
 
3
3
  describe DataMapper::Types::ZipCode do
4
4
 
data/spec/spec_helper.rb CHANGED
@@ -1,7 +1,5 @@
1
+ require 'rubygems'
1
2
  require 'spec'
2
-
3
- $LOAD_PATH.unshift(File.dirname(__FILE__))
4
- $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
5
3
  require 'dm-address'
6
4
 
7
5
  Spec::Runner.configure do |config|
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jm81-dm-address
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jared Morgan
@@ -9,19 +9,9 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-07-28 00:00:00 -07:00
12
+ date: 2009-11-29 00:00:00 -06:00
13
13
  default_executable:
14
14
  dependencies:
15
- - !ruby/object:Gem::Dependency
16
- name: extlib
17
- type: :runtime
18
- version_requirement:
19
- version_requirements: !ruby/object:Gem::Requirement
20
- requirements:
21
- - - ">="
22
- - !ruby/object:Gem::Version
23
- version: "0"
24
- version:
25
15
  - !ruby/object:Gem::Dependency
26
16
  name: dm-core
27
17
  type: :runtime
@@ -30,7 +20,7 @@ dependencies:
30
20
  requirements:
31
21
  - - ">="
32
22
  - !ruby/object:Gem::Version
33
- version: "0"
23
+ version: 0.10.0
34
24
  version:
35
25
  - !ruby/object:Gem::Dependency
36
26
  name: dm-types
@@ -40,7 +30,7 @@ dependencies:
40
30
  requirements:
41
31
  - - ">="
42
32
  - !ruby/object:Gem::Version
43
- version: "0"
33
+ version: 0.10.0
44
34
  version:
45
35
  - !ruby/object:Gem::Dependency
46
36
  name: dm-validations
@@ -50,9 +40,12 @@ dependencies:
50
40
  requirements:
51
41
  - - ">="
52
42
  - !ruby/object:Gem::Version
53
- version: "0"
43
+ version: 0.10.0
54
44
  version:
55
- description:
45
+ description: |
46
+ Add address fields to a DataMapper model. This includes optional validations,
47
+ and additional DM types for ZipCode and PhoneNumber.
48
+
56
49
  email: jmorgan@morgancreative.net
57
50
  executables: []
58
51
 
@@ -68,10 +61,11 @@ files:
68
61
  - README.rdoc
69
62
  - Rakefile
70
63
  - VERSION
71
- - dm-address.gemspec
64
+ - jm81-dm-address.gemspec
72
65
  - lib/dm-address.rb
73
66
  - lib/dm-address/phone_number.rb
74
67
  - lib/dm-address/polymorphic.rb
68
+ - lib/dm-address/preferred.rb
75
69
  - lib/dm-address/us.rb
76
70
  - lib/dm-address/zip_code.rb
77
71
  - lib/dm-types/phone_number.rb
@@ -80,15 +74,18 @@ files:
80
74
  - lib/dm-validations/formats/zip_code.rb
81
75
  - spec/dm-address/phone_number_spec.rb
82
76
  - spec/dm-address/polymorphic_spec.rb
77
+ - spec/dm-address/preferred_spec.rb
78
+ - spec/dm-address/samples.rb
83
79
  - spec/dm-address/us_spec.rb
84
80
  - spec/dm-address/zip_code_spec.rb
85
81
  - spec/dm-address_spec.rb
86
82
  - spec/dm-types/phone_number_spec.rb
87
83
  - spec/dm-types/zip_code_spec.rb
88
84
  - spec/spec_helper.rb
89
- has_rdoc: false
85
+ has_rdoc: true
90
86
  homepage: http://github.com/jm81/dm-address
91
- licenses:
87
+ licenses: []
88
+
92
89
  post_install_message:
93
90
  rdoc_options:
94
91
  - --charset=UTF-8
@@ -112,13 +109,15 @@ rubyforge_project:
112
109
  rubygems_version: 1.3.5
113
110
  signing_key:
114
111
  specification_version: 3
115
- summary: TODO
112
+ summary: Add address related fields to a DataMapper model
116
113
  test_files:
117
- - spec/dm-address/phone_number_spec.rb
118
- - spec/dm-address/polymorphic_spec.rb
119
- - spec/dm-address/us_spec.rb
120
- - spec/dm-address/zip_code_spec.rb
114
+ - spec/spec_helper.rb
121
115
  - spec/dm-address_spec.rb
122
116
  - spec/dm-types/phone_number_spec.rb
123
117
  - spec/dm-types/zip_code_spec.rb
124
- - spec/spec_helper.rb
118
+ - spec/dm-address/us_spec.rb
119
+ - spec/dm-address/preferred_spec.rb
120
+ - spec/dm-address/polymorphic_spec.rb
121
+ - spec/dm-address/samples.rb
122
+ - spec/dm-address/phone_number_spec.rb
123
+ - spec/dm-address/zip_code_spec.rb