dm-core 0.10.1 → 0.10.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.autotest +29 -0
- data/.document +5 -0
- data/.gitignore +27 -0
- data/LICENSE +20 -0
- data/{README.txt → README.rdoc} +14 -3
- data/Rakefile +23 -22
- data/VERSION +1 -0
- data/dm-core.gemspec +201 -10
- data/lib/dm-core.rb +32 -23
- data/lib/dm-core/adapters.rb +0 -1
- data/lib/dm-core/adapters/data_objects_adapter.rb +230 -151
- data/lib/dm-core/adapters/mysql_adapter.rb +7 -8
- data/lib/dm-core/adapters/oracle_adapter.rb +39 -59
- data/lib/dm-core/adapters/postgres_adapter.rb +0 -1
- data/lib/dm-core/adapters/sqlite3_adapter.rb +5 -0
- data/lib/dm-core/adapters/sqlserver_adapter.rb +114 -0
- data/lib/dm-core/adapters/yaml_adapter.rb +0 -5
- data/lib/dm-core/associations/many_to_many.rb +118 -56
- data/lib/dm-core/associations/many_to_one.rb +48 -21
- data/lib/dm-core/associations/one_to_many.rb +8 -30
- data/lib/dm-core/associations/one_to_one.rb +1 -5
- data/lib/dm-core/associations/relationship.rb +89 -97
- data/lib/dm-core/collection.rb +299 -184
- data/lib/dm-core/core_ext/enumerable.rb +28 -0
- data/lib/dm-core/core_ext/kernel.rb +0 -2
- data/lib/dm-core/migrations.rb +314 -170
- data/lib/dm-core/model.rb +97 -66
- data/lib/dm-core/model/descendant_set.rb +1 -1
- data/lib/dm-core/model/hook.rb +0 -3
- data/lib/dm-core/model/property.rb +7 -10
- data/lib/dm-core/model/relationship.rb +79 -26
- data/lib/dm-core/model/scope.rb +3 -4
- data/lib/dm-core/property.rb +152 -90
- data/lib/dm-core/property_set.rb +18 -37
- data/lib/dm-core/query.rb +452 -153
- data/lib/dm-core/query/conditions/comparison.rb +266 -173
- data/lib/dm-core/query/conditions/operation.rb +499 -57
- data/lib/dm-core/query/direction.rb +0 -3
- data/lib/dm-core/query/operator.rb +0 -4
- data/lib/dm-core/query/path.rb +10 -12
- data/lib/dm-core/query/sort.rb +4 -10
- data/lib/dm-core/repository.rb +10 -6
- data/lib/dm-core/resource.rb +343 -148
- data/lib/dm-core/spec/adapter_shared_spec.rb +17 -1
- data/lib/dm-core/spec/data_objects_adapter_shared_spec.rb +277 -17
- data/lib/dm-core/support/chainable.rb +0 -2
- data/lib/dm-core/support/equalizer.rb +27 -3
- data/lib/dm-core/transaction.rb +75 -75
- data/lib/dm-core/type.rb +19 -5
- data/lib/dm-core/types/discriminator.rb +4 -4
- data/lib/dm-core/types/object.rb +2 -7
- data/lib/dm-core/types/paranoid_boolean.rb +8 -2
- data/lib/dm-core/types/paranoid_datetime.rb +8 -2
- data/lib/dm-core/version.rb +1 -1
- data/script/performance.rb +7 -7
- data/script/profile.rb +6 -6
- data/spec/lib/collection_helpers.rb +2 -2
- data/spec/lib/pending_helpers.rb +22 -3
- data/spec/lib/rspec_immediate_feedback_formatter.rb +1 -0
- data/spec/public/associations/many_to_many_spec.rb +6 -4
- data/spec/public/associations/many_to_one_spec.rb +10 -1
- data/spec/public/associations/many_to_one_with_boolean_cpk_spec.rb +39 -0
- data/spec/public/associations/one_to_many_spec.rb +4 -3
- data/spec/public/associations/one_to_one_spec.rb +19 -1
- data/spec/public/associations/one_to_one_with_boolean_cpk_spec.rb +45 -0
- data/spec/public/collection_spec.rb +4 -3
- data/spec/public/migrations_spec.rb +144 -0
- data/spec/public/model/relationship_spec.rb +115 -55
- data/spec/public/model_spec.rb +13 -13
- data/spec/public/property/object_spec.rb +106 -0
- data/spec/public/property_spec.rb +18 -14
- data/spec/public/resource_spec.rb +10 -1
- data/spec/public/sel_spec.rb +16 -49
- data/spec/public/setup_spec.rb +1 -1
- data/spec/public/shared/association_collection_shared_spec.rb +6 -14
- data/spec/public/shared/collection_finder_shared_spec.rb +267 -0
- data/spec/public/shared/collection_shared_spec.rb +214 -217
- data/spec/public/shared/finder_shared_spec.rb +259 -365
- data/spec/public/shared/resource_shared_spec.rb +524 -248
- data/spec/public/transaction_spec.rb +27 -3
- data/spec/public/types/discriminator_spec.rb +1 -1
- data/spec/rcov.opts +6 -0
- data/spec/semipublic/adapters/sqlserver_adapter_spec.rb +17 -0
- data/spec/semipublic/associations/many_to_one_spec.rb +3 -20
- data/spec/semipublic/associations_spec.rb +2 -2
- data/spec/semipublic/collection_spec.rb +0 -32
- data/spec/semipublic/model_spec.rb +96 -0
- data/spec/semipublic/property_spec.rb +3 -3
- data/spec/semipublic/query/conditions/comparison_spec.rb +1719 -0
- data/spec/semipublic/query/conditions/operation_spec.rb +1292 -0
- data/spec/semipublic/query_spec.rb +1285 -144
- data/spec/semipublic/resource_spec.rb +0 -24
- data/spec/semipublic/shared/resource_shared_spec.rb +103 -38
- data/spec/spec.opts +1 -1
- data/spec/spec_helper.rb +15 -6
- data/tasks/ci.rake +1 -0
- data/tasks/metrics.rake +37 -0
- data/tasks/spec.rake +41 -0
- data/tasks/yard.rake +9 -0
- data/tasks/yardstick.rake +19 -0
- metadata +99 -29
- data/CONTRIBUTING +0 -51
- data/FAQ +0 -93
- data/History.txt +0 -27
- data/MIT-LICENSE +0 -22
- data/Manifest.txt +0 -121
- data/QUICKLINKS +0 -11
- data/SPECS +0 -35
- data/TODO +0 -1
- data/spec/semipublic/query/conditions_spec.rb +0 -528
- data/tasks/ci.rb +0 -24
- data/tasks/dm.rb +0 -58
- data/tasks/doc.rb +0 -17
- data/tasks/gemspec.rb +0 -23
- data/tasks/hoe.rb +0 -45
- data/tasks/install.rb +0 -18
@@ -10,30 +10,6 @@ describe DataMapper::Resource do
|
|
10
10
|
property :description, Text
|
11
11
|
end
|
12
12
|
|
13
|
-
# This is a special class that needs to be an exact copy of User
|
14
|
-
class ::Clone
|
15
|
-
include DataMapper::Resource
|
16
|
-
|
17
|
-
property :name, String, :key => true
|
18
|
-
property :age, Integer
|
19
|
-
property :description, Text
|
20
|
-
end
|
21
|
-
|
22
|
-
class ::Comment
|
23
|
-
include DataMapper::Resource
|
24
|
-
|
25
|
-
property :id, Serial
|
26
|
-
property :body, Text
|
27
|
-
|
28
|
-
belongs_to :user
|
29
|
-
end
|
30
|
-
|
31
|
-
class ::Default
|
32
|
-
include DataMapper::Resource
|
33
|
-
|
34
|
-
property :name, String, :key => true, :default => 'a default value'
|
35
|
-
end
|
36
|
-
|
37
13
|
@user_model = User
|
38
14
|
end
|
39
15
|
|
@@ -5,83 +5,149 @@ share_examples_for 'A semipublic Resource' do
|
|
5
5
|
end
|
6
6
|
end
|
7
7
|
|
8
|
-
it { @user.should respond_to(:
|
9
|
-
|
10
|
-
describe '#dirty?' do
|
8
|
+
it { @user.should respond_to(:attribute_dirty?) }
|
11
9
|
|
10
|
+
describe '#attribute_dirty?' do
|
12
11
|
describe 'on a non-dirty record' do
|
12
|
+
it { @user.attribute_dirty?(:age).should be_false }
|
13
|
+
end
|
13
14
|
|
14
|
-
|
15
|
+
describe 'on a dirty record' do
|
16
|
+
before { @user.age = 100 }
|
15
17
|
|
18
|
+
it { @user.attribute_dirty?(:age).should be_true }
|
16
19
|
end
|
17
20
|
|
18
|
-
describe 'on a
|
21
|
+
describe 'on a new record' do
|
22
|
+
before { @user = @user_model.new }
|
19
23
|
|
20
|
-
|
24
|
+
it { @user.attribute_dirty?(:age).should be_false }
|
25
|
+
end
|
26
|
+
end
|
21
27
|
|
22
|
-
|
28
|
+
it { @user.should respond_to(:dirty_attributes) }
|
23
29
|
|
30
|
+
describe '#dirty_attributes' do
|
31
|
+
describe 'on a saved/clean record' do
|
32
|
+
it { @user.dirty_attributes.should be_empty }
|
24
33
|
end
|
25
34
|
|
26
|
-
describe 'on a
|
35
|
+
describe 'on a saved/dirty record' do
|
36
|
+
before { @user.age = 100 }
|
27
37
|
|
28
|
-
|
38
|
+
it { @user.dirty_attributes.should == { @user_model.properties[:age] => 100 } }
|
39
|
+
end
|
29
40
|
|
30
|
-
|
41
|
+
describe 'on an saved/set/unset record' do
|
42
|
+
before do
|
43
|
+
@user.age = 100
|
44
|
+
@user.age = 25
|
45
|
+
end
|
31
46
|
|
47
|
+
it { @user.dirty_attributes.should be_empty }
|
32
48
|
end
|
33
49
|
|
34
|
-
describe 'on
|
50
|
+
describe 'on an saved/unchanged record' do
|
51
|
+
before do
|
52
|
+
@user.age = 25
|
53
|
+
end
|
35
54
|
|
36
|
-
|
55
|
+
it { @user.dirty_attributes.should be_empty }
|
56
|
+
end
|
37
57
|
|
38
|
-
|
58
|
+
describe 'on a new/clean record' do
|
59
|
+
before { @user = @user_model.new }
|
39
60
|
|
61
|
+
it { @user.dirty_attributes.should be_empty }
|
40
62
|
end
|
41
63
|
|
42
|
-
describe 'on a new record
|
64
|
+
describe 'on a new/dirty record' do
|
65
|
+
before { @user = @user_model.new(:age => 100) }
|
43
66
|
|
44
|
-
|
67
|
+
it { @user.original_attributes.should == { @user_model.properties[:age] => nil } }
|
68
|
+
end
|
45
69
|
|
46
|
-
|
70
|
+
describe 'on an new/set/unset record' do
|
71
|
+
before do
|
72
|
+
@user = @user_model.new(:age => 100)
|
73
|
+
@user.age = nil
|
74
|
+
end
|
47
75
|
|
76
|
+
it { @user.dirty_attributes.should == { @user_model.properties[:age] => nil } }
|
48
77
|
end
|
49
78
|
|
79
|
+
describe 'on an new/unchanged record' do
|
80
|
+
before do
|
81
|
+
@user = @user_model.new(:age => nil)
|
82
|
+
end
|
50
83
|
|
84
|
+
it { @user.dirty_attributes.should == { @user_model.properties[:age] => nil } }
|
85
|
+
end
|
51
86
|
end
|
52
87
|
|
53
|
-
it { @user.should respond_to(:
|
88
|
+
it { @user.should respond_to(:original_attributes) }
|
54
89
|
|
55
|
-
describe '#
|
90
|
+
describe '#original_attributes' do
|
91
|
+
describe 'on a saved/clean record' do
|
92
|
+
it { @user.original_attributes.should be_empty }
|
93
|
+
end
|
56
94
|
|
57
|
-
describe 'on a
|
95
|
+
describe 'on a saved/dirty record' do
|
96
|
+
before { @user.age = 100 }
|
58
97
|
|
59
|
-
it { @user.
|
98
|
+
it { @user.original_attributes.should == { @user_model.properties[:age] => 25 } }
|
99
|
+
end
|
60
100
|
|
101
|
+
describe 'on an saved/set/unset record' do
|
102
|
+
before do
|
103
|
+
@user.age = 100
|
104
|
+
@user.age = 25
|
105
|
+
end
|
106
|
+
|
107
|
+
it { @user.original_attributes.should be_empty }
|
61
108
|
end
|
62
109
|
|
63
|
-
describe 'on
|
110
|
+
describe 'on an saved/unchanged record' do
|
111
|
+
before do
|
112
|
+
@user.age = 25
|
113
|
+
end
|
64
114
|
|
65
|
-
|
115
|
+
it { @user.original_attributes.should be_empty }
|
116
|
+
end
|
66
117
|
|
67
|
-
|
118
|
+
describe 'on a new/clean record' do
|
119
|
+
before { @user = @user_model.new }
|
68
120
|
|
121
|
+
it { @user.original_attributes.should be_empty }
|
69
122
|
end
|
70
123
|
|
71
|
-
describe 'on a new record' do
|
124
|
+
describe 'on a new/dirty record' do
|
125
|
+
before { @user = @user_model.new(:age => 100) }
|
72
126
|
|
73
|
-
|
127
|
+
it { @user.original_attributes.should == { @user_model.properties[:age] => nil } }
|
128
|
+
end
|
74
129
|
|
75
|
-
|
130
|
+
describe 'on an new/set/unset record' do
|
131
|
+
before do
|
132
|
+
@user = @user_model.new(:age => 100)
|
133
|
+
@user.age = nil
|
134
|
+
end
|
76
135
|
|
136
|
+
it { @user.original_attributes.should == { @user_model.properties[:age] => nil } }
|
77
137
|
end
|
78
138
|
|
139
|
+
describe 'on an new/unchanged record' do
|
140
|
+
before do
|
141
|
+
@user = @user_model.new(:age => nil)
|
142
|
+
end
|
143
|
+
|
144
|
+
it { @user.original_attributes.should == { @user_model.properties[:age] => nil } }
|
145
|
+
end
|
79
146
|
end
|
80
147
|
|
81
148
|
it { @user.should respond_to(:repository) }
|
82
149
|
|
83
|
-
describe
|
84
|
-
|
150
|
+
describe '#repository' do
|
85
151
|
before :all do
|
86
152
|
class ::Statistic
|
87
153
|
include DataMapper::Resource
|
@@ -97,30 +163,29 @@ share_examples_for 'A semipublic Resource' do
|
|
97
163
|
end
|
98
164
|
|
99
165
|
with_alternate_adapter do
|
100
|
-
it
|
101
|
-
@user_model.create(:name =>
|
166
|
+
it 'should return the default adapter when nothing is specified' do
|
167
|
+
@user_model.create(:name => 'carl').repository.should == @repository
|
102
168
|
@user_model.new.repository.should == @repository
|
103
|
-
@user_model.get(
|
169
|
+
@user_model.get('carl').repository.should == @repository
|
104
170
|
end
|
105
171
|
|
106
|
-
it
|
107
|
-
statistic = Statistic.create(:name =>
|
172
|
+
it 'should return the default repository for the model' do
|
173
|
+
statistic = Statistic.create(:name => 'visits', :value => 2)
|
108
174
|
statistic.repository.should == @alternate_repository
|
109
175
|
Statistic.new.repository.should == @alternate_repository
|
110
176
|
Statistic.get(statistic.id).repository.should == @alternate_repository
|
111
177
|
end
|
112
178
|
|
113
|
-
it
|
179
|
+
it 'should return the repository defined by the current context' do
|
114
180
|
@alternate_repository.scope do
|
115
181
|
@user_model.new.repository.should == @alternate_repository
|
116
|
-
@user_model.create(:name =>
|
117
|
-
@user_model.get(
|
182
|
+
@user_model.create(:name => 'carl').repository.should == @alternate_repository
|
183
|
+
@user_model.get('carl').repository.should == @alternate_repository
|
118
184
|
end
|
119
185
|
|
120
|
-
@alternate_repository.scope { @user_model.get(
|
186
|
+
@alternate_repository.scope { @user_model.get('carl') }.repository.should == @alternate_repository
|
121
187
|
end
|
122
188
|
end
|
123
189
|
|
124
190
|
end
|
125
|
-
|
126
191
|
end
|
data/spec/spec.opts
CHANGED
data/spec/spec_helper.rb
CHANGED
@@ -1,9 +1,6 @@
|
|
1
1
|
require 'pathname'
|
2
2
|
require 'rubygems'
|
3
3
|
|
4
|
-
gem 'addressable', '~>2.0'
|
5
|
-
gem 'rspec', '>1.1.2'
|
6
|
-
|
7
4
|
require 'addressable/uri'
|
8
5
|
require 'spec'
|
9
6
|
|
@@ -35,7 +32,8 @@ PRIMARY = {
|
|
35
32
|
# 'sqlite3_fs' => "sqlite3://#{temp_db_dir}/primary.db",
|
36
33
|
'mysql' => 'mysql://localhost/dm_core_test',
|
37
34
|
'postgres' => 'postgres://localhost/dm_core_test',
|
38
|
-
'oracle' => 'oracle://dm_core_test:dm_core_test@localhost/orcl'
|
35
|
+
'oracle' => 'oracle://dm_core_test:dm_core_test@localhost/orcl',
|
36
|
+
'sqlserver' => 'sqlserver://dm_core_test:dm_core_test@localhost/dm_core_test;instance=SQLEXPRESS'
|
39
37
|
}
|
40
38
|
|
41
39
|
ALTERNATE = {
|
@@ -45,7 +43,8 @@ ALTERNATE = {
|
|
45
43
|
# 'sqlite3_fs' => "sqlite3://#{temp_db_dir}/alternate.db",
|
46
44
|
'mysql' => 'mysql://localhost/dm_core_test2',
|
47
45
|
'postgres' => 'postgres://localhost/dm_core_test2',
|
48
|
-
'oracle' => 'oracle://dm_core_test2:dm_core_test2@localhost/orcl'
|
46
|
+
'oracle' => 'oracle://dm_core_test2:dm_core_test2@localhost/orcl',
|
47
|
+
'sqlserver' => 'sqlserver://dm_core_test:dm_core_test@localhost/dm_core_test2;instance=SQLEXPRESS'
|
49
48
|
}
|
50
49
|
|
51
50
|
# These environment variables will override the default connection string:
|
@@ -66,7 +65,7 @@ PRIMARY.only(*adapters).each do |name, default|
|
|
66
65
|
|
67
66
|
# test the connection if possible
|
68
67
|
if adapter.respond_to?(:query)
|
69
|
-
name == 'oracle' ? adapter.
|
68
|
+
name == 'oracle' ? adapter.select('SELECT 1 FROM dual') : adapter.select('SELECT 1')
|
70
69
|
end
|
71
70
|
|
72
71
|
ADAPTERS << name
|
@@ -112,3 +111,13 @@ Spec::Runner.configure do |config|
|
|
112
111
|
end
|
113
112
|
end
|
114
113
|
end
|
114
|
+
|
115
|
+
# remove the Resource#send method to ensure specs/internals do no rely on it
|
116
|
+
module RemoveSend
|
117
|
+
def self.included(model)
|
118
|
+
model.send(:undef_method, :send)
|
119
|
+
model.send(:undef_method, :freeze)
|
120
|
+
end
|
121
|
+
|
122
|
+
DataMapper::Model.append_inclusions self
|
123
|
+
end
|
data/tasks/ci.rake
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
task :ci => [ :verify_measurements, 'metrics:all' ]
|
data/tasks/metrics.rake
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
begin
|
2
|
+
require 'metric_fu'
|
3
|
+
rescue LoadError
|
4
|
+
namespace :metrics do
|
5
|
+
task :all do
|
6
|
+
abort 'metric_fu is not available. In order to run metrics:all, you must: gem install metric_fu'
|
7
|
+
end
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
begin
|
12
|
+
require 'reek/adapters/rake_task'
|
13
|
+
|
14
|
+
Reek::RakeTask.new do |t|
|
15
|
+
t.fail_on_error = true
|
16
|
+
t.verbose = false
|
17
|
+
t.source_files = 'lib/**/*.rb'
|
18
|
+
end
|
19
|
+
rescue LoadError
|
20
|
+
task :reek do
|
21
|
+
abort 'Reek is not available. In order to run reek, you must: gem install reek'
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
begin
|
26
|
+
require 'roodi'
|
27
|
+
require 'rake/tasklib'
|
28
|
+
require 'roodi_task'
|
29
|
+
|
30
|
+
RoodiTask.new do |t|
|
31
|
+
t.verbose = false
|
32
|
+
end
|
33
|
+
rescue LoadError
|
34
|
+
task :roodi do
|
35
|
+
abort 'Roodi is not available. In order to run roodi, you must: gem install roodi'
|
36
|
+
end
|
37
|
+
end
|
data/tasks/spec.rake
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
spec_defaults = lambda do |spec|
|
2
|
+
spec.pattern = 'spec/**/*_spec.rb'
|
3
|
+
spec.libs << 'lib' << 'spec'
|
4
|
+
spec.spec_opts << '--options' << 'spec/spec.opts'
|
5
|
+
end
|
6
|
+
|
7
|
+
begin
|
8
|
+
require 'spec/rake/spectask'
|
9
|
+
|
10
|
+
Spec::Rake::SpecTask.new(:spec, &spec_defaults)
|
11
|
+
rescue LoadError
|
12
|
+
task :spec do
|
13
|
+
abort 'rspec is not available. In order to run spec, you must: gem install rspec'
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
begin
|
18
|
+
require 'rcov'
|
19
|
+
require 'spec/rake/verify_rcov'
|
20
|
+
|
21
|
+
Spec::Rake::SpecTask.new(:rcov) do |rcov|
|
22
|
+
spec_defaults.call(rcov)
|
23
|
+
rcov.rcov = true
|
24
|
+
rcov.rcov_opts = File.read('spec/rcov.opts').split(/\s+/)
|
25
|
+
end
|
26
|
+
|
27
|
+
RCov::VerifyTask.new(:verify_rcov => :rcov) do |rcov|
|
28
|
+
rcov.threshold = 100
|
29
|
+
end
|
30
|
+
rescue LoadError
|
31
|
+
%w[ rcov verify_rcov ].each do |name|
|
32
|
+
task name do
|
33
|
+
abort "rcov is not available. In order to run #{name}, you must: gem install rcov"
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
task :spec => :check_dependencies
|
39
|
+
task :rcov => :check_dependencies
|
40
|
+
|
41
|
+
task :default => :spec
|
data/tasks/yard.rake
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
begin
|
2
|
+
require 'pathname'
|
3
|
+
require 'yardstick/rake/measurement'
|
4
|
+
require 'yardstick/rake/verify'
|
5
|
+
|
6
|
+
# yardstick_measure task
|
7
|
+
Yardstick::Rake::Measurement.new
|
8
|
+
|
9
|
+
# verify_measurements task
|
10
|
+
Yardstick::Rake::Verify.new do |verify|
|
11
|
+
verify.threshold = 100
|
12
|
+
end
|
13
|
+
rescue LoadError
|
14
|
+
%w[ yardstick_measure verify_measurements ].each do |name|
|
15
|
+
task name.to_s do
|
16
|
+
abort "Yardstick is not available. In order to run #{name}, you must: gem install yardstick"
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dm-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.10.
|
4
|
+
version: 0.10.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dan Kubb
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-12-11 00:00:00 -08:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -20,7 +20,7 @@ dependencies:
|
|
20
20
|
requirements:
|
21
21
|
- - ~>
|
22
22
|
- !ruby/object:Gem::Version
|
23
|
-
version: 0.9.
|
23
|
+
version: 0.9.14
|
24
24
|
version:
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: addressable
|
@@ -32,30 +32,43 @@ dependencies:
|
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: "2.1"
|
34
34
|
version:
|
35
|
+
- !ruby/object:Gem::Dependency
|
36
|
+
name: rspec
|
37
|
+
type: :development
|
38
|
+
version_requirement:
|
39
|
+
version_requirements: !ruby/object:Gem::Requirement
|
40
|
+
requirements:
|
41
|
+
- - ~>
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: 1.2.9
|
44
|
+
version:
|
45
|
+
- !ruby/object:Gem::Dependency
|
46
|
+
name: yard
|
47
|
+
type: :development
|
48
|
+
version_requirement:
|
49
|
+
version_requirements: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - ~>
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: 0.4.0
|
54
|
+
version:
|
35
55
|
description: Faster, Better, Simpler.
|
36
|
-
email:
|
37
|
-
- dan.kubb@gmail.com
|
56
|
+
email: dan.kubb@gmail.com
|
38
57
|
executables: []
|
39
58
|
|
40
59
|
extensions: []
|
41
60
|
|
42
61
|
extra_rdoc_files:
|
43
|
-
-
|
44
|
-
-
|
45
|
-
- README.txt
|
62
|
+
- LICENSE
|
63
|
+
- README.rdoc
|
46
64
|
files:
|
47
65
|
- .autotest
|
66
|
+
- .document
|
48
67
|
- .gitignore
|
49
|
-
-
|
50
|
-
-
|
51
|
-
- History.txt
|
52
|
-
- MIT-LICENSE
|
53
|
-
- Manifest.txt
|
54
|
-
- QUICKLINKS
|
55
|
-
- README.txt
|
68
|
+
- LICENSE
|
69
|
+
- README.rdoc
|
56
70
|
- Rakefile
|
57
|
-
-
|
58
|
-
- TODO
|
71
|
+
- VERSION
|
59
72
|
- deps.rip
|
60
73
|
- dm-core.gemspec
|
61
74
|
- lib/dm-core.rb
|
@@ -67,6 +80,7 @@ files:
|
|
67
80
|
- lib/dm-core/adapters/oracle_adapter.rb
|
68
81
|
- lib/dm-core/adapters/postgres_adapter.rb
|
69
82
|
- lib/dm-core/adapters/sqlite3_adapter.rb
|
83
|
+
- lib/dm-core/adapters/sqlserver_adapter.rb
|
70
84
|
- lib/dm-core/adapters/yaml_adapter.rb
|
71
85
|
- lib/dm-core/associations/many_to_many.rb
|
72
86
|
- lib/dm-core/associations/many_to_one.rb
|
@@ -74,6 +88,7 @@ files:
|
|
74
88
|
- lib/dm-core/associations/one_to_one.rb
|
75
89
|
- lib/dm-core/associations/relationship.rb
|
76
90
|
- lib/dm-core/collection.rb
|
91
|
+
- lib/dm-core/core_ext/enumerable.rb
|
77
92
|
- lib/dm-core/core_ext/kernel.rb
|
78
93
|
- lib/dm-core/core_ext/symbol.rb
|
79
94
|
- lib/dm-core/identity_map.rb
|
@@ -122,36 +137,44 @@ files:
|
|
122
137
|
- spec/lib/rspec_immediate_feedback_formatter.rb
|
123
138
|
- spec/public/associations/many_to_many_spec.rb
|
124
139
|
- spec/public/associations/many_to_one_spec.rb
|
140
|
+
- spec/public/associations/many_to_one_with_boolean_cpk_spec.rb
|
125
141
|
- spec/public/associations/one_to_many_spec.rb
|
126
142
|
- spec/public/associations/one_to_one_spec.rb
|
143
|
+
- spec/public/associations/one_to_one_with_boolean_cpk_spec.rb
|
127
144
|
- spec/public/collection_spec.rb
|
128
145
|
- spec/public/migrations_spec.rb
|
129
146
|
- spec/public/model/relationship_spec.rb
|
130
147
|
- spec/public/model_spec.rb
|
148
|
+
- spec/public/property/object_spec.rb
|
131
149
|
- spec/public/property_spec.rb
|
132
150
|
- spec/public/resource_spec.rb
|
133
151
|
- spec/public/sel_spec.rb
|
134
152
|
- spec/public/setup_spec.rb
|
135
153
|
- spec/public/shared/association_collection_shared_spec.rb
|
154
|
+
- spec/public/shared/collection_finder_shared_spec.rb
|
136
155
|
- spec/public/shared/collection_shared_spec.rb
|
137
156
|
- spec/public/shared/finder_shared_spec.rb
|
138
157
|
- spec/public/shared/resource_shared_spec.rb
|
139
158
|
- spec/public/shared/sel_shared_spec.rb
|
140
159
|
- spec/public/transaction_spec.rb
|
141
160
|
- spec/public/types/discriminator_spec.rb
|
161
|
+
- spec/rcov.opts
|
142
162
|
- spec/semipublic/adapters/abstract_adapter_spec.rb
|
143
163
|
- spec/semipublic/adapters/in_memory_adapter_spec.rb
|
144
164
|
- spec/semipublic/adapters/mysql_adapter_spec.rb
|
145
165
|
- spec/semipublic/adapters/oracle_adapter_spec.rb
|
146
166
|
- spec/semipublic/adapters/postgres_adapter_spec.rb
|
147
167
|
- spec/semipublic/adapters/sqlite3_adapter_spec.rb
|
168
|
+
- spec/semipublic/adapters/sqlserver_adapter_spec.rb
|
148
169
|
- spec/semipublic/adapters/yaml_adapter_spec.rb
|
149
170
|
- spec/semipublic/associations/many_to_one_spec.rb
|
150
171
|
- spec/semipublic/associations/relationship_spec.rb
|
151
172
|
- spec/semipublic/associations_spec.rb
|
152
173
|
- spec/semipublic/collection_spec.rb
|
174
|
+
- spec/semipublic/model_spec.rb
|
153
175
|
- spec/semipublic/property_spec.rb
|
154
|
-
- spec/semipublic/query/
|
176
|
+
- spec/semipublic/query/conditions/comparison_spec.rb
|
177
|
+
- spec/semipublic/query/conditions/operation_spec.rb
|
155
178
|
- spec/semipublic/query/path_spec.rb
|
156
179
|
- spec/semipublic/query_spec.rb
|
157
180
|
- spec/semipublic/resource_spec.rb
|
@@ -159,20 +182,18 @@ files:
|
|
159
182
|
- spec/semipublic/shared/resource_shared_spec.rb
|
160
183
|
- spec/spec.opts
|
161
184
|
- spec/spec_helper.rb
|
162
|
-
- tasks/ci.
|
163
|
-
- tasks/
|
164
|
-
- tasks/
|
165
|
-
- tasks/
|
166
|
-
- tasks/
|
167
|
-
- tasks/install.rb
|
185
|
+
- tasks/ci.rake
|
186
|
+
- tasks/metrics.rake
|
187
|
+
- tasks/spec.rake
|
188
|
+
- tasks/yard.rake
|
189
|
+
- tasks/yardstick.rake
|
168
190
|
has_rdoc: true
|
169
|
-
homepage: http://datamapper
|
191
|
+
homepage: http://github.com/datamapper/dm-core
|
170
192
|
licenses: []
|
171
193
|
|
172
194
|
post_install_message:
|
173
195
|
rdoc_options:
|
174
|
-
- --
|
175
|
-
- README.txt
|
196
|
+
- --charset=UTF-8
|
176
197
|
require_paths:
|
177
198
|
- lib
|
178
199
|
required_ruby_version: !ruby/object:Gem::Requirement
|
@@ -194,5 +215,54 @@ rubygems_version: 1.3.5
|
|
194
215
|
signing_key:
|
195
216
|
specification_version: 3
|
196
217
|
summary: An Object/Relational Mapper for Ruby
|
197
|
-
test_files:
|
198
|
-
|
218
|
+
test_files:
|
219
|
+
- spec/lib/adapter_helpers.rb
|
220
|
+
- spec/lib/collection_helpers.rb
|
221
|
+
- spec/lib/counter_adapter.rb
|
222
|
+
- spec/lib/pending_helpers.rb
|
223
|
+
- spec/lib/rspec_immediate_feedback_formatter.rb
|
224
|
+
- spec/public/associations/many_to_many_spec.rb
|
225
|
+
- spec/public/associations/many_to_one_spec.rb
|
226
|
+
- spec/public/associations/many_to_one_with_boolean_cpk_spec.rb
|
227
|
+
- spec/public/associations/one_to_many_spec.rb
|
228
|
+
- spec/public/associations/one_to_one_spec.rb
|
229
|
+
- spec/public/associations/one_to_one_with_boolean_cpk_spec.rb
|
230
|
+
- spec/public/collection_spec.rb
|
231
|
+
- spec/public/migrations_spec.rb
|
232
|
+
- spec/public/model/relationship_spec.rb
|
233
|
+
- spec/public/model_spec.rb
|
234
|
+
- spec/public/property/object_spec.rb
|
235
|
+
- spec/public/property_spec.rb
|
236
|
+
- spec/public/resource_spec.rb
|
237
|
+
- spec/public/sel_spec.rb
|
238
|
+
- spec/public/setup_spec.rb
|
239
|
+
- spec/public/shared/association_collection_shared_spec.rb
|
240
|
+
- spec/public/shared/collection_finder_shared_spec.rb
|
241
|
+
- spec/public/shared/collection_shared_spec.rb
|
242
|
+
- spec/public/shared/finder_shared_spec.rb
|
243
|
+
- spec/public/shared/resource_shared_spec.rb
|
244
|
+
- spec/public/shared/sel_shared_spec.rb
|
245
|
+
- spec/public/transaction_spec.rb
|
246
|
+
- spec/public/types/discriminator_spec.rb
|
247
|
+
- spec/semipublic/adapters/abstract_adapter_spec.rb
|
248
|
+
- spec/semipublic/adapters/in_memory_adapter_spec.rb
|
249
|
+
- spec/semipublic/adapters/mysql_adapter_spec.rb
|
250
|
+
- spec/semipublic/adapters/oracle_adapter_spec.rb
|
251
|
+
- spec/semipublic/adapters/postgres_adapter_spec.rb
|
252
|
+
- spec/semipublic/adapters/sqlite3_adapter_spec.rb
|
253
|
+
- spec/semipublic/adapters/sqlserver_adapter_spec.rb
|
254
|
+
- spec/semipublic/adapters/yaml_adapter_spec.rb
|
255
|
+
- spec/semipublic/associations/many_to_one_spec.rb
|
256
|
+
- spec/semipublic/associations/relationship_spec.rb
|
257
|
+
- spec/semipublic/associations_spec.rb
|
258
|
+
- spec/semipublic/collection_spec.rb
|
259
|
+
- spec/semipublic/model_spec.rb
|
260
|
+
- spec/semipublic/property_spec.rb
|
261
|
+
- spec/semipublic/query/conditions/comparison_spec.rb
|
262
|
+
- spec/semipublic/query/conditions/operation_spec.rb
|
263
|
+
- spec/semipublic/query/path_spec.rb
|
264
|
+
- spec/semipublic/query_spec.rb
|
265
|
+
- spec/semipublic/resource_spec.rb
|
266
|
+
- spec/semipublic/shared/condition_shared_spec.rb
|
267
|
+
- spec/semipublic/shared/resource_shared_spec.rb
|
268
|
+
- spec/spec_helper.rb
|