composite_primary_keys 2.3.5.1 → 3.0.0.b2
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 +26 -0
- data/README.txt +1 -1
- data/Rakefile +41 -51
- data/lib/composite_primary_keys.rb +19 -7
- data/lib/composite_primary_keys/association_preload.rb +75 -170
- data/lib/composite_primary_keys/associations.rb +98 -400
- data/lib/composite_primary_keys/associations/association_proxy.rb +32 -0
- data/lib/composite_primary_keys/associations/has_and_belongs_to_many_association.rb +30 -0
- data/lib/composite_primary_keys/associations/has_many_association.rb +72 -0
- data/lib/composite_primary_keys/associations/has_one_association.rb +19 -0
- data/lib/composite_primary_keys/associations/through_association_scope.rb +103 -0
- data/lib/composite_primary_keys/base.rb +148 -305
- data/lib/composite_primary_keys/calculations.rb +22 -64
- data/lib/composite_primary_keys/composite_arrays.rb +3 -10
- data/lib/composite_primary_keys/connection_adapters/abstract_adapter.rb +9 -0
- data/lib/composite_primary_keys/connection_adapters/oracle_enhanced_adapter.rb +17 -0
- data/lib/composite_primary_keys/connection_adapters/postgresql_adapter.rb +1 -1
- data/lib/composite_primary_keys/finder_methods.rb +71 -0
- data/lib/composite_primary_keys/fixtures.rb +1 -1
- data/lib/composite_primary_keys/read.rb +25 -0
- data/lib/composite_primary_keys/reflection.rb +30 -10
- data/lib/composite_primary_keys/relation.rb +31 -0
- data/lib/composite_primary_keys/validations/uniqueness.rb +106 -66
- data/lib/composite_primary_keys/version.rb +4 -4
- data/scripts/console.rb +1 -1
- data/tasks/Rakefile.rb +13 -0
- data/tasks/databases/mysql.rake +11 -15
- data/tasks/databases/oracle.rake +10 -11
- data/tasks/databases/postgresql.rake +10 -13
- data/tasks/databases/sqlite3.rake +9 -9
- data/test/README_tests.txt +1 -45
- data/test/abstract_unit.rb +17 -14
- data/test/connections/connection_spec.rb +19 -0
- data/test/connections/databases.example.yml +11 -0
- data/test/connections/databases.yml +13 -0
- data/test/connections/native_mysql/connection.rb +10 -2
- data/test/connections/native_oracle/connection.rb +7 -4
- data/test/connections/native_oracle_enhanced/connection.rb +23 -0
- data/test/connections/native_postgresql/connection.rb +13 -5
- data/test/connections/native_sqlite/connection.rb +7 -3
- data/test/fixtures/article_group.rb +4 -0
- data/test/fixtures/article_groups.yml +7 -0
- data/test/fixtures/db_definitions/postgresql.sql +2 -1
- data/test/fixtures/debug.log +133 -0
- data/test/fixtures/dorm.rb +3 -0
- data/test/fixtures/dorms.yml +2 -0
- data/test/fixtures/kitchen_sink.rb +3 -0
- data/test/fixtures/kitchen_sinks.yml +5 -0
- data/test/fixtures/reference_codes.yml +2 -0
- data/test/fixtures/reference_type.rb +1 -1
- data/test/fixtures/restaurant.rb +6 -0
- data/test/fixtures/restaurants.yml +5 -0
- data/test/fixtures/restaurants_suburbs.yml +11 -0
- data/test/fixtures/room.rb +10 -0
- data/test/fixtures/room_assignment.rb +4 -0
- data/test/fixtures/room_assignments.yml +4 -0
- data/test/fixtures/room_attribute.rb +3 -0
- data/test/fixtures/room_attribute_assignment.rb +5 -0
- data/test/fixtures/room_attribute_assignments.yml +4 -0
- data/test/fixtures/room_attributes.yml +3 -0
- data/test/fixtures/rooms.yml +3 -0
- data/test/fixtures/seat.rb +5 -0
- data/test/fixtures/seats.yml +4 -0
- data/test/fixtures/student.rb +4 -0
- data/test/fixtures/students.yml +2 -0
- data/test/test_associations.rb +27 -50
- data/test/test_attributes.rb +15 -19
- data/test/test_composite_arrays.rb +2 -21
- data/test/test_create.rb +3 -3
- data/test/test_delete.rb +7 -20
- data/test/test_exists.rb +3 -7
- data/test/test_find.rb +0 -8
- data/test/test_ids.rb +3 -17
- data/test/test_polymorphic.rb +5 -4
- data/test/test_suite.rb +19 -0
- data/test/{test_tutorial_examle.rb → test_tutorial_example.rb} +0 -0
- metadata +110 -72
- data/Manifest.txt +0 -123
- data/lib/adapter_helper/base.rb +0 -63
- data/lib/adapter_helper/mysql.rb +0 -13
- data/lib/adapter_helper/oracle.rb +0 -12
- data/lib/adapter_helper/postgresql.rb +0 -13
- data/lib/adapter_helper/sqlite3.rb +0 -13
- data/lib/composite_primary_keys/migration.rb +0 -20
- data/local/database_connections.rb.sample +0 -12
- data/local/paths.rb.sample +0 -2
- data/local/tasks.rb.sample +0 -2
- data/tasks/activerecord_selection.rake +0 -43
- data/tasks/databases.rake +0 -12
- data/tasks/deployment.rake +0 -22
- data/tasks/local_setup.rake +0 -13
- data/test/test_dummy.rb +0 -28
- data/tmp/test.db +0 -0
- data/website/index.html +0 -195
- data/website/index.txt +0 -159
- data/website/javascripts/rounded_corners_lite.inc.js +0 -285
- data/website/stylesheets/screen.css +0 -126
- data/website/template.js +0 -3
- data/website/template.rhtml +0 -53
- data/website/version-raw.js +0 -3
- data/website/version-raw.txt +0 -2
- data/website/version.js +0 -4
- data/website/version.txt +0 -3
data/test/test_attributes.rb
CHANGED
@@ -30,7 +30,7 @@ class TestAttributes < ActiveSupport::TestCase
|
|
30
30
|
end
|
31
31
|
end
|
32
32
|
end
|
33
|
-
|
33
|
+
|
34
34
|
def test_brackets_primary_key
|
35
35
|
testing_with do
|
36
36
|
assert_equal @first.id, @first[@primary_keys], "[] failing for #{@klass}"
|
@@ -51,26 +51,22 @@ class TestAttributes < ActiveSupport::TestCase
|
|
51
51
|
@flat = Tariff.find(1, Date.today.to_s(:db))
|
52
52
|
@second_free = ProductTariff.find(2,2,Date.today.to_s(:db))
|
53
53
|
@second_free_fk = [:tariff_id, :tariff_start_date]
|
54
|
+
|
54
55
|
@second_free[key = @second_free_fk] = @flat.id
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
@
|
61
|
-
|
62
|
-
|
63
|
-
@second_free[key
|
64
|
-
|
65
|
-
compare_indexes('@flat', @flat.class.primary_key, '@second_free', @second_free_fk)
|
66
|
-
@second_free[key = @second_free_fk.to_composite_ids.to_s] = @flat.id
|
67
|
-
assert_equal @flat.id, @second_free[key]
|
68
|
-
compare_indexes('@flat', @flat.class.primary_key, '@second_free', @second_free_fk)
|
69
|
-
@second_free[key = @second_free_fk.to_composite_ids.to_s] = @flat.id.to_s
|
70
|
-
assert_equal @flat.id, @second_free[key]
|
71
|
-
compare_indexes('@flat', @flat.class.primary_key, '@second_free', @second_free_fk)
|
56
|
+
compare_indexes('@flat', @flat.class.primary_key, '@second_free', @second_free_fk)
|
57
|
+
assert_equal @flat.id, @second_free[key]
|
58
|
+
|
59
|
+
@second_free[key = @second_free_fk.to_composite_keys] = @flat.id
|
60
|
+
assert_equal @flat.id, @second_free[key]
|
61
|
+
compare_indexes('@flat', @flat.class.primary_key, '@second_free', @second_free_fk)
|
62
|
+
|
63
|
+
@second_free[key = @second_free_fk.to_composite_keys.to_s] = @flat.id
|
64
|
+
assert_equal @flat.id, @second_free[key]
|
65
|
+
compare_indexes('@flat', @flat.class.primary_key, '@second_free', @second_free_fk)
|
72
66
|
end
|
73
|
-
|
67
|
+
|
68
|
+
private
|
69
|
+
|
74
70
|
def compare_indexes(obj_name1, indexes1, obj_name2, indexes2)
|
75
71
|
obj1, obj2 = eval "[#{obj_name1}, #{obj_name2}]"
|
76
72
|
indexes1.length.times do |key_index|
|
@@ -24,28 +24,9 @@ class CompositeArraysTest < ActiveSupport::TestCase
|
|
24
24
|
assert_equal '1,2,3', keys.to_s
|
25
25
|
end
|
26
26
|
|
27
|
-
def test_new_ids
|
28
|
-
keys = CompositePrimaryKeys::CompositeIds.new
|
29
|
-
assert_not_nil keys
|
30
|
-
assert_equal '', keys.to_s
|
31
|
-
assert_equal '', "#{keys}"
|
32
|
-
end
|
33
|
-
|
34
|
-
def test_initialize_ids
|
35
|
-
keys = CompositePrimaryKeys::CompositeIds.new([1,2,3])
|
36
|
-
assert_not_nil keys
|
37
|
-
assert_equal '1,2,3', keys.to_s
|
38
|
-
assert_equal '1,2,3', "#{keys}"
|
39
|
-
end
|
40
|
-
|
41
27
|
def test_to_composite_ids
|
42
28
|
keys = [1,2,3].to_composite_ids
|
43
|
-
assert_equal
|
44
|
-
assert_equal '
|
45
|
-
end
|
46
|
-
|
47
|
-
def test_flatten
|
48
|
-
keys = [CompositePrimaryKeys::CompositeIds.new([1,2,3]), CompositePrimaryKeys::CompositeIds.new([4,5,6])]
|
49
|
-
assert_equal 6, keys.flatten.size
|
29
|
+
assert_equal Array, keys.class
|
30
|
+
assert_equal '123', keys.to_s
|
50
31
|
end
|
51
32
|
end
|
data/test/test_create.rb
CHANGED
@@ -29,14 +29,14 @@ class TestCreate < ActiveSupport::TestCase
|
|
29
29
|
assert_not_nil @klass_info[:create]
|
30
30
|
end
|
31
31
|
end
|
32
|
-
|
32
|
+
|
33
33
|
def test_create
|
34
34
|
testing_with do
|
35
35
|
assert new_obj = @klass.create(@klass_info[:create])
|
36
36
|
assert !new_obj.new_record?
|
37
37
|
end
|
38
38
|
end
|
39
|
-
|
39
|
+
|
40
40
|
def test_create_no_id
|
41
41
|
testing_with do
|
42
42
|
begin
|
@@ -50,7 +50,7 @@ class TestCreate < ActiveSupport::TestCase
|
|
50
50
|
assert_equal composite?, !@successful, "Create should have failed for composites; #{@obj.inspect}"
|
51
51
|
end
|
52
52
|
end
|
53
|
-
|
53
|
+
|
54
54
|
def test_create_on_association
|
55
55
|
suburb = Suburb.find(:first)
|
56
56
|
suburb.streets.create(:name => "my street")
|
data/test/test_delete.rb
CHANGED
@@ -24,14 +24,7 @@ class TestDelete < ActiveSupport::TestCase
|
|
24
24
|
|
25
25
|
def test_destroy_one
|
26
26
|
testing_with do
|
27
|
-
|
28
|
-
assert true
|
29
|
-
end
|
30
|
-
end
|
31
|
-
|
32
|
-
def test_destroy_one_via_class
|
33
|
-
testing_with do
|
34
|
-
assert @klass.destroy(*@first.id)
|
27
|
+
assert @first.destroy
|
35
28
|
end
|
36
29
|
end
|
37
30
|
|
@@ -41,12 +34,6 @@ class TestDelete < ActiveSupport::TestCase
|
|
41
34
|
end
|
42
35
|
end
|
43
36
|
|
44
|
-
def test_delete_one
|
45
|
-
testing_with do
|
46
|
-
assert @klass.delete(*@first.id) if composite?
|
47
|
-
end
|
48
|
-
end
|
49
|
-
|
50
37
|
def test_delete_one_alone
|
51
38
|
testing_with do
|
52
39
|
assert @klass.delete(@first.id)
|
@@ -67,12 +54,12 @@ class TestDelete < ActiveSupport::TestCase
|
|
67
54
|
end
|
68
55
|
|
69
56
|
def test_clear_association
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
57
|
+
department = Department.find(1,1)
|
58
|
+
assert_equal 2, department.employees.size, "Before clear employee count should be 2."
|
59
|
+
department.employees.clear
|
60
|
+
assert_equal 0, department.employees.size, "After clear employee count should be 0."
|
61
|
+
department.reload
|
62
|
+
assert_equal 0, department.employees.size, "After clear and a reload from DB employee count should be 0."
|
76
63
|
end
|
77
64
|
|
78
65
|
def test_delete_association
|
data/test/test_exists.rb
CHANGED
@@ -8,20 +8,16 @@ class TestExists < ActiveSupport::TestCase
|
|
8
8
|
def test_single_key_exists_giving_id
|
9
9
|
assert Article.exists?(1)
|
10
10
|
end
|
11
|
-
|
11
|
+
|
12
12
|
def test_single_key_exists_giving_condition
|
13
13
|
assert Article.exists?(['name = ?', 'Article One'])
|
14
14
|
end
|
15
|
-
|
16
|
-
def test_composite_key_exists_giving_ids_as_string
|
17
|
-
assert Department.exists?('1,1,')
|
18
|
-
end
|
19
|
-
|
15
|
+
|
20
16
|
def test_composite_key_exists_giving_ids_as_array
|
21
17
|
assert Department.exists?([1,1])
|
22
18
|
assert_equal(false, Department.exists?([1111,1111]))
|
23
19
|
end
|
24
|
-
|
20
|
+
|
25
21
|
def test_composite_key_exists_giving_ids_as_condition
|
26
22
|
assert Department.exists?(['department_id = ? and location_id = ?', 1, 1])
|
27
23
|
assert_equal(false, Department.exists?(['department_id = ? and location_id = ?', 11111, 11111]))
|
data/test/test_find.rb
CHANGED
@@ -1,6 +1,4 @@
|
|
1
1
|
require 'abstract_unit'
|
2
|
-
require 'fixtures/reference_type'
|
3
|
-
require 'fixtures/reference_code'
|
4
2
|
|
5
3
|
# Testing the find action on composite ActiveRecords with two primary keys
|
6
4
|
class TestFind < ActiveSupport::TestCase
|
@@ -53,12 +51,6 @@ class TestFind < ActiveSupport::TestCase
|
|
53
51
|
end
|
54
52
|
end
|
55
53
|
|
56
|
-
def test_to_param
|
57
|
-
testing_with do
|
58
|
-
assert_equal first_id_str, @first.to_param.to_s
|
59
|
-
end
|
60
|
-
end
|
61
|
-
|
62
54
|
def things_to_look_at
|
63
55
|
testing_with do
|
64
56
|
assert_equal found, @klass.find(found.id.to_s) # fails for 2+ keys
|
data/test/test_ids.rb
CHANGED
@@ -30,13 +30,6 @@ class TestIds < ActiveSupport::TestCase
|
|
30
30
|
end
|
31
31
|
end
|
32
32
|
|
33
|
-
def test_id_to_s
|
34
|
-
testing_with do
|
35
|
-
assert_equal first_id_str, @first.id.to_s
|
36
|
-
assert_equal first_id_str, "#{@first.id}"
|
37
|
-
end
|
38
|
-
end
|
39
|
-
|
40
33
|
def test_ids_to_s
|
41
34
|
testing_with do
|
42
35
|
order = @klass.primary_key.is_a?(String) ? @klass.primary_key : @klass.primary_key.join(',')
|
@@ -46,13 +39,6 @@ class TestIds < ActiveSupport::TestCase
|
|
46
39
|
end
|
47
40
|
end
|
48
41
|
|
49
|
-
def test_composite_where_clause
|
50
|
-
testing_with do
|
51
|
-
where = 'reference_codes.reference_type_id=1 AND reference_codes.reference_code=2) OR (reference_codes.reference_type_id=2 AND reference_codes.reference_code=2'
|
52
|
-
assert_equal(where, @klass.composite_where_clause([[1, 2], [2, 2]])) if @key_test == :dual
|
53
|
-
end
|
54
|
-
end
|
55
|
-
|
56
42
|
def test_set_ids_string
|
57
43
|
testing_with do
|
58
44
|
array = @primary_keys.collect {|key| 5}
|
@@ -86,12 +72,12 @@ class TestIds < ActiveSupport::TestCase
|
|
86
72
|
assert_not_nil @klass.primary_keys
|
87
73
|
assert_equal @primary_keys.map {|key| key.to_sym}, @klass.primary_keys
|
88
74
|
assert_equal @klass.primary_keys, @klass.primary_key
|
75
|
+
assert_equal @primary_keys.map {|key| key.to_sym}.to_s, @klass.primary_key.to_s
|
89
76
|
else
|
90
77
|
assert_not_nil @klass.primary_key
|
91
|
-
assert_equal @primary_keys,
|
78
|
+
assert_equal @primary_keys.first, @klass.primary_key.to_sym
|
79
|
+
assert_equal @primary_keys.first.to_s, @klass.primary_key.to_s
|
92
80
|
end
|
93
|
-
assert_equal @primary_keys.join(','), @klass.primary_key.to_s
|
94
|
-
# Need a :primary_keys should be Array with to_s overridden
|
95
81
|
end
|
96
82
|
end
|
97
83
|
end
|
data/test/test_polymorphic.rb
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
require 'abstract_unit'
|
2
2
|
require 'fixtures/comment'
|
3
|
+
require 'fixtures/article'
|
4
|
+
require 'fixtures/reading'
|
3
5
|
require 'fixtures/user'
|
4
6
|
require 'fixtures/employee'
|
5
7
|
require 'fixtures/hack'
|
@@ -11,21 +13,20 @@ class TestPolymorphic < ActiveSupport::TestCase
|
|
11
13
|
comments = Hack.find('andrew').comments
|
12
14
|
assert_equal 'andrew', comments[0].person_id
|
13
15
|
end
|
14
|
-
|
16
|
+
|
15
17
|
def test_polymorphic_has_one
|
16
18
|
first_comment = Hack.find('andrew').first_comment
|
17
19
|
assert_equal 'andrew', first_comment.person_id
|
18
20
|
end
|
19
|
-
|
21
|
+
|
20
22
|
def test_has_many_through
|
21
23
|
user = users(:santiago)
|
22
24
|
article_names = user.articles.collect { |a| a.name }.sort
|
23
25
|
assert_equal ['Article One', 'Article Two'], article_names
|
24
26
|
end
|
25
|
-
|
27
|
+
|
26
28
|
def test_polymorphic_has_many_through
|
27
29
|
user = users(:santiago)
|
28
30
|
assert_equal ['andrew'], user.hacks.collect { |a| a.name }.sort
|
29
31
|
end
|
30
|
-
|
31
32
|
end
|
data/test/test_suite.rb
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'test/unit'
|
2
|
+
|
3
|
+
require 'test_associations'
|
4
|
+
require 'test_attribute_methods'
|
5
|
+
require 'test_attributes'
|
6
|
+
require 'test_clone'
|
7
|
+
require 'test_composite_arrays'
|
8
|
+
require 'test_create'
|
9
|
+
require 'test_delete'
|
10
|
+
require 'test_exists'
|
11
|
+
require 'test_find'
|
12
|
+
require 'test_ids'
|
13
|
+
require 'test_miscellaneous'
|
14
|
+
require 'test_pagination'
|
15
|
+
require 'test_polymorphic'
|
16
|
+
require 'test_santiago'
|
17
|
+
require 'test_tutorial_example'
|
18
|
+
require 'test_update'
|
19
|
+
require 'test_validations'
|
File without changes
|
metadata
CHANGED
@@ -1,105 +1,120 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: composite_primary_keys
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
hash: 6629740
|
5
|
+
prerelease: true
|
6
|
+
segments:
|
7
|
+
- 3
|
8
|
+
- 0
|
9
|
+
- 0
|
10
|
+
- b2
|
11
|
+
version: 3.0.0.b2
|
5
12
|
platform: ruby
|
6
13
|
authors:
|
7
14
|
- Dr Nic Williams
|
15
|
+
- Charlie Savage
|
8
16
|
autorequire:
|
9
17
|
bindir: bin
|
10
18
|
cert_chain: []
|
11
19
|
|
12
|
-
date: 2010-
|
20
|
+
date: 2010-11-06 00:00:00 -06:00
|
13
21
|
default_executable:
|
14
22
|
dependencies:
|
15
23
|
- !ruby/object:Gem::Dependency
|
16
24
|
name: activerecord
|
17
|
-
|
18
|
-
|
19
|
-
|
25
|
+
prerelease: false
|
26
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
27
|
+
none: false
|
20
28
|
requirements:
|
21
29
|
- - ">="
|
22
30
|
- !ruby/object:Gem::Version
|
23
|
-
|
24
|
-
|
31
|
+
hash: 5
|
32
|
+
segments:
|
33
|
+
- 3
|
34
|
+
- 0
|
35
|
+
- 1
|
36
|
+
version: 3.0.1
|
37
|
+
type: :runtime
|
38
|
+
version_requirements: *id001
|
25
39
|
- !ruby/object:Gem::Dependency
|
26
|
-
name:
|
27
|
-
|
28
|
-
|
29
|
-
|
40
|
+
name: rspec
|
41
|
+
prerelease: false
|
42
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
43
|
+
none: false
|
30
44
|
requirements:
|
31
45
|
- - ">="
|
32
46
|
- !ruby/object:Gem::Version
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
47
|
+
hash: 3
|
48
|
+
segments:
|
49
|
+
- 0
|
50
|
+
version: "0"
|
51
|
+
type: :development
|
52
|
+
version_requirements: *id002
|
53
|
+
description: Composite key support for ActiveRecord 3
|
54
|
+
email:
|
55
|
+
- drnicwilliams@gmail.com
|
37
56
|
executables: []
|
38
57
|
|
39
58
|
extensions: []
|
40
59
|
|
41
|
-
extra_rdoc_files:
|
42
|
-
|
43
|
-
- Manifest.txt
|
44
|
-
- README.txt
|
45
|
-
- README_DB2.txt
|
46
|
-
- website/index.txt
|
47
|
-
- website/version-raw.txt
|
48
|
-
- website/version.txt
|
60
|
+
extra_rdoc_files: []
|
61
|
+
|
49
62
|
files:
|
63
|
+
- Rakefile
|
50
64
|
- History.txt
|
51
|
-
- Manifest.txt
|
52
65
|
- README.txt
|
53
66
|
- README_DB2.txt
|
54
|
-
- Rakefile
|
55
67
|
- init.rb
|
56
68
|
- install.rb
|
57
|
-
-
|
58
|
-
- lib/
|
59
|
-
- lib/
|
60
|
-
- lib/
|
61
|
-
- lib/
|
62
|
-
- lib/composite_primary_keys.rb
|
63
|
-
- lib/composite_primary_keys/association_preload.rb
|
69
|
+
- loader.rb
|
70
|
+
- lib/composite_primary_keys/associations/association_proxy.rb
|
71
|
+
- lib/composite_primary_keys/associations/has_and_belongs_to_many_association.rb
|
72
|
+
- lib/composite_primary_keys/associations/has_many_association.rb
|
73
|
+
- lib/composite_primary_keys/associations/has_one_association.rb
|
74
|
+
- lib/composite_primary_keys/associations/through_association_scope.rb
|
64
75
|
- lib/composite_primary_keys/associations.rb
|
76
|
+
- lib/composite_primary_keys/association_preload.rb
|
65
77
|
- lib/composite_primary_keys/attribute_methods.rb
|
66
78
|
- lib/composite_primary_keys/base.rb
|
67
79
|
- lib/composite_primary_keys/calculations.rb
|
68
80
|
- lib/composite_primary_keys/composite_arrays.rb
|
81
|
+
- lib/composite_primary_keys/connection_adapters/abstract_adapter.rb
|
69
82
|
- lib/composite_primary_keys/connection_adapters/ibm_db_adapter.rb
|
70
83
|
- lib/composite_primary_keys/connection_adapters/oracle_adapter.rb
|
84
|
+
- lib/composite_primary_keys/connection_adapters/oracle_enhanced_adapter.rb
|
71
85
|
- lib/composite_primary_keys/connection_adapters/postgresql_adapter.rb
|
72
86
|
- lib/composite_primary_keys/connection_adapters/sqlite3_adapter.rb
|
87
|
+
- lib/composite_primary_keys/finder_methods.rb
|
73
88
|
- lib/composite_primary_keys/fixtures.rb
|
74
|
-
- lib/composite_primary_keys/
|
89
|
+
- lib/composite_primary_keys/read.rb
|
75
90
|
- lib/composite_primary_keys/reflection.rb
|
91
|
+
- lib/composite_primary_keys/relation.rb
|
76
92
|
- lib/composite_primary_keys/validations/uniqueness.rb
|
77
93
|
- lib/composite_primary_keys/version.rb
|
78
|
-
-
|
79
|
-
- local/database_connections.rb.sample
|
80
|
-
- local/paths.rb.sample
|
81
|
-
- local/tasks.rb.sample
|
94
|
+
- lib/composite_primary_keys.rb
|
82
95
|
- scripts/console.rb
|
83
96
|
- scripts/txt2html
|
84
97
|
- scripts/txt2js
|
85
|
-
- tasks/activerecord_selection.rake
|
86
|
-
- tasks/databases.rake
|
87
98
|
- tasks/databases/mysql.rake
|
88
99
|
- tasks/databases/oracle.rake
|
89
100
|
- tasks/databases/postgresql.rake
|
90
101
|
- tasks/databases/sqlite3.rake
|
91
|
-
- tasks/
|
92
|
-
- tasks/local_setup.rake
|
102
|
+
- tasks/Rakefile.rb
|
93
103
|
- tasks/website.rake
|
94
|
-
- test/README_tests.txt
|
95
104
|
- test/abstract_unit.rb
|
105
|
+
- test/connections/connection_spec.rb
|
106
|
+
- test/connections/databases.example.yml
|
107
|
+
- test/connections/databases.yml
|
96
108
|
- test/connections/native_ibm_db/connection.rb
|
97
109
|
- test/connections/native_mysql/connection.rb
|
98
110
|
- test/connections/native_oracle/connection.rb
|
111
|
+
- test/connections/native_oracle_enhanced/connection.rb
|
99
112
|
- test/connections/native_postgresql/connection.rb
|
100
113
|
- test/connections/native_sqlite/connection.rb
|
101
114
|
- test/fixtures/article.rb
|
102
115
|
- test/fixtures/articles.yml
|
116
|
+
- test/fixtures/article_group.rb
|
117
|
+
- test/fixtures/article_groups.yml
|
103
118
|
- test/fixtures/comment.rb
|
104
119
|
- test/fixtures/comments.yml
|
105
120
|
- test/fixtures/db_definitions/db2-create-tables.sql
|
@@ -109,30 +124,50 @@ files:
|
|
109
124
|
- test/fixtures/db_definitions/oracle.sql
|
110
125
|
- test/fixtures/db_definitions/postgresql.sql
|
111
126
|
- test/fixtures/db_definitions/sqlite.sql
|
127
|
+
- test/fixtures/debug.log
|
112
128
|
- test/fixtures/department.rb
|
113
129
|
- test/fixtures/departments.yml
|
130
|
+
- test/fixtures/dorm.rb
|
131
|
+
- test/fixtures/dorms.yml
|
114
132
|
- test/fixtures/employee.rb
|
115
133
|
- test/fixtures/employees.yml
|
116
134
|
- test/fixtures/group.rb
|
117
135
|
- test/fixtures/groups.yml
|
118
136
|
- test/fixtures/hack.rb
|
119
137
|
- test/fixtures/hacks.yml
|
138
|
+
- test/fixtures/kitchen_sink.rb
|
139
|
+
- test/fixtures/kitchen_sinks.yml
|
120
140
|
- test/fixtures/membership.rb
|
141
|
+
- test/fixtures/memberships.yml
|
121
142
|
- test/fixtures/membership_status.rb
|
122
143
|
- test/fixtures/membership_statuses.yml
|
123
|
-
- test/fixtures/memberships.yml
|
124
144
|
- test/fixtures/product.rb
|
145
|
+
- test/fixtures/products.yml
|
125
146
|
- test/fixtures/product_tariff.rb
|
126
147
|
- test/fixtures/product_tariffs.yml
|
127
|
-
- test/fixtures/products.yml
|
128
148
|
- test/fixtures/reading.rb
|
129
149
|
- test/fixtures/readings.yml
|
130
150
|
- test/fixtures/reference_code.rb
|
131
151
|
- test/fixtures/reference_codes.yml
|
132
152
|
- test/fixtures/reference_type.rb
|
133
153
|
- test/fixtures/reference_types.yml
|
154
|
+
- test/fixtures/restaurant.rb
|
155
|
+
- test/fixtures/restaurants.yml
|
156
|
+
- test/fixtures/restaurants_suburbs.yml
|
157
|
+
- test/fixtures/room.rb
|
158
|
+
- test/fixtures/rooms.yml
|
159
|
+
- test/fixtures/room_assignment.rb
|
160
|
+
- test/fixtures/room_assignments.yml
|
161
|
+
- test/fixtures/room_attribute.rb
|
162
|
+
- test/fixtures/room_attributes.yml
|
163
|
+
- test/fixtures/room_attribute_assignment.rb
|
164
|
+
- test/fixtures/room_attribute_assignments.yml
|
165
|
+
- test/fixtures/seat.rb
|
166
|
+
- test/fixtures/seats.yml
|
134
167
|
- test/fixtures/street.rb
|
135
168
|
- test/fixtures/streets.yml
|
169
|
+
- test/fixtures/student.rb
|
170
|
+
- test/fixtures/students.yml
|
136
171
|
- test/fixtures/suburb.rb
|
137
172
|
- test/fixtures/suburbs.yml
|
138
173
|
- test/fixtures/tariff.rb
|
@@ -142,14 +177,14 @@ files:
|
|
142
177
|
- test/hash_tricks.rb
|
143
178
|
- test/plugins/pagination.rb
|
144
179
|
- test/plugins/pagination_helper.rb
|
180
|
+
- test/README_tests.txt
|
145
181
|
- test/test_associations.rb
|
146
|
-
- test/test_attribute_methods.rb
|
147
182
|
- test/test_attributes.rb
|
183
|
+
- test/test_attribute_methods.rb
|
148
184
|
- test/test_clone.rb
|
149
185
|
- test/test_composite_arrays.rb
|
150
186
|
- test/test_create.rb
|
151
187
|
- test/test_delete.rb
|
152
|
-
- test/test_dummy.rb
|
153
188
|
- test/test_exists.rb
|
154
189
|
- test/test_find.rb
|
155
190
|
- test/test_ids.rb
|
@@ -157,57 +192,59 @@ files:
|
|
157
192
|
- test/test_pagination.rb
|
158
193
|
- test/test_polymorphic.rb
|
159
194
|
- test/test_santiago.rb
|
160
|
-
- test/
|
195
|
+
- test/test_suite.rb
|
196
|
+
- test/test_tutorial_example.rb
|
161
197
|
- test/test_update.rb
|
162
|
-
-
|
163
|
-
- website/index.html
|
164
|
-
- website/index.txt
|
165
|
-
- website/javascripts/rounded_corners_lite.inc.js
|
166
|
-
- website/stylesheets/screen.css
|
167
|
-
- website/template.js
|
168
|
-
- website/template.rhtml
|
169
|
-
- website/version-raw.js
|
170
|
-
- website/version-raw.txt
|
171
|
-
- website/version.js
|
172
|
-
- website/version.txt
|
198
|
+
- test/test_validations.rb
|
173
199
|
has_rdoc: true
|
174
|
-
homepage: http://
|
200
|
+
homepage: http://github.com/cfis/composite_primary_keys
|
175
201
|
licenses: []
|
176
202
|
|
177
203
|
post_install_message:
|
178
|
-
rdoc_options:
|
179
|
-
|
180
|
-
- README.txt
|
204
|
+
rdoc_options: []
|
205
|
+
|
181
206
|
require_paths:
|
182
207
|
- lib
|
183
208
|
required_ruby_version: !ruby/object:Gem::Requirement
|
209
|
+
none: false
|
184
210
|
requirements:
|
185
211
|
- - ">="
|
186
212
|
- !ruby/object:Gem::Version
|
187
|
-
|
188
|
-
|
213
|
+
hash: 57
|
214
|
+
segments:
|
215
|
+
- 1
|
216
|
+
- 8
|
217
|
+
- 7
|
218
|
+
version: 1.8.7
|
189
219
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
220
|
+
none: false
|
190
221
|
requirements:
|
191
|
-
- - "
|
222
|
+
- - ">"
|
192
223
|
- !ruby/object:Gem::Version
|
193
|
-
|
194
|
-
|
224
|
+
hash: 25
|
225
|
+
segments:
|
226
|
+
- 1
|
227
|
+
- 3
|
228
|
+
- 1
|
229
|
+
version: 1.3.1
|
195
230
|
requirements: []
|
196
231
|
|
197
232
|
rubyforge_project: compositekeys
|
198
|
-
rubygems_version: 1.3.
|
233
|
+
rubygems_version: 1.3.7
|
199
234
|
signing_key:
|
200
235
|
specification_version: 3
|
201
|
-
summary: Composite key support for
|
236
|
+
summary: Composite key support for ActiveRecord
|
202
237
|
test_files:
|
238
|
+
- test/abstract_unit.rb
|
239
|
+
- test/hash_tricks.rb
|
240
|
+
- test/README_tests.txt
|
203
241
|
- test/test_associations.rb
|
204
|
-
- test/test_attribute_methods.rb
|
205
242
|
- test/test_attributes.rb
|
243
|
+
- test/test_attribute_methods.rb
|
206
244
|
- test/test_clone.rb
|
207
245
|
- test/test_composite_arrays.rb
|
208
246
|
- test/test_create.rb
|
209
247
|
- test/test_delete.rb
|
210
|
-
- test/test_dummy.rb
|
211
248
|
- test/test_exists.rb
|
212
249
|
- test/test_find.rb
|
213
250
|
- test/test_ids.rb
|
@@ -215,6 +252,7 @@ test_files:
|
|
215
252
|
- test/test_pagination.rb
|
216
253
|
- test/test_polymorphic.rb
|
217
254
|
- test/test_santiago.rb
|
218
|
-
- test/
|
255
|
+
- test/test_suite.rb
|
256
|
+
- test/test_tutorial_example.rb
|
219
257
|
- test/test_update.rb
|
220
258
|
- test/test_validations.rb
|