has_many_polymorphs 2.11 → 2.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (126) hide show
  1. data.tar.gz.sig +0 -0
  2. data/CHANGELOG +3 -1
  3. data/Manifest +43 -61
  4. data/README +30 -0
  5. data/TODO +0 -3
  6. data/generators/tagging/tagging_generator.rb +2 -0
  7. data/generators/tagging/templates/tag_test.rb +7 -2
  8. data/generators/tagging/templates/tagging.rb +2 -2
  9. data/generators/tagging/templates/tagging_extensions.rb +49 -2
  10. data/generators/tagging/templates/tagging_test.rb +32 -9
  11. data/generators/tagging/templates/tags.yml +2 -2
  12. data/has_many_polymorphs.gemspec +20 -13
  13. data/lib/has_many_polymorphs.rb +0 -1
  14. data/lib/has_many_polymorphs/autoload.rb +45 -37
  15. data/lib/has_many_polymorphs/class_methods.rb +2 -15
  16. data/lib/has_many_polymorphs/configuration.rb +2 -2
  17. data/lib/has_many_polymorphs/rake_task_redefine_task.rb +9 -1
  18. data/test/generator/tagging_generator_test.rb +42 -0
  19. data/test/integration/app/app/controllers/bones_controller.rb +5 -0
  20. data/test/integration/app/app/helpers/bones_helper.rb +2 -0
  21. data/test/integration/app/app/models/bone.rb +2 -0
  22. data/test/integration/app/app/models/double_sti_parent.rb +2 -0
  23. data/test/integration/app/app/models/double_sti_parent_relationship.rb +2 -0
  24. data/test/integration/app/app/models/organic_substance.rb +2 -0
  25. data/test/integration/app/app/models/single_sti_parent.rb +4 -0
  26. data/test/integration/app/app/models/single_sti_parent_relationship.rb +4 -0
  27. data/test/integration/app/app/models/stick.rb +2 -0
  28. data/test/integration/app/app/models/stone.rb +2 -0
  29. data/test/integration/app/app/views/bones/index.rhtml +5 -0
  30. data/test/integration/app/config/boot.rb +97 -32
  31. data/test/integration/app/config/database.yml +8 -12
  32. data/test/integration/app/config/environment.rb +9 -3
  33. data/test/integration/app/config/environment.rb.canonical +19 -0
  34. data/test/integration/app/config/environments/development.rb +6 -5
  35. data/test/integration/app/db/migrate/001_create_sticks.rb +11 -0
  36. data/test/integration/app/db/migrate/002_create_stones.rb +11 -0
  37. data/test/integration/app/db/migrate/003_create_organic_substances.rb +11 -0
  38. data/test/integration/app/db/migrate/004_create_bones.rb +8 -0
  39. data/test/integration/app/db/migrate/005_create_single_sti_parents.rb +11 -0
  40. data/test/integration/app/db/migrate/006_create_double_sti_parents.rb +11 -0
  41. data/test/integration/app/db/migrate/007_create_single_sti_parent_relationships.rb +13 -0
  42. data/test/integration/app/db/migrate/008_create_double_sti_parent_relationships.rb +14 -0
  43. data/test/integration/app/db/migrate/009_create_library_model.rb +11 -0
  44. data/test/integration/app/db/schema.rb +21 -121
  45. data/test/integration/app/hmp_development +0 -0
  46. data/test/integration/app/lib/library_model.rb +2 -0
  47. data/test/integration/app/test/fixtures/double_sti_parent_relationships.yml +7 -0
  48. data/test/integration/app/test/fixtures/double_sti_parents.yml +7 -0
  49. data/test/integration/app/test/fixtures/organic_substances.yml +5 -0
  50. data/test/integration/app/test/fixtures/single_sti_parent_relationships.yml +7 -0
  51. data/test/integration/app/test/fixtures/single_sti_parents.yml +7 -0
  52. data/test/integration/app/test/fixtures/sticks.yml +7 -0
  53. data/test/integration/app/test/fixtures/stones.yml +7 -0
  54. data/test/integration/app/test/{unit/user_test.rb → functional/bones_controller_test.rb} +1 -3
  55. data/test/integration/app/test/test_helper.rb +1 -21
  56. data/test/integration/app/test/unit/{state_test.rb → bone_test.rb} +1 -3
  57. data/test/integration/app/test/unit/{seller_test.rb → double_sti_parent_relationship_test.rb} +1 -3
  58. data/test/integration/app/test/unit/{address_test.rb → double_sti_parent_test.rb} +1 -3
  59. data/test/integration/app/test/unit/organic_substance_test.rb +8 -0
  60. data/test/integration/app/test/unit/single_sti_parent_relationship_test.rb +8 -0
  61. data/test/integration/app/test/unit/single_sti_parent_test.rb +8 -0
  62. data/test/integration/app/test/unit/stick_test.rb +8 -0
  63. data/test/integration/app/test/unit/stone_test.rb +8 -0
  64. data/test/integration/server_test.rb +43 -0
  65. data/test/patches/symlinked_plugins_1.2.6.diff +46 -0
  66. data/test/setup.rb +6 -2
  67. data/test/test_helper.rb +32 -16
  68. data/test/unit/{polymorph_test.rb → has_many_polymorphs_test.rb} +16 -16
  69. metadata +49 -65
  70. metadata.gz.sig +0 -0
  71. data/generators/commenting/commenting_generator.rb +0 -94
  72. data/generators/commenting/templates/comment.rb +0 -33
  73. data/generators/commenting/templates/comment_test.rb +0 -12
  74. data/generators/commenting/templates/commenting.rb +0 -13
  75. data/generators/commenting/templates/commenting_extensions.rb +0 -30
  76. data/generators/commenting/templates/commenting_test.rb +0 -30
  77. data/generators/commenting/templates/commentings.yml +0 -23
  78. data/generators/commenting/templates/comments.yml +0 -13
  79. data/generators/commenting/templates/migration.rb +0 -28
  80. data/lib/has_many_polymorphs/dependencies.rb +0 -41
  81. data/test/integration/app/app/controllers/addresses_controller.rb +0 -85
  82. data/test/integration/app/app/controllers/sellers_controller.rb +0 -85
  83. data/test/integration/app/app/controllers/states_controller.rb +0 -85
  84. data/test/integration/app/app/controllers/users_controller.rb +0 -85
  85. data/test/integration/app/app/models/address.rb +0 -4
  86. data/test/integration/app/app/models/citation.rb +0 -3
  87. data/test/integration/app/app/models/citations_item.rb +0 -4
  88. data/test/integration/app/app/models/seller.rb +0 -4
  89. data/test/integration/app/app/models/state.rb +0 -3
  90. data/test/integration/app/app/models/user.rb +0 -4
  91. data/test/integration/app/db/migrate/001_create_users.rb +0 -16
  92. data/test/integration/app/db/migrate/002_create_sellers.rb +0 -14
  93. data/test/integration/app/db/migrate/003_create_addresses.rb +0 -19
  94. data/test/integration/app/db/migrate/004_create_states.rb +0 -12
  95. data/test/integration/app/db/migrate/005_add_capitalization_to_seller.rb +0 -9
  96. data/test/integration/app/db/migrate/006_add_deleted_to_user.rb +0 -9
  97. data/test/integration/app/db/migrate/007_add_lat_and_long_to_address.rb +0 -11
  98. data/test/integration/app/db/migrate/008_create_citations.rb +0 -12
  99. data/test/integration/app/db/migrate/009_create_citations_items.rb +0 -14
  100. data/test/integration/app/generated_models/aquatic_fish.rb +0 -109
  101. data/test/integration/app/generated_models/aquatic_pupils_whale.rb +0 -13
  102. data/test/integration/app/generated_models/aquatic_whale.rb +0 -42
  103. data/test/integration/app/generated_models/beautiful_fight_relationship.rb +0 -25
  104. data/test/integration/app/generated_models/citation.rb +0 -40
  105. data/test/integration/app/generated_models/citations_item.rb +0 -12
  106. data/test/integration/app/generated_models/dog.rb +0 -183
  107. data/test/integration/app/generated_models/eaters_foodstuff.rb +0 -13
  108. data/test/integration/app/generated_models/frog.rb +0 -78
  109. data/test/integration/app/generated_models/kitten.rb +0 -161
  110. data/test/integration/app/generated_models/parentship.rb +0 -14
  111. data/test/integration/app/generated_models/person.rb +0 -53
  112. data/test/integration/app/generated_models/petfood.rb +0 -125
  113. data/test/integration/app/generated_models/polymorph_test_some_model.rb +0 -25
  114. data/test/integration/app/generated_models/seller.rb +0 -30
  115. data/test/integration/app/generated_models/tabby.rb +0 -26
  116. data/test/integration/app/generated_models/user.rb +0 -34
  117. data/test/integration/app/generated_models/wild_boar.rb +0 -87
  118. data/test/integration/app/test/fixtures/addresses.yml +0 -13
  119. data/test/integration/app/test/fixtures/citations.yml +0 -9
  120. data/test/integration/app/test/fixtures/citations_items.yml +0 -9
  121. data/test/integration/app/test/fixtures/sellers.yml +0 -10
  122. data/test/integration/app/test/fixtures/states.yml +0 -216
  123. data/test/integration/app/test/fixtures/users.yml +0 -11
  124. data/test/integration/app/test/unit/citation_test.rb +0 -10
  125. data/test/integration/app/test/unit/citations_item_test.rb +0 -10
  126. data/test/test_all.rb +0 -16
@@ -1,216 +0,0 @@
1
- AA:<% id = 0 %>
2
- id: <%= (id=id+1).to_s %>
3
- name: AA
4
- abbreviation: AA
5
- AE:
6
- id: <%= (id=id+1).to_s %>
7
- name: AE
8
- abbreviation: AE
9
- AP:
10
- id: <%= (id=id+1).to_s %>
11
- name: AP
12
- abbreviation: AP
13
- AL:
14
- id: <%= (id=id+1).to_s %>
15
- name: Alabama
16
- abbreviation: AL
17
- AK:
18
- id: <%= (id=id+1).to_s %>
19
- name: Alaska
20
- abbreviation: AK
21
- AZ:
22
- id: <%= (id=id+1).to_s %>
23
- name: Arizona
24
- abbreviation: AZ
25
- AR:
26
- id: <%= (id=id+1).to_s %>
27
- name: Arkansas
28
- abbreviation: AR
29
- CA:
30
- id: <%= (id=id+1).to_s %>
31
- name: California
32
- abbreviation: CA
33
- CO:
34
- id: <%= (id=id+1).to_s %>
35
- name: Colorado
36
- abbreviation: CO
37
- CT:
38
- id: <%= (id=id+1).to_s %>
39
- name: Connecticut
40
- abbreviation: CT
41
- DE:
42
- id: <%= (id=id+1).to_s %>
43
- name: Delaware
44
- abbreviation: DE
45
- DC:
46
- id: <%= (id=id+1).to_s %>
47
- name: District of Columbia
48
- abbreviation: DC
49
- FL:
50
- id: <%= (id=id+1).to_s %>
51
- name: Florida
52
- abbreviation: FL
53
- GA:
54
- id: <%= (id=id+1).to_s %>
55
- name: Georgia
56
- abbreviation: GA
57
- HI:
58
- id: <%= (id=id+1).to_s %>
59
- name: Hawaii
60
- abbreviation: HI
61
- ID:
62
- id: <%= (id=id+1).to_s %>
63
- name: Idaho
64
- abbreviation: ID
65
- IL:
66
- id: <%= (id=id+1).to_s %>
67
- name: Illinois
68
- abbreviation: IL
69
- IN:
70
- id: <%= (id=id+1).to_s %>
71
- name: Indiana
72
- abbreviation: IN
73
- IA:
74
- id: <%= (id=id+1).to_s %>
75
- name: Iowa
76
- abbreviation: IA
77
- KS:
78
- id: <%= (id=id+1).to_s %>
79
- name: Kansas
80
- abbreviation: KS
81
- KY:
82
- id: <%= (id=id+1).to_s %>
83
- name: Kentucky
84
- abbreviation: KY
85
- LA:
86
- id: <%= (id=id+1).to_s %>
87
- name: Louisiana
88
- abbreviation: LA
89
- ME:
90
- id: <%= (id=id+1).to_s %>
91
- name: Maine
92
- abbreviation: ME
93
- MD:
94
- id: <%= (id=id+1).to_s %>
95
- name: Maryland
96
- abbreviation: MD
97
- MA:
98
- id: <%= (id=id+1).to_s %>
99
- name: Massachusetts
100
- abbreviation: MA
101
- MI:
102
- id: <%= (id=id+1).to_s %>
103
- name: Michigan
104
- abbreviation: MI
105
- MN:
106
- id: <%= (id=id+1).to_s %>
107
- name: Minnesota
108
- abbreviation: MN
109
- MS:
110
- id: <%= (id=id+1).to_s %>
111
- name: Mississippi
112
- abbreviation: MS
113
- MO:
114
- id: <%= (id=id+1).to_s %>
115
- name: Missouri
116
- abbreviation: MO
117
- MT:
118
- id: <%= (id=id+1).to_s %>
119
- name: Montana
120
- abbreviation: MT
121
- NE:
122
- id: <%= (id=id+1).to_s %>
123
- name: Nebraska
124
- abbreviation: NE
125
- NV:
126
- id: <%= (id=id+1).to_s %>
127
- name: Nevada
128
- abbreviation: NV
129
- NH:
130
- id: <%= (id=id+1).to_s %>
131
- name: New Hampshire
132
- abbreviation: NH
133
- NJ:
134
- id: <%= (id=id+1).to_s %>
135
- name: New Jersey
136
- abbreviation: NJ
137
- NM:
138
- id: <%= (id=id+1).to_s %>
139
- name: New Mexico
140
- abbreviation: NM
141
- NY:
142
- id: <%= (id=id+1).to_s %>
143
- name: New York
144
- abbreviation: NY
145
- NC:
146
- id: <%= (id=id+1).to_s %>
147
- name: North Carolina
148
- abbreviation: NC
149
- ND:
150
- id: <%= (id=id+1).to_s %>
151
- name: North Dakota
152
- abbreviation: ND
153
- OH:
154
- id: <%= (id=id+1).to_s %>
155
- name: Ohio
156
- abbreviation: OH
157
- OK:
158
- id: <%= (id=id+1).to_s %>
159
- name: Oklahoma
160
- abbreviation: OK
161
- OR:
162
- id: <%= (id=id+1).to_s %>
163
- name: Oregon
164
- abbreviation: OR
165
- PA:
166
- id: <%= (id=id+1).to_s %>
167
- name: Pennsylvania
168
- abbreviation: PA
169
- RI:
170
- id: <%= (id=id+1).to_s %>
171
- name: Rhode Island
172
- abbreviation: RI
173
- SC:
174
- id: <%= (id=id+1).to_s %>
175
- name: South Carolina
176
- abbreviation: SC
177
- SD:
178
- id: <%= (id=id+1).to_s %>
179
- name: South Dakota
180
- abbreviation: SD
181
- TN:
182
- id: <%= (id=id+1).to_s %>
183
- name: Tennessee
184
- abbreviation: TN
185
- TX:
186
- id: <%= (id=id+1).to_s %>
187
- name: Texas
188
- abbreviation: TX
189
- UT:
190
- id: <%= (id=id+1).to_s %>
191
- name: Utah
192
- abbreviation: UT
193
- VT:
194
- id: <%= (id=id+1).to_s %>
195
- name: Vermont
196
- abbreviation: VT
197
- VA:
198
- id: <%= (id=id+1).to_s %>
199
- name: Virginia
200
- abbreviation: VA
201
- WA:
202
- id: <%= (id=id+1).to_s %>
203
- name: Washington
204
- abbreviation: WA
205
- WV:
206
- id: <%= (id=id+1).to_s %>
207
- name: West Virginia
208
- abbreviation: WV
209
- WI:
210
- id: <%= (id=id+1).to_s %>
211
- name: Wisconsin
212
- abbreviation: WI
213
- WY:
214
- id: <%= (id=id+1).to_s %>
215
- name: Wyoming
216
- abbreviation: WY
@@ -1,11 +0,0 @@
1
- <% 1.upto(41) do |num| %>
2
- <%="user#{num}:" %>
3
- id: <%= num.to_s %>
4
- login: <%= "user#{num}" %>
5
- crypted_password: "2fdefe5c83d80a03a828dd65e90cfff65f0fb42d043a254ca2cad6af968d0e15" #password
6
- email: <%= "user#{num}@test.com" %>
7
- salt: "1000"
8
- created_at: <%= (Time.now - 30).to_s :db %>
9
- updated_at: <%= Time.now.to_s :db %>
10
- deleted: <%= num == 41 ? true : false %>
11
- <% end %>
@@ -1,10 +0,0 @@
1
- require File.dirname(__FILE__) + '/../test_helper'
2
-
3
- class CitationTest < Test::Unit::TestCase
4
- fixtures :citations
5
-
6
- # Replace this with your real tests.
7
- def test_truth
8
- assert true
9
- end
10
- end
@@ -1,10 +0,0 @@
1
- require File.dirname(__FILE__) + '/../test_helper'
2
-
3
- class CitationsItemTest < Test::Unit::TestCase
4
- fixtures :citations_items
5
-
6
- # Replace this with your real tests.
7
- def test_truth
8
- assert true
9
- end
10
- end
@@ -1,16 +0,0 @@
1
-
2
- # Run tests against all Rails versions
3
-
4
- VENDOR_DIR = File.expand_path("~/Desktop/projects/vendor/rails")
5
-
6
- HERE = File.expand_path(File.dirname(__FILE__))
7
-
8
- Dir["#{VENDOR_DIR}/*"].each do |dir|
9
- puts "\n\n**** #{dir} ****\n\n"
10
- Dir.chdir "#{HERE}/integration/app/vendor" do
11
- system("rm rails; ln -s #{dir} rails")
12
- end
13
- system("ruby #{HERE}/unit/polymorph_test.rb")
14
- end
15
-
16
- system("rm #{HERE}/integration/app/vendor; svn up #{HERE}/integration/app/vendor")