soft_destroyable 0.1.7 → 0.1.8
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/VERSION +1 -1
- data/lib/soft_destroyable.rb +1 -1
- data/soft_destroyable.gemspec +1 -1
- data/test/class_method_test.rb +5 -0
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.8
|
data/lib/soft_destroyable.rb
CHANGED
@@ -57,7 +57,7 @@ module SoftDestroyable
|
|
57
57
|
# returns an array of association symbols that must be managed by soft_destroyable on
|
58
58
|
# destroy and destroy!
|
59
59
|
def soft_dependencies
|
60
|
-
|
60
|
+
has_one_dependencies + has_many_dependencies
|
61
61
|
end
|
62
62
|
|
63
63
|
def restrict_dependencies
|
data/soft_destroyable.gemspec
CHANGED
data/test/class_method_test.rb
CHANGED
@@ -40,6 +40,11 @@ class ClassMethodTest < Test::Unit::TestCase
|
|
40
40
|
assert Parent.soft_dependencies.include? :parent_nickname
|
41
41
|
end
|
42
42
|
|
43
|
+
def test_soft_dependency_order
|
44
|
+
# verify has_one dependencies are evaluated before has_many
|
45
|
+
assert Parent.soft_dependencies.index(:soft_one) < Parent.soft_dependencies.index(:soft_children)
|
46
|
+
end
|
47
|
+
|
43
48
|
def test_restrict_dependencies
|
44
49
|
assert_equal 4, Parent.restrict_dependencies.count
|
45
50
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: soft_destroyable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 11
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 8
|
10
|
+
version: 0.1.8
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Michael Kintzer
|