dm-constraints 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +1 -1
- data/Rakefile +3 -2
- data/VERSION +1 -1
- data/dm-constraints.gemspec +8 -7
- data/lib/dm-constraints/delete_constraint.rb +4 -6
- metadata +7 -7
data/Gemfile
CHANGED
data/Rakefile
CHANGED
@@ -12,11 +12,12 @@ begin
|
|
12
12
|
gem.email = 'd.bussink [a] gmail [d] com'
|
13
13
|
gem.homepage = 'http://github.com/datamapper/%s' % gem.name
|
14
14
|
gem.authors = [ 'Dirkjan Bussink' ]
|
15
|
+
gem.has_rdoc = 'yard'
|
15
16
|
|
16
17
|
gem.rubyforge_project = 'datamapper'
|
17
18
|
|
18
|
-
gem.add_dependency 'dm-core', '~> 1.0.
|
19
|
-
gem.add_dependency 'dm-migrations', '~> 1.0.
|
19
|
+
gem.add_dependency 'dm-core', '~> 1.0.2'
|
20
|
+
gem.add_dependency 'dm-migrations', '~> 1.0.2'
|
20
21
|
|
21
22
|
gem.add_development_dependency 'rspec', '~> 1.3'
|
22
23
|
end
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.2
|
data/dm-constraints.gemspec
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{dm-constraints}
|
8
|
-
s.version = "1.0.
|
8
|
+
s.version = "1.0.2"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Dirkjan Bussink"]
|
@@ -49,6 +49,7 @@ Gem::Specification.new do |s|
|
|
49
49
|
"tasks/yard.rake",
|
50
50
|
"tasks/yardstick.rake"
|
51
51
|
]
|
52
|
+
s.has_rdoc = %q{yard}
|
52
53
|
s.homepage = %q{http://github.com/datamapper/dm-constraints}
|
53
54
|
s.rdoc_options = ["--charset=UTF-8"]
|
54
55
|
s.require_paths = ["lib"]
|
@@ -68,17 +69,17 @@ Gem::Specification.new do |s|
|
|
68
69
|
s.specification_version = 3
|
69
70
|
|
70
71
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
71
|
-
s.add_runtime_dependency(%q<dm-core>, ["~> 1.0.
|
72
|
-
s.add_runtime_dependency(%q<dm-migrations>, ["~> 1.0.
|
72
|
+
s.add_runtime_dependency(%q<dm-core>, ["~> 1.0.2"])
|
73
|
+
s.add_runtime_dependency(%q<dm-migrations>, ["~> 1.0.2"])
|
73
74
|
s.add_development_dependency(%q<rspec>, ["~> 1.3"])
|
74
75
|
else
|
75
|
-
s.add_dependency(%q<dm-core>, ["~> 1.0.
|
76
|
-
s.add_dependency(%q<dm-migrations>, ["~> 1.0.
|
76
|
+
s.add_dependency(%q<dm-core>, ["~> 1.0.2"])
|
77
|
+
s.add_dependency(%q<dm-migrations>, ["~> 1.0.2"])
|
77
78
|
s.add_dependency(%q<rspec>, ["~> 1.3"])
|
78
79
|
end
|
79
80
|
else
|
80
|
-
s.add_dependency(%q<dm-core>, ["~> 1.0.
|
81
|
-
s.add_dependency(%q<dm-migrations>, ["~> 1.0.
|
81
|
+
s.add_dependency(%q<dm-core>, ["~> 1.0.2"])
|
82
|
+
s.add_dependency(%q<dm-migrations>, ["~> 1.0.2"])
|
82
83
|
s.add_dependency(%q<rspec>, ["~> 1.3"])
|
83
84
|
end
|
84
85
|
end
|
@@ -17,7 +17,7 @@ module DataMapper
|
|
17
17
|
#
|
18
18
|
# @param options [Hash] options hash
|
19
19
|
#
|
20
|
-
# @
|
20
|
+
# @raise ArgumentError
|
21
21
|
#
|
22
22
|
# @return [nil]
|
23
23
|
#
|
@@ -52,7 +52,7 @@ module DataMapper
|
|
52
52
|
#
|
53
53
|
# @param block [Proc] proc to run
|
54
54
|
#
|
55
|
-
# @
|
55
|
+
# @note TODO: this should be moved to a 'util-like' module
|
56
56
|
#
|
57
57
|
# @return [nil]
|
58
58
|
#
|
@@ -82,13 +82,11 @@ module DataMapper
|
|
82
82
|
##
|
83
83
|
# Checks delete constraints prior to destroying a dm resource or collection
|
84
84
|
#
|
85
|
-
# @
|
86
|
-
#
|
87
|
-
# @notes
|
85
|
+
# @note
|
88
86
|
# - It only considers a relationship's constraints if this is the parent model (ie a child shouldn't delete a parent)
|
89
87
|
# - Many to Many Relationships are skipped, as they are evaluated by their underlying 1:M relationships
|
90
88
|
#
|
91
|
-
# @
|
89
|
+
# @return [nil]
|
92
90
|
#
|
93
91
|
# @api semi-public
|
94
92
|
def check_delete_constraints
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 1
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 1.0.
|
8
|
+
- 2
|
9
|
+
version: 1.0.2
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Dirkjan Bussink
|
@@ -28,8 +28,8 @@ dependencies:
|
|
28
28
|
segments:
|
29
29
|
- 1
|
30
30
|
- 0
|
31
|
-
-
|
32
|
-
version: 1.0.
|
31
|
+
- 2
|
32
|
+
version: 1.0.2
|
33
33
|
type: :runtime
|
34
34
|
version_requirements: *id001
|
35
35
|
- !ruby/object:Gem::Dependency
|
@@ -43,8 +43,8 @@ dependencies:
|
|
43
43
|
segments:
|
44
44
|
- 1
|
45
45
|
- 0
|
46
|
-
-
|
47
|
-
version: 1.0.
|
46
|
+
- 2
|
47
|
+
version: 1.0.2
|
48
48
|
type: :runtime
|
49
49
|
version_requirements: *id002
|
50
50
|
- !ruby/object:Gem::Dependency
|
@@ -102,7 +102,7 @@ files:
|
|
102
102
|
- tasks/spec.rake
|
103
103
|
- tasks/yard.rake
|
104
104
|
- tasks/yardstick.rake
|
105
|
-
has_rdoc:
|
105
|
+
has_rdoc: yard
|
106
106
|
homepage: http://github.com/datamapper/dm-constraints
|
107
107
|
licenses: []
|
108
108
|
|