dm-core 1.0.2 → 1.1.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (184) hide show
  1. data/Gemfile +28 -94
  2. data/LICENSE +1 -1
  3. data/README.rdoc +44 -11
  4. data/Rakefile +1 -7
  5. data/VERSION +1 -1
  6. data/dm-core.gemspec +398 -299
  7. data/lib/dm-core.rb +23 -13
  8. data/lib/dm-core/adapters/abstract_adapter.rb +1 -1
  9. data/lib/dm-core/associations/many_to_many.rb +1 -3
  10. data/lib/dm-core/associations/many_to_one.rb +54 -36
  11. data/lib/dm-core/associations/one_to_many.rb +1 -2
  12. data/lib/dm-core/associations/relationship.rb +11 -2
  13. data/lib/dm-core/collection.rb +3 -7
  14. data/lib/dm-core/core_ext/symbol.rb +1 -1
  15. data/lib/dm-core/identity_map.rb +0 -5
  16. data/lib/dm-core/model.rb +11 -21
  17. data/lib/dm-core/model/property.rb +43 -58
  18. data/lib/dm-core/model/relationship.rb +49 -44
  19. data/lib/dm-core/property.rb +106 -130
  20. data/lib/dm-core/property/date_time.rb +1 -3
  21. data/lib/dm-core/property/decimal.rb +11 -7
  22. data/lib/dm-core/property/integer.rb +2 -2
  23. data/lib/dm-core/property/lookup.rb +3 -16
  24. data/lib/dm-core/property/numeric.rb +3 -3
  25. data/lib/dm-core/property/object.rb +2 -11
  26. data/lib/dm-core/property/string.rb +1 -1
  27. data/lib/dm-core/property_set.rb +34 -54
  28. data/lib/dm-core/query.rb +85 -56
  29. data/lib/dm-core/query/conditions/comparison.rb +3 -6
  30. data/lib/dm-core/query/direction.rb +0 -4
  31. data/lib/dm-core/query/path.rb +22 -6
  32. data/lib/dm-core/relationship_set.rb +74 -0
  33. data/lib/dm-core/resource.rb +21 -32
  34. data/lib/dm-core/resource/state.rb +3 -4
  35. data/lib/dm-core/spec/lib/spec_helper.rb +1 -4
  36. data/lib/dm-core/spec/setup.rb +12 -5
  37. data/lib/dm-core/spec/shared/public/property_spec.rb +35 -21
  38. data/lib/dm-core/spec/shared/resource_spec.rb +1 -1
  39. data/lib/dm-core/spec/shared/semipublic/property_spec.rb +9 -9
  40. data/lib/dm-core/spec/shared/semipublic/query/conditions/abstract_comparison_spec.rb +261 -0
  41. data/lib/dm-core/support/deprecate.rb +1 -1
  42. data/lib/dm-core/support/descendant_set.rb +12 -5
  43. data/lib/dm-core/support/ordered_set.rb +382 -0
  44. data/lib/dm-core/support/subject_set.rb +252 -0
  45. data/lib/dm-core/version.rb +1 -1
  46. data/spec/public/associations/many_to_many/read_multiple_join_spec.rb +1 -2
  47. data/spec/public/associations/many_to_many_spec.rb +11 -9
  48. data/spec/public/associations/many_to_one_spec.rb +1 -1
  49. data/spec/public/associations/many_to_one_with_boolean_cpk_spec.rb +1 -1
  50. data/spec/public/associations/many_to_one_with_custom_fk_spec.rb +2 -2
  51. data/spec/public/associations/one_to_many_spec.rb +6 -5
  52. data/spec/public/associations/one_to_one_spec.rb +1 -1
  53. data/spec/public/associations/one_to_one_with_boolean_cpk_spec.rb +1 -1
  54. data/spec/public/collection_spec.rb +7 -6
  55. data/spec/public/finalize_spec.rb +1 -1
  56. data/spec/public/model/hook_spec.rb +4 -3
  57. data/spec/public/model/property_spec.rb +9 -3
  58. data/spec/public/model/relationship_spec.rb +2 -4
  59. data/spec/public/model_spec.rb +1 -1
  60. data/spec/public/property/binary_spec.rb +1 -1
  61. data/spec/public/property/boolean_spec.rb +1 -1
  62. data/spec/public/property/class_spec.rb +1 -1
  63. data/spec/public/property/date_spec.rb +1 -1
  64. data/spec/public/property/date_time_spec.rb +1 -1
  65. data/spec/public/property/decimal_spec.rb +7 -6
  66. data/spec/public/property/discriminator_spec.rb +1 -1
  67. data/spec/public/property/float_spec.rb +1 -1
  68. data/spec/public/property/integer_spec.rb +1 -1
  69. data/spec/public/property/object_spec.rb +2 -2
  70. data/spec/public/property/serial_spec.rb +1 -1
  71. data/spec/public/property/string_spec.rb +1 -1
  72. data/spec/public/property/text_spec.rb +6 -3
  73. data/spec/public/property/time_spec.rb +1 -1
  74. data/spec/public/property_spec.rb +13 -11
  75. data/spec/public/resource_spec.rb +43 -1
  76. data/spec/public/sel_spec.rb +1 -1
  77. data/spec/public/setup_spec.rb +1 -1
  78. data/spec/public/shared/collection_shared_spec.rb +6 -1
  79. data/spec/semipublic/adapters/abstract_adapter_spec.rb +1 -1
  80. data/spec/semipublic/adapters/in_memory_adapter_spec.rb +1 -1
  81. data/spec/semipublic/associations/many_to_many_spec.rb +1 -1
  82. data/spec/semipublic/associations/many_to_one_spec.rb +1 -1
  83. data/spec/semipublic/associations/one_to_many_spec.rb +1 -1
  84. data/spec/semipublic/associations/one_to_one_spec.rb +1 -1
  85. data/spec/semipublic/associations/relationship_spec.rb +1 -1
  86. data/spec/semipublic/associations_spec.rb +1 -1
  87. data/spec/semipublic/collection_spec.rb +1 -1
  88. data/spec/semipublic/model_spec.rb +1 -1
  89. data/spec/semipublic/property/binary_spec.rb +1 -1
  90. data/spec/semipublic/property/boolean_spec.rb +1 -1
  91. data/spec/semipublic/property/class_spec.rb +1 -1
  92. data/spec/semipublic/property/date_spec.rb +1 -1
  93. data/spec/semipublic/property/date_time_spec.rb +1 -1
  94. data/spec/semipublic/property/decimal_spec.rb +6 -5
  95. data/spec/semipublic/property/discriminator_spec.rb +1 -1
  96. data/spec/semipublic/property/float_spec.rb +1 -1
  97. data/spec/semipublic/property/integer_spec.rb +1 -1
  98. data/spec/semipublic/property/lookup_spec.rb +8 -5
  99. data/spec/semipublic/property/serial_spec.rb +1 -1
  100. data/spec/semipublic/property/string_spec.rb +1 -1
  101. data/spec/semipublic/property/text_spec.rb +1 -1
  102. data/spec/semipublic/property/time_spec.rb +1 -1
  103. data/spec/semipublic/property_spec.rb +32 -7
  104. data/spec/semipublic/query/conditions/comparison_spec.rb +1 -264
  105. data/spec/semipublic/query/conditions/operation_spec.rb +1 -2
  106. data/spec/semipublic/query/path_spec.rb +27 -1
  107. data/spec/semipublic/query_spec.rb +87 -36
  108. data/spec/semipublic/resource/state/clean_spec.rb +1 -2
  109. data/spec/semipublic/resource/state/deleted_spec.rb +1 -2
  110. data/spec/semipublic/resource/state/dirty_spec.rb +1 -2
  111. data/spec/semipublic/resource/state/immutable_spec.rb +1 -2
  112. data/spec/semipublic/resource/state/transient_spec.rb +7 -2
  113. data/spec/semipublic/resource/state_spec.rb +1 -1
  114. data/spec/semipublic/resource_spec.rb +1 -1
  115. data/spec/unit/array_spec.rb +1 -0
  116. data/spec/unit/data_mapper/ordered_set/append_spec.rb +26 -0
  117. data/spec/unit/data_mapper/ordered_set/clear_spec.rb +24 -0
  118. data/spec/unit/data_mapper/ordered_set/delete_spec.rb +28 -0
  119. data/spec/unit/data_mapper/ordered_set/each_spec.rb +19 -0
  120. data/spec/unit/data_mapper/ordered_set/empty_spec.rb +20 -0
  121. data/spec/unit/data_mapper/ordered_set/entries_spec.rb +22 -0
  122. data/spec/unit/data_mapper/ordered_set/eql_spec.rb +51 -0
  123. data/spec/unit/data_mapper/ordered_set/equal_value_spec.rb +84 -0
  124. data/spec/unit/data_mapper/ordered_set/hash_spec.rb +12 -0
  125. data/spec/unit/data_mapper/ordered_set/include_spec.rb +23 -0
  126. data/spec/unit/data_mapper/ordered_set/index_spec.rb +28 -0
  127. data/spec/unit/data_mapper/ordered_set/initialize_spec.rb +32 -0
  128. data/spec/unit/data_mapper/ordered_set/merge_spec.rb +36 -0
  129. data/spec/unit/data_mapper/ordered_set/shared/append_spec.rb +24 -0
  130. data/spec/unit/data_mapper/ordered_set/shared/clear_spec.rb +9 -0
  131. data/spec/unit/data_mapper/ordered_set/shared/delete_spec.rb +25 -0
  132. data/spec/unit/data_mapper/ordered_set/shared/each_spec.rb +17 -0
  133. data/spec/unit/data_mapper/ordered_set/shared/empty_spec.rb +9 -0
  134. data/spec/unit/data_mapper/ordered_set/shared/entries_spec.rb +9 -0
  135. data/spec/unit/data_mapper/ordered_set/shared/include_spec.rb +9 -0
  136. data/spec/unit/data_mapper/ordered_set/shared/index_spec.rb +13 -0
  137. data/spec/unit/data_mapper/ordered_set/shared/initialize_spec.rb +28 -0
  138. data/spec/unit/data_mapper/ordered_set/shared/merge_spec.rb +28 -0
  139. data/spec/unit/data_mapper/ordered_set/shared/size_spec.rb +13 -0
  140. data/spec/unit/data_mapper/ordered_set/shared/to_ary_spec.rb +11 -0
  141. data/spec/unit/data_mapper/ordered_set/size_spec.rb +27 -0
  142. data/spec/unit/data_mapper/ordered_set/to_ary_spec.rb +23 -0
  143. data/spec/unit/data_mapper/subject_set/append_spec.rb +47 -0
  144. data/spec/unit/data_mapper/subject_set/clear_spec.rb +34 -0
  145. data/spec/unit/data_mapper/subject_set/delete_spec.rb +40 -0
  146. data/spec/unit/data_mapper/subject_set/each_spec.rb +30 -0
  147. data/spec/unit/data_mapper/subject_set/empty_spec.rb +31 -0
  148. data/spec/unit/data_mapper/subject_set/entries_spec.rb +31 -0
  149. data/spec/unit/data_mapper/subject_set/get_spec.rb +34 -0
  150. data/spec/unit/data_mapper/subject_set/include_spec.rb +32 -0
  151. data/spec/unit/data_mapper/subject_set/named_spec.rb +33 -0
  152. data/spec/unit/data_mapper/subject_set/shared/append_spec.rb +18 -0
  153. data/spec/unit/data_mapper/subject_set/shared/clear_spec.rb +9 -0
  154. data/spec/unit/data_mapper/subject_set/shared/delete_spec.rb +9 -0
  155. data/spec/unit/data_mapper/subject_set/shared/each_spec.rb +9 -0
  156. data/spec/unit/data_mapper/subject_set/shared/empty_spec.rb +9 -0
  157. data/spec/unit/data_mapper/subject_set/shared/entries_spec.rb +9 -0
  158. data/spec/unit/data_mapper/subject_set/shared/get_spec.rb +9 -0
  159. data/spec/unit/data_mapper/subject_set/shared/include_spec.rb +9 -0
  160. data/spec/unit/data_mapper/subject_set/shared/named_spec.rb +9 -0
  161. data/spec/unit/data_mapper/subject_set/shared/size_spec.rb +13 -0
  162. data/spec/unit/data_mapper/subject_set/shared/to_ary_spec.rb +9 -0
  163. data/spec/unit/data_mapper/subject_set/shared/values_at_spec.rb +44 -0
  164. data/spec/unit/data_mapper/subject_set/size_spec.rb +42 -0
  165. data/spec/unit/data_mapper/subject_set/to_ary_spec.rb +34 -0
  166. data/spec/unit/data_mapper/subject_set/values_at_spec.rb +57 -0
  167. data/spec/unit/hash_spec.rb +2 -1
  168. data/spec/unit/hook_spec.rb +1 -0
  169. data/spec/unit/lazy_array_spec.rb +2 -1
  170. data/spec/unit/module_spec.rb +2 -1
  171. data/spec/unit/object_spec.rb +1 -0
  172. data/spec/unit/try_dup_spec.rb +1 -0
  173. data/tasks/spec.rake +0 -3
  174. metadata +149 -52
  175. data/.gitignore +0 -37
  176. data/lib/dm-core/type.rb +0 -216
  177. data/lib/dm-core/types/boolean.rb +0 -9
  178. data/lib/dm-core/types/decimal.rb +0 -9
  179. data/lib/dm-core/types/discriminator.rb +0 -50
  180. data/lib/dm-core/types/object.rb +0 -25
  181. data/lib/dm-core/types/serial.rb +0 -11
  182. data/lib/dm-core/types/text.rb +0 -11
  183. data/tasks/local_gemfile.rake +0 -16
  184. data/tasks/metrics.rake +0 -37
data/Gemfile CHANGED
@@ -1,142 +1,76 @@
1
- # If you're working on more than one datamapper gem at a time, then it's
2
- # recommended to create a local Gemfile and use this instead of the git
3
- # sources. This will make sure that you are developing against your
4
- # other local datamapper sources that you currently work on. Gemfile.local
5
- # will behave identically to the standard Gemfile apart from the fact that
6
- # it fetches the datamapper gems from local paths. This means that you can use
7
- # the same environment variables, like ADAPTER(S) or PLUGIN(S) when running
8
- # bundle commands. Gemfile.local is added to .gitignore, so you don't need to
9
- # worry about accidentally checking local development paths into git.
10
- # In order to create a local Gemfile, all you need to do is run:
11
- #
12
- # bundle exec rake local_gemfile
13
- #
14
- # This will give you a Gemfile.local file that points to your local clones of
15
- # the various datamapper gems. It's assumed that all datamapper repo clones
16
- # reside in the same directory. You can use the Gemfile.local like so for
17
- # running any bundle command:
18
- #
19
- # BUNDLE_GEMFILE=Gemfile.local bundle foo
20
- #
21
- # You can also specify which adapter(s) should be part of the bundle by setting
22
- # an environment variable. This of course also works when using the Gemfile.local
23
- #
24
- # bundle foo # dm-sqlite-adapter
25
- # ADAPTER=mysql bundle foo # dm-mysql-adapter
26
- # ADAPTERS=sqlite,mysql bundle foo # dm-sqlite-adapter and dm-mysql-adapter
27
- #
28
- # Of course you can also use the ADAPTER(S) variable when using the Gemfile.local
29
- # and running specs against selected adapters.
30
- #
31
- # For easily working with adapters supported on your machine, it's recommended
32
- # that you first install all adapters that you are planning to use or work on
33
- # by doing something like
34
- #
35
- # ADAPTERS=sqlite,mysql,postgres bundle install
36
- #
37
- # This will clone the various repositories and make them available to bundler.
38
- # Once you have them installed you can easily switch between adapters for the
39
- # various development tasks. Running something like
40
- #
41
- # ADAPTER=mysql bundle exec rake spec
42
- #
43
- # will make sure that the dm-mysql-adapter is part of the bundle, and will be used
44
- # when running the specs.
45
- #
46
- # You can also specify which plugin(s) should be part of the bundle by setting
47
- # an environment variable. This also works when using the Gemfile.local
48
- #
49
- # bundle foo # dm-migrations
50
- # PLUGINS=dm-validations bundle foo # dm-migrations and dm-validations
51
- # PLUGINS=dm-validations,dm-types bundle foo # dm-migrations, dm-validations and dm-types
52
- #
53
- # Of course you can combine the PLUGIN(S) and ADAPTER(S) env vars to run specs
54
- # for certain adapter/plugin combinations.
55
- #
56
- # Finally, to speed up running specs and other tasks, it's recommended to run
57
- #
58
- # bundle lock
59
- #
60
- # after running 'bundle install' for the first time. This will make 'bundle exec' run
61
- # a lot faster compared to the unlocked version. With an unlocked bundle you would
62
- # typically just run 'bundle install' from time to time to fetch the latest sources from
63
- # upstream. When you locked your bundle, you need to run
64
- #
65
- # bundle install --relock
66
- #
67
- # to make sure to fetch the latest updates and then lock the bundle again. Gemfile.lock
68
- # is added to the .gitignore file, so you don't need to worry about accidentally checking
69
- # it into version control.
1
+ require 'pathname'
70
2
 
71
3
  source 'http://rubygems.org'
72
4
 
73
- DATAMAPPER = 'git://github.com/datamapper'
74
- DM_VERSION = '~> 1.0.2'
5
+ SOURCE = ENV.fetch('SOURCE', :git).to_sym
6
+ REPO_POSTFIX = SOURCE == :path ? '' : '.git'
7
+ DATAMAPPER = SOURCE == :path ? Pathname(__FILE__).dirname.parent : 'http://github.com/datamapper'
8
+ DM_VERSION = '~> 1.1.0.rc1'
75
9
 
76
- group :runtime do # Runtime dependencies (as in the gemspec)
10
+ group :runtime do
77
11
 
78
12
  if ENV['EXTLIB']
79
- gem 'extlib', '~> 0.9.15', :git => "#{DATAMAPPER}/extlib.git"
13
+ gem 'extlib', '~> 0.9.15', SOURCE => "#{DATAMAPPER}/extlib#{REPO_POSTFIX}", :require => nil
80
14
  else
81
- gem 'activesupport', '~> 3.0.0', :git => 'git://github.com/rails/rails.git', :branch => '3-0-stable', :require => nil
15
+ gem 'activesupport', '~> 3.0.4', :require => nil
16
+ gem 'i18n', '~> 0.5.0'
82
17
  end
83
18
 
84
- gem 'addressable', '~> 2.2'
19
+ gem 'addressable', '~> 2.2'
85
20
 
86
21
  end
87
22
 
88
- group(:development) do # Development dependencies (as in the gemspec)
23
+ group :development do
89
24
 
90
- gem 'rake', '~> 0.8.7'
91
- gem 'rspec', '~> 1.3', :git => 'git://github.com/snusnu/rspec', :branch => 'heckle_fix_plus_gemfile'
92
- gem 'jeweler', '~> 1.4'
25
+ gem 'jeweler', '~> 1.5.2'
26
+ gem 'rake', '~> 0.8.7'
27
+ gem 'rspec', '~> 1.3.1'
93
28
 
94
29
  end
95
30
 
96
- group :quality do # These gems contain rake tasks that check the quality of the source code
31
+ group :quality do
97
32
 
98
- gem 'metric_fu', '~> 1.3'
99
- gem 'rcov', '~> 0.9.8'
100
- gem 'reek', '~> 1.2.8'
101
- gem 'roodi', '~> 2.1'
102
- gem 'yard', '~> 0.5'
103
- gem 'yardstick', '~> 0.1'
33
+ gem 'rcov', '~> 0.9.9', :platforms => :mri_18
34
+ gem 'yard', '~> 0.6'
35
+ gem 'yardstick', '~> 0.2'
104
36
 
105
37
  end
106
38
 
107
- group :datamapper do # We need this because we want to pin these dependencies to their git master sources
39
+ group :datamapper do
108
40
 
109
41
  gem 'dm-core', DM_VERSION, :path => File.dirname(__FILE__) # Make ourself available to the adapters
110
42
 
111
- adapters = ENV['ADAPTER'] || ENV['ADAPTERS']
112
- adapters = adapters.to_s.tr(',', ' ').split.uniq - %w[ in_memory ]
43
+ adapters = ENV['ADAPTERS'] || ENV['ADAPTER'] || 'in_memory'
44
+ adapters = adapters.to_s.tr(',', ' ').split.uniq
113
45
 
114
46
  DO_VERSION = '~> 0.10.2'
115
47
  DM_DO_ADAPTERS = %w[ sqlite postgres mysql oracle sqlserver ]
116
48
 
117
49
  if (do_adapters = DM_DO_ADAPTERS & adapters).any?
118
50
  options = {}
119
- options[:git] = "#{DATAMAPPER}/do.git" if ENV['DO_GIT'] == 'true'
51
+ options[:git] = "#{DATAMAPPER}/do#{REPO_POSTFIX}" if ENV['DO_GIT'] == 'true'
120
52
 
121
- gem 'data_objects', DO_VERSION, options.dup
53
+ gem 'data_objects', DO_VERSION, options.dup
122
54
 
123
55
  do_adapters.each do |adapter|
124
56
  adapter = 'sqlite3' if adapter == 'sqlite'
125
57
  gem "do_#{adapter}", DO_VERSION, options.dup
126
58
  end
127
59
 
128
- gem 'dm-do-adapter', DM_VERSION, :git => "#{DATAMAPPER}/dm-do-adapter.git"
60
+ gem 'dm-do-adapter', DM_VERSION, SOURCE => "#{DATAMAPPER}/dm-do-adapter#{REPO_POSTFIX}"
129
61
  end
130
62
 
131
63
  adapters.each do |adapter|
132
- gem "dm-#{adapter}-adapter", DM_VERSION, :git => "#{DATAMAPPER}/dm-#{adapter}-adapter.git"
64
+ unless adapter == 'in_memory'
65
+ gem "dm-#{adapter}-adapter", DM_VERSION, SOURCE => "#{DATAMAPPER}/dm-#{adapter}-adapter#{REPO_POSTFIX}"
66
+ end
133
67
  end
134
68
 
135
69
  plugins = ENV['PLUGINS'] || ENV['PLUGIN']
136
70
  plugins = plugins.to_s.tr(',', ' ').split.push('dm-migrations').uniq
137
71
 
138
72
  plugins.each do |plugin|
139
- gem plugin, DM_VERSION, :git => "#{DATAMAPPER}/#{plugin}.git"
73
+ gem plugin, DM_VERSION, SOURCE => "#{DATAMAPPER}/#{plugin}#{REPO_POSTFIX}"
140
74
  end
141
75
 
142
76
  end
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2010 Dan Kubb
1
+ Copyright (c) 2011 Dan Kubb
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
@@ -64,14 +64,14 @@ board.
64
64
  Not so with the DataMapper. Text fields are lazily loaded, meaning they
65
65
  only load when you need them. If you want more control you can enable or
66
66
  disable this feature for any field (not just text-fields) by passing a
67
- @:lazy@ option to your field mapping with a value of <tt>true</tt> or
67
+ <tt>:lazy</tt> option to your field mapping with a value of <tt>true</tt> or
68
68
  <tt>false</tt>.
69
69
 
70
70
  class Animal
71
71
  include DataMapper::Resource
72
72
 
73
- property :name, String
74
- property :notes, Text, :lazy => false
73
+ property :name, String
74
+ property :description, Text, :lazy => false
75
75
  end
76
76
 
77
77
  Plus, lazy-loading of Text fields happens automatically and intelligently when
@@ -79,10 +79,10 @@ working with associations. The following only issues 2 queries to load up all
79
79
  of the notes fields on each animal:
80
80
 
81
81
  repository do
82
- Animal.all.each { |animal| animal.notes.to_a }
82
+ Animal.all.each { |animal| animal.description.to_a }
83
83
  end
84
84
 
85
- Did you notice the the <tt>#to_a</tt> call in the above example? That
85
+ Did you notice the <tt>#to_a</tt> call in the above example? That
86
86
  was necessary because even DataMapper collections are lazy. If you don't
87
87
  iterate over them, or in this case ask them to become Arrays, they won't
88
88
  execute until you need them. We needed to call <tt>#to_a</tt> to force
@@ -90,12 +90,11 @@ the lazy load because without it, the above example would have only
90
90
  executed one query. This extra bit of laziness can come in very handy,
91
91
  for example:
92
92
 
93
- animals = Animal.all
93
+ animals = Animal.all
94
+ description = 'foo'
94
95
 
95
- unless note.blank?
96
- animals.each do |animal|
97
- animal.update(:note => note)
98
- end
96
+ animals.each do |animal|
97
+ animal.update(:description => description)
99
98
  end
100
99
 
101
100
  In the above example, the Animals won't be retrieved until you actually
@@ -133,6 +132,40 @@ You can even use this on association collections, eg:
133
132
 
134
133
  zoo.animals.mammals.to_a # => executes one query
135
134
 
135
+ == Custom Properties
136
+
137
+ With DataMapper it is possible to create custom properties for your models.
138
+ Consider this example:
139
+
140
+ module DataMapper
141
+ class Property
142
+ class Email < String
143
+ required true
144
+ format /^([\w\.%\+\-]+)@([\w\-]+\.)+([\w]{2,})$/i
145
+ end
146
+ end
147
+ end
148
+
149
+ class User
150
+ include DataMapper::Resource
151
+
152
+ property :id, Serial
153
+ property :email, Email
154
+ end
155
+
156
+ This way there won't be a need to repeat same property options every time you
157
+ add an email to a model. In the example above we create an Email property which
158
+ is just a String with additional pre-configured options: <tt>required</tt> and
159
+ <tt>format</tt>. Please note that it is possible to override these options when
160
+ declaring a property, like this:
161
+
162
+ class Member
163
+ include DataMapper::Resource
164
+
165
+ property :id, Serial
166
+ property :email, Email, :required => false
167
+ end
168
+
136
169
  == Plays Well With Others
137
170
 
138
171
  In ActiveRecord, all your fields are mapped, whether you want them or not.
@@ -201,4 +234,4 @@ nice syntax tweaks DataMapper delivers out of the box...
201
234
 
202
235
  == Copyright
203
236
 
204
- Copyright (c) 2010 Dan Kubb. See LICENSE for details.
237
+ Copyright (c) 2011 Dan Kubb. See LICENSE for details.
data/Rakefile CHANGED
@@ -2,7 +2,7 @@ require 'rubygems'
2
2
  require 'rake'
3
3
 
4
4
  begin
5
- gem 'jeweler', '~> 1.4'
5
+ gem 'jeweler', '~> 1.5.2'
6
6
  require 'jeweler'
7
7
 
8
8
  Jeweler::Tasks.new do |gem|
@@ -15,12 +15,6 @@ begin
15
15
  gem.has_rdoc = 'yard'
16
16
 
17
17
  gem.rubyforge_project = 'datamapper'
18
-
19
- gem.add_dependency 'extlib', '~> 0.9.15'
20
- gem.add_dependency 'addressable', '~> 2.2'
21
-
22
- gem.add_development_dependency 'rspec', '~> 1.3'
23
- gem.add_development_dependency 'jeweler', '~> 1.4'
24
18
  end
25
19
 
26
20
  Jeweler::GemcutterTasks.new
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.2
1
+ 1.1.0.rc1
@@ -1,336 +1,435 @@
1
1
  # Generated by jeweler
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{dm-core}
8
- s.version = "1.0.2"
8
+ s.version = "1.1.0.rc1"
9
9
 
10
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
10
+ s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Dan Kubb"]
12
- s.date = %q{2010-09-07}
12
+ s.date = %q{2011-02-28}
13
13
  s.description = %q{Faster, Better, Simpler.}
14
14
  s.email = %q{dan.kubb@gmail.com}
15
15
  s.extra_rdoc_files = [
16
16
  "LICENSE",
17
- "README.rdoc"
17
+ "README.rdoc"
18
18
  ]
19
19
  s.files = [
20
20
  ".autotest",
21
- ".document",
22
- ".gitignore",
23
- "Gemfile",
24
- "LICENSE",
25
- "README.rdoc",
26
- "Rakefile",
27
- "VERSION",
28
- "dm-core.gemspec",
29
- "lib/dm-core.rb",
30
- "lib/dm-core/adapters.rb",
31
- "lib/dm-core/adapters/abstract_adapter.rb",
32
- "lib/dm-core/adapters/in_memory_adapter.rb",
33
- "lib/dm-core/associations/many_to_many.rb",
34
- "lib/dm-core/associations/many_to_one.rb",
35
- "lib/dm-core/associations/one_to_many.rb",
36
- "lib/dm-core/associations/one_to_one.rb",
37
- "lib/dm-core/associations/relationship.rb",
38
- "lib/dm-core/collection.rb",
39
- "lib/dm-core/core_ext/array.rb",
40
- "lib/dm-core/core_ext/hash.rb",
41
- "lib/dm-core/core_ext/kernel.rb",
42
- "lib/dm-core/core_ext/module.rb",
43
- "lib/dm-core/core_ext/object.rb",
44
- "lib/dm-core/core_ext/pathname.rb",
45
- "lib/dm-core/core_ext/string.rb",
46
- "lib/dm-core/core_ext/symbol.rb",
47
- "lib/dm-core/core_ext/try_dup.rb",
48
- "lib/dm-core/identity_map.rb",
49
- "lib/dm-core/model.rb",
50
- "lib/dm-core/model/hook.rb",
51
- "lib/dm-core/model/is.rb",
52
- "lib/dm-core/model/property.rb",
53
- "lib/dm-core/model/relationship.rb",
54
- "lib/dm-core/model/scope.rb",
55
- "lib/dm-core/property.rb",
56
- "lib/dm-core/property/binary.rb",
57
- "lib/dm-core/property/boolean.rb",
58
- "lib/dm-core/property/class.rb",
59
- "lib/dm-core/property/date.rb",
60
- "lib/dm-core/property/date_time.rb",
61
- "lib/dm-core/property/decimal.rb",
62
- "lib/dm-core/property/discriminator.rb",
63
- "lib/dm-core/property/float.rb",
64
- "lib/dm-core/property/integer.rb",
65
- "lib/dm-core/property/lookup.rb",
66
- "lib/dm-core/property/numeric.rb",
67
- "lib/dm-core/property/object.rb",
68
- "lib/dm-core/property/serial.rb",
69
- "lib/dm-core/property/string.rb",
70
- "lib/dm-core/property/text.rb",
71
- "lib/dm-core/property/time.rb",
72
- "lib/dm-core/property/typecast/numeric.rb",
73
- "lib/dm-core/property/typecast/time.rb",
74
- "lib/dm-core/property_set.rb",
75
- "lib/dm-core/query.rb",
76
- "lib/dm-core/query/conditions/comparison.rb",
77
- "lib/dm-core/query/conditions/operation.rb",
78
- "lib/dm-core/query/direction.rb",
79
- "lib/dm-core/query/operator.rb",
80
- "lib/dm-core/query/path.rb",
81
- "lib/dm-core/query/sort.rb",
82
- "lib/dm-core/repository.rb",
83
- "lib/dm-core/resource.rb",
84
- "lib/dm-core/resource/state.rb",
85
- "lib/dm-core/resource/state/clean.rb",
86
- "lib/dm-core/resource/state/deleted.rb",
87
- "lib/dm-core/resource/state/dirty.rb",
88
- "lib/dm-core/resource/state/immutable.rb",
89
- "lib/dm-core/resource/state/persisted.rb",
90
- "lib/dm-core/resource/state/transient.rb",
91
- "lib/dm-core/spec/lib/adapter_helpers.rb",
92
- "lib/dm-core/spec/lib/collection_helpers.rb",
93
- "lib/dm-core/spec/lib/counter_adapter.rb",
94
- "lib/dm-core/spec/lib/pending_helpers.rb",
95
- "lib/dm-core/spec/lib/spec_helper.rb",
96
- "lib/dm-core/spec/setup.rb",
97
- "lib/dm-core/spec/shared/adapter_spec.rb",
98
- "lib/dm-core/spec/shared/public/property_spec.rb",
99
- "lib/dm-core/spec/shared/resource_spec.rb",
100
- "lib/dm-core/spec/shared/sel_spec.rb",
101
- "lib/dm-core/spec/shared/semipublic/property_spec.rb",
102
- "lib/dm-core/support/assertions.rb",
103
- "lib/dm-core/support/chainable.rb",
104
- "lib/dm-core/support/deprecate.rb",
105
- "lib/dm-core/support/descendant_set.rb",
106
- "lib/dm-core/support/equalizer.rb",
107
- "lib/dm-core/support/hook.rb",
108
- "lib/dm-core/support/lazy_array.rb",
109
- "lib/dm-core/support/local_object_space.rb",
110
- "lib/dm-core/support/logger.rb",
111
- "lib/dm-core/support/naming_conventions.rb",
112
- "lib/dm-core/support/subject.rb",
113
- "lib/dm-core/type.rb",
114
- "lib/dm-core/types/boolean.rb",
115
- "lib/dm-core/types/decimal.rb",
116
- "lib/dm-core/types/discriminator.rb",
117
- "lib/dm-core/types/object.rb",
118
- "lib/dm-core/types/serial.rb",
119
- "lib/dm-core/types/text.rb",
120
- "lib/dm-core/version.rb",
121
- "script/performance.rb",
122
- "script/profile.rb",
123
- "spec/lib/rspec_immediate_feedback_formatter.rb",
124
- "spec/public/associations/many_to_many/read_multiple_join_spec.rb",
125
- "spec/public/associations/many_to_many_spec.rb",
126
- "spec/public/associations/many_to_one_spec.rb",
127
- "spec/public/associations/many_to_one_with_boolean_cpk_spec.rb",
128
- "spec/public/associations/many_to_one_with_custom_fk_spec.rb",
129
- "spec/public/associations/one_to_many_spec.rb",
130
- "spec/public/associations/one_to_one_spec.rb",
131
- "spec/public/associations/one_to_one_with_boolean_cpk_spec.rb",
132
- "spec/public/collection_spec.rb",
133
- "spec/public/finalize_spec.rb",
134
- "spec/public/model/hook_spec.rb",
135
- "spec/public/model/property_spec.rb",
136
- "spec/public/model/relationship_spec.rb",
137
- "spec/public/model_spec.rb",
138
- "spec/public/property/binary_spec.rb",
139
- "spec/public/property/boolean_spec.rb",
140
- "spec/public/property/class_spec.rb",
141
- "spec/public/property/date_spec.rb",
142
- "spec/public/property/date_time_spec.rb",
143
- "spec/public/property/decimal_spec.rb",
144
- "spec/public/property/discriminator_spec.rb",
145
- "spec/public/property/float_spec.rb",
146
- "spec/public/property/integer_spec.rb",
147
- "spec/public/property/object_spec.rb",
148
- "spec/public/property/serial_spec.rb",
149
- "spec/public/property/string_spec.rb",
150
- "spec/public/property/text_spec.rb",
151
- "spec/public/property/time_spec.rb",
152
- "spec/public/property_spec.rb",
153
- "spec/public/resource_spec.rb",
154
- "spec/public/sel_spec.rb",
155
- "spec/public/setup_spec.rb",
156
- "spec/public/shared/association_collection_shared_spec.rb",
157
- "spec/public/shared/collection_finder_shared_spec.rb",
158
- "spec/public/shared/collection_shared_spec.rb",
159
- "spec/public/shared/finder_shared_spec.rb",
160
- "spec/rcov.opts",
161
- "spec/semipublic/adapters/abstract_adapter_spec.rb",
162
- "spec/semipublic/adapters/in_memory_adapter_spec.rb",
163
- "spec/semipublic/associations/many_to_many_spec.rb",
164
- "spec/semipublic/associations/many_to_one_spec.rb",
165
- "spec/semipublic/associations/one_to_many_spec.rb",
166
- "spec/semipublic/associations/one_to_one_spec.rb",
167
- "spec/semipublic/associations/relationship_spec.rb",
168
- "spec/semipublic/associations_spec.rb",
169
- "spec/semipublic/collection_spec.rb",
170
- "spec/semipublic/model_spec.rb",
171
- "spec/semipublic/property/binary_spec.rb",
172
- "spec/semipublic/property/boolean_spec.rb",
173
- "spec/semipublic/property/class_spec.rb",
174
- "spec/semipublic/property/date_spec.rb",
175
- "spec/semipublic/property/date_time_spec.rb",
176
- "spec/semipublic/property/decimal_spec.rb",
177
- "spec/semipublic/property/discriminator_spec.rb",
178
- "spec/semipublic/property/float_spec.rb",
179
- "spec/semipublic/property/integer_spec.rb",
180
- "spec/semipublic/property/lookup_spec.rb",
181
- "spec/semipublic/property/serial_spec.rb",
182
- "spec/semipublic/property/string_spec.rb",
183
- "spec/semipublic/property/text_spec.rb",
184
- "spec/semipublic/property/time_spec.rb",
185
- "spec/semipublic/property_spec.rb",
186
- "spec/semipublic/query/conditions/comparison_spec.rb",
187
- "spec/semipublic/query/conditions/operation_spec.rb",
188
- "spec/semipublic/query/path_spec.rb",
189
- "spec/semipublic/query_spec.rb",
190
- "spec/semipublic/resource/state/clean_spec.rb",
191
- "spec/semipublic/resource/state/deleted_spec.rb",
192
- "spec/semipublic/resource/state/dirty_spec.rb",
193
- "spec/semipublic/resource/state/immutable_spec.rb",
194
- "spec/semipublic/resource/state/transient_spec.rb",
195
- "spec/semipublic/resource/state_spec.rb",
196
- "spec/semipublic/resource_spec.rb",
197
- "spec/semipublic/shared/condition_shared_spec.rb",
198
- "spec/semipublic/shared/resource_shared_spec.rb",
199
- "spec/semipublic/shared/resource_state_shared_spec.rb",
200
- "spec/semipublic/shared/subject_shared_spec.rb",
201
- "spec/spec.opts",
202
- "spec/spec_helper.rb",
203
- "spec/support/properties/huge_integer.rb",
204
- "spec/unit/array_spec.rb",
205
- "spec/unit/hash_spec.rb",
206
- "spec/unit/hook_spec.rb",
207
- "spec/unit/lazy_array_spec.rb",
208
- "spec/unit/module_spec.rb",
209
- "spec/unit/object_spec.rb",
210
- "spec/unit/try_dup_spec.rb",
211
- "tasks/ci.rake",
212
- "tasks/local_gemfile.rake",
213
- "tasks/metrics.rake",
214
- "tasks/spec.rake",
215
- "tasks/yard.rake",
216
- "tasks/yardstick.rake"
21
+ ".document",
22
+ "Gemfile",
23
+ "LICENSE",
24
+ "README.rdoc",
25
+ "Rakefile",
26
+ "VERSION",
27
+ "dm-core.gemspec",
28
+ "lib/dm-core.rb",
29
+ "lib/dm-core/adapters.rb",
30
+ "lib/dm-core/adapters/abstract_adapter.rb",
31
+ "lib/dm-core/adapters/in_memory_adapter.rb",
32
+ "lib/dm-core/associations/many_to_many.rb",
33
+ "lib/dm-core/associations/many_to_one.rb",
34
+ "lib/dm-core/associations/one_to_many.rb",
35
+ "lib/dm-core/associations/one_to_one.rb",
36
+ "lib/dm-core/associations/relationship.rb",
37
+ "lib/dm-core/collection.rb",
38
+ "lib/dm-core/core_ext/array.rb",
39
+ "lib/dm-core/core_ext/hash.rb",
40
+ "lib/dm-core/core_ext/kernel.rb",
41
+ "lib/dm-core/core_ext/module.rb",
42
+ "lib/dm-core/core_ext/object.rb",
43
+ "lib/dm-core/core_ext/pathname.rb",
44
+ "lib/dm-core/core_ext/string.rb",
45
+ "lib/dm-core/core_ext/symbol.rb",
46
+ "lib/dm-core/core_ext/try_dup.rb",
47
+ "lib/dm-core/identity_map.rb",
48
+ "lib/dm-core/model.rb",
49
+ "lib/dm-core/model/hook.rb",
50
+ "lib/dm-core/model/is.rb",
51
+ "lib/dm-core/model/property.rb",
52
+ "lib/dm-core/model/relationship.rb",
53
+ "lib/dm-core/model/scope.rb",
54
+ "lib/dm-core/property.rb",
55
+ "lib/dm-core/property/binary.rb",
56
+ "lib/dm-core/property/boolean.rb",
57
+ "lib/dm-core/property/class.rb",
58
+ "lib/dm-core/property/date.rb",
59
+ "lib/dm-core/property/date_time.rb",
60
+ "lib/dm-core/property/decimal.rb",
61
+ "lib/dm-core/property/discriminator.rb",
62
+ "lib/dm-core/property/float.rb",
63
+ "lib/dm-core/property/integer.rb",
64
+ "lib/dm-core/property/lookup.rb",
65
+ "lib/dm-core/property/numeric.rb",
66
+ "lib/dm-core/property/object.rb",
67
+ "lib/dm-core/property/serial.rb",
68
+ "lib/dm-core/property/string.rb",
69
+ "lib/dm-core/property/text.rb",
70
+ "lib/dm-core/property/time.rb",
71
+ "lib/dm-core/property/typecast/numeric.rb",
72
+ "lib/dm-core/property/typecast/time.rb",
73
+ "lib/dm-core/property_set.rb",
74
+ "lib/dm-core/query.rb",
75
+ "lib/dm-core/query/conditions/comparison.rb",
76
+ "lib/dm-core/query/conditions/operation.rb",
77
+ "lib/dm-core/query/direction.rb",
78
+ "lib/dm-core/query/operator.rb",
79
+ "lib/dm-core/query/path.rb",
80
+ "lib/dm-core/query/sort.rb",
81
+ "lib/dm-core/relationship_set.rb",
82
+ "lib/dm-core/repository.rb",
83
+ "lib/dm-core/resource.rb",
84
+ "lib/dm-core/resource/state.rb",
85
+ "lib/dm-core/resource/state/clean.rb",
86
+ "lib/dm-core/resource/state/deleted.rb",
87
+ "lib/dm-core/resource/state/dirty.rb",
88
+ "lib/dm-core/resource/state/immutable.rb",
89
+ "lib/dm-core/resource/state/persisted.rb",
90
+ "lib/dm-core/resource/state/transient.rb",
91
+ "lib/dm-core/spec/lib/adapter_helpers.rb",
92
+ "lib/dm-core/spec/lib/collection_helpers.rb",
93
+ "lib/dm-core/spec/lib/counter_adapter.rb",
94
+ "lib/dm-core/spec/lib/pending_helpers.rb",
95
+ "lib/dm-core/spec/lib/spec_helper.rb",
96
+ "lib/dm-core/spec/setup.rb",
97
+ "lib/dm-core/spec/shared/adapter_spec.rb",
98
+ "lib/dm-core/spec/shared/public/property_spec.rb",
99
+ "lib/dm-core/spec/shared/resource_spec.rb",
100
+ "lib/dm-core/spec/shared/sel_spec.rb",
101
+ "lib/dm-core/spec/shared/semipublic/property_spec.rb",
102
+ "lib/dm-core/spec/shared/semipublic/query/conditions/abstract_comparison_spec.rb",
103
+ "lib/dm-core/support/assertions.rb",
104
+ "lib/dm-core/support/chainable.rb",
105
+ "lib/dm-core/support/deprecate.rb",
106
+ "lib/dm-core/support/descendant_set.rb",
107
+ "lib/dm-core/support/equalizer.rb",
108
+ "lib/dm-core/support/hook.rb",
109
+ "lib/dm-core/support/lazy_array.rb",
110
+ "lib/dm-core/support/local_object_space.rb",
111
+ "lib/dm-core/support/logger.rb",
112
+ "lib/dm-core/support/naming_conventions.rb",
113
+ "lib/dm-core/support/ordered_set.rb",
114
+ "lib/dm-core/support/subject.rb",
115
+ "lib/dm-core/support/subject_set.rb",
116
+ "lib/dm-core/version.rb",
117
+ "script/performance.rb",
118
+ "script/profile.rb",
119
+ "spec/lib/rspec_immediate_feedback_formatter.rb",
120
+ "spec/public/associations/many_to_many/read_multiple_join_spec.rb",
121
+ "spec/public/associations/many_to_many_spec.rb",
122
+ "spec/public/associations/many_to_one_spec.rb",
123
+ "spec/public/associations/many_to_one_with_boolean_cpk_spec.rb",
124
+ "spec/public/associations/many_to_one_with_custom_fk_spec.rb",
125
+ "spec/public/associations/one_to_many_spec.rb",
126
+ "spec/public/associations/one_to_one_spec.rb",
127
+ "spec/public/associations/one_to_one_with_boolean_cpk_spec.rb",
128
+ "spec/public/collection_spec.rb",
129
+ "spec/public/finalize_spec.rb",
130
+ "spec/public/model/hook_spec.rb",
131
+ "spec/public/model/property_spec.rb",
132
+ "spec/public/model/relationship_spec.rb",
133
+ "spec/public/model_spec.rb",
134
+ "spec/public/property/binary_spec.rb",
135
+ "spec/public/property/boolean_spec.rb",
136
+ "spec/public/property/class_spec.rb",
137
+ "spec/public/property/date_spec.rb",
138
+ "spec/public/property/date_time_spec.rb",
139
+ "spec/public/property/decimal_spec.rb",
140
+ "spec/public/property/discriminator_spec.rb",
141
+ "spec/public/property/float_spec.rb",
142
+ "spec/public/property/integer_spec.rb",
143
+ "spec/public/property/object_spec.rb",
144
+ "spec/public/property/serial_spec.rb",
145
+ "spec/public/property/string_spec.rb",
146
+ "spec/public/property/text_spec.rb",
147
+ "spec/public/property/time_spec.rb",
148
+ "spec/public/property_spec.rb",
149
+ "spec/public/resource_spec.rb",
150
+ "spec/public/sel_spec.rb",
151
+ "spec/public/setup_spec.rb",
152
+ "spec/public/shared/association_collection_shared_spec.rb",
153
+ "spec/public/shared/collection_finder_shared_spec.rb",
154
+ "spec/public/shared/collection_shared_spec.rb",
155
+ "spec/public/shared/finder_shared_spec.rb",
156
+ "spec/rcov.opts",
157
+ "spec/semipublic/adapters/abstract_adapter_spec.rb",
158
+ "spec/semipublic/adapters/in_memory_adapter_spec.rb",
159
+ "spec/semipublic/associations/many_to_many_spec.rb",
160
+ "spec/semipublic/associations/many_to_one_spec.rb",
161
+ "spec/semipublic/associations/one_to_many_spec.rb",
162
+ "spec/semipublic/associations/one_to_one_spec.rb",
163
+ "spec/semipublic/associations/relationship_spec.rb",
164
+ "spec/semipublic/associations_spec.rb",
165
+ "spec/semipublic/collection_spec.rb",
166
+ "spec/semipublic/model_spec.rb",
167
+ "spec/semipublic/property/binary_spec.rb",
168
+ "spec/semipublic/property/boolean_spec.rb",
169
+ "spec/semipublic/property/class_spec.rb",
170
+ "spec/semipublic/property/date_spec.rb",
171
+ "spec/semipublic/property/date_time_spec.rb",
172
+ "spec/semipublic/property/decimal_spec.rb",
173
+ "spec/semipublic/property/discriminator_spec.rb",
174
+ "spec/semipublic/property/float_spec.rb",
175
+ "spec/semipublic/property/integer_spec.rb",
176
+ "spec/semipublic/property/lookup_spec.rb",
177
+ "spec/semipublic/property/serial_spec.rb",
178
+ "spec/semipublic/property/string_spec.rb",
179
+ "spec/semipublic/property/text_spec.rb",
180
+ "spec/semipublic/property/time_spec.rb",
181
+ "spec/semipublic/property_spec.rb",
182
+ "spec/semipublic/query/conditions/comparison_spec.rb",
183
+ "spec/semipublic/query/conditions/operation_spec.rb",
184
+ "spec/semipublic/query/path_spec.rb",
185
+ "spec/semipublic/query_spec.rb",
186
+ "spec/semipublic/resource/state/clean_spec.rb",
187
+ "spec/semipublic/resource/state/deleted_spec.rb",
188
+ "spec/semipublic/resource/state/dirty_spec.rb",
189
+ "spec/semipublic/resource/state/immutable_spec.rb",
190
+ "spec/semipublic/resource/state/transient_spec.rb",
191
+ "spec/semipublic/resource/state_spec.rb",
192
+ "spec/semipublic/resource_spec.rb",
193
+ "spec/semipublic/shared/condition_shared_spec.rb",
194
+ "spec/semipublic/shared/resource_shared_spec.rb",
195
+ "spec/semipublic/shared/resource_state_shared_spec.rb",
196
+ "spec/semipublic/shared/subject_shared_spec.rb",
197
+ "spec/spec.opts",
198
+ "spec/spec_helper.rb",
199
+ "spec/support/properties/huge_integer.rb",
200
+ "spec/unit/array_spec.rb",
201
+ "spec/unit/data_mapper/ordered_set/append_spec.rb",
202
+ "spec/unit/data_mapper/ordered_set/clear_spec.rb",
203
+ "spec/unit/data_mapper/ordered_set/delete_spec.rb",
204
+ "spec/unit/data_mapper/ordered_set/each_spec.rb",
205
+ "spec/unit/data_mapper/ordered_set/empty_spec.rb",
206
+ "spec/unit/data_mapper/ordered_set/entries_spec.rb",
207
+ "spec/unit/data_mapper/ordered_set/eql_spec.rb",
208
+ "spec/unit/data_mapper/ordered_set/equal_value_spec.rb",
209
+ "spec/unit/data_mapper/ordered_set/hash_spec.rb",
210
+ "spec/unit/data_mapper/ordered_set/include_spec.rb",
211
+ "spec/unit/data_mapper/ordered_set/index_spec.rb",
212
+ "spec/unit/data_mapper/ordered_set/initialize_spec.rb",
213
+ "spec/unit/data_mapper/ordered_set/merge_spec.rb",
214
+ "spec/unit/data_mapper/ordered_set/shared/append_spec.rb",
215
+ "spec/unit/data_mapper/ordered_set/shared/clear_spec.rb",
216
+ "spec/unit/data_mapper/ordered_set/shared/delete_spec.rb",
217
+ "spec/unit/data_mapper/ordered_set/shared/each_spec.rb",
218
+ "spec/unit/data_mapper/ordered_set/shared/empty_spec.rb",
219
+ "spec/unit/data_mapper/ordered_set/shared/entries_spec.rb",
220
+ "spec/unit/data_mapper/ordered_set/shared/include_spec.rb",
221
+ "spec/unit/data_mapper/ordered_set/shared/index_spec.rb",
222
+ "spec/unit/data_mapper/ordered_set/shared/initialize_spec.rb",
223
+ "spec/unit/data_mapper/ordered_set/shared/merge_spec.rb",
224
+ "spec/unit/data_mapper/ordered_set/shared/size_spec.rb",
225
+ "spec/unit/data_mapper/ordered_set/shared/to_ary_spec.rb",
226
+ "spec/unit/data_mapper/ordered_set/size_spec.rb",
227
+ "spec/unit/data_mapper/ordered_set/to_ary_spec.rb",
228
+ "spec/unit/data_mapper/subject_set/append_spec.rb",
229
+ "spec/unit/data_mapper/subject_set/clear_spec.rb",
230
+ "spec/unit/data_mapper/subject_set/delete_spec.rb",
231
+ "spec/unit/data_mapper/subject_set/each_spec.rb",
232
+ "spec/unit/data_mapper/subject_set/empty_spec.rb",
233
+ "spec/unit/data_mapper/subject_set/entries_spec.rb",
234
+ "spec/unit/data_mapper/subject_set/get_spec.rb",
235
+ "spec/unit/data_mapper/subject_set/include_spec.rb",
236
+ "spec/unit/data_mapper/subject_set/named_spec.rb",
237
+ "spec/unit/data_mapper/subject_set/shared/append_spec.rb",
238
+ "spec/unit/data_mapper/subject_set/shared/clear_spec.rb",
239
+ "spec/unit/data_mapper/subject_set/shared/delete_spec.rb",
240
+ "spec/unit/data_mapper/subject_set/shared/each_spec.rb",
241
+ "spec/unit/data_mapper/subject_set/shared/empty_spec.rb",
242
+ "spec/unit/data_mapper/subject_set/shared/entries_spec.rb",
243
+ "spec/unit/data_mapper/subject_set/shared/get_spec.rb",
244
+ "spec/unit/data_mapper/subject_set/shared/include_spec.rb",
245
+ "spec/unit/data_mapper/subject_set/shared/named_spec.rb",
246
+ "spec/unit/data_mapper/subject_set/shared/size_spec.rb",
247
+ "spec/unit/data_mapper/subject_set/shared/to_ary_spec.rb",
248
+ "spec/unit/data_mapper/subject_set/shared/values_at_spec.rb",
249
+ "spec/unit/data_mapper/subject_set/size_spec.rb",
250
+ "spec/unit/data_mapper/subject_set/to_ary_spec.rb",
251
+ "spec/unit/data_mapper/subject_set/values_at_spec.rb",
252
+ "spec/unit/hash_spec.rb",
253
+ "spec/unit/hook_spec.rb",
254
+ "spec/unit/lazy_array_spec.rb",
255
+ "spec/unit/module_spec.rb",
256
+ "spec/unit/object_spec.rb",
257
+ "spec/unit/try_dup_spec.rb",
258
+ "tasks/ci.rake",
259
+ "tasks/spec.rake",
260
+ "tasks/yard.rake",
261
+ "tasks/yardstick.rake"
217
262
  ]
218
- s.has_rdoc = %q{yard}
219
263
  s.homepage = %q{http://github.com/datamapper/dm-core}
220
- s.rdoc_options = ["--charset=UTF-8"]
221
264
  s.require_paths = ["lib"]
222
265
  s.rubyforge_project = %q{datamapper}
223
- s.rubygems_version = %q{1.3.7}
266
+ s.rubygems_version = %q{1.5.2}
224
267
  s.summary = %q{An Object/Relational Mapper for Ruby}
225
268
  s.test_files = [
226
269
  "spec/lib/rspec_immediate_feedback_formatter.rb",
227
- "spec/public/associations/many_to_many/read_multiple_join_spec.rb",
228
- "spec/public/associations/many_to_many_spec.rb",
229
- "spec/public/associations/many_to_one_spec.rb",
230
- "spec/public/associations/many_to_one_with_boolean_cpk_spec.rb",
231
- "spec/public/associations/many_to_one_with_custom_fk_spec.rb",
232
- "spec/public/associations/one_to_many_spec.rb",
233
- "spec/public/associations/one_to_one_spec.rb",
234
- "spec/public/associations/one_to_one_with_boolean_cpk_spec.rb",
235
- "spec/public/collection_spec.rb",
236
- "spec/public/finalize_spec.rb",
237
- "spec/public/model/hook_spec.rb",
238
- "spec/public/model/property_spec.rb",
239
- "spec/public/model/relationship_spec.rb",
240
- "spec/public/model_spec.rb",
241
- "spec/public/property/binary_spec.rb",
242
- "spec/public/property/boolean_spec.rb",
243
- "spec/public/property/class_spec.rb",
244
- "spec/public/property/date_spec.rb",
245
- "spec/public/property/date_time_spec.rb",
246
- "spec/public/property/decimal_spec.rb",
247
- "spec/public/property/discriminator_spec.rb",
248
- "spec/public/property/float_spec.rb",
249
- "spec/public/property/integer_spec.rb",
250
- "spec/public/property/object_spec.rb",
251
- "spec/public/property/serial_spec.rb",
252
- "spec/public/property/string_spec.rb",
253
- "spec/public/property/text_spec.rb",
254
- "spec/public/property/time_spec.rb",
255
- "spec/public/property_spec.rb",
256
- "spec/public/resource_spec.rb",
257
- "spec/public/sel_spec.rb",
258
- "spec/public/setup_spec.rb",
259
- "spec/public/shared/association_collection_shared_spec.rb",
260
- "spec/public/shared/collection_finder_shared_spec.rb",
261
- "spec/public/shared/collection_shared_spec.rb",
262
- "spec/public/shared/finder_shared_spec.rb",
263
- "spec/semipublic/adapters/abstract_adapter_spec.rb",
264
- "spec/semipublic/adapters/in_memory_adapter_spec.rb",
265
- "spec/semipublic/associations/many_to_many_spec.rb",
266
- "spec/semipublic/associations/many_to_one_spec.rb",
267
- "spec/semipublic/associations/one_to_many_spec.rb",
268
- "spec/semipublic/associations/one_to_one_spec.rb",
269
- "spec/semipublic/associations/relationship_spec.rb",
270
- "spec/semipublic/associations_spec.rb",
271
- "spec/semipublic/collection_spec.rb",
272
- "spec/semipublic/model_spec.rb",
273
- "spec/semipublic/property/binary_spec.rb",
274
- "spec/semipublic/property/boolean_spec.rb",
275
- "spec/semipublic/property/class_spec.rb",
276
- "spec/semipublic/property/date_spec.rb",
277
- "spec/semipublic/property/date_time_spec.rb",
278
- "spec/semipublic/property/decimal_spec.rb",
279
- "spec/semipublic/property/discriminator_spec.rb",
280
- "spec/semipublic/property/float_spec.rb",
281
- "spec/semipublic/property/integer_spec.rb",
282
- "spec/semipublic/property/lookup_spec.rb",
283
- "spec/semipublic/property/serial_spec.rb",
284
- "spec/semipublic/property/string_spec.rb",
285
- "spec/semipublic/property/text_spec.rb",
286
- "spec/semipublic/property/time_spec.rb",
287
- "spec/semipublic/property_spec.rb",
288
- "spec/semipublic/query/conditions/comparison_spec.rb",
289
- "spec/semipublic/query/conditions/operation_spec.rb",
290
- "spec/semipublic/query/path_spec.rb",
291
- "spec/semipublic/query_spec.rb",
292
- "spec/semipublic/resource/state/clean_spec.rb",
293
- "spec/semipublic/resource/state/deleted_spec.rb",
294
- "spec/semipublic/resource/state/dirty_spec.rb",
295
- "spec/semipublic/resource/state/immutable_spec.rb",
296
- "spec/semipublic/resource/state/transient_spec.rb",
297
- "spec/semipublic/resource/state_spec.rb",
298
- "spec/semipublic/resource_spec.rb",
299
- "spec/semipublic/shared/condition_shared_spec.rb",
300
- "spec/semipublic/shared/resource_shared_spec.rb",
301
- "spec/semipublic/shared/resource_state_shared_spec.rb",
302
- "spec/semipublic/shared/subject_shared_spec.rb",
303
- "spec/spec_helper.rb",
304
- "spec/support/properties/huge_integer.rb",
305
- "spec/unit/array_spec.rb",
306
- "spec/unit/hash_spec.rb",
307
- "spec/unit/hook_spec.rb",
308
- "spec/unit/lazy_array_spec.rb",
309
- "spec/unit/module_spec.rb",
310
- "spec/unit/object_spec.rb",
311
- "spec/unit/try_dup_spec.rb"
270
+ "spec/public/associations/many_to_many/read_multiple_join_spec.rb",
271
+ "spec/public/associations/many_to_many_spec.rb",
272
+ "spec/public/associations/many_to_one_spec.rb",
273
+ "spec/public/associations/many_to_one_with_boolean_cpk_spec.rb",
274
+ "spec/public/associations/many_to_one_with_custom_fk_spec.rb",
275
+ "spec/public/associations/one_to_many_spec.rb",
276
+ "spec/public/associations/one_to_one_spec.rb",
277
+ "spec/public/associations/one_to_one_with_boolean_cpk_spec.rb",
278
+ "spec/public/collection_spec.rb",
279
+ "spec/public/finalize_spec.rb",
280
+ "spec/public/model/hook_spec.rb",
281
+ "spec/public/model/property_spec.rb",
282
+ "spec/public/model/relationship_spec.rb",
283
+ "spec/public/model_spec.rb",
284
+ "spec/public/property/binary_spec.rb",
285
+ "spec/public/property/boolean_spec.rb",
286
+ "spec/public/property/class_spec.rb",
287
+ "spec/public/property/date_spec.rb",
288
+ "spec/public/property/date_time_spec.rb",
289
+ "spec/public/property/decimal_spec.rb",
290
+ "spec/public/property/discriminator_spec.rb",
291
+ "spec/public/property/float_spec.rb",
292
+ "spec/public/property/integer_spec.rb",
293
+ "spec/public/property/object_spec.rb",
294
+ "spec/public/property/serial_spec.rb",
295
+ "spec/public/property/string_spec.rb",
296
+ "spec/public/property/text_spec.rb",
297
+ "spec/public/property/time_spec.rb",
298
+ "spec/public/property_spec.rb",
299
+ "spec/public/resource_spec.rb",
300
+ "spec/public/sel_spec.rb",
301
+ "spec/public/setup_spec.rb",
302
+ "spec/public/shared/association_collection_shared_spec.rb",
303
+ "spec/public/shared/collection_finder_shared_spec.rb",
304
+ "spec/public/shared/collection_shared_spec.rb",
305
+ "spec/public/shared/finder_shared_spec.rb",
306
+ "spec/semipublic/adapters/abstract_adapter_spec.rb",
307
+ "spec/semipublic/adapters/in_memory_adapter_spec.rb",
308
+ "spec/semipublic/associations/many_to_many_spec.rb",
309
+ "spec/semipublic/associations/many_to_one_spec.rb",
310
+ "spec/semipublic/associations/one_to_many_spec.rb",
311
+ "spec/semipublic/associations/one_to_one_spec.rb",
312
+ "spec/semipublic/associations/relationship_spec.rb",
313
+ "spec/semipublic/associations_spec.rb",
314
+ "spec/semipublic/collection_spec.rb",
315
+ "spec/semipublic/model_spec.rb",
316
+ "spec/semipublic/property/binary_spec.rb",
317
+ "spec/semipublic/property/boolean_spec.rb",
318
+ "spec/semipublic/property/class_spec.rb",
319
+ "spec/semipublic/property/date_spec.rb",
320
+ "spec/semipublic/property/date_time_spec.rb",
321
+ "spec/semipublic/property/decimal_spec.rb",
322
+ "spec/semipublic/property/discriminator_spec.rb",
323
+ "spec/semipublic/property/float_spec.rb",
324
+ "spec/semipublic/property/integer_spec.rb",
325
+ "spec/semipublic/property/lookup_spec.rb",
326
+ "spec/semipublic/property/serial_spec.rb",
327
+ "spec/semipublic/property/string_spec.rb",
328
+ "spec/semipublic/property/text_spec.rb",
329
+ "spec/semipublic/property/time_spec.rb",
330
+ "spec/semipublic/property_spec.rb",
331
+ "spec/semipublic/query/conditions/comparison_spec.rb",
332
+ "spec/semipublic/query/conditions/operation_spec.rb",
333
+ "spec/semipublic/query/path_spec.rb",
334
+ "spec/semipublic/query_spec.rb",
335
+ "spec/semipublic/resource/state/clean_spec.rb",
336
+ "spec/semipublic/resource/state/deleted_spec.rb",
337
+ "spec/semipublic/resource/state/dirty_spec.rb",
338
+ "spec/semipublic/resource/state/immutable_spec.rb",
339
+ "spec/semipublic/resource/state/transient_spec.rb",
340
+ "spec/semipublic/resource/state_spec.rb",
341
+ "spec/semipublic/resource_spec.rb",
342
+ "spec/semipublic/shared/condition_shared_spec.rb",
343
+ "spec/semipublic/shared/resource_shared_spec.rb",
344
+ "spec/semipublic/shared/resource_state_shared_spec.rb",
345
+ "spec/semipublic/shared/subject_shared_spec.rb",
346
+ "spec/spec_helper.rb",
347
+ "spec/support/properties/huge_integer.rb",
348
+ "spec/unit/array_spec.rb",
349
+ "spec/unit/data_mapper/ordered_set/append_spec.rb",
350
+ "spec/unit/data_mapper/ordered_set/clear_spec.rb",
351
+ "spec/unit/data_mapper/ordered_set/delete_spec.rb",
352
+ "spec/unit/data_mapper/ordered_set/each_spec.rb",
353
+ "spec/unit/data_mapper/ordered_set/empty_spec.rb",
354
+ "spec/unit/data_mapper/ordered_set/entries_spec.rb",
355
+ "spec/unit/data_mapper/ordered_set/eql_spec.rb",
356
+ "spec/unit/data_mapper/ordered_set/equal_value_spec.rb",
357
+ "spec/unit/data_mapper/ordered_set/hash_spec.rb",
358
+ "spec/unit/data_mapper/ordered_set/include_spec.rb",
359
+ "spec/unit/data_mapper/ordered_set/index_spec.rb",
360
+ "spec/unit/data_mapper/ordered_set/initialize_spec.rb",
361
+ "spec/unit/data_mapper/ordered_set/merge_spec.rb",
362
+ "spec/unit/data_mapper/ordered_set/shared/append_spec.rb",
363
+ "spec/unit/data_mapper/ordered_set/shared/clear_spec.rb",
364
+ "spec/unit/data_mapper/ordered_set/shared/delete_spec.rb",
365
+ "spec/unit/data_mapper/ordered_set/shared/each_spec.rb",
366
+ "spec/unit/data_mapper/ordered_set/shared/empty_spec.rb",
367
+ "spec/unit/data_mapper/ordered_set/shared/entries_spec.rb",
368
+ "spec/unit/data_mapper/ordered_set/shared/include_spec.rb",
369
+ "spec/unit/data_mapper/ordered_set/shared/index_spec.rb",
370
+ "spec/unit/data_mapper/ordered_set/shared/initialize_spec.rb",
371
+ "spec/unit/data_mapper/ordered_set/shared/merge_spec.rb",
372
+ "spec/unit/data_mapper/ordered_set/shared/size_spec.rb",
373
+ "spec/unit/data_mapper/ordered_set/shared/to_ary_spec.rb",
374
+ "spec/unit/data_mapper/ordered_set/size_spec.rb",
375
+ "spec/unit/data_mapper/ordered_set/to_ary_spec.rb",
376
+ "spec/unit/data_mapper/subject_set/append_spec.rb",
377
+ "spec/unit/data_mapper/subject_set/clear_spec.rb",
378
+ "spec/unit/data_mapper/subject_set/delete_spec.rb",
379
+ "spec/unit/data_mapper/subject_set/each_spec.rb",
380
+ "spec/unit/data_mapper/subject_set/empty_spec.rb",
381
+ "spec/unit/data_mapper/subject_set/entries_spec.rb",
382
+ "spec/unit/data_mapper/subject_set/get_spec.rb",
383
+ "spec/unit/data_mapper/subject_set/include_spec.rb",
384
+ "spec/unit/data_mapper/subject_set/named_spec.rb",
385
+ "spec/unit/data_mapper/subject_set/shared/append_spec.rb",
386
+ "spec/unit/data_mapper/subject_set/shared/clear_spec.rb",
387
+ "spec/unit/data_mapper/subject_set/shared/delete_spec.rb",
388
+ "spec/unit/data_mapper/subject_set/shared/each_spec.rb",
389
+ "spec/unit/data_mapper/subject_set/shared/empty_spec.rb",
390
+ "spec/unit/data_mapper/subject_set/shared/entries_spec.rb",
391
+ "spec/unit/data_mapper/subject_set/shared/get_spec.rb",
392
+ "spec/unit/data_mapper/subject_set/shared/include_spec.rb",
393
+ "spec/unit/data_mapper/subject_set/shared/named_spec.rb",
394
+ "spec/unit/data_mapper/subject_set/shared/size_spec.rb",
395
+ "spec/unit/data_mapper/subject_set/shared/to_ary_spec.rb",
396
+ "spec/unit/data_mapper/subject_set/shared/values_at_spec.rb",
397
+ "spec/unit/data_mapper/subject_set/size_spec.rb",
398
+ "spec/unit/data_mapper/subject_set/to_ary_spec.rb",
399
+ "spec/unit/data_mapper/subject_set/values_at_spec.rb",
400
+ "spec/unit/hash_spec.rb",
401
+ "spec/unit/hook_spec.rb",
402
+ "spec/unit/lazy_array_spec.rb",
403
+ "spec/unit/module_spec.rb",
404
+ "spec/unit/object_spec.rb",
405
+ "spec/unit/try_dup_spec.rb"
312
406
  ]
313
407
 
314
408
  if s.respond_to? :specification_version then
315
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
316
409
  s.specification_version = 3
317
410
 
318
411
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
319
- s.add_runtime_dependency(%q<extlib>, ["~> 0.9.15"])
412
+ s.add_runtime_dependency(%q<activesupport>, ["~> 3.0.4"])
413
+ s.add_runtime_dependency(%q<i18n>, ["~> 0.5.0"])
320
414
  s.add_runtime_dependency(%q<addressable>, ["~> 2.2"])
321
- s.add_development_dependency(%q<rspec>, ["~> 1.3"])
322
- s.add_development_dependency(%q<jeweler>, ["~> 1.4"])
415
+ s.add_development_dependency(%q<jeweler>, ["~> 1.5.2"])
416
+ s.add_development_dependency(%q<rake>, ["~> 0.8.7"])
417
+ s.add_development_dependency(%q<rspec>, ["~> 1.3.1"])
323
418
  else
324
- s.add_dependency(%q<extlib>, ["~> 0.9.15"])
419
+ s.add_dependency(%q<activesupport>, ["~> 3.0.4"])
420
+ s.add_dependency(%q<i18n>, ["~> 0.5.0"])
325
421
  s.add_dependency(%q<addressable>, ["~> 2.2"])
326
- s.add_dependency(%q<rspec>, ["~> 1.3"])
327
- s.add_dependency(%q<jeweler>, ["~> 1.4"])
422
+ s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
423
+ s.add_dependency(%q<rake>, ["~> 0.8.7"])
424
+ s.add_dependency(%q<rspec>, ["~> 1.3.1"])
328
425
  end
329
426
  else
330
- s.add_dependency(%q<extlib>, ["~> 0.9.15"])
427
+ s.add_dependency(%q<activesupport>, ["~> 3.0.4"])
428
+ s.add_dependency(%q<i18n>, ["~> 0.5.0"])
331
429
  s.add_dependency(%q<addressable>, ["~> 2.2"])
332
- s.add_dependency(%q<rspec>, ["~> 1.3"])
333
- s.add_dependency(%q<jeweler>, ["~> 1.4"])
430
+ s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
431
+ s.add_dependency(%q<rake>, ["~> 0.8.7"])
432
+ s.add_dependency(%q<rspec>, ["~> 1.3.1"])
334
433
  end
335
434
  end
336
435