dm-core 1.1.0 → 1.2.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +13 -11
- data/README.rdoc +1 -1
- data/Rakefile +1 -2
- data/VERSION +1 -1
- data/dm-core.gemspec +30 -176
- data/lib/dm-core.rb +32 -67
- data/lib/dm-core/adapters/abstract_adapter.rb +1 -2
- data/lib/dm-core/associations/many_to_many.rb +11 -5
- data/lib/dm-core/associations/many_to_one.rb +17 -2
- data/lib/dm-core/associations/one_to_many.rb +16 -0
- data/lib/dm-core/backwards.rb +13 -0
- data/lib/dm-core/collection.rb +1 -1
- data/lib/dm-core/model.rb +99 -41
- data/lib/dm-core/model/property.rb +24 -27
- data/lib/dm-core/model/relationship.rb +22 -28
- data/lib/dm-core/property.rb +37 -50
- data/lib/dm-core/property/boolean.rb +6 -10
- data/lib/dm-core/property/date.rb +0 -2
- data/lib/dm-core/property/date_time.rb +0 -2
- data/lib/dm-core/property/decimal.rb +5 -1
- data/lib/dm-core/property/discriminator.rb +24 -26
- data/lib/dm-core/property/float.rb +5 -1
- data/lib/dm-core/property/numeric.rb +6 -9
- data/lib/dm-core/property/string.rb +2 -1
- data/lib/dm-core/property/time.rb +0 -2
- data/lib/dm-core/property/typecast/time.rb +7 -2
- data/lib/dm-core/property_set.rb +1 -3
- data/lib/dm-core/query.rb +3 -10
- data/lib/dm-core/query/conditions/comparison.rb +5 -1
- data/lib/dm-core/query/conditions/operation.rb +1 -1
- data/lib/dm-core/relationship_set.rb +0 -2
- data/lib/dm-core/resource.rb +27 -28
- data/lib/dm-core/resource/{state.rb → persistence_state.rb} +2 -2
- data/lib/dm-core/resource/{state → persistence_state}/clean.rb +4 -4
- data/lib/dm-core/resource/{state → persistence_state}/deleted.rb +2 -2
- data/lib/dm-core/resource/{state → persistence_state}/dirty.rb +2 -2
- data/lib/dm-core/resource/{state → persistence_state}/immutable.rb +3 -3
- data/lib/dm-core/resource/{state → persistence_state}/persisted.rb +3 -3
- data/lib/dm-core/resource/{state → persistence_state}/transient.rb +3 -3
- data/lib/dm-core/spec/lib/adapter_helpers.rb +2 -5
- data/lib/dm-core/spec/setup.rb +3 -2
- data/lib/dm-core/spec/shared/public/property_spec.rb +8 -0
- data/lib/dm-core/spec/shared/resource_spec.rb +14 -0
- data/lib/dm-core/spec/shared/semipublic/property_spec.rb +1 -1
- data/lib/dm-core/support/descendant_set.rb +0 -2
- data/lib/dm-core/support/ext/array.rb +0 -19
- data/lib/dm-core/support/ext/blank.rb +1 -0
- data/lib/dm-core/support/hook.rb +0 -3
- data/lib/dm-core/support/naming_conventions.rb +6 -0
- data/lib/dm-core/support/ordered_set.rb +0 -2
- data/lib/dm-core/support/subject_set.rb +0 -2
- data/lib/dm-core/version.rb +1 -1
- data/spec/public/associations/many_to_many_spec.rb +0 -1
- data/spec/public/model/property_spec.rb +55 -9
- data/spec/public/model/relationship_spec.rb +24 -2
- data/spec/public/model_spec.rb +32 -0
- data/spec/public/property/binary_spec.rb +14 -6
- data/spec/public/property/boolean_spec.rb +14 -6
- data/spec/public/property/class_spec.rb +14 -6
- data/spec/public/property/date_spec.rb +14 -6
- data/spec/public/property/date_time_spec.rb +14 -6
- data/spec/public/property/decimal_spec.rb +10 -2
- data/spec/public/property/discriminator_spec.rb +15 -1
- data/spec/public/property/float_spec.rb +14 -6
- data/spec/public/property/integer_spec.rb +14 -6
- data/spec/public/property/object_spec.rb +8 -0
- data/spec/public/property/serial_spec.rb +14 -6
- data/spec/public/property/string_spec.rb +14 -6
- data/spec/public/property/text_spec.rb +14 -6
- data/spec/public/property/time_spec.rb +14 -6
- data/spec/public/resource_spec.rb +58 -0
- data/spec/public/shared/finder_shared_spec.rb +8 -4
- data/spec/semipublic/associations/many_to_many_spec.rb +2 -0
- data/spec/semipublic/associations/many_to_one_spec.rb +2 -0
- data/spec/semipublic/associations/one_to_many_spec.rb +2 -0
- data/spec/semipublic/associations/one_to_one_spec.rb +2 -0
- data/spec/semipublic/property/binary_spec.rb +5 -5
- data/spec/semipublic/property/boolean_spec.rb +5 -5
- data/spec/semipublic/property/class_spec.rb +5 -5
- data/spec/semipublic/property/date_spec.rb +5 -5
- data/spec/semipublic/property/date_time_spec.rb +5 -5
- data/spec/semipublic/property/decimal_spec.rb +2 -2
- data/spec/semipublic/property/discriminator_spec.rb +5 -5
- data/spec/semipublic/property/float_spec.rb +5 -5
- data/spec/semipublic/property/integer_spec.rb +5 -5
- data/spec/semipublic/property/lookup_spec.rb +3 -3
- data/spec/semipublic/property/serial_spec.rb +5 -5
- data/spec/semipublic/property/string_spec.rb +5 -5
- data/spec/semipublic/property/text_spec.rb +5 -5
- data/spec/semipublic/property/time_spec.rb +5 -5
- data/spec/semipublic/query/conditions/comparison_spec.rb +44 -4
- data/spec/semipublic/query_spec.rb +2 -11
- data/spec/semipublic/resource/state/clean_spec.rb +6 -6
- data/spec/semipublic/resource/state/deleted_spec.rb +4 -4
- data/spec/semipublic/resource/state/dirty_spec.rb +8 -8
- data/spec/semipublic/resource/state/immutable_spec.rb +6 -6
- data/spec/semipublic/resource/state/transient_spec.rb +5 -5
- data/spec/semipublic/resource/state_spec.rb +15 -15
- data/spec/semipublic/shared/resource_shared_spec.rb +7 -1
- data/spec/semipublic/shared/resource_state_shared_spec.rb +8 -8
- data/spec/unit/array_spec.rb +0 -14
- data/spec/unit/blank_spec.rb +11 -0
- metadata +70 -188
- data/lib/dm-core/support/inflector.rb +0 -3
@@ -1,5 +1,5 @@
|
|
1
1
|
require 'spec_helper'
|
2
|
-
describe DataMapper::Resource::
|
2
|
+
describe DataMapper::Resource::PersistenceState::Dirty do
|
3
3
|
before :all do
|
4
4
|
class ::Author
|
5
5
|
include DataMapper::Resource
|
@@ -24,8 +24,8 @@ describe DataMapper::Resource::State::Dirty do
|
|
24
24
|
@resource = @model.create(:id => 2, :name => 'Dan Kubb', :parent => @parent)
|
25
25
|
@resource.attributes = { :name => 'John Doe' }
|
26
26
|
|
27
|
-
@state = @resource.
|
28
|
-
@state.should be_kind_of(DataMapper::Resource::
|
27
|
+
@state = @resource.persistence_state
|
28
|
+
@state.should be_kind_of(DataMapper::Resource::PersistenceState::Dirty)
|
29
29
|
end
|
30
30
|
|
31
31
|
after do
|
@@ -44,7 +44,7 @@ describe DataMapper::Resource::State::Dirty do
|
|
44
44
|
end
|
45
45
|
|
46
46
|
it 'should return a Clean state' do
|
47
|
-
should eql(DataMapper::Resource::
|
47
|
+
should eql(DataMapper::Resource::PersistenceState::Clean.new(@resource))
|
48
48
|
end
|
49
49
|
|
50
50
|
it 'should set the child key if the parent key changes' do
|
@@ -91,7 +91,7 @@ describe DataMapper::Resource::State::Dirty do
|
|
91
91
|
it_should_behave_like 'It resets resource state'
|
92
92
|
|
93
93
|
it 'should return a Deleted state' do
|
94
|
-
should eql(DataMapper::Resource::
|
94
|
+
should eql(DataMapper::Resource::PersistenceState::Deleted.new(@resource))
|
95
95
|
end
|
96
96
|
end
|
97
97
|
end
|
@@ -101,7 +101,7 @@ describe DataMapper::Resource::State::Dirty do
|
|
101
101
|
@loaded_value = 'John Doe'
|
102
102
|
end
|
103
103
|
|
104
|
-
it_should_behave_like 'Resource::
|
104
|
+
it_should_behave_like 'Resource::PersistenceState::Persisted#get'
|
105
105
|
end
|
106
106
|
|
107
107
|
describe '#rollback' do
|
@@ -115,7 +115,7 @@ describe DataMapper::Resource::State::Dirty do
|
|
115
115
|
it_should_behave_like 'It resets resource state'
|
116
116
|
|
117
117
|
it 'should return a Clean state' do
|
118
|
-
should eql(DataMapper::Resource::
|
118
|
+
should eql(DataMapper::Resource::PersistenceState::Clean.new(@resource))
|
119
119
|
end
|
120
120
|
end
|
121
121
|
end
|
@@ -148,7 +148,7 @@ describe DataMapper::Resource::State::Dirty do
|
|
148
148
|
it_should_behave_like 'A method that delegates to the superclass #set'
|
149
149
|
|
150
150
|
it 'should return a Clean state' do
|
151
|
-
should eql(DataMapper::Resource::
|
151
|
+
should eql(DataMapper::Resource::PersistenceState::Clean.new(@resource))
|
152
152
|
end
|
153
153
|
end
|
154
154
|
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
require 'spec_helper'
|
2
|
-
describe DataMapper::Resource::
|
2
|
+
describe DataMapper::Resource::PersistenceState::Immutable do
|
3
3
|
before :all do
|
4
4
|
class ::Author
|
5
5
|
include DataMapper::Resource
|
@@ -20,12 +20,12 @@ describe DataMapper::Resource::State::Immutable do
|
|
20
20
|
before do
|
21
21
|
@parent = @model.create(:name => 'John Doe')
|
22
22
|
|
23
|
-
@resource
|
24
|
-
attributes =
|
25
|
-
@resource
|
23
|
+
@resource = @model.create(:name => 'Dan Kubb', :parent => @parent)
|
24
|
+
attributes = Hash[ @model.key.zip(@resource.key) ]
|
25
|
+
@resource = @model.first(attributes.merge(:fields => [ :name, :parent_id ]))
|
26
26
|
|
27
|
-
@state = @resource.
|
28
|
-
@state.should be_kind_of(DataMapper::Resource::
|
27
|
+
@state = @resource.persistence_state
|
28
|
+
@state.should be_kind_of(DataMapper::Resource::PersistenceState::Immutable)
|
29
29
|
end
|
30
30
|
|
31
31
|
after do
|
@@ -1,5 +1,5 @@
|
|
1
1
|
require 'spec_helper'
|
2
|
-
describe DataMapper::Resource::
|
2
|
+
describe DataMapper::Resource::PersistenceState::Transient do
|
3
3
|
before :all do
|
4
4
|
class ::Author
|
5
5
|
include DataMapper::Resource
|
@@ -26,8 +26,8 @@ describe DataMapper::Resource::State::Transient do
|
|
26
26
|
@parent = @model.create(:name => 'John Doe')
|
27
27
|
@resource = @model.new(:name => 'Dan Kubb', :coding => false, :parent => @parent)
|
28
28
|
|
29
|
-
@state = @resource.
|
30
|
-
@state.should be_kind_of(DataMapper::Resource::
|
29
|
+
@state = @resource.persistence_state
|
30
|
+
@state.should be_kind_of(DataMapper::Resource::PersistenceState::Transient)
|
31
31
|
end
|
32
32
|
|
33
33
|
after do
|
@@ -39,7 +39,7 @@ describe DataMapper::Resource::State::Transient do
|
|
39
39
|
|
40
40
|
supported_by :all do
|
41
41
|
it 'should return the expected Clean state' do
|
42
|
-
should eql(DataMapper::Resource::
|
42
|
+
should eql(DataMapper::Resource::PersistenceState::Clean.new(@resource))
|
43
43
|
end
|
44
44
|
|
45
45
|
it 'should set the serial property' do
|
@@ -80,7 +80,7 @@ describe DataMapper::Resource::State::Transient do
|
|
80
80
|
}
|
81
81
|
|
82
82
|
expect do
|
83
|
-
@resource.
|
83
|
+
@resource.persistence_state = subject
|
84
84
|
end.should change { @resource.original_attributes.dup }.from(original_attributes).to({})
|
85
85
|
end
|
86
86
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
|
-
describe DataMapper::Resource::
|
3
|
+
describe DataMapper::Resource::PersistenceState do
|
4
4
|
before :all do
|
5
5
|
class ::Author
|
6
6
|
include DataMapper::Resource
|
@@ -20,13 +20,13 @@ describe DataMapper::Resource::State do
|
|
20
20
|
before do
|
21
21
|
@resource = @model.new(:name => 'Dan Kubb')
|
22
22
|
|
23
|
-
@state = DataMapper::Resource::
|
23
|
+
@state = DataMapper::Resource::PersistenceState.new(@resource)
|
24
24
|
end
|
25
25
|
|
26
26
|
describe '.new' do
|
27
|
-
subject { DataMapper::Resource::
|
27
|
+
subject { DataMapper::Resource::PersistenceState.new(@resource) }
|
28
28
|
|
29
|
-
it { should be_kind_of(DataMapper::Resource::
|
29
|
+
it { should be_kind_of(DataMapper::Resource::PersistenceState) }
|
30
30
|
end
|
31
31
|
|
32
32
|
describe '#==' do
|
@@ -35,7 +35,7 @@ describe DataMapper::Resource::State do
|
|
35
35
|
supported_by :all do
|
36
36
|
describe 'with the same class and resource' do
|
37
37
|
before do
|
38
|
-
@other = DataMapper::Resource::
|
38
|
+
@other = DataMapper::Resource::PersistenceState.new(@resource)
|
39
39
|
end
|
40
40
|
|
41
41
|
it { should be(true) }
|
@@ -47,7 +47,7 @@ describe DataMapper::Resource::State do
|
|
47
47
|
|
48
48
|
describe 'with the same class and different resource' do
|
49
49
|
before do
|
50
|
-
@other = DataMapper::Resource::
|
50
|
+
@other = DataMapper::Resource::PersistenceState.new(@model.new)
|
51
51
|
end
|
52
52
|
|
53
53
|
it { should be(false) }
|
@@ -59,7 +59,7 @@ describe DataMapper::Resource::State do
|
|
59
59
|
|
60
60
|
describe 'with a different class and the same resource' do
|
61
61
|
before do
|
62
|
-
@other = DataMapper::Resource::
|
62
|
+
@other = DataMapper::Resource::PersistenceState::Clean.new(@resource)
|
63
63
|
end
|
64
64
|
|
65
65
|
it 'should be true for a subclass' do
|
@@ -73,7 +73,7 @@ describe DataMapper::Resource::State do
|
|
73
73
|
|
74
74
|
describe 'with a different class and different resource' do
|
75
75
|
before do
|
76
|
-
@other = DataMapper::Resource::
|
76
|
+
@other = DataMapper::Resource::PersistenceState::Clean.new(@model.new)
|
77
77
|
end
|
78
78
|
|
79
79
|
it { should be(false) }
|
@@ -90,7 +90,7 @@ describe DataMapper::Resource::State do
|
|
90
90
|
subject { @state.send(method) }
|
91
91
|
|
92
92
|
it 'should raise an exception' do
|
93
|
-
method(:subject).should raise_error(NotImplementedError, "DataMapper::Resource::
|
93
|
+
method(:subject).should raise_error(NotImplementedError, "DataMapper::Resource::PersistenceState##{method} should be implemented")
|
94
94
|
end
|
95
95
|
end
|
96
96
|
end
|
@@ -101,7 +101,7 @@ describe DataMapper::Resource::State do
|
|
101
101
|
supported_by :all do
|
102
102
|
describe 'with the same class and resource' do
|
103
103
|
before do
|
104
|
-
@other = DataMapper::Resource::
|
104
|
+
@other = DataMapper::Resource::PersistenceState.new(@resource)
|
105
105
|
end
|
106
106
|
|
107
107
|
it { should be(true) }
|
@@ -113,7 +113,7 @@ describe DataMapper::Resource::State do
|
|
113
113
|
|
114
114
|
describe 'with the same class and different resource' do
|
115
115
|
before do
|
116
|
-
@other = DataMapper::Resource::
|
116
|
+
@other = DataMapper::Resource::PersistenceState.new(@model.new)
|
117
117
|
end
|
118
118
|
|
119
119
|
it { should be(false) }
|
@@ -125,7 +125,7 @@ describe DataMapper::Resource::State do
|
|
125
125
|
|
126
126
|
describe 'with a different class and the same resource' do
|
127
127
|
before do
|
128
|
-
@other = DataMapper::Resource::
|
128
|
+
@other = DataMapper::Resource::PersistenceState::Clean.new(@resource)
|
129
129
|
end
|
130
130
|
|
131
131
|
it { should be(false) }
|
@@ -137,7 +137,7 @@ describe DataMapper::Resource::State do
|
|
137
137
|
|
138
138
|
describe 'with a different class and different resource' do
|
139
139
|
before do
|
140
|
-
@other = DataMapper::Resource::
|
140
|
+
@other = DataMapper::Resource::PersistenceState::Clean.new(@model.new)
|
141
141
|
end
|
142
142
|
|
143
143
|
it { should be(false) }
|
@@ -202,7 +202,7 @@ describe DataMapper::Resource::State do
|
|
202
202
|
end
|
203
203
|
|
204
204
|
it 'should return a state object' do
|
205
|
-
should be_kind_of(DataMapper::Resource::
|
205
|
+
should be_kind_of(DataMapper::Resource::PersistenceState)
|
206
206
|
end
|
207
207
|
|
208
208
|
it 'should change the object attributes' do
|
@@ -218,7 +218,7 @@ describe DataMapper::Resource::State do
|
|
218
218
|
end
|
219
219
|
|
220
220
|
it 'should return a state object' do
|
221
|
-
should be_kind_of(DataMapper::Resource::
|
221
|
+
should be_kind_of(DataMapper::Resource::PersistenceState)
|
222
222
|
end
|
223
223
|
|
224
224
|
it 'should change the object relationship' do
|
@@ -160,10 +160,16 @@ share_examples_for 'A semipublic Resource' do
|
|
160
160
|
property :name, String
|
161
161
|
property :value, Integer
|
162
162
|
end
|
163
|
-
DataMapper.finalize
|
164
163
|
end
|
165
164
|
|
166
165
|
with_alternate_adapter do
|
166
|
+
before :all do
|
167
|
+
if @user_model.respond_to?(:auto_migrate!)
|
168
|
+
# force the user model to be available in the alternate repository
|
169
|
+
@user_model.auto_migrate!(@adapter.name)
|
170
|
+
end
|
171
|
+
end
|
172
|
+
|
167
173
|
it 'should return the default repository when nothing is specified' do
|
168
174
|
default_repository = DataMapper.repository(:default)
|
169
175
|
@user_model.create(:name => 'carl').repository.should == default_repository
|
@@ -2,9 +2,9 @@ share_examples_for 'A method that delegates to the superclass #set' do
|
|
2
2
|
it 'should delegate to the superclass' do
|
3
3
|
# this is the only way I could think of to test if the
|
4
4
|
# superclass method is being called
|
5
|
-
DataMapper::Resource::
|
5
|
+
DataMapper::Resource::PersistenceState.class_eval { alias_method :original_set, :set; undef_method(:set) }
|
6
6
|
method(:subject).should raise_error(NoMethodError)
|
7
|
-
DataMapper::Resource::
|
7
|
+
DataMapper::Resource::PersistenceState.class_eval { alias_method :set, :original_set; undef_method(:original_set) }
|
8
8
|
end
|
9
9
|
end
|
10
10
|
|
@@ -12,9 +12,9 @@ share_examples_for 'A method that does not delegate to the superclass #set' do
|
|
12
12
|
it 'should delegate to the superclass' do
|
13
13
|
# this is the only way I could think of to test if the
|
14
14
|
# superclass method is not being called
|
15
|
-
DataMapper::Resource::
|
15
|
+
DataMapper::Resource::PersistenceState.class_eval { alias_method :original_set, :set; undef_method(:set) }
|
16
16
|
method(:subject).should_not raise_error(NoMethodError)
|
17
|
-
DataMapper::Resource::
|
17
|
+
DataMapper::Resource::PersistenceState.class_eval { alias_method :set, :original_set; undef_method(:original_set) }
|
18
18
|
end
|
19
19
|
end
|
20
20
|
|
@@ -36,7 +36,7 @@ share_examples_for 'It resets resource state' do
|
|
36
36
|
end
|
37
37
|
end
|
38
38
|
|
39
|
-
share_examples_for 'Resource::
|
39
|
+
share_examples_for 'Resource::PersistenceState::Persisted#get' do
|
40
40
|
subject { @state.get(@key) }
|
41
41
|
|
42
42
|
supported_by :all do
|
@@ -49,9 +49,9 @@ share_examples_for 'Resource::State::Persisted#get' do
|
|
49
49
|
@resource.should be_dirty
|
50
50
|
@resource.save.should be(true)
|
51
51
|
|
52
|
-
attributes =
|
53
|
-
@resource
|
54
|
-
@state
|
52
|
+
attributes = Hash[ @model.key.zip(@resource.key) ]
|
53
|
+
@resource = @model.first(attributes.merge(:fields => @model.key))
|
54
|
+
@state = @state.class.new(@resource)
|
55
55
|
|
56
56
|
# make sure the subject is not loaded
|
57
57
|
@key.should_not be_loaded(@resource)
|
data/spec/unit/array_spec.rb
CHANGED
@@ -7,20 +7,6 @@ describe DataMapper::Ext::Array do
|
|
7
7
|
@array = [ [ :a, [ 1 ] ], [ :b, [ 2 ] ], [ :c, [ 3 ] ] ].freeze
|
8
8
|
end
|
9
9
|
|
10
|
-
describe '.to_hash' do
|
11
|
-
before :all do
|
12
|
-
@return = DataMapper::Ext::Array.to_hash(@array)
|
13
|
-
end
|
14
|
-
|
15
|
-
it 'should return a Hash' do
|
16
|
-
@return.should be_kind_of(Hash)
|
17
|
-
end
|
18
|
-
|
19
|
-
it 'should return expected value' do
|
20
|
-
@return.should == { :a => [ 1 ], :b => [ 2 ], :c => [ 3 ] }
|
21
|
-
end
|
22
|
-
end
|
23
|
-
|
24
10
|
describe '.to_mash' do
|
25
11
|
before :all do
|
26
12
|
@return = DataMapper::Ext::Array.to_mash(@array)
|
data/spec/unit/blank_spec.rb
CHANGED
@@ -60,3 +60,14 @@ describe 'DataMapper::Ext.blank?', String do
|
|
60
60
|
DataMapper::Ext.blank?(' a ').should == false
|
61
61
|
end
|
62
62
|
end
|
63
|
+
|
64
|
+
describe 'DataMapper::Ext.blank?', 'object with #blank?' do
|
65
|
+
subject { DataMapper::Ext.blank?(object) }
|
66
|
+
|
67
|
+
let(:return_value) { mock('Return Value') }
|
68
|
+
let(:object) { mock('Object', :blank? => return_value) }
|
69
|
+
|
70
|
+
it 'returns the object#blank? result if supported' do
|
71
|
+
should equal(return_value)
|
72
|
+
end
|
73
|
+
end
|
metadata
CHANGED
@@ -1,8 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dm-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
|
4
|
+
hash: 15424023
|
5
|
+
prerelease: 6
|
6
|
+
segments:
|
7
|
+
- 1
|
8
|
+
- 2
|
9
|
+
- 0
|
10
|
+
- rc
|
11
|
+
- 1
|
12
|
+
version: 1.2.0.rc1
|
6
13
|
platform: ruby
|
7
14
|
authors:
|
8
15
|
- Dan Kubb
|
@@ -10,64 +17,72 @@ autorequire:
|
|
10
17
|
bindir: bin
|
11
18
|
cert_chain: []
|
12
19
|
|
13
|
-
date: 2011-
|
14
|
-
default_executable:
|
20
|
+
date: 2011-09-09 00:00:00 Z
|
15
21
|
dependencies:
|
16
22
|
- !ruby/object:Gem::Dependency
|
17
|
-
name: addressable
|
18
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
19
|
-
none: false
|
20
|
-
requirements:
|
21
|
-
- - ~>
|
22
|
-
- !ruby/object:Gem::Version
|
23
|
-
version: 2.2.4
|
24
23
|
type: :runtime
|
25
|
-
|
26
|
-
version_requirements: *id001
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: jeweler
|
29
|
-
requirement: &id002 !ruby/object:Gem::Requirement
|
24
|
+
version_requirements: &id001 !ruby/object:Gem::Requirement
|
30
25
|
none: false
|
31
26
|
requirements:
|
32
27
|
- - ~>
|
33
28
|
- !ruby/object:Gem::Version
|
34
|
-
|
35
|
-
|
29
|
+
hash: 11
|
30
|
+
segments:
|
31
|
+
- 2
|
32
|
+
- 2
|
33
|
+
- 6
|
34
|
+
version: 2.2.6
|
36
35
|
prerelease: false
|
37
|
-
|
36
|
+
requirement: *id001
|
37
|
+
name: addressable
|
38
38
|
- !ruby/object:Gem::Dependency
|
39
|
-
|
40
|
-
|
39
|
+
type: :development
|
40
|
+
version_requirements: &id002 !ruby/object:Gem::Requirement
|
41
41
|
none: false
|
42
42
|
requirements:
|
43
43
|
- - ~>
|
44
44
|
- !ruby/object:Gem::Version
|
45
|
-
|
46
|
-
|
45
|
+
hash: 7
|
46
|
+
segments:
|
47
|
+
- 1
|
48
|
+
- 6
|
49
|
+
- 4
|
50
|
+
version: 1.6.4
|
47
51
|
prerelease: false
|
48
|
-
|
52
|
+
requirement: *id002
|
53
|
+
name: jeweler
|
49
54
|
- !ruby/object:Gem::Dependency
|
50
|
-
|
51
|
-
|
55
|
+
type: :development
|
56
|
+
version_requirements: &id003 !ruby/object:Gem::Requirement
|
52
57
|
none: false
|
53
58
|
requirements:
|
54
59
|
- - ~>
|
55
60
|
- !ruby/object:Gem::Version
|
56
|
-
|
57
|
-
|
61
|
+
hash: 63
|
62
|
+
segments:
|
63
|
+
- 0
|
64
|
+
- 9
|
65
|
+
- 2
|
66
|
+
version: 0.9.2
|
58
67
|
prerelease: false
|
59
|
-
|
68
|
+
requirement: *id003
|
69
|
+
name: rake
|
60
70
|
- !ruby/object:Gem::Dependency
|
61
|
-
|
62
|
-
|
71
|
+
type: :development
|
72
|
+
version_requirements: &id004 !ruby/object:Gem::Requirement
|
63
73
|
none: false
|
64
74
|
requirements:
|
65
75
|
- - ~>
|
66
76
|
- !ruby/object:Gem::Version
|
67
|
-
|
68
|
-
|
77
|
+
hash: 31
|
78
|
+
segments:
|
79
|
+
- 1
|
80
|
+
- 3
|
81
|
+
- 2
|
82
|
+
version: 1.3.2
|
69
83
|
prerelease: false
|
70
|
-
|
84
|
+
requirement: *id004
|
85
|
+
name: rspec
|
71
86
|
description: Faster, Better, Simpler.
|
72
87
|
email: dan.kubb@gmail.com
|
73
88
|
executables: []
|
@@ -96,6 +111,7 @@ files:
|
|
96
111
|
- lib/dm-core/associations/one_to_many.rb
|
97
112
|
- lib/dm-core/associations/one_to_one.rb
|
98
113
|
- lib/dm-core/associations/relationship.rb
|
114
|
+
- lib/dm-core/backwards.rb
|
99
115
|
- lib/dm-core/collection.rb
|
100
116
|
- lib/dm-core/core_ext/kernel.rb
|
101
117
|
- lib/dm-core/core_ext/pathname.rb
|
@@ -137,13 +153,13 @@ files:
|
|
137
153
|
- lib/dm-core/relationship_set.rb
|
138
154
|
- lib/dm-core/repository.rb
|
139
155
|
- lib/dm-core/resource.rb
|
140
|
-
- lib/dm-core/resource/
|
141
|
-
- lib/dm-core/resource/
|
142
|
-
- lib/dm-core/resource/
|
143
|
-
- lib/dm-core/resource/
|
144
|
-
- lib/dm-core/resource/
|
145
|
-
- lib/dm-core/resource/
|
146
|
-
- lib/dm-core/resource/
|
156
|
+
- lib/dm-core/resource/persistence_state.rb
|
157
|
+
- lib/dm-core/resource/persistence_state/clean.rb
|
158
|
+
- lib/dm-core/resource/persistence_state/deleted.rb
|
159
|
+
- lib/dm-core/resource/persistence_state/dirty.rb
|
160
|
+
- lib/dm-core/resource/persistence_state/immutable.rb
|
161
|
+
- lib/dm-core/resource/persistence_state/persisted.rb
|
162
|
+
- lib/dm-core/resource/persistence_state/transient.rb
|
147
163
|
- lib/dm-core/spec/lib/adapter_helpers.rb
|
148
164
|
- lib/dm-core/spec/lib/collection_helpers.rb
|
149
165
|
- lib/dm-core/spec/lib/counter_adapter.rb
|
@@ -170,7 +186,6 @@ files:
|
|
170
186
|
- lib/dm-core/support/ext/try_dup.rb
|
171
187
|
- lib/dm-core/support/hook.rb
|
172
188
|
- lib/dm-core/support/inflections.rb
|
173
|
-
- lib/dm-core/support/inflector.rb
|
174
189
|
- lib/dm-core/support/inflector/inflections.rb
|
175
190
|
- lib/dm-core/support/inflector/methods.rb
|
176
191
|
- lib/dm-core/support/lazy_array.rb
|
@@ -331,7 +346,6 @@ files:
|
|
331
346
|
- tasks/spec.rake
|
332
347
|
- tasks/yard.rake
|
333
348
|
- tasks/yardstick.rake
|
334
|
-
has_rdoc: true
|
335
349
|
homepage: http://github.com/datamapper/dm-core
|
336
350
|
licenses: []
|
337
351
|
|
@@ -345,159 +359,27 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
345
359
|
requirements:
|
346
360
|
- - ">="
|
347
361
|
- !ruby/object:Gem::Version
|
362
|
+
hash: 3
|
363
|
+
segments:
|
364
|
+
- 0
|
348
365
|
version: "0"
|
349
366
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
350
367
|
none: false
|
351
368
|
requirements:
|
352
|
-
- - "
|
369
|
+
- - ">"
|
353
370
|
- !ruby/object:Gem::Version
|
354
|
-
|
371
|
+
hash: 25
|
372
|
+
segments:
|
373
|
+
- 1
|
374
|
+
- 3
|
375
|
+
- 1
|
376
|
+
version: 1.3.1
|
355
377
|
requirements: []
|
356
378
|
|
357
379
|
rubyforge_project: datamapper
|
358
|
-
rubygems_version: 1.
|
380
|
+
rubygems_version: 1.8.10
|
359
381
|
signing_key:
|
360
382
|
specification_version: 3
|
361
383
|
summary: An Object/Relational Mapper for Ruby
|
362
|
-
test_files:
|
363
|
-
|
364
|
-
- spec/public/associations/many_to_many/read_multiple_join_spec.rb
|
365
|
-
- spec/public/associations/many_to_many_spec.rb
|
366
|
-
- spec/public/associations/many_to_one_spec.rb
|
367
|
-
- spec/public/associations/many_to_one_with_boolean_cpk_spec.rb
|
368
|
-
- spec/public/associations/many_to_one_with_custom_fk_spec.rb
|
369
|
-
- spec/public/associations/one_to_many_spec.rb
|
370
|
-
- spec/public/associations/one_to_one_spec.rb
|
371
|
-
- spec/public/associations/one_to_one_with_boolean_cpk_spec.rb
|
372
|
-
- spec/public/collection_spec.rb
|
373
|
-
- spec/public/finalize_spec.rb
|
374
|
-
- spec/public/model/hook_spec.rb
|
375
|
-
- spec/public/model/property_spec.rb
|
376
|
-
- spec/public/model/relationship_spec.rb
|
377
|
-
- spec/public/model_spec.rb
|
378
|
-
- spec/public/property/binary_spec.rb
|
379
|
-
- spec/public/property/boolean_spec.rb
|
380
|
-
- spec/public/property/class_spec.rb
|
381
|
-
- spec/public/property/date_spec.rb
|
382
|
-
- spec/public/property/date_time_spec.rb
|
383
|
-
- spec/public/property/decimal_spec.rb
|
384
|
-
- spec/public/property/discriminator_spec.rb
|
385
|
-
- spec/public/property/float_spec.rb
|
386
|
-
- spec/public/property/integer_spec.rb
|
387
|
-
- spec/public/property/object_spec.rb
|
388
|
-
- spec/public/property/serial_spec.rb
|
389
|
-
- spec/public/property/string_spec.rb
|
390
|
-
- spec/public/property/text_spec.rb
|
391
|
-
- spec/public/property/time_spec.rb
|
392
|
-
- spec/public/property_spec.rb
|
393
|
-
- spec/public/resource_spec.rb
|
394
|
-
- spec/public/sel_spec.rb
|
395
|
-
- spec/public/setup_spec.rb
|
396
|
-
- spec/public/shared/association_collection_shared_spec.rb
|
397
|
-
- spec/public/shared/collection_finder_shared_spec.rb
|
398
|
-
- spec/public/shared/collection_shared_spec.rb
|
399
|
-
- spec/public/shared/finder_shared_spec.rb
|
400
|
-
- spec/semipublic/adapters/abstract_adapter_spec.rb
|
401
|
-
- spec/semipublic/adapters/in_memory_adapter_spec.rb
|
402
|
-
- spec/semipublic/associations/many_to_many_spec.rb
|
403
|
-
- spec/semipublic/associations/many_to_one_spec.rb
|
404
|
-
- spec/semipublic/associations/one_to_many_spec.rb
|
405
|
-
- spec/semipublic/associations/one_to_one_spec.rb
|
406
|
-
- spec/semipublic/associations/relationship_spec.rb
|
407
|
-
- spec/semipublic/associations_spec.rb
|
408
|
-
- spec/semipublic/collection_spec.rb
|
409
|
-
- spec/semipublic/model_spec.rb
|
410
|
-
- spec/semipublic/property/binary_spec.rb
|
411
|
-
- spec/semipublic/property/boolean_spec.rb
|
412
|
-
- spec/semipublic/property/class_spec.rb
|
413
|
-
- spec/semipublic/property/date_spec.rb
|
414
|
-
- spec/semipublic/property/date_time_spec.rb
|
415
|
-
- spec/semipublic/property/decimal_spec.rb
|
416
|
-
- spec/semipublic/property/discriminator_spec.rb
|
417
|
-
- spec/semipublic/property/float_spec.rb
|
418
|
-
- spec/semipublic/property/integer_spec.rb
|
419
|
-
- spec/semipublic/property/lookup_spec.rb
|
420
|
-
- spec/semipublic/property/serial_spec.rb
|
421
|
-
- spec/semipublic/property/string_spec.rb
|
422
|
-
- spec/semipublic/property/text_spec.rb
|
423
|
-
- spec/semipublic/property/time_spec.rb
|
424
|
-
- spec/semipublic/property_spec.rb
|
425
|
-
- spec/semipublic/query/conditions/comparison_spec.rb
|
426
|
-
- spec/semipublic/query/conditions/operation_spec.rb
|
427
|
-
- spec/semipublic/query/path_spec.rb
|
428
|
-
- spec/semipublic/query_spec.rb
|
429
|
-
- spec/semipublic/resource/state/clean_spec.rb
|
430
|
-
- spec/semipublic/resource/state/deleted_spec.rb
|
431
|
-
- spec/semipublic/resource/state/dirty_spec.rb
|
432
|
-
- spec/semipublic/resource/state/immutable_spec.rb
|
433
|
-
- spec/semipublic/resource/state/transient_spec.rb
|
434
|
-
- spec/semipublic/resource/state_spec.rb
|
435
|
-
- spec/semipublic/resource_spec.rb
|
436
|
-
- spec/semipublic/shared/condition_shared_spec.rb
|
437
|
-
- spec/semipublic/shared/resource_shared_spec.rb
|
438
|
-
- spec/semipublic/shared/resource_state_shared_spec.rb
|
439
|
-
- spec/semipublic/shared/subject_shared_spec.rb
|
440
|
-
- spec/spec_helper.rb
|
441
|
-
- spec/support/core_ext/hash.rb
|
442
|
-
- spec/support/core_ext/inheritable_attributes.rb
|
443
|
-
- spec/support/properties/huge_integer.rb
|
444
|
-
- spec/unit/array_spec.rb
|
445
|
-
- spec/unit/blank_spec.rb
|
446
|
-
- spec/unit/data_mapper/ordered_set/append_spec.rb
|
447
|
-
- spec/unit/data_mapper/ordered_set/clear_spec.rb
|
448
|
-
- spec/unit/data_mapper/ordered_set/delete_spec.rb
|
449
|
-
- spec/unit/data_mapper/ordered_set/each_spec.rb
|
450
|
-
- spec/unit/data_mapper/ordered_set/empty_spec.rb
|
451
|
-
- spec/unit/data_mapper/ordered_set/entries_spec.rb
|
452
|
-
- spec/unit/data_mapper/ordered_set/eql_spec.rb
|
453
|
-
- spec/unit/data_mapper/ordered_set/equal_value_spec.rb
|
454
|
-
- spec/unit/data_mapper/ordered_set/hash_spec.rb
|
455
|
-
- spec/unit/data_mapper/ordered_set/include_spec.rb
|
456
|
-
- spec/unit/data_mapper/ordered_set/index_spec.rb
|
457
|
-
- spec/unit/data_mapper/ordered_set/initialize_spec.rb
|
458
|
-
- spec/unit/data_mapper/ordered_set/merge_spec.rb
|
459
|
-
- spec/unit/data_mapper/ordered_set/shared/append_spec.rb
|
460
|
-
- spec/unit/data_mapper/ordered_set/shared/clear_spec.rb
|
461
|
-
- spec/unit/data_mapper/ordered_set/shared/delete_spec.rb
|
462
|
-
- spec/unit/data_mapper/ordered_set/shared/each_spec.rb
|
463
|
-
- spec/unit/data_mapper/ordered_set/shared/empty_spec.rb
|
464
|
-
- spec/unit/data_mapper/ordered_set/shared/entries_spec.rb
|
465
|
-
- spec/unit/data_mapper/ordered_set/shared/include_spec.rb
|
466
|
-
- spec/unit/data_mapper/ordered_set/shared/index_spec.rb
|
467
|
-
- spec/unit/data_mapper/ordered_set/shared/initialize_spec.rb
|
468
|
-
- spec/unit/data_mapper/ordered_set/shared/merge_spec.rb
|
469
|
-
- spec/unit/data_mapper/ordered_set/shared/size_spec.rb
|
470
|
-
- spec/unit/data_mapper/ordered_set/shared/to_ary_spec.rb
|
471
|
-
- spec/unit/data_mapper/ordered_set/size_spec.rb
|
472
|
-
- spec/unit/data_mapper/ordered_set/to_ary_spec.rb
|
473
|
-
- spec/unit/data_mapper/subject_set/append_spec.rb
|
474
|
-
- spec/unit/data_mapper/subject_set/clear_spec.rb
|
475
|
-
- spec/unit/data_mapper/subject_set/delete_spec.rb
|
476
|
-
- spec/unit/data_mapper/subject_set/each_spec.rb
|
477
|
-
- spec/unit/data_mapper/subject_set/empty_spec.rb
|
478
|
-
- spec/unit/data_mapper/subject_set/entries_spec.rb
|
479
|
-
- spec/unit/data_mapper/subject_set/get_spec.rb
|
480
|
-
- spec/unit/data_mapper/subject_set/include_spec.rb
|
481
|
-
- spec/unit/data_mapper/subject_set/named_spec.rb
|
482
|
-
- spec/unit/data_mapper/subject_set/shared/append_spec.rb
|
483
|
-
- spec/unit/data_mapper/subject_set/shared/clear_spec.rb
|
484
|
-
- spec/unit/data_mapper/subject_set/shared/delete_spec.rb
|
485
|
-
- spec/unit/data_mapper/subject_set/shared/each_spec.rb
|
486
|
-
- spec/unit/data_mapper/subject_set/shared/empty_spec.rb
|
487
|
-
- spec/unit/data_mapper/subject_set/shared/entries_spec.rb
|
488
|
-
- spec/unit/data_mapper/subject_set/shared/get_spec.rb
|
489
|
-
- spec/unit/data_mapper/subject_set/shared/include_spec.rb
|
490
|
-
- spec/unit/data_mapper/subject_set/shared/named_spec.rb
|
491
|
-
- spec/unit/data_mapper/subject_set/shared/size_spec.rb
|
492
|
-
- spec/unit/data_mapper/subject_set/shared/to_ary_spec.rb
|
493
|
-
- spec/unit/data_mapper/subject_set/shared/values_at_spec.rb
|
494
|
-
- spec/unit/data_mapper/subject_set/size_spec.rb
|
495
|
-
- spec/unit/data_mapper/subject_set/to_ary_spec.rb
|
496
|
-
- spec/unit/data_mapper/subject_set/values_at_spec.rb
|
497
|
-
- spec/unit/hash_spec.rb
|
498
|
-
- spec/unit/hook_spec.rb
|
499
|
-
- spec/unit/lazy_array_spec.rb
|
500
|
-
- spec/unit/mash_spec.rb
|
501
|
-
- spec/unit/module_spec.rb
|
502
|
-
- spec/unit/object_spec.rb
|
503
|
-
- spec/unit/try_dup_spec.rb
|
384
|
+
test_files: []
|
385
|
+
|