dm-core 0.10.2 → 1.0.0.rc1
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.
- data/.gitignore +10 -1
- data/Gemfile +143 -0
- data/Rakefile +9 -5
- data/VERSION +1 -1
- data/dm-core.gemspec +160 -57
- data/lib/dm-core.rb +131 -56
- data/lib/dm-core/adapters.rb +98 -14
- data/lib/dm-core/adapters/abstract_adapter.rb +24 -4
- data/lib/dm-core/adapters/in_memory_adapter.rb +7 -2
- data/lib/dm-core/associations/many_to_many.rb +19 -30
- data/lib/dm-core/associations/many_to_one.rb +58 -42
- data/lib/dm-core/associations/one_to_many.rb +33 -23
- data/lib/dm-core/associations/one_to_one.rb +27 -11
- data/lib/dm-core/associations/relationship.rb +4 -4
- data/lib/dm-core/collection.rb +23 -16
- data/lib/dm-core/core_ext/array.rb +36 -0
- data/lib/dm-core/core_ext/hash.rb +30 -0
- data/lib/dm-core/core_ext/module.rb +46 -0
- data/lib/dm-core/core_ext/object.rb +31 -0
- data/lib/dm-core/core_ext/pathname.rb +20 -0
- data/lib/dm-core/core_ext/string.rb +22 -0
- data/lib/dm-core/core_ext/try_dup.rb +44 -0
- data/lib/dm-core/model.rb +88 -27
- data/lib/dm-core/model/hook.rb +75 -18
- data/lib/dm-core/model/property.rb +50 -9
- data/lib/dm-core/model/relationship.rb +31 -31
- data/lib/dm-core/model/scope.rb +3 -3
- data/lib/dm-core/property.rb +196 -516
- data/lib/dm-core/property/binary.rb +7 -0
- data/lib/dm-core/property/boolean.rb +35 -0
- data/lib/dm-core/property/class.rb +24 -0
- data/lib/dm-core/property/date.rb +47 -0
- data/lib/dm-core/property/date_time.rb +48 -0
- data/lib/dm-core/property/decimal.rb +43 -0
- data/lib/dm-core/property/discriminator.rb +48 -0
- data/lib/dm-core/property/float.rb +24 -0
- data/lib/dm-core/property/integer.rb +32 -0
- data/lib/dm-core/property/numeric.rb +43 -0
- data/lib/dm-core/property/object.rb +32 -0
- data/lib/dm-core/property/serial.rb +8 -0
- data/lib/dm-core/property/string.rb +49 -0
- data/lib/dm-core/property/text.rb +12 -0
- data/lib/dm-core/property/time.rb +48 -0
- data/lib/dm-core/property/typecast/numeric.rb +32 -0
- data/lib/dm-core/property/typecast/time.rb +28 -0
- data/lib/dm-core/property_set.rb +10 -4
- data/lib/dm-core/query.rb +14 -37
- data/lib/dm-core/query/conditions/comparison.rb +8 -6
- data/lib/dm-core/query/conditions/operation.rb +33 -2
- data/lib/dm-core/query/operator.rb +2 -5
- data/lib/dm-core/query/path.rb +4 -6
- data/lib/dm-core/repository.rb +21 -6
- data/lib/dm-core/resource.rb +316 -133
- data/lib/dm-core/resource/state.rb +79 -0
- data/lib/dm-core/resource/state/clean.rb +40 -0
- data/lib/dm-core/resource/state/deleted.rb +30 -0
- data/lib/dm-core/resource/state/dirty.rb +86 -0
- data/lib/dm-core/resource/state/immutable.rb +34 -0
- data/lib/dm-core/resource/state/persisted.rb +29 -0
- data/lib/dm-core/resource/state/transient.rb +70 -0
- data/lib/dm-core/spec/lib/adapter_helpers.rb +52 -0
- data/lib/dm-core/spec/lib/collection_helpers.rb +20 -0
- data/{spec → lib/dm-core/spec}/lib/counter_adapter.rb +5 -1
- data/lib/dm-core/spec/lib/pending_helpers.rb +50 -0
- data/lib/dm-core/spec/lib/spec_helper.rb +68 -0
- data/lib/dm-core/spec/setup.rb +165 -0
- data/lib/dm-core/spec/{adapter_shared_spec.rb → shared/adapter_spec.rb} +21 -7
- data/{spec/public/shared/resource_shared_spec.rb → lib/dm-core/spec/shared/resource_spec.rb} +120 -83
- data/{spec/public/shared/sel_shared_spec.rb → lib/dm-core/spec/shared/sel_spec.rb} +5 -6
- data/lib/dm-core/support/assertions.rb +8 -0
- data/lib/dm-core/support/equalizer.rb +1 -0
- data/lib/dm-core/support/hook.rb +420 -0
- data/lib/dm-core/support/lazy_array.rb +453 -0
- data/lib/dm-core/support/local_object_space.rb +12 -0
- data/lib/dm-core/support/logger.rb +193 -6
- data/lib/dm-core/support/naming_conventions.rb +8 -8
- data/lib/dm-core/support/subject.rb +33 -0
- data/lib/dm-core/type.rb +4 -0
- data/lib/dm-core/types/boolean.rb +2 -0
- data/lib/dm-core/types/decimal.rb +9 -0
- data/lib/dm-core/types/discriminator.rb +2 -0
- data/lib/dm-core/types/object.rb +3 -0
- data/lib/dm-core/types/serial.rb +2 -0
- data/lib/dm-core/types/text.rb +2 -0
- data/lib/dm-core/version.rb +1 -1
- data/spec/public/associations/many_to_many/read_multiple_join_spec.rb +67 -0
- data/spec/public/model/hook_spec.rb +209 -0
- data/spec/public/model/property_spec.rb +35 -0
- data/spec/public/model/relationship_spec.rb +33 -20
- data/spec/public/model_spec.rb +142 -10
- data/spec/public/property/binary_spec.rb +14 -0
- data/spec/public/property/boolean_spec.rb +14 -0
- data/spec/public/property/class_spec.rb +20 -0
- data/spec/public/property/date_spec.rb +14 -0
- data/spec/public/property/date_time_spec.rb +14 -0
- data/spec/public/property/decimal_spec.rb +14 -0
- data/spec/public/{types → property}/discriminator_spec.rb +2 -12
- data/spec/public/property/float_spec.rb +14 -0
- data/spec/public/property/integer_spec.rb +14 -0
- data/spec/public/property/object_spec.rb +9 -17
- data/spec/public/property/serial_spec.rb +14 -0
- data/spec/public/property/string_spec.rb +14 -0
- data/spec/public/property/text_spec.rb +52 -0
- data/spec/public/property/time_spec.rb +14 -0
- data/spec/public/property_spec.rb +28 -87
- data/spec/public/resource_spec.rb +101 -0
- data/spec/public/sel_spec.rb +5 -15
- data/spec/public/shared/collection_shared_spec.rb +16 -30
- data/spec/public/shared/finder_shared_spec.rb +2 -4
- data/spec/public/shared/property_shared_spec.rb +176 -0
- data/spec/semipublic/adapters/abstract_adapter_spec.rb +1 -1
- data/spec/semipublic/adapters/in_memory_adapter_spec.rb +2 -2
- data/spec/semipublic/associations/many_to_many_spec.rb +89 -0
- data/spec/semipublic/associations/many_to_one_spec.rb +24 -1
- data/spec/semipublic/associations/one_to_many_spec.rb +51 -0
- data/spec/semipublic/associations/one_to_one_spec.rb +49 -0
- data/spec/semipublic/associations/relationship_spec.rb +3 -3
- data/spec/semipublic/associations_spec.rb +1 -1
- data/spec/semipublic/property/binary_spec.rb +13 -0
- data/spec/semipublic/property/boolean_spec.rb +65 -0
- data/spec/semipublic/property/class_spec.rb +33 -0
- data/spec/semipublic/property/date_spec.rb +43 -0
- data/spec/semipublic/property/date_time_spec.rb +46 -0
- data/spec/semipublic/property/decimal_spec.rb +82 -0
- data/spec/semipublic/property/discriminator_spec.rb +19 -0
- data/spec/semipublic/property/float_spec.rb +82 -0
- data/spec/semipublic/property/integer_spec.rb +82 -0
- data/spec/semipublic/property/serial_spec.rb +13 -0
- data/spec/semipublic/property/string_spec.rb +13 -0
- data/spec/semipublic/property/text_spec.rb +31 -0
- data/spec/semipublic/property/time_spec.rb +50 -0
- data/spec/semipublic/property_spec.rb +2 -532
- data/spec/semipublic/query/conditions/comparison_spec.rb +171 -169
- data/spec/semipublic/query/conditions/operation_spec.rb +53 -51
- data/spec/semipublic/query/path_spec.rb +17 -17
- data/spec/semipublic/query_spec.rb +47 -78
- data/spec/semipublic/resource/state/clean_spec.rb +88 -0
- data/spec/semipublic/resource/state/deleted_spec.rb +78 -0
- data/spec/semipublic/resource/state/dirty_spec.rb +133 -0
- data/spec/semipublic/resource/state/immutable_spec.rb +99 -0
- data/spec/semipublic/resource/state/transient_spec.rb +128 -0
- data/spec/semipublic/resource/state_spec.rb +226 -0
- data/spec/semipublic/shared/property_shared_spec.rb +143 -0
- data/spec/semipublic/shared/resource_shared_spec.rb +16 -15
- data/spec/semipublic/shared/resource_state_shared_spec.rb +78 -0
- data/spec/semipublic/shared/subject_shared_spec.rb +79 -0
- data/spec/spec_helper.rb +21 -97
- data/spec/support/types/huge_integer.rb +17 -0
- data/spec/unit/array_spec.rb +48 -0
- data/spec/unit/hash_spec.rb +35 -0
- data/spec/unit/hook_spec.rb +1234 -0
- data/spec/unit/lazy_array_spec.rb +1959 -0
- data/spec/unit/module_spec.rb +70 -0
- data/spec/unit/object_spec.rb +37 -0
- data/spec/unit/try_dup_spec.rb +45 -0
- data/tasks/local_gemfile.rake +18 -0
- data/tasks/spec.rake +0 -3
- metadata +197 -71
- data/deps.rip +0 -2
- data/lib/dm-core/adapters/data_objects_adapter.rb +0 -712
- data/lib/dm-core/adapters/mysql_adapter.rb +0 -42
- data/lib/dm-core/adapters/oracle_adapter.rb +0 -229
- data/lib/dm-core/adapters/postgres_adapter.rb +0 -22
- data/lib/dm-core/adapters/sqlite3_adapter.rb +0 -17
- data/lib/dm-core/adapters/sqlserver_adapter.rb +0 -114
- data/lib/dm-core/adapters/yaml_adapter.rb +0 -111
- data/lib/dm-core/core_ext/enumerable.rb +0 -28
- data/lib/dm-core/migrations.rb +0 -1427
- data/lib/dm-core/spec/data_objects_adapter_shared_spec.rb +0 -366
- data/lib/dm-core/transaction.rb +0 -508
- data/lib/dm-core/types/paranoid_boolean.rb +0 -42
- data/lib/dm-core/types/paranoid_datetime.rb +0 -41
- data/spec/lib/adapter_helpers.rb +0 -105
- data/spec/lib/collection_helpers.rb +0 -18
- data/spec/lib/pending_helpers.rb +0 -46
- data/spec/public/migrations_spec.rb +0 -503
- data/spec/public/transaction_spec.rb +0 -153
- data/spec/semipublic/adapters/mysql_adapter_spec.rb +0 -17
- data/spec/semipublic/adapters/oracle_adapter_spec.rb +0 -194
- data/spec/semipublic/adapters/postgres_adapter_spec.rb +0 -17
- data/spec/semipublic/adapters/sqlite3_adapter_spec.rb +0 -17
- data/spec/semipublic/adapters/sqlserver_adapter_spec.rb +0 -17
- data/spec/semipublic/adapters/yaml_adapter_spec.rb +0 -12
data/.gitignore
CHANGED
@@ -13,7 +13,11 @@ tmtags
|
|
13
13
|
## VIM
|
14
14
|
*.swp
|
15
15
|
|
16
|
+
## Rubinius
|
17
|
+
*.rbc
|
18
|
+
|
16
19
|
## PROJECT::GENERAL
|
20
|
+
*.gem
|
17
21
|
coverage
|
18
22
|
rdoc
|
19
23
|
pkg
|
@@ -21,7 +25,12 @@ tmp
|
|
21
25
|
doc
|
22
26
|
log
|
23
27
|
.yardoc
|
28
|
+
measurements
|
24
29
|
|
25
|
-
##
|
30
|
+
## BUNDLER
|
31
|
+
.bundle
|
32
|
+
Gemfile.local
|
33
|
+
Gemfile.lock
|
26
34
|
|
35
|
+
## PROJECT::SPECIFIC
|
27
36
|
spec/db/
|
data/Gemfile
ADDED
@@ -0,0 +1,143 @@
|
|
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.
|
70
|
+
|
71
|
+
source 'http://rubygems.org'
|
72
|
+
|
73
|
+
DATAMAPPER = 'git://github.com/datamapper'
|
74
|
+
DM_VERSION = '~> 1.0.0.rc1'
|
75
|
+
|
76
|
+
group :runtime do # Runtime dependencies (as in the gemspec)
|
77
|
+
|
78
|
+
if ENV['EXTLIB']
|
79
|
+
gem 'extlib', '~> 0.9.15', :git => "#{DATAMAPPER}/extlib.git"
|
80
|
+
else
|
81
|
+
gem 'activesupport', '~> 3.0.0.beta3', :git => 'git://github.com/rails/rails.git', :require => nil
|
82
|
+
end
|
83
|
+
|
84
|
+
gem 'addressable', '~> 2.1'
|
85
|
+
|
86
|
+
end
|
87
|
+
|
88
|
+
group(:development) do # Development dependencies (as in the gemspec)
|
89
|
+
|
90
|
+
gem 'rake', '~> 0.8.7'
|
91
|
+
gem 'rspec', '~> 1.3'
|
92
|
+
gem 'jeweler', '~> 1.4'
|
93
|
+
|
94
|
+
end
|
95
|
+
|
96
|
+
group :quality do # These gems contain rake tasks that check the quality of the source code
|
97
|
+
|
98
|
+
gem 'metric_fu', '~> 1.3'
|
99
|
+
gem 'rcov', '~> 0.9.7'
|
100
|
+
gem 'reek', '~> 1.2.7'
|
101
|
+
gem 'roodi', '~> 2.1'
|
102
|
+
gem 'yard', '~> 0.5'
|
103
|
+
gem 'yardstick', '~> 0.1'
|
104
|
+
|
105
|
+
end
|
106
|
+
|
107
|
+
group :datamapper do # We need this because we want to pin these dependencies to their git master sources
|
108
|
+
|
109
|
+
gem 'dm-core', DM_VERSION, :path => File.dirname(__FILE__) # Make ourself available to the adapters
|
110
|
+
|
111
|
+
adapters = ENV['ADAPTER'] || ENV['ADAPTERS']
|
112
|
+
adapters = adapters.to_s.gsub(',',' ').split(' ') - ['in_memory']
|
113
|
+
|
114
|
+
unless adapters.empty?
|
115
|
+
|
116
|
+
DO_VERSION = '~> 0.10.2'
|
117
|
+
DM_DO_ADAPTERS = %w[sqlite postgres mysql oracle sqlserver]
|
118
|
+
|
119
|
+
gem 'data_objects', DO_VERSION, :git => "#{DATAMAPPER}/do.git"
|
120
|
+
|
121
|
+
adapters.each do |adapter|
|
122
|
+
if DM_DO_ADAPTERS.any? { |dm_do_adapter| dm_do_adapter =~ /#{adapter}/ }
|
123
|
+
adapter = 'sqlite3' if adapter == 'sqlite'
|
124
|
+
gem "do_#{adapter}", DO_VERSION, :git => "#{DATAMAPPER}/do.git"
|
125
|
+
end
|
126
|
+
end
|
127
|
+
|
128
|
+
gem 'dm-do-adapter', DM_VERSION, :git => "#{DATAMAPPER}/dm-do-adapter.git"
|
129
|
+
|
130
|
+
adapters.each do |adapter|
|
131
|
+
gem "dm-#{adapter}-adapter", DM_VERSION, :git => "#{DATAMAPPER}/dm-#{adapter}-adapter.git"
|
132
|
+
end
|
133
|
+
|
134
|
+
end
|
135
|
+
|
136
|
+
plugins = ENV['PLUGINS'] || ENV['PLUGIN']
|
137
|
+
plugins = (plugins.to_s.gsub(',',' ').split(' ') + ['dm-migrations']).uniq
|
138
|
+
|
139
|
+
plugins.each do |plugin|
|
140
|
+
gem plugin, DM_VERSION, :git => "#{DATAMAPPER}/#{plugin}.git"
|
141
|
+
end
|
142
|
+
|
143
|
+
end
|
data/Rakefile
CHANGED
@@ -15,16 +15,20 @@ begin
|
|
15
15
|
|
16
16
|
gem.rubyforge_project = 'datamapper'
|
17
17
|
|
18
|
-
gem.add_dependency 'extlib',
|
19
|
-
gem.add_dependency 'addressable',
|
18
|
+
gem.add_dependency 'extlib', '~> 0.9.14'
|
19
|
+
gem.add_dependency 'addressable', '~> 2.1'
|
20
|
+
|
21
|
+
gem.add_development_dependency 'rspec', '~> 1.3'
|
22
|
+
gem.add_development_dependency 'jeweler', '~> 1.4'
|
20
23
|
|
21
|
-
gem.add_development_dependency 'rspec', '~> 1.2.9'
|
22
|
-
gem.add_development_dependency 'yard', '~> 0.4.0'
|
23
24
|
end
|
24
25
|
|
25
26
|
Jeweler::GemcutterTasks.new
|
26
27
|
|
27
28
|
FileList['tasks/**/*.rake'].each { |task| import task }
|
28
|
-
|
29
|
+
|
30
|
+
rescue LoadError => e
|
29
31
|
puts 'Jeweler (or a dependency) not available. Install it with: gem install jeweler'
|
32
|
+
puts '-----------------------------------------------------------------------------'
|
33
|
+
puts e.backtrace # Let's help by actually showing *which* dependency is missing
|
30
34
|
end
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
1.0.0.rc1
|
data/dm-core.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{dm-core}
|
8
|
-
s.version = "0.
|
8
|
+
s.version = "1.0.0.rc1"
|
9
9
|
|
10
|
-
s.required_rubygems_version = Gem::Requirement.new("
|
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{
|
12
|
+
s.date = %q{2010-05-19}
|
13
13
|
s.description = %q{Faster, Better, Simpler.}
|
14
14
|
s.email = %q{dan.kubb@gmail.com}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -20,34 +20,32 @@ Gem::Specification.new do |s|
|
|
20
20
|
".autotest",
|
21
21
|
".document",
|
22
22
|
".gitignore",
|
23
|
+
"Gemfile",
|
23
24
|
"LICENSE",
|
24
25
|
"README.rdoc",
|
25
26
|
"Rakefile",
|
26
27
|
"VERSION",
|
27
|
-
"deps.rip",
|
28
28
|
"dm-core.gemspec",
|
29
29
|
"lib/dm-core.rb",
|
30
30
|
"lib/dm-core/adapters.rb",
|
31
31
|
"lib/dm-core/adapters/abstract_adapter.rb",
|
32
|
-
"lib/dm-core/adapters/data_objects_adapter.rb",
|
33
32
|
"lib/dm-core/adapters/in_memory_adapter.rb",
|
34
|
-
"lib/dm-core/adapters/mysql_adapter.rb",
|
35
|
-
"lib/dm-core/adapters/oracle_adapter.rb",
|
36
|
-
"lib/dm-core/adapters/postgres_adapter.rb",
|
37
|
-
"lib/dm-core/adapters/sqlite3_adapter.rb",
|
38
|
-
"lib/dm-core/adapters/sqlserver_adapter.rb",
|
39
|
-
"lib/dm-core/adapters/yaml_adapter.rb",
|
40
33
|
"lib/dm-core/associations/many_to_many.rb",
|
41
34
|
"lib/dm-core/associations/many_to_one.rb",
|
42
35
|
"lib/dm-core/associations/one_to_many.rb",
|
43
36
|
"lib/dm-core/associations/one_to_one.rb",
|
44
37
|
"lib/dm-core/associations/relationship.rb",
|
45
38
|
"lib/dm-core/collection.rb",
|
46
|
-
"lib/dm-core/core_ext/
|
39
|
+
"lib/dm-core/core_ext/array.rb",
|
40
|
+
"lib/dm-core/core_ext/hash.rb",
|
47
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",
|
48
46
|
"lib/dm-core/core_ext/symbol.rb",
|
47
|
+
"lib/dm-core/core_ext/try_dup.rb",
|
49
48
|
"lib/dm-core/identity_map.rb",
|
50
|
-
"lib/dm-core/migrations.rb",
|
51
49
|
"lib/dm-core/model.rb",
|
52
50
|
"lib/dm-core/model/descendant_set.rb",
|
53
51
|
"lib/dm-core/model/hook.rb",
|
@@ -56,6 +54,23 @@ Gem::Specification.new do |s|
|
|
56
54
|
"lib/dm-core/model/relationship.rb",
|
57
55
|
"lib/dm-core/model/scope.rb",
|
58
56
|
"lib/dm-core/property.rb",
|
57
|
+
"lib/dm-core/property/binary.rb",
|
58
|
+
"lib/dm-core/property/boolean.rb",
|
59
|
+
"lib/dm-core/property/class.rb",
|
60
|
+
"lib/dm-core/property/date.rb",
|
61
|
+
"lib/dm-core/property/date_time.rb",
|
62
|
+
"lib/dm-core/property/decimal.rb",
|
63
|
+
"lib/dm-core/property/discriminator.rb",
|
64
|
+
"lib/dm-core/property/float.rb",
|
65
|
+
"lib/dm-core/property/integer.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",
|
59
74
|
"lib/dm-core/property_set.rb",
|
60
75
|
"lib/dm-core/query.rb",
|
61
76
|
"lib/dm-core/query/conditions/comparison.rb",
|
@@ -66,30 +81,44 @@ Gem::Specification.new do |s|
|
|
66
81
|
"lib/dm-core/query/sort.rb",
|
67
82
|
"lib/dm-core/repository.rb",
|
68
83
|
"lib/dm-core/resource.rb",
|
69
|
-
"lib/dm-core/
|
70
|
-
"lib/dm-core/
|
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/resource_spec.rb",
|
99
|
+
"lib/dm-core/spec/shared/sel_spec.rb",
|
100
|
+
"lib/dm-core/support/assertions.rb",
|
71
101
|
"lib/dm-core/support/chainable.rb",
|
72
102
|
"lib/dm-core/support/deprecate.rb",
|
73
103
|
"lib/dm-core/support/equalizer.rb",
|
104
|
+
"lib/dm-core/support/hook.rb",
|
105
|
+
"lib/dm-core/support/lazy_array.rb",
|
106
|
+
"lib/dm-core/support/local_object_space.rb",
|
74
107
|
"lib/dm-core/support/logger.rb",
|
75
108
|
"lib/dm-core/support/naming_conventions.rb",
|
76
|
-
"lib/dm-core/
|
109
|
+
"lib/dm-core/support/subject.rb",
|
77
110
|
"lib/dm-core/type.rb",
|
78
111
|
"lib/dm-core/types/boolean.rb",
|
112
|
+
"lib/dm-core/types/decimal.rb",
|
79
113
|
"lib/dm-core/types/discriminator.rb",
|
80
114
|
"lib/dm-core/types/object.rb",
|
81
|
-
"lib/dm-core/types/paranoid_boolean.rb",
|
82
|
-
"lib/dm-core/types/paranoid_datetime.rb",
|
83
115
|
"lib/dm-core/types/serial.rb",
|
84
116
|
"lib/dm-core/types/text.rb",
|
85
117
|
"lib/dm-core/version.rb",
|
86
118
|
"script/performance.rb",
|
87
119
|
"script/profile.rb",
|
88
|
-
"spec/lib/adapter_helpers.rb",
|
89
|
-
"spec/lib/collection_helpers.rb",
|
90
|
-
"spec/lib/counter_adapter.rb",
|
91
|
-
"spec/lib/pending_helpers.rb",
|
92
120
|
"spec/lib/rspec_immediate_feedback_formatter.rb",
|
121
|
+
"spec/public/associations/many_to_many/read_multiple_join_spec.rb",
|
93
122
|
"spec/public/associations/many_to_many_spec.rb",
|
94
123
|
"spec/public/associations/many_to_one_spec.rb",
|
95
124
|
"spec/public/associations/many_to_one_with_boolean_cpk_spec.rb",
|
@@ -97,10 +126,24 @@ Gem::Specification.new do |s|
|
|
97
126
|
"spec/public/associations/one_to_one_spec.rb",
|
98
127
|
"spec/public/associations/one_to_one_with_boolean_cpk_spec.rb",
|
99
128
|
"spec/public/collection_spec.rb",
|
100
|
-
"spec/public/
|
129
|
+
"spec/public/model/hook_spec.rb",
|
130
|
+
"spec/public/model/property_spec.rb",
|
101
131
|
"spec/public/model/relationship_spec.rb",
|
102
132
|
"spec/public/model_spec.rb",
|
133
|
+
"spec/public/property/binary_spec.rb",
|
134
|
+
"spec/public/property/boolean_spec.rb",
|
135
|
+
"spec/public/property/class_spec.rb",
|
136
|
+
"spec/public/property/date_spec.rb",
|
137
|
+
"spec/public/property/date_time_spec.rb",
|
138
|
+
"spec/public/property/decimal_spec.rb",
|
139
|
+
"spec/public/property/discriminator_spec.rb",
|
140
|
+
"spec/public/property/float_spec.rb",
|
141
|
+
"spec/public/property/integer_spec.rb",
|
103
142
|
"spec/public/property/object_spec.rb",
|
143
|
+
"spec/public/property/serial_spec.rb",
|
144
|
+
"spec/public/property/string_spec.rb",
|
145
|
+
"spec/public/property/text_spec.rb",
|
146
|
+
"spec/public/property/time_spec.rb",
|
104
147
|
"spec/public/property_spec.rb",
|
105
148
|
"spec/public/resource_spec.rb",
|
106
149
|
"spec/public/sel_spec.rb",
|
@@ -109,35 +152,60 @@ Gem::Specification.new do |s|
|
|
109
152
|
"spec/public/shared/collection_finder_shared_spec.rb",
|
110
153
|
"spec/public/shared/collection_shared_spec.rb",
|
111
154
|
"spec/public/shared/finder_shared_spec.rb",
|
112
|
-
"spec/public/shared/
|
113
|
-
"spec/public/shared/sel_shared_spec.rb",
|
114
|
-
"spec/public/transaction_spec.rb",
|
115
|
-
"spec/public/types/discriminator_spec.rb",
|
155
|
+
"spec/public/shared/property_shared_spec.rb",
|
116
156
|
"spec/rcov.opts",
|
117
157
|
"spec/semipublic/adapters/abstract_adapter_spec.rb",
|
118
158
|
"spec/semipublic/adapters/in_memory_adapter_spec.rb",
|
119
|
-
"spec/semipublic/
|
120
|
-
"spec/semipublic/adapters/oracle_adapter_spec.rb",
|
121
|
-
"spec/semipublic/adapters/postgres_adapter_spec.rb",
|
122
|
-
"spec/semipublic/adapters/sqlite3_adapter_spec.rb",
|
123
|
-
"spec/semipublic/adapters/sqlserver_adapter_spec.rb",
|
124
|
-
"spec/semipublic/adapters/yaml_adapter_spec.rb",
|
159
|
+
"spec/semipublic/associations/many_to_many_spec.rb",
|
125
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",
|
126
163
|
"spec/semipublic/associations/relationship_spec.rb",
|
127
164
|
"spec/semipublic/associations_spec.rb",
|
128
165
|
"spec/semipublic/collection_spec.rb",
|
129
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/serial_spec.rb",
|
177
|
+
"spec/semipublic/property/string_spec.rb",
|
178
|
+
"spec/semipublic/property/text_spec.rb",
|
179
|
+
"spec/semipublic/property/time_spec.rb",
|
130
180
|
"spec/semipublic/property_spec.rb",
|
131
181
|
"spec/semipublic/query/conditions/comparison_spec.rb",
|
132
182
|
"spec/semipublic/query/conditions/operation_spec.rb",
|
133
183
|
"spec/semipublic/query/path_spec.rb",
|
134
184
|
"spec/semipublic/query_spec.rb",
|
185
|
+
"spec/semipublic/resource/state/clean_spec.rb",
|
186
|
+
"spec/semipublic/resource/state/deleted_spec.rb",
|
187
|
+
"spec/semipublic/resource/state/dirty_spec.rb",
|
188
|
+
"spec/semipublic/resource/state/immutable_spec.rb",
|
189
|
+
"spec/semipublic/resource/state/transient_spec.rb",
|
190
|
+
"spec/semipublic/resource/state_spec.rb",
|
135
191
|
"spec/semipublic/resource_spec.rb",
|
136
192
|
"spec/semipublic/shared/condition_shared_spec.rb",
|
193
|
+
"spec/semipublic/shared/property_shared_spec.rb",
|
137
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",
|
138
197
|
"spec/spec.opts",
|
139
198
|
"spec/spec_helper.rb",
|
199
|
+
"spec/support/types/huge_integer.rb",
|
200
|
+
"spec/unit/array_spec.rb",
|
201
|
+
"spec/unit/hash_spec.rb",
|
202
|
+
"spec/unit/hook_spec.rb",
|
203
|
+
"spec/unit/lazy_array_spec.rb",
|
204
|
+
"spec/unit/module_spec.rb",
|
205
|
+
"spec/unit/object_spec.rb",
|
206
|
+
"spec/unit/try_dup_spec.rb",
|
140
207
|
"tasks/ci.rake",
|
208
|
+
"tasks/local_gemfile.rake",
|
141
209
|
"tasks/metrics.rake",
|
142
210
|
"tasks/spec.rake",
|
143
211
|
"tasks/yard.rake",
|
@@ -147,14 +215,11 @@ Gem::Specification.new do |s|
|
|
147
215
|
s.rdoc_options = ["--charset=UTF-8"]
|
148
216
|
s.require_paths = ["lib"]
|
149
217
|
s.rubyforge_project = %q{datamapper}
|
150
|
-
s.rubygems_version = %q{1.3.
|
218
|
+
s.rubygems_version = %q{1.3.6}
|
151
219
|
s.summary = %q{An Object/Relational Mapper for Ruby}
|
152
220
|
s.test_files = [
|
153
|
-
"spec/lib/
|
154
|
-
"spec/
|
155
|
-
"spec/lib/counter_adapter.rb",
|
156
|
-
"spec/lib/pending_helpers.rb",
|
157
|
-
"spec/lib/rspec_immediate_feedback_formatter.rb",
|
221
|
+
"spec/lib/rspec_immediate_feedback_formatter.rb",
|
222
|
+
"spec/public/associations/many_to_many/read_multiple_join_spec.rb",
|
158
223
|
"spec/public/associations/many_to_many_spec.rb",
|
159
224
|
"spec/public/associations/many_to_one_spec.rb",
|
160
225
|
"spec/public/associations/many_to_one_with_boolean_cpk_spec.rb",
|
@@ -162,10 +227,24 @@ Gem::Specification.new do |s|
|
|
162
227
|
"spec/public/associations/one_to_one_spec.rb",
|
163
228
|
"spec/public/associations/one_to_one_with_boolean_cpk_spec.rb",
|
164
229
|
"spec/public/collection_spec.rb",
|
165
|
-
"spec/public/
|
230
|
+
"spec/public/model/hook_spec.rb",
|
231
|
+
"spec/public/model/property_spec.rb",
|
166
232
|
"spec/public/model/relationship_spec.rb",
|
167
233
|
"spec/public/model_spec.rb",
|
234
|
+
"spec/public/property/binary_spec.rb",
|
235
|
+
"spec/public/property/boolean_spec.rb",
|
236
|
+
"spec/public/property/class_spec.rb",
|
237
|
+
"spec/public/property/date_spec.rb",
|
238
|
+
"spec/public/property/date_time_spec.rb",
|
239
|
+
"spec/public/property/decimal_spec.rb",
|
240
|
+
"spec/public/property/discriminator_spec.rb",
|
241
|
+
"spec/public/property/float_spec.rb",
|
242
|
+
"spec/public/property/integer_spec.rb",
|
168
243
|
"spec/public/property/object_spec.rb",
|
244
|
+
"spec/public/property/serial_spec.rb",
|
245
|
+
"spec/public/property/string_spec.rb",
|
246
|
+
"spec/public/property/text_spec.rb",
|
247
|
+
"spec/public/property/time_spec.rb",
|
169
248
|
"spec/public/property_spec.rb",
|
170
249
|
"spec/public/resource_spec.rb",
|
171
250
|
"spec/public/sel_spec.rb",
|
@@ -174,32 +253,56 @@ Gem::Specification.new do |s|
|
|
174
253
|
"spec/public/shared/collection_finder_shared_spec.rb",
|
175
254
|
"spec/public/shared/collection_shared_spec.rb",
|
176
255
|
"spec/public/shared/finder_shared_spec.rb",
|
177
|
-
"spec/public/shared/
|
178
|
-
"spec/public/shared/sel_shared_spec.rb",
|
179
|
-
"spec/public/transaction_spec.rb",
|
180
|
-
"spec/public/types/discriminator_spec.rb",
|
256
|
+
"spec/public/shared/property_shared_spec.rb",
|
181
257
|
"spec/semipublic/adapters/abstract_adapter_spec.rb",
|
182
258
|
"spec/semipublic/adapters/in_memory_adapter_spec.rb",
|
183
|
-
"spec/semipublic/
|
184
|
-
"spec/semipublic/adapters/oracle_adapter_spec.rb",
|
185
|
-
"spec/semipublic/adapters/postgres_adapter_spec.rb",
|
186
|
-
"spec/semipublic/adapters/sqlite3_adapter_spec.rb",
|
187
|
-
"spec/semipublic/adapters/sqlserver_adapter_spec.rb",
|
188
|
-
"spec/semipublic/adapters/yaml_adapter_spec.rb",
|
259
|
+
"spec/semipublic/associations/many_to_many_spec.rb",
|
189
260
|
"spec/semipublic/associations/many_to_one_spec.rb",
|
261
|
+
"spec/semipublic/associations/one_to_many_spec.rb",
|
262
|
+
"spec/semipublic/associations/one_to_one_spec.rb",
|
190
263
|
"spec/semipublic/associations/relationship_spec.rb",
|
191
264
|
"spec/semipublic/associations_spec.rb",
|
192
265
|
"spec/semipublic/collection_spec.rb",
|
193
266
|
"spec/semipublic/model_spec.rb",
|
267
|
+
"spec/semipublic/property/binary_spec.rb",
|
268
|
+
"spec/semipublic/property/boolean_spec.rb",
|
269
|
+
"spec/semipublic/property/class_spec.rb",
|
270
|
+
"spec/semipublic/property/date_spec.rb",
|
271
|
+
"spec/semipublic/property/date_time_spec.rb",
|
272
|
+
"spec/semipublic/property/decimal_spec.rb",
|
273
|
+
"spec/semipublic/property/discriminator_spec.rb",
|
274
|
+
"spec/semipublic/property/float_spec.rb",
|
275
|
+
"spec/semipublic/property/integer_spec.rb",
|
276
|
+
"spec/semipublic/property/serial_spec.rb",
|
277
|
+
"spec/semipublic/property/string_spec.rb",
|
278
|
+
"spec/semipublic/property/text_spec.rb",
|
279
|
+
"spec/semipublic/property/time_spec.rb",
|
194
280
|
"spec/semipublic/property_spec.rb",
|
195
281
|
"spec/semipublic/query/conditions/comparison_spec.rb",
|
196
282
|
"spec/semipublic/query/conditions/operation_spec.rb",
|
197
283
|
"spec/semipublic/query/path_spec.rb",
|
198
284
|
"spec/semipublic/query_spec.rb",
|
285
|
+
"spec/semipublic/resource/state/clean_spec.rb",
|
286
|
+
"spec/semipublic/resource/state/deleted_spec.rb",
|
287
|
+
"spec/semipublic/resource/state/dirty_spec.rb",
|
288
|
+
"spec/semipublic/resource/state/immutable_spec.rb",
|
289
|
+
"spec/semipublic/resource/state/transient_spec.rb",
|
290
|
+
"spec/semipublic/resource/state_spec.rb",
|
199
291
|
"spec/semipublic/resource_spec.rb",
|
200
292
|
"spec/semipublic/shared/condition_shared_spec.rb",
|
293
|
+
"spec/semipublic/shared/property_shared_spec.rb",
|
201
294
|
"spec/semipublic/shared/resource_shared_spec.rb",
|
202
|
-
"spec/
|
295
|
+
"spec/semipublic/shared/resource_state_shared_spec.rb",
|
296
|
+
"spec/semipublic/shared/subject_shared_spec.rb",
|
297
|
+
"spec/spec_helper.rb",
|
298
|
+
"spec/support/types/huge_integer.rb",
|
299
|
+
"spec/unit/array_spec.rb",
|
300
|
+
"spec/unit/hash_spec.rb",
|
301
|
+
"spec/unit/hook_spec.rb",
|
302
|
+
"spec/unit/lazy_array_spec.rb",
|
303
|
+
"spec/unit/module_spec.rb",
|
304
|
+
"spec/unit/object_spec.rb",
|
305
|
+
"spec/unit/try_dup_spec.rb"
|
203
306
|
]
|
204
307
|
|
205
308
|
if s.respond_to? :specification_version then
|
@@ -209,19 +312,19 @@ Gem::Specification.new do |s|
|
|
209
312
|
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
210
313
|
s.add_runtime_dependency(%q<extlib>, ["~> 0.9.14"])
|
211
314
|
s.add_runtime_dependency(%q<addressable>, ["~> 2.1"])
|
212
|
-
s.add_development_dependency(%q<rspec>, ["~> 1.
|
213
|
-
s.add_development_dependency(%q<
|
315
|
+
s.add_development_dependency(%q<rspec>, ["~> 1.3"])
|
316
|
+
s.add_development_dependency(%q<jeweler>, ["~> 1.4"])
|
214
317
|
else
|
215
318
|
s.add_dependency(%q<extlib>, ["~> 0.9.14"])
|
216
319
|
s.add_dependency(%q<addressable>, ["~> 2.1"])
|
217
|
-
s.add_dependency(%q<rspec>, ["~> 1.
|
218
|
-
s.add_dependency(%q<
|
320
|
+
s.add_dependency(%q<rspec>, ["~> 1.3"])
|
321
|
+
s.add_dependency(%q<jeweler>, ["~> 1.4"])
|
219
322
|
end
|
220
323
|
else
|
221
324
|
s.add_dependency(%q<extlib>, ["~> 0.9.14"])
|
222
325
|
s.add_dependency(%q<addressable>, ["~> 2.1"])
|
223
|
-
s.add_dependency(%q<rspec>, ["~> 1.
|
224
|
-
s.add_dependency(%q<
|
326
|
+
s.add_dependency(%q<rspec>, ["~> 1.3"])
|
327
|
+
s.add_dependency(%q<jeweler>, ["~> 1.4"])
|
225
328
|
end
|
226
329
|
end
|
227
330
|
|