soft_deletion 0.4.1 → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
data.tar.gz.sig CHANGED
Binary file
@@ -4,10 +4,14 @@ rvm:
4
4
  - 2.0
5
5
  gemfile:
6
6
  - gemfiles/rails2.gemfile
7
- - gemfiles/rails3.gemfile
7
+ - gemfiles/rails32.gemfile
8
8
  - gemfiles/rails4.gemfile
9
9
  matrix:
10
10
  exclude:
11
11
  - rvm: 2.0
12
12
  gemfile: gemfiles/rails2.gemfile
13
+ - rvm: 2.0
14
+ gemfile: gemfiles/rails30.gemfile
15
+ - rvm: 1.8.7
16
+ gemfile: gemfiles/rails4.gemfile
13
17
  script: "rake spec"
data/Appraisals CHANGED
@@ -1,11 +1,17 @@
1
1
  appraise "rails2" do
2
- version = "2.3.14"
2
+ version = "2.3.18"
3
3
  gem 'activerecord', version
4
4
  gem 'activesupport', version
5
5
  end
6
6
 
7
- appraise "rails3" do
8
- version = "3.2.3"
7
+ appraise "rails30" do
8
+ version = "3.0.20"
9
+ gem 'activerecord', version
10
+ gem 'activesupport', version
11
+ end
12
+
13
+ appraise "rails32" do
14
+ version = "3.2.13"
9
15
  gem 'activerecord', version
10
16
  gem 'activesupport', version
11
17
  end
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- soft_deletion (0.4.1)
4
+ soft_deletion (0.4.2)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -8,7 +8,7 @@ gem "sqlite3"
8
8
  gem "rspec"
9
9
  gem "database_cleaner", "1.0.0.RC1"
10
10
  gem "bump"
11
- gem "activerecord", "2.3.14"
12
- gem "activesupport", "2.3.14"
11
+ gem "activerecord", "2.3.18"
12
+ gem "activesupport", "2.3.18"
13
13
 
14
14
  gemspec :path=>"../"
@@ -0,0 +1,14 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "appraisal"
6
+ gem "rake"
7
+ gem "sqlite3"
8
+ gem "rspec"
9
+ gem "database_cleaner", "1.0.0.RC1"
10
+ gem "bump"
11
+ gem "activerecord", "3.0.20"
12
+ gem "activesupport", "3.0.20"
13
+
14
+ gemspec :path=>"../"
@@ -0,0 +1,14 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "appraisal"
6
+ gem "rake"
7
+ gem "sqlite3"
8
+ gem "rspec"
9
+ gem "database_cleaner", "1.0.0.RC1"
10
+ gem "bump"
11
+ gem "activerecord", "3.2.13"
12
+ gem "activesupport", "3.2.13"
13
+
14
+ gemspec :path=>"../"
@@ -33,7 +33,7 @@ module SoftDeletion
33
33
 
34
34
  def nullify_dependencies
35
35
  dependencies.each do |dependency|
36
- dependency.update_attribute(association.primary_key_name, nil)
36
+ dependency.update_attribute(association.options[:foreign_key], nil)
37
37
  end
38
38
  end
39
39
 
@@ -1,3 +1,3 @@
1
1
  module SoftDeletion
2
- VERSION = '0.4.1'
2
+ VERSION = '0.4.2'
3
3
  end
@@ -238,8 +238,8 @@ describe SoftDeletion do
238
238
  category.soft_delete!
239
239
 
240
240
  forum.reload
241
- forum.should be_deleted
242
- #forum.category_id.should be_nil # TODO
241
+ forum.should_not be_deleted
242
+ forum.category_id.should be_nil
243
243
  end
244
244
  end
245
245
  end
@@ -109,7 +109,7 @@ class NDACategory < ActiveRecord::Base
109
109
 
110
110
  has_soft_deletion
111
111
 
112
- has_many :forums, :dependent => :destroy, :foreign_key => :category_id
112
+ has_many :forums, :dependent => :nullify, :foreign_key => :category_id
113
113
  end
114
114
 
115
115
  # Has ome association
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: soft_deletion
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -36,7 +36,7 @@ cert_chain:
36
36
  VHNmKzZNYWVud0FNa0FnSGRzd0dzSnp0T25ObkJhM0YKeTBrQ1NXbUs2RCt4
37
37
  L1NiZlM2cjdLZTA3TVJxemlKZEI5R3VFMSswY0lSdUZoOEVRK0xONkhYQ0tN
38
38
  NXBvbi9HVQp5Y3dNWGZsMAotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg==
39
- date: 2013-04-24 00:00:00.000000000 Z
39
+ date: 2013-06-13 00:00:00.000000000 Z
40
40
  dependencies: []
41
41
  description:
42
42
  email: michael@grosser.it
@@ -55,6 +55,8 @@ files:
55
55
  - gem-public_cert.pem
56
56
  - gemfiles/rails2.gemfile
57
57
  - gemfiles/rails3.gemfile
58
+ - gemfiles/rails30.gemfile
59
+ - gemfiles/rails32.gemfile
58
60
  - gemfiles/rails4.gemfile
59
61
  - lib/soft_deletion.rb
60
62
  - lib/soft_deletion/core.rb
@@ -79,7 +81,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
79
81
  version: '0'
80
82
  segments:
81
83
  - 0
82
- hash: 4177162783989057611
84
+ hash: -2568323612092411395
83
85
  required_rubygems_version: !ruby/object:Gem::Requirement
84
86
  none: false
85
87
  requirements:
@@ -88,7 +90,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
88
90
  version: '0'
89
91
  segments:
90
92
  - 0
91
- hash: 4177162783989057611
93
+ hash: -2568323612092411395
92
94
  requirements: []
93
95
  rubyforge_project:
94
96
  rubygems_version: 1.8.25
metadata.gz.sig CHANGED
Binary file