property 2.1.1 → 2.1.2

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/History.txt CHANGED
@@ -1,3 +1,8 @@
1
+ == 2.1.2 2010-12-04
2
+
3
+ * Major enhancements
4
+ * Fixed a bug preventing destruction of objects with a field index.
5
+
1
6
  == 2.1.1 2010-11-23
2
7
 
3
8
  * Major enhancements
@@ -228,6 +228,7 @@ module Property
228
228
  foreign_key = index_foreign_key
229
229
  current_id = self.id
230
230
  schema.index_groups.each do |group_name, definitions|
231
+ next if group_name =~ FIELD_INDEX_REGEXP
231
232
  if group_name.kind_of?(Class)
232
233
  group_name.delete_property_index(self)
233
234
  else
@@ -1,3 +1,3 @@
1
1
  module Property
2
- VERSION = '2.1.1'
2
+ VERSION = '2.1.2'
3
3
  end
data/property.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{property}
8
- s.version = "2.1.1"
8
+ s.version = "2.1.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Renaud Kern", "Gaspard Bucher"]
12
- s.date = %q{2010-11-23}
12
+ s.date = %q{2010-12-04}
13
13
  s.description = %q{Wrap model properties into a single database column and declare properties from within the model.}
14
14
  s.email = %q{gaspard@teti.ch}
15
15
  s.extra_rdoc_files = [
@@ -52,5 +52,19 @@ class IndexFieldTest < ActiveSupport::TestCase
52
52
  end
53
53
  end # on index rebuild
54
54
 
55
+ context 'on record destroy' do
56
+ subject do
57
+ Person.create('name' => 'Jake Sully', 'age' => 30)
58
+ end
59
+
60
+ should 'not raise an error' do
61
+ subject # create
62
+ assert_difference('Person.count', -1) do
63
+ assert_nothing_raised do
64
+ assert subject.destroy
65
+ end
66
+ end
67
+ end
68
+ end
55
69
  end
56
70
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: property
3
3
  version: !ruby/object:Gem::Version
4
- hash: 9
4
+ hash: 15
5
5
  prerelease: false
6
6
  segments:
7
7
  - 2
8
8
  - 1
9
- - 1
10
- version: 2.1.1
9
+ - 2
10
+ version: 2.1.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Renaud Kern
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2010-11-23 00:00:00 +01:00
19
+ date: 2010-12-04 00:00:00 +01:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency