tyler-composite_primary_keys 1.1.0 → 1.1.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.
Files changed (47) hide show
  1. data/History.txt +0 -8
  2. data/Manifest.txt +0 -1
  3. data/Rakefile +65 -0
  4. data/init.rb +2 -0
  5. data/install.rb +30 -0
  6. data/lib/composite_primary_keys/association_preload.rb +2 -19
  7. data/lib/composite_primary_keys/associations.rb +2 -2
  8. data/lib/composite_primary_keys/base.rb +2 -6
  9. data/lib/composite_primary_keys/calculations.rb +1 -2
  10. data/lib/composite_primary_keys/version.rb +3 -3
  11. data/loader.rb +24 -0
  12. data/tmp/test.db +0 -0
  13. data/website/index.html +199 -0
  14. data/website/index.txt +159 -0
  15. data/website/javascripts/rounded_corners_lite.inc.js +285 -0
  16. data/website/stylesheets/screen.css +126 -0
  17. data/website/template.js +3 -0
  18. data/website/template.rhtml +53 -0
  19. data/website/version-raw.js +3 -0
  20. data/website/version-raw.txt +2 -0
  21. data/website/version.js +4 -0
  22. data/website/version.txt +3 -0
  23. metadata +78 -59
  24. data/lib/adapter_helper/oracle_enhanced.rb +0 -12
  25. data/lib/composite_primary_keys/connection_adapters/abstract_adapter.rb +0 -9
  26. data/lib/composite_primary_keys/connection_adapters/oracle_enhanced_adapter.rb +0 -17
  27. data/test/connections/native_oracle_enhanced/connection.rb +0 -20
  28. data/test/fixtures/article_group.rb +0 -4
  29. data/test/fixtures/article_groups.yml +0 -7
  30. data/test/fixtures/dorm.rb +0 -3
  31. data/test/fixtures/dorms.yml +0 -2
  32. data/test/fixtures/kitchen_sink.rb +0 -3
  33. data/test/fixtures/kitchen_sinks.yml +0 -5
  34. data/test/fixtures/restaurant.rb +0 -6
  35. data/test/fixtures/restaurants.yml +0 -5
  36. data/test/fixtures/restaurants_suburbs.yml +0 -11
  37. data/test/fixtures/room.rb +0 -10
  38. data/test/fixtures/room_assignment.rb +0 -4
  39. data/test/fixtures/room_assignments.yml +0 -4
  40. data/test/fixtures/room_attribute.rb +0 -3
  41. data/test/fixtures/room_attribute_assignment.rb +0 -5
  42. data/test/fixtures/room_attribute_assignments.yml +0 -4
  43. data/test/fixtures/room_attributes.yml +0 -3
  44. data/test/fixtures/rooms.yml +0 -3
  45. data/test/fixtures/student.rb +0 -4
  46. data/test/fixtures/students.yml +0 -2
  47. data/test/test_exists.rb +0 -29
@@ -1,11 +0,0 @@
1
- a:
2
- franchise_id: 1
3
- store_id: 1
4
- city_id: 1
5
- suburb_id: 1
6
-
7
- b:
8
- franchise_id: 1
9
- store_id: 1
10
- city_id: 2
11
- suburb_id: 1
@@ -1,10 +0,0 @@
1
- class Room < ActiveRecord::Base
2
- set_primary_keys :dorm_id, :room_id
3
- belongs_to :dorm
4
- has_many :room_attribute_assignments, :foreign_key => [:dorm_id, :room_id]
5
- has_many :room_attributes, :through => :room_attribute_assignments
6
-
7
- def find_custom_room_attributes
8
- room_attributes.find(:all, :conditions => ["room_attributes.name != ?", "keg"])
9
- end
10
- end
@@ -1,4 +0,0 @@
1
- class RoomAssignment < ActiveRecord::Base
2
- belongs_to :student
3
- belongs_to :room, :foreign_key => [:dorm_id, :room_id]
4
- end
@@ -1,4 +0,0 @@
1
- jacksons_room:
2
- student_id: 1
3
- dorm_id: 1
4
- room_id: 1
@@ -1,3 +0,0 @@
1
- class RoomAttribute < ActiveRecord::Base
2
- has_many :rooms, :through => :room_attribute_assignments, :foreign_key => [:dorm_id, :room_id]
3
- end
@@ -1,5 +0,0 @@
1
- class RoomAttributeAssignment < ActiveRecord::Base
2
- set_primary_keys :dorm_id, :room_id, :room_attribute_id
3
- belongs_to :room, :foreign_key => [:dorm_id, :room_id]
4
- belongs_to :room_attribute
5
- end
@@ -1,4 +0,0 @@
1
- assignment:
2
- dorm_id: 1
3
- room_id: 1
4
- room_attribute_id: 1
@@ -1,3 +0,0 @@
1
- attribute_1:
2
- id: 1
3
- name: 'keg'
@@ -1,3 +0,0 @@
1
- jacksons_room:
2
- dorm_id: 1
3
- room_id: 1
@@ -1,4 +0,0 @@
1
- class Student < ActiveRecord::Base
2
- has_many :room_assignments
3
- has_many :rooms, :through => :room_assignments, :foreign_key => [:building_code, :room_number]
4
- end
@@ -1,2 +0,0 @@
1
- jackson:
2
- id: 1
data/test/test_exists.rb DELETED
@@ -1,29 +0,0 @@
1
- require 'abstract_unit'
2
- require 'fixtures/article'
3
- require 'fixtures/department'
4
-
5
- class TestExists < Test::Unit::TestCase
6
- fixtures :articles, :departments
7
-
8
- def test_single_key_exists_giving_id
9
- assert Article.exists?(1)
10
- end
11
-
12
- def test_single_key_exists_giving_condition
13
- assert Article.exists?(['name = ?', 'Article One'])
14
- end
15
-
16
- def test_composite_key_exists_giving_ids_as_string
17
- assert Department.exists?('1,1,')
18
- end
19
-
20
- def test_composite_key_exists_giving_ids_as_array
21
- assert Department.exists?([1,1])
22
- assert_equal(false, Department.exists?([1111,1111]))
23
- end
24
-
25
- def test_composite_key_exists_giving_ids_as_condition
26
- assert Department.exists?(['department_id = ? and location_id = ?', 1, 1])
27
- assert_equal(false, Department.exists?(['department_id = ? and location_id = ?', 11111, 11111]))
28
- end
29
- end