dm-core 1.0.0 → 1.0.1
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 +1 -0
- data/Gemfile +19 -20
- data/Rakefile +1 -1
- data/VERSION +1 -1
- data/dm-core.gemspec +15 -12
- data/lib/dm-core.rb +23 -14
- data/lib/dm-core/adapters.rb +7 -3
- data/lib/dm-core/adapters/abstract_adapter.rb +3 -9
- data/lib/dm-core/associations/many_to_many.rb +1 -1
- data/lib/dm-core/associations/many_to_one.rb +3 -4
- data/lib/dm-core/associations/one_to_many.rb +2 -2
- data/lib/dm-core/associations/one_to_one.rb +1 -1
- data/lib/dm-core/collection.rb +4 -6
- data/lib/dm-core/model.rb +22 -32
- data/lib/dm-core/model/property.rb +15 -39
- data/lib/dm-core/property.rb +75 -87
- data/lib/dm-core/property/discriminator.rb +3 -3
- data/lib/dm-core/property/lookup.rb +42 -0
- data/lib/dm-core/property/object.rb +5 -0
- data/lib/dm-core/property/serial.rb +6 -1
- data/lib/dm-core/query/conditions/comparison.rb +3 -3
- data/lib/dm-core/query/conditions/operation.rb +3 -3
- data/lib/dm-core/resource.rb +2 -2
- data/lib/dm-core/resource/state/dirty.rb +2 -2
- data/lib/dm-core/spec/lib/spec_helper.rb +11 -3
- data/lib/dm-core/spec/setup.rb +2 -2
- data/{spec/public/shared/property_shared_spec.rb → lib/dm-core/spec/shared/public/property_spec.rb} +51 -20
- data/{spec/semipublic/shared/property_shared_spec.rb → lib/dm-core/spec/shared/semipublic/property_spec.rb} +22 -26
- data/lib/dm-core/support/descendant_set.rb +84 -0
- data/lib/dm-core/support/naming_conventions.rb +8 -8
- data/lib/dm-core/types/discriminator.rb +2 -2
- data/spec/public/associations/many_to_one_with_custom_fk_spec.rb +49 -0
- data/spec/public/finalize_spec.rb +42 -11
- data/spec/public/property/discriminator_spec.rb +6 -6
- data/spec/semipublic/adapters/abstract_adapter_spec.rb +1 -1
- data/spec/semipublic/property/lookup_spec.rb +26 -0
- data/spec/semipublic/property_spec.rb +43 -0
- data/spec/semipublic/resource/state/dirty_spec.rb +4 -2
- data/spec/support/{types → properties}/huge_integer.rb +5 -5
- data/tasks/local_gemfile.rake +5 -7
- metadata +15 -19
- data/lib/dm-core/model/descendant_set.rb +0 -81
@@ -28,25 +28,25 @@ module DataMapper
|
|
28
28
|
|
29
29
|
module UnderscoredAndPluralized
|
30
30
|
def self.call(name)
|
31
|
-
|
31
|
+
DataMapper::Inflector.pluralize(DataMapper::Inflector.underscore(name)).gsub('/', '_')
|
32
32
|
end
|
33
33
|
end # module UnderscoredAndPluralized
|
34
34
|
|
35
35
|
module UnderscoredAndPluralizedWithoutModule
|
36
36
|
def self.call(name)
|
37
|
-
|
37
|
+
DataMapper::Inflector.pluralize(DataMapper::Inflector.underscore(DataMapper::Inflector.demodulize(name)))
|
38
38
|
end
|
39
39
|
end # module UnderscoredAndPluralizedWithoutModule
|
40
40
|
|
41
41
|
module Underscored
|
42
42
|
def self.call(name)
|
43
|
-
|
43
|
+
DataMapper::Inflector.underscore(name)
|
44
44
|
end
|
45
45
|
end # module Underscored
|
46
46
|
|
47
47
|
module Yaml
|
48
48
|
def self.call(name)
|
49
|
-
"#{
|
49
|
+
"#{DataMapper::Inflector.pluralize(DataMapper::Inflector.underscore(name))}.yaml"
|
50
50
|
end
|
51
51
|
end # module Yaml
|
52
52
|
|
@@ -56,25 +56,25 @@ module DataMapper
|
|
56
56
|
|
57
57
|
module UnderscoredAndPluralized
|
58
58
|
def self.call(property)
|
59
|
-
|
59
|
+
DataMapper::Inflector.pluralize(DataMapper::Inflector.underscore(property.name.to_s)).gsub('/', '_')
|
60
60
|
end
|
61
61
|
end # module UnderscoredAndPluralized
|
62
62
|
|
63
63
|
module UnderscoredAndPluralizedWithoutModule
|
64
64
|
def self.call(property)
|
65
|
-
|
65
|
+
DataMapper::Inflector.pluralize(DataMapper::Inflector.underscore(DataMapper::Inflector.demodulize(property.name.to_s)))
|
66
66
|
end
|
67
67
|
end # module UnderscoredAndPluralizedWithoutModule
|
68
68
|
|
69
69
|
module Underscored
|
70
70
|
def self.call(property)
|
71
|
-
|
71
|
+
DataMapper::Inflector.underscore(property.name.to_s)
|
72
72
|
end
|
73
73
|
end # module Underscored
|
74
74
|
|
75
75
|
module Yaml
|
76
76
|
def self.call(property)
|
77
|
-
"#{
|
77
|
+
"#{DataMapper::Inflector.pluralize(DataMapper::Inflector.underscore(property.name.to_s))}.yaml"
|
78
78
|
end
|
79
79
|
end # module Yaml
|
80
80
|
|
@@ -13,7 +13,7 @@ module DataMapper
|
|
13
13
|
model = property.model
|
14
14
|
property_name = property.name
|
15
15
|
|
16
|
-
model.default_scope(repository_name).update(property_name => model.descendants)
|
16
|
+
model.default_scope(repository_name).update(property_name => model.descendants.dup << model)
|
17
17
|
|
18
18
|
model.class_eval <<-RUBY, __FILE__, __LINE__ + 1
|
19
19
|
extend Chainable
|
@@ -40,7 +40,7 @@ module DataMapper
|
|
40
40
|
private
|
41
41
|
|
42
42
|
def set_discriminator_scope_for(model)
|
43
|
-
model.default_scope(#{repository_name.inspect}).update(#{property_name.inspect} => model.descendants)
|
43
|
+
model.default_scope(#{repository_name.inspect}).update(#{property_name.inspect} => model.descendants.dup << model)
|
44
44
|
end
|
45
45
|
end
|
46
46
|
RUBY
|
@@ -0,0 +1,49 @@
|
|
1
|
+
require File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'spec_helper'))
|
2
|
+
|
3
|
+
# TODO: combine this into many_to_one_spec.rb
|
4
|
+
|
5
|
+
describe 'Many to One Associations when foreign key is a custom property' do
|
6
|
+
before :all do
|
7
|
+
class ::CustomPK < DataMapper::Property::String
|
8
|
+
key true
|
9
|
+
end
|
10
|
+
|
11
|
+
class ::Animal
|
12
|
+
include DataMapper::Resource
|
13
|
+
|
14
|
+
property :id, Serial
|
15
|
+
property :name, String
|
16
|
+
|
17
|
+
belongs_to :zoo
|
18
|
+
end
|
19
|
+
|
20
|
+
class ::Zoo
|
21
|
+
include DataMapper::Resource
|
22
|
+
|
23
|
+
property :id, ::CustomPK
|
24
|
+
|
25
|
+
has n, :animals
|
26
|
+
end
|
27
|
+
|
28
|
+
DataMapper.finalize
|
29
|
+
end
|
30
|
+
|
31
|
+
supported_by :all do
|
32
|
+
before :all do
|
33
|
+
@zoo = Zoo.create(:id => 'foo')
|
34
|
+
@animal = @zoo.animals.create(:name => 'marty')
|
35
|
+
end
|
36
|
+
|
37
|
+
it 'should have FK of the same property type as zoo PK' do
|
38
|
+
Animal.properties[:zoo_id].class.should be(Zoo.properties[:id].class)
|
39
|
+
end
|
40
|
+
|
41
|
+
it 'should be able to access parent' do
|
42
|
+
@animal.zoo.should == @zoo
|
43
|
+
end
|
44
|
+
|
45
|
+
it 'should be able to access the children' do
|
46
|
+
@zoo.animals.should == [ @animal ]
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
@@ -9,9 +9,31 @@ describe DataMapper do
|
|
9
9
|
include DataMapper::Resource
|
10
10
|
property :id, Integer, :key => true
|
11
11
|
end
|
12
|
-
|
13
|
-
|
14
|
-
|
12
|
+
begin
|
13
|
+
method(:subject).should_not raise_error
|
14
|
+
ensure
|
15
|
+
DataMapper::Model.descendants.delete(ValidObject)
|
16
|
+
Object.send(:remove_const, :ValidObject)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
it "should not raise on valid child model" do
|
21
|
+
class ::ValidChild
|
22
|
+
include DataMapper::Resource
|
23
|
+
belongs_to :valid_object, :key => true
|
24
|
+
end
|
25
|
+
class ::ValidObject
|
26
|
+
include DataMapper::Resource
|
27
|
+
property :id, Integer, :key => true
|
28
|
+
end
|
29
|
+
begin
|
30
|
+
method(:subject).should_not raise_error
|
31
|
+
ensure
|
32
|
+
DataMapper::Model.descendants.delete(ValidChild)
|
33
|
+
DataMapper::Model.descendants.delete(ValidObject)
|
34
|
+
Object.send(:remove_const, :ValidChild)
|
35
|
+
Object.send(:remove_const, :ValidObject)
|
36
|
+
end
|
15
37
|
end
|
16
38
|
|
17
39
|
it 'should raise on an anonymous model' do
|
@@ -19,17 +41,23 @@ describe DataMapper do
|
|
19
41
|
include DataMapper::Resource
|
20
42
|
property :id, Integer, :key => true
|
21
43
|
end
|
22
|
-
|
23
|
-
|
44
|
+
begin
|
45
|
+
method(:subject).should raise_error(DataMapper::IncompleteModelError, "#{model.inspect} must have a name")
|
46
|
+
ensure
|
47
|
+
DataMapper::Model.descendants.delete(model)
|
48
|
+
end
|
24
49
|
end
|
25
50
|
|
26
51
|
it 'should raise on an empty model' do
|
27
52
|
class ::EmptyObject
|
28
53
|
include DataMapper::Resource
|
29
54
|
end
|
30
|
-
|
31
|
-
|
32
|
-
|
55
|
+
begin
|
56
|
+
method(:subject).should raise_error(DataMapper::IncompleteModelError, 'EmptyObject must have at least one property or many to one relationship to be valid')
|
57
|
+
ensure
|
58
|
+
DataMapper::Model.descendants.delete(EmptyObject)
|
59
|
+
Object.send(:remove_const, :EmptyObject)
|
60
|
+
end
|
33
61
|
end
|
34
62
|
|
35
63
|
it 'should raise on a keyless model' do
|
@@ -37,9 +65,12 @@ describe DataMapper do
|
|
37
65
|
include DataMapper::Resource
|
38
66
|
property :name, String
|
39
67
|
end
|
40
|
-
|
41
|
-
|
42
|
-
|
68
|
+
begin
|
69
|
+
method(:subject).should raise_error(DataMapper::IncompleteModelError, 'KeylessObject must have a key to be valid')
|
70
|
+
ensure
|
71
|
+
DataMapper::Model.descendants.delete(KeylessObject)
|
72
|
+
Object.send(:remove_const, :KeylessObject)
|
73
|
+
end
|
43
74
|
end
|
44
75
|
end
|
45
76
|
end
|
@@ -71,29 +71,29 @@ describe DataMapper::Property::Discriminator do
|
|
71
71
|
|
72
72
|
describe 'Model#descendants' do
|
73
73
|
it 'should set the descendants for the grandparent model' do
|
74
|
-
@article_model.descendants.to_a.should
|
74
|
+
@article_model.descendants.to_a.should =~ [ @announcement_model, @release_model ]
|
75
75
|
end
|
76
76
|
|
77
77
|
it 'should set the descendants for the parent model' do
|
78
|
-
@announcement_model.descendants.to_a.should == [ @
|
78
|
+
@announcement_model.descendants.to_a.should == [ @release_model ]
|
79
79
|
end
|
80
80
|
|
81
81
|
it 'should set the descendants for the child model' do
|
82
|
-
@release_model.descendants.to_a.should == [
|
82
|
+
@release_model.descendants.to_a.should == []
|
83
83
|
end
|
84
84
|
end
|
85
85
|
|
86
86
|
describe 'Model#default_scope' do
|
87
87
|
it 'should set the default scope for the grandparent model' do
|
88
|
-
@article_model.default_scope[:type].should
|
88
|
+
@article_model.default_scope[:type].to_a.should =~ [ @article_model, @announcement_model, @release_model ]
|
89
89
|
end
|
90
90
|
|
91
91
|
it 'should set the default scope for the parent model' do
|
92
|
-
@announcement_model.default_scope[:type].should
|
92
|
+
@announcement_model.default_scope[:type].to_a.should =~ [ @announcement_model, @release_model ]
|
93
93
|
end
|
94
94
|
|
95
95
|
it 'should set the default scope for the child model' do
|
96
|
-
@release_model.default_scope[:type].should
|
96
|
+
@release_model.default_scope[:type].to_a.should == [ @release_model ]
|
97
97
|
end
|
98
98
|
end
|
99
99
|
|
@@ -4,7 +4,7 @@ describe 'AbstractAdapter' do
|
|
4
4
|
before :all do
|
5
5
|
@adapter = DataMapper::Adapters::AbstractAdapter.new(:abstract, :foo => 'bar')
|
6
6
|
@adapter_class = @adapter.class
|
7
|
-
@scheme =
|
7
|
+
@scheme = DataMapper::Inflector.underscore(DataMapper::Inflector.demodulize(@adapter_class).chomp('Adapter'))
|
8
8
|
@adapter_name = "test_#{@scheme}".to_sym
|
9
9
|
end
|
10
10
|
|
@@ -0,0 +1,26 @@
|
|
1
|
+
require File.expand_path(File.join(File.dirname(__FILE__), '../..', 'spec_helper'))
|
2
|
+
require 'dm-core/property/lookup'
|
3
|
+
|
4
|
+
describe DataMapper::Property::Lookup do
|
5
|
+
supported_by :all do
|
6
|
+
before(:all) do
|
7
|
+
@klass = Class.new { extend DataMapper::Model }
|
8
|
+
|
9
|
+
DataMapper::Types::LegacyType = Class.new(DataMapper::Types::Text)
|
10
|
+
end
|
11
|
+
|
12
|
+
it "should provide access to Property classes" do
|
13
|
+
@klass::Serial.should == DataMapper::Property::Serial
|
14
|
+
end
|
15
|
+
|
16
|
+
it "should provide access to legacy Types" do
|
17
|
+
@klass::LegacyType.should be(DataMapper::Types::LegacyType)
|
18
|
+
end
|
19
|
+
|
20
|
+
it "should not provide access to unknown Property classes" do
|
21
|
+
lambda {
|
22
|
+
@klass::Bla
|
23
|
+
}.should raise_error(NameError)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -2,6 +2,49 @@ require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper'))
|
|
2
2
|
|
3
3
|
# instance methods
|
4
4
|
describe DataMapper::Property do
|
5
|
+
describe ".find_class" do
|
6
|
+
[ :Serial, :Text ].each do |type|
|
7
|
+
describe "with #{type}" do
|
8
|
+
subject { DataMapper::Property.find_class(type) }
|
9
|
+
|
10
|
+
it { subject.should be(DataMapper::Property.const_get(type)) }
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
describe ".determine_class" do
|
16
|
+
[ Integer, String, Float, Class, String, Time, DateTime, Date ].each do |type|
|
17
|
+
describe "with #{type}" do
|
18
|
+
subject { DataMapper::Property.determine_class(type) }
|
19
|
+
|
20
|
+
it { subject.should be(DataMapper::Property.const_get(type.name)) }
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
describe "with custom types" do
|
25
|
+
before :all do
|
26
|
+
module ::CustomProps
|
27
|
+
class Property
|
28
|
+
class Hash < DataMapper::Property::Object; end
|
29
|
+
class Other < DataMapper::Property::Object; end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
describe "with ::Foo::Property::Hash" do
|
35
|
+
subject { DataMapper::Property.determine_class(Hash) }
|
36
|
+
|
37
|
+
it { subject.should be(::CustomProps::Property::Hash) }
|
38
|
+
end
|
39
|
+
|
40
|
+
describe "with ::Foo::Property::Other" do
|
41
|
+
subject { DataMapper::Property.determine_class(::CustomProps::Property::Other) }
|
42
|
+
|
43
|
+
it { subject.should be(::CustomProps::Property::Other) }
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
5
48
|
before :all do
|
6
49
|
module ::Blog
|
7
50
|
class Author
|
@@ -51,7 +51,7 @@ describe DataMapper::Resource::State::Dirty do
|
|
51
51
|
it 'should set the child key if the parent key changes' do
|
52
52
|
original_id = @parent.id
|
53
53
|
@parent.update(:id => 42).should be(true)
|
54
|
-
method(:subject).should change(@resource, :parent_id).from(original_id
|
54
|
+
method(:subject).should change(@resource, :parent_id).from(original_id).to(42)
|
55
55
|
end
|
56
56
|
|
57
57
|
it 'should update the resource' do
|
@@ -127,7 +127,7 @@ describe DataMapper::Resource::State::Dirty do
|
|
127
127
|
supported_by :all do
|
128
128
|
describe 'with attributes that keep the resource dirty' do
|
129
129
|
before do
|
130
|
-
@key = @model.properties[:
|
130
|
+
@key = @model.properties[:id]
|
131
131
|
@value = @key.get!(@resource)
|
132
132
|
end
|
133
133
|
|
@@ -136,6 +136,8 @@ describe DataMapper::Resource::State::Dirty do
|
|
136
136
|
it 'should return a Dirty state' do
|
137
137
|
should equal(@state)
|
138
138
|
end
|
139
|
+
|
140
|
+
its(:original_attributes) { should == { @model.properties[:name] => 'Dan Kubb' } }
|
139
141
|
end
|
140
142
|
|
141
143
|
describe 'with attributes that make the resource clean' do
|
@@ -1,16 +1,16 @@
|
|
1
1
|
module DataMapper
|
2
|
-
|
2
|
+
class Property
|
3
3
|
class HugeInteger < DataMapper::Property::String
|
4
|
-
def
|
4
|
+
def load(value)
|
5
5
|
value.to_i unless value.nil?
|
6
6
|
end
|
7
7
|
|
8
|
-
def
|
8
|
+
def dump(value)
|
9
9
|
value.to_s unless value.nil?
|
10
10
|
end
|
11
11
|
|
12
|
-
def
|
13
|
-
load(value
|
12
|
+
def typecast(value)
|
13
|
+
load(value)
|
14
14
|
end
|
15
15
|
end
|
16
16
|
end
|
data/tasks/local_gemfile.rake
CHANGED
@@ -1,16 +1,14 @@
|
|
1
1
|
desc "Support bundling from local source code (allows BUNDLE_GEMFILE=Gemfile.local bundle foo)"
|
2
2
|
task :local_gemfile do |t|
|
3
3
|
|
4
|
-
root
|
5
|
-
datamapper
|
6
|
-
|
7
|
-
source_regex = /DATAMAPPER = 'git:\/\/github.com\/datamapper'/
|
8
|
-
gem_source_regex = /:git => \"#\{DATAMAPPER\}\/(.+?)(?:\.git)?\"/
|
4
|
+
root = Pathname(__FILE__).dirname.parent
|
5
|
+
datamapper = root.parent
|
9
6
|
|
10
7
|
root.join('Gemfile.local').open('w') do |f|
|
11
8
|
root.join('Gemfile').open.each do |line|
|
12
|
-
line.sub!(
|
13
|
-
line.sub!(
|
9
|
+
line.sub!(/DATAMAPPER = 'git:\/\/github.com\/datamapper'/, "DATAMAPPER = '#{datamapper}'")
|
10
|
+
line.sub!(/:git => \"#\{DATAMAPPER\}\/(.+?)(?:\.git)?\"/, ':path => "#{DATAMAPPER}/\1"')
|
11
|
+
line.sub!(/do_options\[:git\] = \"#\{DATAMAPPER\}\/(.+?)(?:\.git)?\"/, 'do_options[:path] = "#{DATAMAPPER}/\1"')
|
14
12
|
f.puts line
|
15
13
|
end
|
16
14
|
end
|
metadata
CHANGED
@@ -1,13 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dm-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash: 23
|
5
4
|
prerelease: false
|
6
5
|
segments:
|
7
6
|
- 1
|
8
7
|
- 0
|
9
|
-
-
|
10
|
-
version: 1.0.
|
8
|
+
- 1
|
9
|
+
version: 1.0.1
|
11
10
|
platform: ruby
|
12
11
|
authors:
|
13
12
|
- Dan Kubb
|
@@ -15,7 +14,7 @@ autorequire:
|
|
15
14
|
bindir: bin
|
16
15
|
cert_chain: []
|
17
16
|
|
18
|
-
date: 2010-
|
17
|
+
date: 2010-09-07 00:00:00 -07:00
|
19
18
|
default_executable:
|
20
19
|
dependencies:
|
21
20
|
- !ruby/object:Gem::Dependency
|
@@ -26,7 +25,6 @@ dependencies:
|
|
26
25
|
requirements:
|
27
26
|
- - ~>
|
28
27
|
- !ruby/object:Gem::Version
|
29
|
-
hash: 37
|
30
28
|
segments:
|
31
29
|
- 0
|
32
30
|
- 9
|
@@ -42,11 +40,10 @@ dependencies:
|
|
42
40
|
requirements:
|
43
41
|
- - ~>
|
44
42
|
- !ruby/object:Gem::Version
|
45
|
-
hash: 1
|
46
43
|
segments:
|
47
44
|
- 2
|
48
|
-
-
|
49
|
-
version: "2.
|
45
|
+
- 2
|
46
|
+
version: "2.2"
|
50
47
|
type: :runtime
|
51
48
|
version_requirements: *id002
|
52
49
|
- !ruby/object:Gem::Dependency
|
@@ -57,7 +54,6 @@ dependencies:
|
|
57
54
|
requirements:
|
58
55
|
- - ~>
|
59
56
|
- !ruby/object:Gem::Version
|
60
|
-
hash: 9
|
61
57
|
segments:
|
62
58
|
- 1
|
63
59
|
- 3
|
@@ -72,7 +68,6 @@ dependencies:
|
|
72
68
|
requirements:
|
73
69
|
- - ~>
|
74
70
|
- !ruby/object:Gem::Version
|
75
|
-
hash: 7
|
76
71
|
segments:
|
77
72
|
- 1
|
78
73
|
- 4
|
@@ -119,7 +114,6 @@ files:
|
|
119
114
|
- lib/dm-core/core_ext/try_dup.rb
|
120
115
|
- lib/dm-core/identity_map.rb
|
121
116
|
- lib/dm-core/model.rb
|
122
|
-
- lib/dm-core/model/descendant_set.rb
|
123
117
|
- lib/dm-core/model/hook.rb
|
124
118
|
- lib/dm-core/model/is.rb
|
125
119
|
- lib/dm-core/model/property.rb
|
@@ -135,6 +129,7 @@ files:
|
|
135
129
|
- lib/dm-core/property/discriminator.rb
|
136
130
|
- lib/dm-core/property/float.rb
|
137
131
|
- lib/dm-core/property/integer.rb
|
132
|
+
- lib/dm-core/property/lookup.rb
|
138
133
|
- lib/dm-core/property/numeric.rb
|
139
134
|
- lib/dm-core/property/object.rb
|
140
135
|
- lib/dm-core/property/serial.rb
|
@@ -167,11 +162,14 @@ files:
|
|
167
162
|
- lib/dm-core/spec/lib/spec_helper.rb
|
168
163
|
- lib/dm-core/spec/setup.rb
|
169
164
|
- lib/dm-core/spec/shared/adapter_spec.rb
|
165
|
+
- lib/dm-core/spec/shared/public/property_spec.rb
|
170
166
|
- lib/dm-core/spec/shared/resource_spec.rb
|
171
167
|
- lib/dm-core/spec/shared/sel_spec.rb
|
168
|
+
- lib/dm-core/spec/shared/semipublic/property_spec.rb
|
172
169
|
- lib/dm-core/support/assertions.rb
|
173
170
|
- lib/dm-core/support/chainable.rb
|
174
171
|
- lib/dm-core/support/deprecate.rb
|
172
|
+
- lib/dm-core/support/descendant_set.rb
|
175
173
|
- lib/dm-core/support/equalizer.rb
|
176
174
|
- lib/dm-core/support/hook.rb
|
177
175
|
- lib/dm-core/support/lazy_array.rb
|
@@ -194,6 +192,7 @@ files:
|
|
194
192
|
- spec/public/associations/many_to_many_spec.rb
|
195
193
|
- spec/public/associations/many_to_one_spec.rb
|
196
194
|
- spec/public/associations/many_to_one_with_boolean_cpk_spec.rb
|
195
|
+
- spec/public/associations/many_to_one_with_custom_fk_spec.rb
|
197
196
|
- spec/public/associations/one_to_many_spec.rb
|
198
197
|
- spec/public/associations/one_to_one_spec.rb
|
199
198
|
- spec/public/associations/one_to_one_with_boolean_cpk_spec.rb
|
@@ -225,7 +224,6 @@ files:
|
|
225
224
|
- spec/public/shared/collection_finder_shared_spec.rb
|
226
225
|
- spec/public/shared/collection_shared_spec.rb
|
227
226
|
- spec/public/shared/finder_shared_spec.rb
|
228
|
-
- spec/public/shared/property_shared_spec.rb
|
229
227
|
- spec/rcov.opts
|
230
228
|
- spec/semipublic/adapters/abstract_adapter_spec.rb
|
231
229
|
- spec/semipublic/adapters/in_memory_adapter_spec.rb
|
@@ -246,6 +244,7 @@ files:
|
|
246
244
|
- spec/semipublic/property/discriminator_spec.rb
|
247
245
|
- spec/semipublic/property/float_spec.rb
|
248
246
|
- spec/semipublic/property/integer_spec.rb
|
247
|
+
- spec/semipublic/property/lookup_spec.rb
|
249
248
|
- spec/semipublic/property/serial_spec.rb
|
250
249
|
- spec/semipublic/property/string_spec.rb
|
251
250
|
- spec/semipublic/property/text_spec.rb
|
@@ -263,13 +262,12 @@ files:
|
|
263
262
|
- spec/semipublic/resource/state_spec.rb
|
264
263
|
- spec/semipublic/resource_spec.rb
|
265
264
|
- spec/semipublic/shared/condition_shared_spec.rb
|
266
|
-
- spec/semipublic/shared/property_shared_spec.rb
|
267
265
|
- spec/semipublic/shared/resource_shared_spec.rb
|
268
266
|
- spec/semipublic/shared/resource_state_shared_spec.rb
|
269
267
|
- spec/semipublic/shared/subject_shared_spec.rb
|
270
268
|
- spec/spec.opts
|
271
269
|
- spec/spec_helper.rb
|
272
|
-
- spec/support/
|
270
|
+
- spec/support/properties/huge_integer.rb
|
273
271
|
- spec/unit/array_spec.rb
|
274
272
|
- spec/unit/hash_spec.rb
|
275
273
|
- spec/unit/hook_spec.rb
|
@@ -297,7 +295,6 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
297
295
|
requirements:
|
298
296
|
- - ">="
|
299
297
|
- !ruby/object:Gem::Version
|
300
|
-
hash: 3
|
301
298
|
segments:
|
302
299
|
- 0
|
303
300
|
version: "0"
|
@@ -306,7 +303,6 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
306
303
|
requirements:
|
307
304
|
- - ">="
|
308
305
|
- !ruby/object:Gem::Version
|
309
|
-
hash: 3
|
310
306
|
segments:
|
311
307
|
- 0
|
312
308
|
version: "0"
|
@@ -323,6 +319,7 @@ test_files:
|
|
323
319
|
- spec/public/associations/many_to_many_spec.rb
|
324
320
|
- spec/public/associations/many_to_one_spec.rb
|
325
321
|
- spec/public/associations/many_to_one_with_boolean_cpk_spec.rb
|
322
|
+
- spec/public/associations/many_to_one_with_custom_fk_spec.rb
|
326
323
|
- spec/public/associations/one_to_many_spec.rb
|
327
324
|
- spec/public/associations/one_to_one_spec.rb
|
328
325
|
- spec/public/associations/one_to_one_with_boolean_cpk_spec.rb
|
@@ -354,7 +351,6 @@ test_files:
|
|
354
351
|
- spec/public/shared/collection_finder_shared_spec.rb
|
355
352
|
- spec/public/shared/collection_shared_spec.rb
|
356
353
|
- spec/public/shared/finder_shared_spec.rb
|
357
|
-
- spec/public/shared/property_shared_spec.rb
|
358
354
|
- spec/semipublic/adapters/abstract_adapter_spec.rb
|
359
355
|
- spec/semipublic/adapters/in_memory_adapter_spec.rb
|
360
356
|
- spec/semipublic/associations/many_to_many_spec.rb
|
@@ -374,6 +370,7 @@ test_files:
|
|
374
370
|
- spec/semipublic/property/discriminator_spec.rb
|
375
371
|
- spec/semipublic/property/float_spec.rb
|
376
372
|
- spec/semipublic/property/integer_spec.rb
|
373
|
+
- spec/semipublic/property/lookup_spec.rb
|
377
374
|
- spec/semipublic/property/serial_spec.rb
|
378
375
|
- spec/semipublic/property/string_spec.rb
|
379
376
|
- spec/semipublic/property/text_spec.rb
|
@@ -391,12 +388,11 @@ test_files:
|
|
391
388
|
- spec/semipublic/resource/state_spec.rb
|
392
389
|
- spec/semipublic/resource_spec.rb
|
393
390
|
- spec/semipublic/shared/condition_shared_spec.rb
|
394
|
-
- spec/semipublic/shared/property_shared_spec.rb
|
395
391
|
- spec/semipublic/shared/resource_shared_spec.rb
|
396
392
|
- spec/semipublic/shared/resource_state_shared_spec.rb
|
397
393
|
- spec/semipublic/shared/subject_shared_spec.rb
|
398
394
|
- spec/spec_helper.rb
|
399
|
-
- spec/support/
|
395
|
+
- spec/support/properties/huge_integer.rb
|
400
396
|
- spec/unit/array_spec.rb
|
401
397
|
- spec/unit/hash_spec.rb
|
402
398
|
- spec/unit/hook_spec.rb
|