class-table-inheritance 1.2.0 → 1.2.1

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/README CHANGED
@@ -1,5 +1,10 @@
1
- ClassTableInheritance 1.1.0 BETA
2
- ================================
1
+ Versions
2
+ ========
3
+
4
+ If you are using Rails 2.3.8 or other version < 3, you have to use the version 1.1.x of this plugin, for Rails 3 you need to use the version 1.2.x or master of this plugin.
5
+
6
+ ClassTableInheritance 1.2.0
7
+ ===========================
3
8
 
4
9
  This is an ActiveRecord plugin designed to allow
5
10
  simple multiple table (class) inheritance.
@@ -9,7 +14,7 @@ ClassTableInheritance 1.1.0 BETA
9
14
  Multiple Table Inheritance with ActiveRecord => http://mediumexposure.com/multiple-table-inheritance-active-record/
10
15
 
11
16
  How to install
12
- =============
17
+ ==============
13
18
 
14
19
  gem install class-table-inheritance
15
20
 
@@ -0,0 +1,23 @@
1
+ require 'rake'
2
+ require 'rake/testtask'
3
+ require 'rake/rdoctask'
4
+
5
+ desc 'Default: run unit tests.'
6
+ task :default => :test
7
+
8
+ desc 'Test the class_table_inheritance plugin.'
9
+ Rake::TestTask.new(:test) do |t|
10
+ t.libs << 'lib'
11
+ t.libs << 'test'
12
+ t.pattern = 'test/**/*_test.rb'
13
+ t.verbose = true
14
+ end
15
+
16
+ desc 'Generate documentation for the class_table_inheritance plugin.'
17
+ Rake::RDocTask.new(:rdoc) do |rdoc|
18
+ rdoc.rdoc_dir = 'rdoc'
19
+ rdoc.title = 'ClassTableInheritance'
20
+ rdoc.options << '--line-numbers' << '--inline-source'
21
+ rdoc.rdoc_files.include('README')
22
+ rdoc.rdoc_files.include('lib/**/*.rb')
23
+ end
data/init.rb ADDED
@@ -0,0 +1 @@
1
+ require 'class-table-inheritance'
@@ -38,7 +38,7 @@ class ActiveRecord::Base
38
38
  def self.inherits_from(association_id)
39
39
 
40
40
  # add an association, and set the foreign key.
41
- has_one association_id, :foreign_key => :id
41
+ has_one association_id, :foreign_key => :id, :dependent => :destroy
42
42
 
43
43
 
44
44
  # set the primary key, it' need because the generalized table doesn't have
metadata CHANGED
@@ -1,24 +1,25 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: class-table-inheritance
3
3
  version: !ruby/object:Gem::Version
4
+ hash: 29
4
5
  prerelease: false
5
6
  segments:
6
7
  - 1
7
8
  - 2
8
- - 0
9
- version: 1.2.0
9
+ - 1
10
+ version: 1.2.1
10
11
  platform: ruby
11
12
  authors:
12
13
  - Bruno Frank Cordeiro
13
- autorequire: name
14
+ autorequire:
14
15
  bindir: bin
15
16
  cert_chain: []
16
17
 
17
- date: 2010-12-02 00:00:00 -02:00
18
+ date: 2010-12-03 00:00:00 -02:00
18
19
  default_executable:
19
20
  dependencies: []
20
21
 
21
- description:
22
+ description: ActiveRecord plugin designed to allow simple multiple table inheritance CTI.
22
23
  email: bfscordeiro@gmail.com
23
24
  executables: []
24
25
 
@@ -27,10 +28,16 @@ extensions: []
27
28
  extra_rdoc_files:
28
29
  - README
29
30
  files:
31
+ - class-table-inheritance-1.0.0.gem
32
+ - class-table-inheritance-1.1.0.gem
33
+ - class-table-inheritance-1.1.1.gem
34
+ - class-table-inheritance-1.2.0.gem
35
+ - class-table-inheritance-1.2.1.gem
36
+ - init.rb
30
37
  - lib/class-table-inheritance.rb
31
38
  - lib/inherits-migration.rb
39
+ - Rakefile
32
40
  - README
33
- - test/class_table_inheritance_test.rb
34
41
  has_rdoc: true
35
42
  homepage:
36
43
  licenses: []
@@ -45,6 +52,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
45
52
  requirements:
46
53
  - - ">="
47
54
  - !ruby/object:Gem::Version
55
+ hash: 3
48
56
  segments:
49
57
  - 0
50
58
  version: "0"
@@ -53,6 +61,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
53
61
  requirements:
54
62
  - - ">="
55
63
  - !ruby/object:Gem::Version
64
+ hash: 3
56
65
  segments:
57
66
  - 0
58
67
  version: "0"
@@ -63,5 +72,5 @@ rubygems_version: 1.3.7
63
72
  signing_key:
64
73
  specification_version: 3
65
74
  summary: ActiveRecord plugin designed to allow simple multiple table (class) inheritance.
66
- test_files:
67
- - test/class_table_inheritance_test.rb
75
+ test_files: []
76
+
@@ -1,8 +0,0 @@
1
- require 'test_helper'
2
-
3
- class ClassTableInheritanceTest < ActiveSupport::TestCase
4
- # Replace this with your real tests.
5
- test "the truth" do
6
- assert true
7
- end
8
- end