acts-as-dag 2.5.4 → 2.5.5

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.5.4
1
+ 2.5.5
@@ -238,12 +238,12 @@ module Dag
238
238
 
239
239
  protected
240
240
 
241
- #Changes on a wire based on the count (destroy! or save!) (should not be called outside this plugin)
241
+ # Changes on a wire based on the count (destroy or save!) (should not be called outside this plugin)
242
242
  def push_associated_modification!(edge)
243
243
  raise ActiveRecord::ActiveRecordError, 'ERROR: cannot modify our self in this way' if edge == self
244
244
  edge.do_not_perpetuate = true
245
245
  if edge.count == 0
246
- edge.destroy!
246
+ edge.destroy
247
247
  else
248
248
  edge.save!
249
249
  end
@@ -1,6 +1,6 @@
1
1
  require 'test/unit'
2
2
  require 'rubygems'
3
- gem 'activerecord', '= 3.0.3'
3
+ gem 'activerecord', '~> 3.0.3'
4
4
  require "./init"
5
5
 
6
6
 
@@ -842,4 +842,14 @@ class DagTest < Test::Unit::TestCase
842
842
  assert_equal [c,d], path
843
843
  end
844
844
 
845
+ # Tests that perpetuate upon destroy works
846
+ def tests_perpetuate_upon_destroy_link
847
+ a = Node.create!
848
+ b = Node.create!
849
+ c = Node.create!
850
+ e = Default.create_edge!(a,b)
851
+ f = Default.create_edge!(b,c)
852
+ e.destroy
853
+ end
854
+
845
855
  end
Binary file
metadata CHANGED
@@ -1,12 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: acts-as-dag
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 2
7
- - 5
8
- - 4
9
- version: 2.5.4
4
+ prerelease:
5
+ version: 2.5.5
10
6
  platform: ruby
11
7
  authors:
12
8
  - Matthew Leventi
@@ -15,7 +11,7 @@ autorequire:
15
11
  bindir: bin
16
12
  cert_chain: []
17
13
 
18
- date: 2011-02-04 00:00:00 -08:00
14
+ date: 2011-04-29 00:00:00 -07:00
19
15
  default_executable:
20
16
  dependencies: []
21
17
 
@@ -56,21 +52,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
56
52
  requirements:
57
53
  - - ">="
58
54
  - !ruby/object:Gem::Version
59
- segments:
60
- - 0
61
55
  version: "0"
62
56
  required_rubygems_version: !ruby/object:Gem::Requirement
63
57
  none: false
64
58
  requirements:
65
59
  - - ">="
66
60
  - !ruby/object:Gem::Version
67
- segments:
68
- - 0
69
61
  version: "0"
70
62
  requirements: []
71
63
 
72
64
  rubyforge_project: acts-as-dag
73
- rubygems_version: 1.3.7
65
+ rubygems_version: 1.6.2
74
66
  signing_key:
75
67
  specification_version: 3
76
68
  summary: Acts As DAG Gem