simply_stated 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (908) hide show
  1. data/.gitignore +7 -0
  2. data/Gemfile +6 -0
  3. data/README.textile +42 -0
  4. data/Rakefile +3 -4
  5. data/VERSION +1 -1
  6. data/bin/convert_to_should_syntax +3 -0
  7. data/lib/simply_stated.rb +4 -6
  8. data/simply_stated.gemspec +914 -9
  9. data/test/database.yml +3 -0
  10. data/test/models/two_state_rule.rb +10 -0
  11. data/test/models/user.rb +3 -0
  12. data/test/schema.rb +9 -0
  13. data/test/simply_stated_test.rb +66 -0
  14. data/test/test_helper.rb +33 -0
  15. data/vendor/gems/ruby/1.8/cache/activerecord-2.3.5.gem +0 -0
  16. data/vendor/gems/ruby/1.8/cache/activesupport-2.3.5.gem +0 -0
  17. data/vendor/gems/ruby/1.8/cache/freighthopper-0.1.2.gem +0 -0
  18. data/vendor/gems/ruby/1.8/cache/shoulda-2.10.3.gem +0 -0
  19. data/vendor/gems/ruby/1.8/cache/test-rig-0.0.3.gem +0 -0
  20. data/vendor/gems/ruby/1.8/environment.rb +111 -0
  21. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/CHANGELOG +5858 -0
  22. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/README +351 -0
  23. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/RUNNING_UNIT_TESTS +36 -0
  24. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/Rakefile +270 -0
  25. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/examples/associations.png +0 -0
  26. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/examples/performance.rb +162 -0
  27. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/install.rb +30 -0
  28. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/aggregations.rb +261 -0
  29. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/association_preload.rb +389 -0
  30. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/associations/association_collection.rb +475 -0
  31. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/associations/association_proxy.rb +278 -0
  32. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/associations/belongs_to_association.rb +76 -0
  33. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/associations/belongs_to_polymorphic_association.rb +53 -0
  34. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/associations/has_and_belongs_to_many_association.rb +143 -0
  35. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/associations/has_many_association.rb +122 -0
  36. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/associations/has_many_through_association.rb +266 -0
  37. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/associations/has_one_association.rb +133 -0
  38. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/associations/has_one_through_association.rb +37 -0
  39. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/associations.rb +2241 -0
  40. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/attribute_methods.rb +388 -0
  41. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/autosave_association.rb +364 -0
  42. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/base.rb +3165 -0
  43. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/batches.rb +81 -0
  44. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/calculations.rb +311 -0
  45. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/callbacks.rb +360 -0
  46. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb +371 -0
  47. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_specification.rb +139 -0
  48. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/database_statements.rb +289 -0
  49. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/query_cache.rb +94 -0
  50. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/quoting.rb +69 -0
  51. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/schema_definitions.rb +722 -0
  52. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/schema_statements.rb +434 -0
  53. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract_adapter.rb +241 -0
  54. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/mysql_adapter.rb +630 -0
  55. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/postgresql_adapter.rb +1113 -0
  56. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/sqlite3_adapter.rb +34 -0
  57. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/sqlite_adapter.rb +453 -0
  58. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/dirty.rb +183 -0
  59. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/dynamic_finder_match.rb +41 -0
  60. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/dynamic_scope_match.rb +25 -0
  61. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/fixtures.rb +996 -0
  62. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/i18n_interpolation_deprecation.rb +26 -0
  63. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/locale/en.yml +58 -0
  64. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/locking/optimistic.rb +148 -0
  65. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/locking/pessimistic.rb +55 -0
  66. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/migration.rb +566 -0
  67. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/named_scope.rb +192 -0
  68. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/nested_attributes.rb +392 -0
  69. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/observer.rb +197 -0
  70. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/query_cache.rb +33 -0
  71. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/reflection.rb +320 -0
  72. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/schema.rb +51 -0
  73. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/schema_dumper.rb +182 -0
  74. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/serialization.rb +101 -0
  75. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/serializers/json_serializer.rb +91 -0
  76. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/serializers/xml_serializer.rb +357 -0
  77. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/session_store.rb +326 -0
  78. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/test_case.rb +66 -0
  79. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/timestamp.rb +71 -0
  80. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/transactions.rb +235 -0
  81. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/validations.rb +1135 -0
  82. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/version.rb +9 -0
  83. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/lib/active_record.rb +84 -0
  84. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/lib/activerecord.rb +2 -0
  85. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/assets/example.log +1 -0
  86. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/assets/flowers.jpg +0 -0
  87. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/cases/aaa_create_tables_test.rb +24 -0
  88. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/cases/active_schema_test_mysql.rb +100 -0
  89. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/cases/active_schema_test_postgresql.rb +24 -0
  90. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/cases/adapter_test.rb +145 -0
  91. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/cases/aggregations_test.rb +167 -0
  92. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/cases/ar_schema_test.rb +32 -0
  93. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/cases/associations/belongs_to_associations_test.rb +425 -0
  94. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/cases/associations/callbacks_test.rb +161 -0
  95. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/cases/associations/cascaded_eager_loading_test.rb +131 -0
  96. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/cases/associations/eager_load_includes_full_sti_class_test.rb +36 -0
  97. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/cases/associations/eager_load_nested_include_test.rb +130 -0
  98. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/cases/associations/eager_singularization_test.rb +145 -0
  99. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/cases/associations/eager_test.rb +834 -0
  100. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/cases/associations/extension_test.rb +62 -0
  101. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/cases/associations/habtm_join_table_test.rb +56 -0
  102. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/cases/associations/has_and_belongs_to_many_associations_test.rb +822 -0
  103. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/cases/associations/has_many_associations_test.rb +1134 -0
  104. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/cases/associations/has_many_through_associations_test.rb +346 -0
  105. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/cases/associations/has_one_associations_test.rb +330 -0
  106. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/cases/associations/has_one_through_associations_test.rb +209 -0
  107. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/cases/associations/inner_join_association_test.rb +93 -0
  108. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/cases/associations/join_model_test.rb +712 -0
  109. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/cases/associations_test.rb +262 -0
  110. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/cases/attribute_methods_test.rb +305 -0
  111. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/cases/autosave_association_test.rb +1142 -0
  112. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/cases/base_test.rb +2154 -0
  113. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/cases/batches_test.rb +61 -0
  114. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/cases/binary_test.rb +30 -0
  115. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/cases/calculations_test.rb +348 -0
  116. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/cases/callbacks_observers_test.rb +38 -0
  117. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/cases/callbacks_test.rb +438 -0
  118. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/cases/class_inheritable_attributes_test.rb +32 -0
  119. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/cases/column_alias_test.rb +17 -0
  120. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/cases/column_definition_test.rb +70 -0
  121. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/cases/connection_pool_test.rb +25 -0
  122. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/cases/connection_test_firebird.rb +8 -0
  123. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/cases/connection_test_mysql.rb +64 -0
  124. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/cases/copy_table_test_sqlite.rb +80 -0
  125. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/cases/database_statements_test.rb +12 -0
  126. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/cases/datatype_test_postgresql.rb +204 -0
  127. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/cases/date_time_test.rb +37 -0
  128. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/cases/default_test_firebird.rb +16 -0
  129. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/cases/defaults_test.rb +111 -0
  130. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/cases/deprecated_finder_test.rb +30 -0
  131. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/cases/dirty_test.rb +316 -0
  132. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/cases/finder_respond_to_test.rb +76 -0
  133. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/cases/finder_test.rb +1054 -0
  134. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/cases/fixtures_test.rb +656 -0
  135. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/cases/helper.rb +68 -0
  136. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/cases/i18n_test.rb +46 -0
  137. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/cases/inheritance_test.rb +262 -0
  138. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/cases/invalid_date_test.rb +24 -0
  139. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/cases/json_serialization_test.rb +205 -0
  140. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/cases/lifecycle_test.rb +193 -0
  141. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/cases/locking_test.rb +304 -0
  142. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/cases/method_scoping_test.rb +704 -0
  143. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/cases/migration_test.rb +1523 -0
  144. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/cases/migration_test_firebird.rb +124 -0
  145. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/cases/mixin_test.rb +96 -0
  146. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/cases/modules_test.rb +81 -0
  147. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/cases/multiple_db_test.rb +85 -0
  148. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/cases/named_scope_test.rb +361 -0
  149. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/cases/nested_attributes_test.rb +581 -0
  150. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/cases/pk_test.rb +119 -0
  151. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/cases/pooled_connections_test.rb +103 -0
  152. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/cases/query_cache_test.rb +123 -0
  153. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/cases/readonly_test.rb +107 -0
  154. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/cases/reflection_test.rb +194 -0
  155. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/cases/reload_models_test.rb +22 -0
  156. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/cases/repair_helper.rb +50 -0
  157. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/cases/reserved_word_test_mysql.rb +176 -0
  158. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/cases/sanitize_test.rb +25 -0
  159. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/cases/schema_authorization_test_postgresql.rb +75 -0
  160. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/cases/schema_dumper_test.rb +211 -0
  161. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/cases/schema_test_postgresql.rb +178 -0
  162. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/cases/serialization_test.rb +47 -0
  163. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/cases/synonym_test_oracle.rb +17 -0
  164. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/cases/timestamp_test.rb +75 -0
  165. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/cases/transactions_test.rb +522 -0
  166. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/cases/unconnected_test.rb +32 -0
  167. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/cases/validations_i18n_test.rb +955 -0
  168. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/cases/validations_test.rb +1640 -0
  169. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/cases/xml_serialization_test.rb +240 -0
  170. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/config.rb +5 -0
  171. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/connections/jdbc_jdbcderby/connection.rb +18 -0
  172. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/connections/jdbc_jdbch2/connection.rb +18 -0
  173. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/connections/jdbc_jdbchsqldb/connection.rb +18 -0
  174. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/connections/jdbc_jdbcmysql/connection.rb +26 -0
  175. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/connections/jdbc_jdbcpostgresql/connection.rb +26 -0
  176. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/connections/jdbc_jdbcsqlite3/connection.rb +25 -0
  177. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/connections/native_db2/connection.rb +25 -0
  178. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/connections/native_firebird/connection.rb +26 -0
  179. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/connections/native_frontbase/connection.rb +27 -0
  180. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/connections/native_mysql/connection.rb +25 -0
  181. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/connections/native_openbase/connection.rb +21 -0
  182. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/connections/native_oracle/connection.rb +27 -0
  183. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/connections/native_postgresql/connection.rb +21 -0
  184. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/connections/native_sqlite/connection.rb +25 -0
  185. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/connections/native_sqlite3/connection.rb +25 -0
  186. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/connections/native_sqlite3/in_memory_connection.rb +18 -0
  187. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/connections/native_sybase/connection.rb +23 -0
  188. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/fixtures/accounts.yml +29 -0
  189. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/fixtures/all/developers.yml +0 -0
  190. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/fixtures/all/people.csv +0 -0
  191. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/fixtures/all/tasks.yml +0 -0
  192. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/fixtures/author_addresses.yml +5 -0
  193. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/fixtures/author_favorites.yml +4 -0
  194. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/fixtures/authors.yml +9 -0
  195. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/fixtures/binaries.yml +132 -0
  196. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/fixtures/books.yml +7 -0
  197. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/fixtures/categories/special_categories.yml +9 -0
  198. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/fixtures/categories/subsubdir/arbitrary_filename.yml +4 -0
  199. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/fixtures/categories.yml +14 -0
  200. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/fixtures/categories_ordered.yml +7 -0
  201. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/fixtures/categories_posts.yml +23 -0
  202. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/fixtures/categorizations.yml +17 -0
  203. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/fixtures/clubs.yml +6 -0
  204. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/fixtures/comments.yml +59 -0
  205. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/fixtures/companies.yml +56 -0
  206. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/fixtures/computers.yml +4 -0
  207. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/fixtures/courses.yml +7 -0
  208. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/fixtures/customers.yml +26 -0
  209. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/fixtures/developers.yml +21 -0
  210. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/fixtures/developers_projects.yml +17 -0
  211. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/fixtures/edges.yml +6 -0
  212. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/fixtures/entrants.yml +14 -0
  213. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/fixtures/fixture_database.sqlite +0 -0
  214. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/fixtures/fixture_database_2.sqlite +0 -0
  215. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/fixtures/fk_test_has_fk.yml +3 -0
  216. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/fixtures/fk_test_has_pk.yml +2 -0
  217. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/fixtures/funny_jokes.yml +10 -0
  218. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/fixtures/items.yml +4 -0
  219. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/fixtures/jobs.yml +7 -0
  220. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/fixtures/legacy_things.yml +3 -0
  221. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/fixtures/mateys.yml +4 -0
  222. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/fixtures/member_types.yml +6 -0
  223. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/fixtures/members.yml +6 -0
  224. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/fixtures/memberships.yml +20 -0
  225. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/fixtures/minimalistics.yml +2 -0
  226. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/fixtures/mixed_case_monkeys.yml +6 -0
  227. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/fixtures/mixins.yml +29 -0
  228. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/fixtures/movies.yml +7 -0
  229. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/fixtures/naked/csv/accounts.csv +1 -0
  230. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/fixtures/naked/yml/accounts.yml +1 -0
  231. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/fixtures/naked/yml/companies.yml +1 -0
  232. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/fixtures/naked/yml/courses.yml +1 -0
  233. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/fixtures/organizations.yml +5 -0
  234. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/fixtures/owners.yml +7 -0
  235. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/fixtures/parrots.yml +27 -0
  236. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/fixtures/parrots_pirates.yml +7 -0
  237. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/fixtures/people.yml +15 -0
  238. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/fixtures/pets.yml +14 -0
  239. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/fixtures/pirates.yml +9 -0
  240. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/fixtures/posts.yml +52 -0
  241. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/fixtures/price_estimates.yml +7 -0
  242. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/fixtures/projects.yml +7 -0
  243. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/fixtures/readers.yml +9 -0
  244. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/fixtures/references.yml +17 -0
  245. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/fixtures/reserved_words/distinct.yml +5 -0
  246. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/fixtures/reserved_words/distincts_selects.yml +11 -0
  247. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/fixtures/reserved_words/group.yml +14 -0
  248. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/fixtures/reserved_words/select.yml +8 -0
  249. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/fixtures/reserved_words/values.yml +7 -0
  250. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/fixtures/ships.yml +5 -0
  251. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/fixtures/sponsors.yml +9 -0
  252. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/fixtures/subscribers.yml +7 -0
  253. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/fixtures/subscriptions.yml +12 -0
  254. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/fixtures/taggings.yml +28 -0
  255. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/fixtures/tags.yml +7 -0
  256. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/fixtures/tasks.yml +7 -0
  257. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/fixtures/topics.yml +42 -0
  258. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/fixtures/toys.yml +4 -0
  259. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/fixtures/treasures.yml +10 -0
  260. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/fixtures/vertices.yml +4 -0
  261. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/fixtures/warehouse-things.yml +3 -0
  262. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/migrations/broken/100_migration_that_raises_exception.rb +10 -0
  263. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/migrations/decimal/1_give_me_big_numbers.rb +15 -0
  264. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/migrations/duplicate/1_people_have_last_names.rb +9 -0
  265. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/migrations/duplicate/2_we_need_reminders.rb +12 -0
  266. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/migrations/duplicate/3_foo.rb +7 -0
  267. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/migrations/duplicate/3_innocent_jointable.rb +12 -0
  268. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/migrations/duplicate_names/20080507052938_chunky.rb +7 -0
  269. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/migrations/duplicate_names/20080507053028_chunky.rb +7 -0
  270. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/migrations/interleaved/pass_1/3_innocent_jointable.rb +12 -0
  271. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/migrations/interleaved/pass_2/1_people_have_last_names.rb +9 -0
  272. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/migrations/interleaved/pass_2/3_innocent_jointable.rb +12 -0
  273. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/migrations/interleaved/pass_3/1_people_have_last_names.rb +9 -0
  274. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/migrations/interleaved/pass_3/2_i_raise_on_down.rb +8 -0
  275. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/migrations/interleaved/pass_3/3_innocent_jointable.rb +12 -0
  276. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/migrations/missing/1000_people_have_middle_names.rb +9 -0
  277. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/migrations/missing/1_people_have_last_names.rb +9 -0
  278. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/migrations/missing/3_we_need_reminders.rb +12 -0
  279. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/migrations/missing/4_innocent_jointable.rb +12 -0
  280. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/migrations/valid/1_people_have_last_names.rb +9 -0
  281. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/migrations/valid/2_we_need_reminders.rb +12 -0
  282. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/migrations/valid/3_innocent_jointable.rb +12 -0
  283. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/models/author.rb +146 -0
  284. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/models/auto_id.rb +4 -0
  285. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/models/binary.rb +2 -0
  286. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/models/bird.rb +3 -0
  287. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/models/book.rb +4 -0
  288. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/models/categorization.rb +5 -0
  289. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/models/category.rb +34 -0
  290. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/models/citation.rb +6 -0
  291. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/models/club.rb +13 -0
  292. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/models/column_name.rb +3 -0
  293. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/models/comment.rb +29 -0
  294. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/models/company.rb +171 -0
  295. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/models/company_in_module.rb +61 -0
  296. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/models/computer.rb +3 -0
  297. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/models/contact.rb +16 -0
  298. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/models/contract.rb +5 -0
  299. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/models/course.rb +3 -0
  300. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/models/customer.rb +73 -0
  301. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/models/default.rb +2 -0
  302. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/models/developer.rb +101 -0
  303. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/models/edge.rb +5 -0
  304. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/models/entrant.rb +3 -0
  305. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/models/essay.rb +3 -0
  306. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/models/event.rb +3 -0
  307. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/models/guid.rb +2 -0
  308. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/models/item.rb +7 -0
  309. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/models/job.rb +5 -0
  310. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/models/joke.rb +3 -0
  311. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/models/keyboard.rb +3 -0
  312. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/models/legacy_thing.rb +3 -0
  313. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/models/matey.rb +4 -0
  314. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/models/member.rb +12 -0
  315. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/models/member_detail.rb +5 -0
  316. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/models/member_type.rb +3 -0
  317. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/models/membership.rb +9 -0
  318. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/models/minimalistic.rb +2 -0
  319. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/models/mixed_case_monkey.rb +3 -0
  320. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/models/movie.rb +5 -0
  321. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/models/order.rb +4 -0
  322. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/models/organization.rb +6 -0
  323. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/models/owner.rb +5 -0
  324. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/models/parrot.rb +16 -0
  325. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/models/person.rb +16 -0
  326. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/models/pet.rb +5 -0
  327. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/models/pirate.rb +70 -0
  328. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/models/post.rb +100 -0
  329. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/models/price_estimate.rb +3 -0
  330. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/models/project.rb +30 -0
  331. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/models/reader.rb +4 -0
  332. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/models/reference.rb +4 -0
  333. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/models/reply.rb +46 -0
  334. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/models/ship.rb +10 -0
  335. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/models/ship_part.rb +5 -0
  336. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/models/sponsor.rb +4 -0
  337. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/models/subject.rb +4 -0
  338. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/models/subscriber.rb +8 -0
  339. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/models/subscription.rb +4 -0
  340. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/models/tag.rb +7 -0
  341. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/models/tagging.rb +10 -0
  342. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/models/task.rb +3 -0
  343. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/models/topic.rb +80 -0
  344. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/models/toy.rb +6 -0
  345. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/models/treasure.rb +8 -0
  346. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/models/vertex.rb +9 -0
  347. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/models/warehouse_thing.rb +5 -0
  348. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/schema/mysql_specific_schema.rb +24 -0
  349. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/schema/postgresql_specific_schema.rb +114 -0
  350. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/schema/schema.rb +493 -0
  351. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/schema/schema2.rb +6 -0
  352. data/vendor/gems/ruby/1.8/gems/activerecord-2.3.5/test/schema/sqlite_specific_schema.rb +25 -0
  353. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/CHANGELOG +1330 -0
  354. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/README +43 -0
  355. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/all.rb +8 -0
  356. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/backtrace_cleaner.rb +72 -0
  357. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/base64.rb +33 -0
  358. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/basic_object.rb +24 -0
  359. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/buffered_logger.rb +127 -0
  360. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/cache/compressed_mem_cache_store.rb +20 -0
  361. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/cache/drb_store.rb +14 -0
  362. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/cache/file_store.rb +72 -0
  363. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/cache/mem_cache_store.rb +143 -0
  364. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/cache/memory_store.rb +52 -0
  365. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/cache/strategy/local_cache.rb +104 -0
  366. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/cache/synchronized_memory_store.rb +47 -0
  367. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/cache.rb +248 -0
  368. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb +279 -0
  369. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/array/access.rb +53 -0
  370. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/array/conversions.rb +197 -0
  371. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/array/extract_options.rb +20 -0
  372. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/array/grouping.rb +106 -0
  373. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/array/random_access.rb +12 -0
  374. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/array/wrapper.rb +24 -0
  375. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/array.rb +15 -0
  376. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/base64/encoding.rb +16 -0
  377. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/base64.rb +4 -0
  378. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/benchmark.rb +19 -0
  379. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/bigdecimal/conversions.rb +37 -0
  380. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/bigdecimal.rb +6 -0
  381. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/blank.rb +2 -0
  382. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/cgi/escape_skipping_slashes.rb +23 -0
  383. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/cgi.rb +5 -0
  384. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/class/attribute_accessors.rb +54 -0
  385. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/class/delegating_attributes.rb +47 -0
  386. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/class/inheritable_attributes.rb +140 -0
  387. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/class/removal.rb +50 -0
  388. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/class.rb +4 -0
  389. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/date/behavior.rb +42 -0
  390. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/date/calculations.rb +231 -0
  391. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/date/conversions.rb +107 -0
  392. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/date.rb +10 -0
  393. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/date_time/calculations.rb +126 -0
  394. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/date_time/conversions.rb +96 -0
  395. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/date_time.rb +12 -0
  396. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/duplicable.rb +43 -0
  397. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/enumerable.rb +114 -0
  398. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/exception.rb +45 -0
  399. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/file/atomic.rb +46 -0
  400. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/file.rb +5 -0
  401. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/float/rounding.rb +24 -0
  402. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/float/time.rb +27 -0
  403. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/float.rb +7 -0
  404. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/hash/conversions.rb +247 -0
  405. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/hash/deep_merge.rb +23 -0
  406. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/hash/diff.rb +19 -0
  407. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/hash/except.rb +25 -0
  408. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/hash/indifferent_access.rb +143 -0
  409. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/hash/keys.rb +52 -0
  410. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/hash/reverse_merge.rb +35 -0
  411. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/hash/slice.rb +40 -0
  412. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/hash.rb +14 -0
  413. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/integer/even_odd.rb +29 -0
  414. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/integer/inflections.rb +20 -0
  415. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/integer/time.rb +45 -0
  416. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/integer.rb +9 -0
  417. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/kernel/agnostics.rb +11 -0
  418. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/kernel/daemonizing.rb +7 -0
  419. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/kernel/debugger.rb +16 -0
  420. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/kernel/reporting.rb +59 -0
  421. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/kernel/requires.rb +24 -0
  422. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/kernel.rb +5 -0
  423. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/load_error.rb +38 -0
  424. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/logger.rb +145 -0
  425. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/module/aliasing.rb +74 -0
  426. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/module/attr_accessor_with_default.rb +31 -0
  427. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/module/attr_internal.rb +32 -0
  428. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/module/attribute_accessors.rb +60 -0
  429. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/module/delegation.rb +135 -0
  430. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/module/inclusion.rb +30 -0
  431. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/module/introspection.rb +90 -0
  432. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/module/loading.rb +23 -0
  433. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/module/model_naming.rb +25 -0
  434. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/module/synchronization.rb +39 -0
  435. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/module.rb +23 -0
  436. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/name_error.rb +19 -0
  437. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/numeric/bytes.rb +50 -0
  438. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/numeric/conversions.rb +19 -0
  439. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/numeric/time.rb +81 -0
  440. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/numeric.rb +9 -0
  441. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/object/blank.rb +58 -0
  442. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/object/conversions.rb +15 -0
  443. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/object/extending.rb +80 -0
  444. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/object/instance_variables.rb +74 -0
  445. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/object/metaclass.rb +13 -0
  446. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/object/misc.rb +90 -0
  447. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/object.rb +6 -0
  448. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/pathname/clean_within.rb +14 -0
  449. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/pathname.rb +7 -0
  450. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/proc.rb +12 -0
  451. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/process/daemon.rb +25 -0
  452. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/process.rb +1 -0
  453. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/range/blockless_step.rb +32 -0
  454. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/range/conversions.rb +27 -0
  455. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/range/include_range.rb +30 -0
  456. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/range/overlaps.rb +15 -0
  457. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/range.rb +11 -0
  458. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/rexml.rb +41 -0
  459. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/string/access.rb +106 -0
  460. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/string/behavior.rb +13 -0
  461. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/string/bytesize.rb +5 -0
  462. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/string/conversions.rb +28 -0
  463. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/string/filters.rb +26 -0
  464. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/string/inflections.rb +167 -0
  465. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/string/iterators.rb +23 -0
  466. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/string/multibyte.rb +81 -0
  467. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/string/output_safety.rb +48 -0
  468. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/string/starts_ends_with.rb +35 -0
  469. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/string/xchar.rb +11 -0
  470. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/string.rb +25 -0
  471. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/symbol.rb +14 -0
  472. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/time/behavior.rb +13 -0
  473. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/time/calculations.rb +304 -0
  474. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/time/conversions.rb +90 -0
  475. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/time/zones.rb +86 -0
  476. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/time.rb +42 -0
  477. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/try.rb +36 -0
  478. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/uri.rb +16 -0
  479. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext.rb +8 -0
  480. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb +625 -0
  481. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/deprecation.rb +196 -0
  482. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/duration.rb +100 -0
  483. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/gzip.rb +25 -0
  484. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/inflections.rb +56 -0
  485. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/inflector.rb +406 -0
  486. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/json/backends/jsongem.rb +37 -0
  487. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/json/backends/yaml.rb +84 -0
  488. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/json/decoding.rb +35 -0
  489. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/json/encoders/date.rb +22 -0
  490. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/json/encoders/date_time.rb +22 -0
  491. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/json/encoders/enumerable.rb +17 -0
  492. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/json/encoders/false_class.rb +7 -0
  493. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/json/encoders/hash.rb +56 -0
  494. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/json/encoders/nil_class.rb +7 -0
  495. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/json/encoders/numeric.rb +21 -0
  496. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/json/encoders/object.rb +10 -0
  497. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/json/encoders/regexp.rb +9 -0
  498. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/json/encoders/string.rb +9 -0
  499. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/json/encoders/symbol.rb +5 -0
  500. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/json/encoders/time.rb +22 -0
  501. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/json/encoders/true_class.rb +7 -0
  502. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/json/encoding.rb +102 -0
  503. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/json/variable.rb +10 -0
  504. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/json.rb +2 -0
  505. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/locale/en.yml +33 -0
  506. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/memoizable.rb +100 -0
  507. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/message_encryptor.rb +70 -0
  508. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/message_verifier.rb +79 -0
  509. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/multibyte/chars.rb +707 -0
  510. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/multibyte/exceptions.rb +8 -0
  511. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/multibyte/unicode_database.rb +71 -0
  512. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/multibyte/utils.rb +61 -0
  513. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/multibyte.rb +57 -0
  514. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/option_merger.rb +23 -0
  515. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/ordered_hash.rb +141 -0
  516. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/ordered_options.rb +19 -0
  517. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/rescuable.rb +108 -0
  518. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/secure_random.rb +199 -0
  519. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/string_inquirer.rb +21 -0
  520. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/test_case.rb +40 -0
  521. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/testing/assertions.rb +65 -0
  522. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/testing/declarative.rb +21 -0
  523. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/testing/default.rb +9 -0
  524. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/testing/deprecation.rb +57 -0
  525. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/testing/performance.rb +452 -0
  526. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/testing/setup_and_teardown.rb +91 -0
  527. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/time_with_zone.rb +335 -0
  528. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/values/time_zone.rb +404 -0
  529. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/values/unicode_tables.dat +0 -0
  530. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/builder-2.1.2/blankslate.rb +113 -0
  531. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/builder-2.1.2/builder/blankslate.rb +20 -0
  532. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/builder-2.1.2/builder/css.rb +250 -0
  533. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/builder-2.1.2/builder/xchar.rb +115 -0
  534. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/builder-2.1.2/builder/xmlbase.rb +139 -0
  535. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/builder-2.1.2/builder/xmlevents.rb +63 -0
  536. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/builder-2.1.2/builder/xmlmarkup.rb +328 -0
  537. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/builder-2.1.2/builder.rb +13 -0
  538. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/i18n-0.1.3/MIT-LICENSE +20 -0
  539. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/i18n-0.1.3/README.textile +20 -0
  540. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/i18n-0.1.3/Rakefile +5 -0
  541. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/i18n-0.1.3/i18n.gemspec +27 -0
  542. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/i18n-0.1.3/lib/i18n/backend/simple.rb +214 -0
  543. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/i18n-0.1.3/lib/i18n/exceptions.rb +53 -0
  544. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/i18n-0.1.3/lib/i18n.rb +199 -0
  545. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/i18n-0.1.3/test/all.rb +5 -0
  546. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/i18n-0.1.3/test/i18n_exceptions_test.rb +99 -0
  547. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/i18n-0.1.3/test/i18n_test.rb +124 -0
  548. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/i18n-0.1.3/test/locale/en.rb +1 -0
  549. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/i18n-0.1.3/test/locale/en.yml +3 -0
  550. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/i18n-0.1.3/test/simple_backend_test.rb +567 -0
  551. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/memcache-client-1.7.4/memcache.rb +1107 -0
  552. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/data_timezone.rb +47 -0
  553. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/data_timezone_info.rb +228 -0
  554. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Algiers.rb +55 -0
  555. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Cairo.rb +219 -0
  556. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Casablanca.rb +40 -0
  557. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Harare.rb +18 -0
  558. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Johannesburg.rb +25 -0
  559. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Monrovia.rb +22 -0
  560. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Nairobi.rb +23 -0
  561. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Argentina/Buenos_Aires.rb +166 -0
  562. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Argentina/San_Juan.rb +86 -0
  563. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Bogota.rb +23 -0
  564. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Caracas.rb +23 -0
  565. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Chicago.rb +283 -0
  566. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Chihuahua.rb +136 -0
  567. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Denver.rb +204 -0
  568. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Godthab.rb +161 -0
  569. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Guatemala.rb +27 -0
  570. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Halifax.rb +274 -0
  571. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Indiana/Indianapolis.rb +149 -0
  572. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Juneau.rb +194 -0
  573. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/La_Paz.rb +22 -0
  574. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Lima.rb +35 -0
  575. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Los_Angeles.rb +232 -0
  576. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Mazatlan.rb +139 -0
  577. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Mexico_City.rb +144 -0
  578. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Monterrey.rb +131 -0
  579. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/New_York.rb +282 -0
  580. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Phoenix.rb +30 -0
  581. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Regina.rb +74 -0
  582. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Santiago.rb +205 -0
  583. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Sao_Paulo.rb +171 -0
  584. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/St_Johns.rb +288 -0
  585. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Tijuana.rb +196 -0
  586. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Almaty.rb +67 -0
  587. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Baghdad.rb +73 -0
  588. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Baku.rb +161 -0
  589. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Bangkok.rb +20 -0
  590. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Chongqing.rb +33 -0
  591. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Colombo.rb +30 -0
  592. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Dhaka.rb +27 -0
  593. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Hong_Kong.rb +87 -0
  594. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Irkutsk.rb +165 -0
  595. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Jakarta.rb +30 -0
  596. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Jerusalem.rb +163 -0
  597. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Kabul.rb +20 -0
  598. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Kamchatka.rb +163 -0
  599. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Karachi.rb +30 -0
  600. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Katmandu.rb +20 -0
  601. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Kolkata.rb +25 -0
  602. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Krasnoyarsk.rb +163 -0
  603. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Kuala_Lumpur.rb +31 -0
  604. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Kuwait.rb +18 -0
  605. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Magadan.rb +163 -0
  606. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Muscat.rb +18 -0
  607. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Novosibirsk.rb +164 -0
  608. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Rangoon.rb +24 -0
  609. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Riyadh.rb +18 -0
  610. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Seoul.rb +34 -0
  611. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Shanghai.rb +35 -0
  612. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Singapore.rb +33 -0
  613. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Taipei.rb +59 -0
  614. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Tashkent.rb +47 -0
  615. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Tbilisi.rb +78 -0
  616. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Tehran.rb +121 -0
  617. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Tokyo.rb +30 -0
  618. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Ulaanbaatar.rb +65 -0
  619. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Urumqi.rb +33 -0
  620. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Vladivostok.rb +164 -0
  621. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Yakutsk.rb +163 -0
  622. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Yekaterinburg.rb +165 -0
  623. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Yerevan.rb +165 -0
  624. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Atlantic/Azores.rb +270 -0
  625. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Atlantic/Cape_Verde.rb +23 -0
  626. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Atlantic/South_Georgia.rb +18 -0
  627. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Adelaide.rb +187 -0
  628. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Brisbane.rb +35 -0
  629. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Darwin.rb +29 -0
  630. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Hobart.rb +193 -0
  631. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Melbourne.rb +185 -0
  632. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Perth.rb +37 -0
  633. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Sydney.rb +185 -0
  634. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Etc/UTC.rb +16 -0
  635. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Amsterdam.rb +228 -0
  636. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Athens.rb +185 -0
  637. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Belgrade.rb +163 -0
  638. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Berlin.rb +188 -0
  639. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Bratislava.rb +13 -0
  640. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Brussels.rb +232 -0
  641. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Bucharest.rb +181 -0
  642. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Budapest.rb +197 -0
  643. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Copenhagen.rb +179 -0
  644. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Dublin.rb +276 -0
  645. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Helsinki.rb +163 -0
  646. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Istanbul.rb +218 -0
  647. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Kiev.rb +168 -0
  648. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Lisbon.rb +268 -0
  649. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Ljubljana.rb +13 -0
  650. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/London.rb +288 -0
  651. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Madrid.rb +211 -0
  652. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Minsk.rb +170 -0
  653. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Moscow.rb +181 -0
  654. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Paris.rb +232 -0
  655. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Prague.rb +187 -0
  656. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Riga.rb +176 -0
  657. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Rome.rb +215 -0
  658. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Sarajevo.rb +13 -0
  659. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Skopje.rb +13 -0
  660. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Sofia.rb +173 -0
  661. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Stockholm.rb +165 -0
  662. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Tallinn.rb +172 -0
  663. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Vienna.rb +183 -0
  664. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Vilnius.rb +170 -0
  665. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Warsaw.rb +212 -0
  666. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Zagreb.rb +13 -0
  667. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Auckland.rb +202 -0
  668. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Fiji.rb +23 -0
  669. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Guam.rb +22 -0
  670. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Honolulu.rb +28 -0
  671. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Majuro.rb +20 -0
  672. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Midway.rb +25 -0
  673. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Noumea.rb +25 -0
  674. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Pago_Pago.rb +26 -0
  675. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Port_Moresby.rb +20 -0
  676. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Tongatapu.rb +27 -0
  677. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/info_timezone.rb +52 -0
  678. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/linked_timezone.rb +51 -0
  679. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/linked_timezone_info.rb +44 -0
  680. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/offset_rationals.rb +98 -0
  681. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/ruby_core_support.rb +56 -0
  682. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/time_or_datetime.rb +292 -0
  683. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone.rb +508 -0
  684. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone_definition.rb +56 -0
  685. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone_info.rb +40 -0
  686. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone_offset_info.rb +94 -0
  687. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone_period.rb +198 -0
  688. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone_transition_info.rb +129 -0
  689. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor/tzinfo-0.3.12/tzinfo.rb +33 -0
  690. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/vendor.rb +28 -0
  691. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/version.rb +9 -0
  692. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/whiny_nil.rb +64 -0
  693. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/xml_mini/jdom.rb +162 -0
  694. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/xml_mini/libxml.rb +133 -0
  695. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/xml_mini/nokogiri.rb +69 -0
  696. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/xml_mini/rexml.rb +108 -0
  697. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/xml_mini.rb +31 -0
  698. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/active_support.rb +59 -0
  699. data/vendor/gems/ruby/1.8/gems/activesupport-2.3.5/lib/activesupport.rb +2 -0
  700. data/vendor/gems/ruby/1.8/gems/freighthopper-0.1.2/.gitignore +7 -0
  701. data/vendor/gems/ruby/1.8/gems/freighthopper-0.1.2/Gemfile +4 -0
  702. data/vendor/gems/ruby/1.8/gems/freighthopper-0.1.2/LICENSE +20 -0
  703. data/vendor/gems/ruby/1.8/gems/freighthopper-0.1.2/README +0 -0
  704. data/vendor/gems/ruby/1.8/gems/freighthopper-0.1.2/Rakefile +29 -0
  705. data/vendor/gems/ruby/1.8/gems/freighthopper-0.1.2/VERSION +1 -0
  706. data/vendor/gems/ruby/1.8/gems/freighthopper-0.1.2/bin/convert_to_should_syntax +3 -0
  707. data/vendor/gems/ruby/1.8/gems/freighthopper-0.1.2/freighthopper.gemspec +75 -0
  708. data/vendor/gems/ruby/1.8/gems/freighthopper-0.1.2/init.rb +1 -0
  709. data/vendor/gems/ruby/1.8/gems/freighthopper-0.1.2/lib/freighthopper.rb +132 -0
  710. data/vendor/gems/ruby/1.8/gems/freighthopper-0.1.2/test/array_test.rb +48 -0
  711. data/vendor/gems/ruby/1.8/gems/freighthopper-0.1.2/test/define_and_alias_test.rb +48 -0
  712. data/vendor/gems/ruby/1.8/gems/freighthopper-0.1.2/test/float_test.rb +18 -0
  713. data/vendor/gems/ruby/1.8/gems/freighthopper-0.1.2/test/hash_test.rb +27 -0
  714. data/vendor/gems/ruby/1.8/gems/freighthopper-0.1.2/test/kernel_test.rb +34 -0
  715. data/vendor/gems/ruby/1.8/gems/freighthopper-0.1.2/test/lazy_alias_test.rb +34 -0
  716. data/vendor/gems/ruby/1.8/gems/freighthopper-0.1.2/test/object_test.rb +68 -0
  717. data/vendor/gems/ruby/1.8/gems/freighthopper-0.1.2/test/string_test.rb +58 -0
  718. data/vendor/gems/ruby/1.8/gems/freighthopper-0.1.2/test/test_helper.rb +17 -0
  719. data/vendor/gems/ruby/1.8/gems/freighthopper-0.1.2/vendor/gems/cache/shoulda-2.10.2.gem +0 -0
  720. data/vendor/gems/ruby/1.8/gems/freighthopper-0.1.2/vendor/gems/cache/test-rig-0.0.1.gem +0 -0
  721. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/CONTRIBUTION_GUIDELINES.rdoc +10 -0
  722. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/MIT-LICENSE +22 -0
  723. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/README.rdoc +171 -0
  724. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/Rakefile +72 -0
  725. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/bin/convert_to_should_syntax +42 -0
  726. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/lib/shoulda/action_controller/macros.rb +240 -0
  727. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/lib/shoulda/action_controller/matchers/assign_to_matcher.rb +109 -0
  728. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/lib/shoulda/action_controller/matchers/filter_param_matcher.rb +57 -0
  729. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/lib/shoulda/action_controller/matchers/render_with_layout_matcher.rb +81 -0
  730. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/lib/shoulda/action_controller/matchers/respond_with_content_type_matcher.rb +74 -0
  731. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/lib/shoulda/action_controller/matchers/respond_with_matcher.rb +81 -0
  732. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/lib/shoulda/action_controller/matchers/route_matcher.rb +93 -0
  733. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/lib/shoulda/action_controller/matchers/set_session_matcher.rb +87 -0
  734. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/lib/shoulda/action_controller/matchers/set_the_flash_matcher.rb +85 -0
  735. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/lib/shoulda/action_controller/matchers.rb +37 -0
  736. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/lib/shoulda/action_controller.rb +26 -0
  737. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/lib/shoulda/action_mailer/assertions.rb +38 -0
  738. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/lib/shoulda/action_mailer.rb +10 -0
  739. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/lib/shoulda/action_view/macros.rb +61 -0
  740. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/lib/shoulda/action_view.rb +10 -0
  741. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/lib/shoulda/active_record/assertions.rb +69 -0
  742. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/lib/shoulda/active_record/helpers.rb +27 -0
  743. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/lib/shoulda/active_record/macros.rb +512 -0
  744. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/lib/shoulda/active_record/matchers/allow_mass_assignment_of_matcher.rb +83 -0
  745. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/lib/shoulda/active_record/matchers/allow_value_matcher.rb +102 -0
  746. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/lib/shoulda/active_record/matchers/association_matcher.rb +226 -0
  747. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/lib/shoulda/active_record/matchers/ensure_inclusion_of_matcher.rb +87 -0
  748. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/lib/shoulda/active_record/matchers/ensure_length_of_matcher.rb +141 -0
  749. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/lib/shoulda/active_record/matchers/have_db_column_matcher.rb +169 -0
  750. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/lib/shoulda/active_record/matchers/have_db_index_matcher.rb +112 -0
  751. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/lib/shoulda/active_record/matchers/have_named_scope_matcher.rb +128 -0
  752. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/lib/shoulda/active_record/matchers/have_readonly_attribute_matcher.rb +59 -0
  753. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/lib/shoulda/active_record/matchers/validate_acceptance_of_matcher.rb +41 -0
  754. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/lib/shoulda/active_record/matchers/validate_format_of_matcher.rb +67 -0
  755. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/lib/shoulda/active_record/matchers/validate_numericality_of_matcher.rb +39 -0
  756. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/lib/shoulda/active_record/matchers/validate_presence_of_matcher.rb +60 -0
  757. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/lib/shoulda/active_record/matchers/validate_uniqueness_of_matcher.rb +148 -0
  758. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/lib/shoulda/active_record/matchers/validation_matcher.rb +57 -0
  759. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/lib/shoulda/active_record/matchers.rb +43 -0
  760. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/lib/shoulda/active_record.rb +16 -0
  761. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/lib/shoulda/assertions.rb +71 -0
  762. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/lib/shoulda/autoload_macros.rb +46 -0
  763. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/lib/shoulda/context.rb +413 -0
  764. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/lib/shoulda/helpers.rb +8 -0
  765. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/lib/shoulda/macros.rb +133 -0
  766. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/lib/shoulda/private_helpers.rb +13 -0
  767. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/lib/shoulda/proc_extensions.rb +14 -0
  768. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/lib/shoulda/rails.rb +13 -0
  769. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/lib/shoulda/rspec.rb +11 -0
  770. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/lib/shoulda/tasks/list_tests.rake +29 -0
  771. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/lib/shoulda/tasks/yaml_to_shoulda.rake +28 -0
  772. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/lib/shoulda/tasks.rb +3 -0
  773. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/lib/shoulda/test_unit.rb +22 -0
  774. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/lib/shoulda.rb +9 -0
  775. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/rails/init.rb +7 -0
  776. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/README +36 -0
  777. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/fail_macros.rb +39 -0
  778. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/fixtures/addresses.yml +3 -0
  779. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/fixtures/friendships.yml +0 -0
  780. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/fixtures/posts.yml +5 -0
  781. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/fixtures/products.yml +0 -0
  782. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/fixtures/taggings.yml +0 -0
  783. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/fixtures/tags.yml +9 -0
  784. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/fixtures/users.yml +6 -0
  785. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/functional/posts_controller_test.rb +121 -0
  786. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/functional/users_controller_test.rb +19 -0
  787. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/matchers/active_record/allow_mass_assignment_of_matcher_test.rb +68 -0
  788. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/matchers/active_record/allow_value_matcher_test.rb +64 -0
  789. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/matchers/active_record/association_matcher_test.rb +263 -0
  790. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/matchers/active_record/ensure_inclusion_of_matcher_test.rb +80 -0
  791. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/matchers/active_record/ensure_length_of_matcher_test.rb +158 -0
  792. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/matchers/active_record/have_db_column_matcher_test.rb +169 -0
  793. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/matchers/active_record/have_db_index_matcher_test.rb +91 -0
  794. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/matchers/active_record/have_named_scope_matcher_test.rb +65 -0
  795. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/matchers/active_record/have_readonly_attributes_matcher_test.rb +29 -0
  796. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/matchers/active_record/validate_acceptance_of_matcher_test.rb +44 -0
  797. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/matchers/active_record/validate_format_of_matcher_test.rb +39 -0
  798. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/matchers/active_record/validate_numericality_of_matcher_test.rb +52 -0
  799. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/matchers/active_record/validate_presence_of_matcher_test.rb +86 -0
  800. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/matchers/active_record/validate_uniqueness_of_matcher_test.rb +147 -0
  801. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/matchers/controller/assign_to_matcher_test.rb +35 -0
  802. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/matchers/controller/filter_param_matcher_test.rb +32 -0
  803. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/matchers/controller/render_with_layout_matcher_test.rb +33 -0
  804. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/matchers/controller/respond_with_content_type_matcher_test.rb +32 -0
  805. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/matchers/controller/respond_with_matcher_test.rb +106 -0
  806. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/matchers/controller/route_matcher_test.rb +75 -0
  807. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/matchers/controller/set_session_matcher_test.rb +38 -0
  808. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/matchers/controller/set_the_flash_matcher.rb +41 -0
  809. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/model_builder.rb +106 -0
  810. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/other/autoload_macro_test.rb +18 -0
  811. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/other/context_test.rb +203 -0
  812. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/other/convert_to_should_syntax_test.rb +63 -0
  813. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/other/helpers_test.rb +340 -0
  814. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/other/private_helpers_test.rb +32 -0
  815. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/other/should_test.rb +271 -0
  816. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/rails_root/app/controllers/application_controller.rb +25 -0
  817. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/rails_root/app/controllers/posts_controller.rb +87 -0
  818. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/rails_root/app/controllers/users_controller.rb +84 -0
  819. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/rails_root/app/helpers/application_helper.rb +3 -0
  820. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/rails_root/app/helpers/posts_helper.rb +2 -0
  821. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/rails_root/app/helpers/users_helper.rb +2 -0
  822. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/rails_root/app/models/address.rb +7 -0
  823. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/rails_root/app/models/flea.rb +3 -0
  824. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/rails_root/app/models/friendship.rb +4 -0
  825. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/rails_root/app/models/pets/cat.rb +7 -0
  826. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/rails_root/app/models/pets/dog.rb +10 -0
  827. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/rails_root/app/models/post.rb +12 -0
  828. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/rails_root/app/models/product.rb +12 -0
  829. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/rails_root/app/models/profile.rb +2 -0
  830. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/rails_root/app/models/registration.rb +2 -0
  831. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/rails_root/app/models/tag.rb +8 -0
  832. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/rails_root/app/models/tagging.rb +4 -0
  833. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/rails_root/app/models/treat.rb +3 -0
  834. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/rails_root/app/models/user.rb +32 -0
  835. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/rails_root/app/views/layouts/posts.rhtml +19 -0
  836. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/rails_root/app/views/layouts/users.rhtml +17 -0
  837. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/rails_root/app/views/layouts/wide.html.erb +1 -0
  838. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/rails_root/app/views/posts/edit.rhtml +27 -0
  839. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/rails_root/app/views/posts/index.rhtml +25 -0
  840. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/rails_root/app/views/posts/new.rhtml +26 -0
  841. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/rails_root/app/views/posts/show.rhtml +18 -0
  842. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/rails_root/app/views/users/edit.rhtml +22 -0
  843. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/rails_root/app/views/users/index.rhtml +22 -0
  844. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/rails_root/app/views/users/new.rhtml +21 -0
  845. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/rails_root/app/views/users/show.rhtml +13 -0
  846. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/rails_root/config/boot.rb +110 -0
  847. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/rails_root/config/database.yml +4 -0
  848. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/rails_root/config/environment.rb +18 -0
  849. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/rails_root/config/environments/test.rb +0 -0
  850. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/rails_root/config/initializers/new_rails_defaults.rb +15 -0
  851. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/rails_root/config/initializers/shoulda.rb +8 -0
  852. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/rails_root/config/routes.rb +6 -0
  853. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/rails_root/db/migrate/001_create_users.rb +19 -0
  854. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/rails_root/db/migrate/002_create_posts.rb +13 -0
  855. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/rails_root/db/migrate/003_create_taggings.rb +12 -0
  856. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/rails_root/db/migrate/004_create_tags.rb +11 -0
  857. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/rails_root/db/migrate/005_create_dogs.rb +12 -0
  858. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/rails_root/db/migrate/006_create_addresses.rb +14 -0
  859. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/rails_root/db/migrate/007_create_fleas.rb +11 -0
  860. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/rails_root/db/migrate/008_create_dogs_fleas.rb +12 -0
  861. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/rails_root/db/migrate/009_create_products.rb +17 -0
  862. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/rails_root/db/migrate/010_create_friendships.rb +14 -0
  863. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/rails_root/db/migrate/011_create_treats.rb +12 -0
  864. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/rails_root/db/migrate/20090506203502_create_profiles.rb +12 -0
  865. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/rails_root/db/migrate/20090506203536_create_registrations.rb +14 -0
  866. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/rails_root/db/migrate/20090513104502_create_cats.rb +12 -0
  867. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/rails_root/db/schema.rb +0 -0
  868. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/rails_root/public/404.html +30 -0
  869. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/rails_root/public/422.html +30 -0
  870. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/rails_root/public/500.html +30 -0
  871. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/rails_root/script/console +3 -0
  872. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/rails_root/script/generate +3 -0
  873. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/rails_root/test/shoulda_macros/custom_macro.rb +6 -0
  874. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/rails_root/vendor/gems/gem_with_macro-0.0.1/shoulda_macros/gem_macro.rb +6 -0
  875. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/rails_root/vendor/plugins/plugin_with_macro/shoulda_macros/plugin_macro.rb +6 -0
  876. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/rspec_test.rb +207 -0
  877. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/test_helper.rb +28 -0
  878. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/unit/address_test.rb +10 -0
  879. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/unit/cat_test.rb +7 -0
  880. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/unit/dog_test.rb +9 -0
  881. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/unit/flea_test.rb +6 -0
  882. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/unit/friendship_test.rb +6 -0
  883. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/unit/post_test.rb +19 -0
  884. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/unit/product_test.rb +23 -0
  885. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/unit/tag_test.rb +15 -0
  886. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/unit/tagging_test.rb +6 -0
  887. data/vendor/gems/ruby/1.8/gems/shoulda-2.10.3/test/unit/user_test.rb +80 -0
  888. data/vendor/gems/ruby/1.8/gems/test-rig-0.0.3/.document +5 -0
  889. data/vendor/gems/ruby/1.8/gems/test-rig-0.0.3/.gitignore +5 -0
  890. data/vendor/gems/ruby/1.8/gems/test-rig-0.0.3/LICENSE +20 -0
  891. data/vendor/gems/ruby/1.8/gems/test-rig-0.0.3/README.textile +140 -0
  892. data/vendor/gems/ruby/1.8/gems/test-rig-0.0.3/Rakefile +56 -0
  893. data/vendor/gems/ruby/1.8/gems/test-rig-0.0.3/VERSION +1 -0
  894. data/vendor/gems/ruby/1.8/gems/test-rig-0.0.3/lib/test_rig/dynamic_assertions.rb +38 -0
  895. data/vendor/gems/ruby/1.8/gems/test-rig-0.0.3/lib/test_rig/smarter_message.rb +69 -0
  896. data/vendor/gems/ruby/1.8/gems/test-rig-0.0.3/lib/test_rig.rb +11 -0
  897. data/vendor/gems/ruby/1.8/gems/test-rig-0.0.3/test/dynamic_assertions_test.rb +65 -0
  898. data/vendor/gems/ruby/1.8/gems/test-rig-0.0.3/test/smarter_message_test.rb +51 -0
  899. data/vendor/gems/ruby/1.8/gems/test-rig-0.0.3/test/test_helper.rb +13 -0
  900. data/vendor/gems/ruby/1.8/gems/test-rig-0.0.3/test-rig.gemspec +55 -0
  901. data/vendor/gems/ruby/1.8/specifications/activerecord-2.3.5.gemspec +34 -0
  902. data/vendor/gems/ruby/1.8/specifications/activesupport-2.3.5.gemspec +28 -0
  903. data/vendor/gems/ruby/1.8/specifications/freighthopper-0.1.2.gemspec +32 -0
  904. data/vendor/gems/ruby/1.8/specifications/shoulda-2.10.3.gemspec +31 -0
  905. data/vendor/gems/ruby/1.8/specifications/test-rig-0.0.3.gemspec +30 -0
  906. metadata +920 -10
  907. data/test/helper.rb +0 -10
  908. data/test/test_simply_stated.rb +0 -5
@@ -0,0 +1,1135 @@
1
+ module ActiveRecord
2
+ # Raised by <tt>save!</tt> and <tt>create!</tt> when the record is invalid. Use the
3
+ # +record+ method to retrieve the record which did not validate.
4
+ # begin
5
+ # complex_operation_that_calls_save!_internally
6
+ # rescue ActiveRecord::RecordInvalid => invalid
7
+ # puts invalid.record.errors
8
+ # end
9
+ class RecordInvalid < ActiveRecordError
10
+ attr_reader :record
11
+ def initialize(record)
12
+ @record = record
13
+ errors = @record.errors.full_messages.join(I18n.t('support.array.words_connector', :default => ', '))
14
+ super(I18n.t('activerecord.errors.messages.record_invalid', :errors => errors))
15
+ end
16
+ end
17
+
18
+ class Error
19
+ attr_accessor :base, :attribute, :type, :message, :options
20
+
21
+ def initialize(base, attribute, type = nil, options = {})
22
+ self.base = base
23
+ self.attribute = attribute
24
+ self.type = type || :invalid
25
+ self.options = options
26
+ self.message = options.delete(:message) || self.type
27
+ end
28
+
29
+ def message
30
+ # When type is a string, it means that we do not have to do a lookup, because
31
+ # the user already sent the "final" message.
32
+ type.is_a?(String) ? type : generate_message(default_options)
33
+ end
34
+
35
+ def full_message
36
+ attribute.to_s == 'base' ? message : generate_full_message(default_options)
37
+ end
38
+
39
+ alias :to_s :message
40
+
41
+ def value
42
+ @base.respond_to?(attribute) ? @base.send(attribute) : nil
43
+ end
44
+
45
+ protected
46
+
47
+ # Translates an error message in it's default scope (<tt>activerecord.errrors.messages</tt>).
48
+ # Error messages are first looked up in <tt>models.MODEL.attributes.ATTRIBUTE.MESSAGE</tt>, if it's not there,
49
+ # it's looked up in <tt>models.MODEL.MESSAGE</tt> and if that is not there it returns the translation of the
50
+ # default message (e.g. <tt>activerecord.errors.messages.MESSAGE</tt>). The translated model name,
51
+ # translated attribute name and the value are available for interpolation.
52
+ #
53
+ # When using inheritence in your models, it will check all the inherited models too, but only if the model itself
54
+ # hasn't been found. Say you have <tt>class Admin < User; end</tt> and you wanted the translation for the <tt>:blank</tt>
55
+ # error +message+ for the <tt>title</tt> +attribute+, it looks for these translations:
56
+ #
57
+ # <ol>
58
+ # <li><tt>activerecord.errors.models.admin.attributes.title.blank</tt></li>
59
+ # <li><tt>activerecord.errors.models.admin.blank</tt></li>
60
+ # <li><tt>activerecord.errors.models.user.attributes.title.blank</tt></li>
61
+ # <li><tt>activerecord.errors.models.user.blank</tt></li>
62
+ # <li><tt>activerecord.errors.messages.blank</tt></li>
63
+ # <li>any default you provided through the +options+ hash (in the activerecord.errors scope)</li>
64
+ # </ol>
65
+ def generate_message(options = {})
66
+ keys = @base.class.self_and_descendants_from_active_record.map do |klass|
67
+ [ :"models.#{klass.name.underscore}.attributes.#{attribute}.#{@message}",
68
+ :"models.#{klass.name.underscore}.#{@message}" ]
69
+ end.flatten
70
+
71
+ keys << options.delete(:default)
72
+ keys << :"messages.#{@message}"
73
+ keys << @message if @message.is_a?(String)
74
+ keys << @type unless @type == @message
75
+ keys.compact!
76
+
77
+ options.merge!(:default => keys)
78
+ I18n.translate(keys.shift, options)
79
+ end
80
+
81
+ # Wraps an error message into a full_message format.
82
+ #
83
+ # The default full_message format for any locale is <tt>"{{attribute}} {{message}}"</tt>.
84
+ # One can specify locale specific default full_message format by storing it as a
85
+ # translation for the key <tt>:"activerecord.errors.full_messages.format"</tt>.
86
+ #
87
+ # Additionally one can specify a validation specific error message format by
88
+ # storing a translation for <tt>:"activerecord.errors.full_messages.[message_key]"</tt>.
89
+ # E.g. the full_message format for any validation that uses :blank as a message
90
+ # key (such as validates_presence_of) can be stored to <tt>:"activerecord.errors.full_messages.blank".</tt>
91
+ #
92
+ # Because the message key used by a validation can be overwritten on the
93
+ # <tt>validates_*</tt> class macro level one can customize the full_message format for
94
+ # any particular validation:
95
+ #
96
+ # # app/models/article.rb
97
+ # class Article < ActiveRecord::Base
98
+ # validates_presence_of :title, :message => :"title.blank"
99
+ # end
100
+ #
101
+ # # config/locales/en.yml
102
+ # en:
103
+ # activerecord:
104
+ # errors:
105
+ # full_messages:
106
+ # title:
107
+ # blank: This title is screwed!
108
+ def generate_full_message(options = {})
109
+ keys = [
110
+ :"full_messages.#{@message}",
111
+ :'full_messages.format',
112
+ '{{attribute}} {{message}}'
113
+ ]
114
+
115
+ options.merge!(:default => keys, :message => self.message)
116
+ I18n.translate(keys.shift, options)
117
+ end
118
+
119
+ # Return user options with default options.
120
+ #
121
+ def default_options
122
+ options.reverse_merge :scope => [:activerecord, :errors],
123
+ :model => @base.class.human_name,
124
+ :attribute => @base.class.human_attribute_name(attribute.to_s),
125
+ :value => value
126
+ end
127
+ end
128
+
129
+ # Active Record validation is reported to and from this object, which is used by Base#save to
130
+ # determine whether the object is in a valid state to be saved. See usage example in Validations.
131
+ class Errors
132
+ include Enumerable
133
+
134
+ class << self
135
+ def default_error_messages
136
+ ActiveSupport::Deprecation.warn("ActiveRecord::Errors.default_error_messages has been deprecated. Please use I18n.translate('activerecord.errors.messages').")
137
+ I18n.translate 'activerecord.errors.messages'
138
+ end
139
+ end
140
+
141
+ def initialize(base) # :nodoc:
142
+ @base = base
143
+ clear
144
+ end
145
+
146
+ # Adds an error to the base object instead of any particular attribute. This is used
147
+ # to report errors that don't tie to any specific attribute, but rather to the object
148
+ # as a whole. These error messages don't get prepended with any field name when iterating
149
+ # with +each_full+, so they should be complete sentences.
150
+ def add_to_base(msg)
151
+ add(:base, msg)
152
+ end
153
+
154
+ # Adds an error message (+messsage+) to the +attribute+, which will be returned on a call to <tt>on(attribute)</tt>
155
+ # for the same attribute and ensure that this error object returns false when asked if <tt>empty?</tt>. More than one
156
+ # error can be added to the same +attribute+ in which case an array will be returned on a call to <tt>on(attribute)</tt>.
157
+ # If no +messsage+ is supplied, :invalid is assumed.
158
+ # If +message+ is a Symbol, it will be translated, using the appropriate scope (see translate_error).
159
+ #
160
+ def add(attribute, message = nil, options = {})
161
+ options[:message] = options.delete(:default) if options.has_key?(:default)
162
+ error, message = message, nil if message.is_a?(Error)
163
+
164
+ @errors[attribute.to_s] ||= []
165
+ @errors[attribute.to_s] << (error || Error.new(@base, attribute, message, options))
166
+ end
167
+
168
+ # Will add an error message to each of the attributes in +attributes+ that is empty.
169
+ def add_on_empty(attributes, custom_message = nil)
170
+ for attr in [attributes].flatten
171
+ value = @base.respond_to?(attr.to_s) ? @base.send(attr.to_s) : @base[attr.to_s]
172
+ is_empty = value.respond_to?(:empty?) ? value.empty? : false
173
+ add(attr, :empty, :default => custom_message) unless !value.nil? && !is_empty
174
+ end
175
+ end
176
+
177
+ # Will add an error message to each of the attributes in +attributes+ that is blank (using Object#blank?).
178
+ def add_on_blank(attributes, custom_message = nil)
179
+ for attr in [attributes].flatten
180
+ value = @base.respond_to?(attr.to_s) ? @base.send(attr.to_s) : @base[attr.to_s]
181
+ add(attr, :blank, :default => custom_message) if value.blank?
182
+ end
183
+ end
184
+
185
+ # Returns true if the specified +attribute+ has errors associated with it.
186
+ #
187
+ # class Company < ActiveRecord::Base
188
+ # validates_presence_of :name, :address, :email
189
+ # validates_length_of :name, :in => 5..30
190
+ # end
191
+ #
192
+ # company = Company.create(:address => '123 First St.')
193
+ # company.errors.invalid?(:name) # => true
194
+ # company.errors.invalid?(:address) # => false
195
+ def invalid?(attribute)
196
+ !@errors[attribute.to_s].nil?
197
+ end
198
+
199
+ # Returns +nil+, if no errors are associated with the specified +attribute+.
200
+ # Returns the error message, if one error is associated with the specified +attribute+.
201
+ # Returns an array of error messages, if more than one error is associated with the specified +attribute+.
202
+ #
203
+ # class Company < ActiveRecord::Base
204
+ # validates_presence_of :name, :address, :email
205
+ # validates_length_of :name, :in => 5..30
206
+ # end
207
+ #
208
+ # company = Company.create(:address => '123 First St.')
209
+ # company.errors.on(:name) # => ["is too short (minimum is 5 characters)", "can't be blank"]
210
+ # company.errors.on(:email) # => "can't be blank"
211
+ # company.errors.on(:address) # => nil
212
+ def on(attribute)
213
+ attribute = attribute.to_s
214
+ return nil unless @errors.has_key?(attribute)
215
+ errors = @errors[attribute].map(&:to_s)
216
+ errors.size == 1 ? errors.first : errors
217
+ end
218
+
219
+ alias :[] :on
220
+
221
+ # Returns errors assigned to the base object through +add_to_base+ according to the normal rules of <tt>on(attribute)</tt>.
222
+ def on_base
223
+ on(:base)
224
+ end
225
+
226
+ # Yields each attribute and associated message per error added.
227
+ #
228
+ # class Company < ActiveRecord::Base
229
+ # validates_presence_of :name, :address, :email
230
+ # validates_length_of :name, :in => 5..30
231
+ # end
232
+ #
233
+ # company = Company.create(:address => '123 First St.')
234
+ # company.errors.each{|attr,msg| puts "#{attr} - #{msg}" }
235
+ # # => name - is too short (minimum is 5 characters)
236
+ # # name - can't be blank
237
+ # # address - can't be blank
238
+ def each
239
+ @errors.each_key { |attr| @errors[attr].each { |error| yield attr, error.message } }
240
+ end
241
+
242
+ def each_error
243
+ @errors.each_key { |attr| @errors[attr].each { |error| yield attr, error } }
244
+ end
245
+
246
+ # Yields each full error message added. So <tt>Person.errors.add("first_name", "can't be empty")</tt> will be returned
247
+ # through iteration as "First name can't be empty".
248
+ #
249
+ # class Company < ActiveRecord::Base
250
+ # validates_presence_of :name, :address, :email
251
+ # validates_length_of :name, :in => 5..30
252
+ # end
253
+ #
254
+ # company = Company.create(:address => '123 First St.')
255
+ # company.errors.each_full{|msg| puts msg }
256
+ # # => Name is too short (minimum is 5 characters)
257
+ # # Name can't be blank
258
+ # # Address can't be blank
259
+ def each_full
260
+ full_messages.each { |msg| yield msg }
261
+ end
262
+
263
+ # Returns all the full error messages in an array.
264
+ #
265
+ # class Company < ActiveRecord::Base
266
+ # validates_presence_of :name, :address, :email
267
+ # validates_length_of :name, :in => 5..30
268
+ # end
269
+ #
270
+ # company = Company.create(:address => '123 First St.')
271
+ # company.errors.full_messages # =>
272
+ # ["Name is too short (minimum is 5 characters)", "Name can't be blank", "Address can't be blank"]
273
+ def full_messages(options = {})
274
+ @errors.values.inject([]) do |full_messages, errors|
275
+ full_messages + errors.map { |error| error.full_message }
276
+ end
277
+ end
278
+
279
+ # Returns true if no errors have been added.
280
+ def empty?
281
+ @errors.empty?
282
+ end
283
+
284
+ # Removes all errors that have been added.
285
+ def clear
286
+ @errors = ActiveSupport::OrderedHash.new
287
+ end
288
+
289
+ # Returns the total number of errors added. Two errors added to the same attribute will be counted as such.
290
+ def size
291
+ @errors.values.inject(0) { |error_count, attribute| error_count + attribute.size }
292
+ end
293
+
294
+ alias_method :count, :size
295
+ alias_method :length, :size
296
+
297
+ # Returns an XML representation of this error object.
298
+ #
299
+ # class Company < ActiveRecord::Base
300
+ # validates_presence_of :name, :address, :email
301
+ # validates_length_of :name, :in => 5..30
302
+ # end
303
+ #
304
+ # company = Company.create(:address => '123 First St.')
305
+ # company.errors.to_xml
306
+ # # => <?xml version="1.0" encoding="UTF-8"?>
307
+ # # <errors>
308
+ # # <error>Name is too short (minimum is 5 characters)</error>
309
+ # # <error>Name can't be blank</error>
310
+ # # <error>Address can't be blank</error>
311
+ # # </errors>
312
+ def to_xml(options={})
313
+ options[:root] ||= "errors"
314
+ options[:indent] ||= 2
315
+ options[:builder] ||= Builder::XmlMarkup.new(:indent => options[:indent])
316
+
317
+ options[:builder].instruct! unless options.delete(:skip_instruct)
318
+ options[:builder].errors do |e|
319
+ full_messages.each { |msg| e.error(msg) }
320
+ end
321
+ end
322
+
323
+ def generate_message(attribute, message = :invalid, options = {})
324
+ ActiveSupport::Deprecation.warn("ActiveRecord::Errors#generate_message has been deprecated. Please use ActiveRecord::Error.new().to_s.")
325
+ Error.new(@base, attribute, message, options).to_s
326
+ end
327
+ end
328
+
329
+
330
+ # Please do have a look at ActiveRecord::Validations::ClassMethods for a higher level of validations.
331
+ #
332
+ # Active Records implement validation by overwriting Base#validate (or the variations, +validate_on_create+ and
333
+ # +validate_on_update+). Each of these methods can inspect the state of the object, which usually means ensuring
334
+ # that a number of attributes have a certain value (such as not empty, within a given range, matching a certain regular expression).
335
+ #
336
+ # Example:
337
+ #
338
+ # class Person < ActiveRecord::Base
339
+ # protected
340
+ # def validate
341
+ # errors.add_on_empty %w( first_name last_name )
342
+ # errors.add("phone_number", "has invalid format") unless phone_number =~ /[0-9]*/
343
+ # end
344
+ #
345
+ # def validate_on_create # is only run the first time a new object is saved
346
+ # unless valid_discount?(membership_discount)
347
+ # errors.add("membership_discount", "has expired")
348
+ # end
349
+ # end
350
+ #
351
+ # def validate_on_update
352
+ # errors.add_to_base("No changes have occurred") if unchanged_attributes?
353
+ # end
354
+ # end
355
+ #
356
+ # person = Person.new("first_name" => "David", "phone_number" => "what?")
357
+ # person.save # => false (and doesn't do the save)
358
+ # person.errors.empty? # => false
359
+ # person.errors.count # => 2
360
+ # person.errors.on "last_name" # => "can't be empty"
361
+ # person.errors.on "phone_number" # => "has invalid format"
362
+ # person.errors.each_full { |msg| puts msg }
363
+ # # => "Last name can't be empty\n" +
364
+ # # "Phone number has invalid format"
365
+ #
366
+ # person.attributes = { "last_name" => "Heinemeier", "phone_number" => "555-555" }
367
+ # person.save # => true (and person is now saved in the database)
368
+ #
369
+ # An Errors object is automatically created for every Active Record.
370
+ module Validations
371
+ VALIDATIONS = %w( validate validate_on_create validate_on_update )
372
+
373
+ def self.included(base) # :nodoc:
374
+ base.extend ClassMethods
375
+ base.class_eval do
376
+ alias_method_chain :save, :validation
377
+ alias_method_chain :save!, :validation
378
+ end
379
+
380
+ base.send :include, ActiveSupport::Callbacks
381
+ base.define_callbacks *VALIDATIONS
382
+ end
383
+
384
+ # Active Record classes can implement validations in several ways. The highest level, easiest to read,
385
+ # and recommended approach is to use the declarative <tt>validates_..._of</tt> class methods (and
386
+ # +validates_associated+) documented below. These are sufficient for most model validations.
387
+ #
388
+ # Slightly lower level is +validates_each+. It provides some of the same options as the purely declarative
389
+ # validation methods, but like all the lower-level approaches it requires manually adding to the errors collection
390
+ # when the record is invalid.
391
+ #
392
+ # At a yet lower level, a model can use the class methods +validate+, +validate_on_create+ and +validate_on_update+
393
+ # to add validation methods or blocks. These are ActiveSupport::Callbacks and follow the same rules of inheritance
394
+ # and chaining.
395
+ #
396
+ # The lowest level style is to define the instance methods +validate+, +validate_on_create+ and +validate_on_update+
397
+ # as documented in ActiveRecord::Validations.
398
+ #
399
+ # == +validate+, +validate_on_create+ and +validate_on_update+ Class Methods
400
+ #
401
+ # Calls to these methods add a validation method or block to the class. Again, this approach is recommended
402
+ # only when the higher-level methods documented below (<tt>validates_..._of</tt> and +validates_associated+) are
403
+ # insufficient to handle the required validation.
404
+ #
405
+ # This can be done with a symbol pointing to a method:
406
+ #
407
+ # class Comment < ActiveRecord::Base
408
+ # validate :must_be_friends
409
+ #
410
+ # def must_be_friends
411
+ # errors.add_to_base("Must be friends to leave a comment") unless commenter.friend_of?(commentee)
412
+ # end
413
+ # end
414
+ #
415
+ # Or with a block which is passed the current record to be validated:
416
+ #
417
+ # class Comment < ActiveRecord::Base
418
+ # validate do |comment|
419
+ # comment.must_be_friends
420
+ # end
421
+ #
422
+ # def must_be_friends
423
+ # errors.add_to_base("Must be friends to leave a comment") unless commenter.friend_of?(commentee)
424
+ # end
425
+ # end
426
+ #
427
+ # This usage applies to +validate_on_create+ and +validate_on_update+ as well.
428
+ module ClassMethods
429
+ DEFAULT_VALIDATION_OPTIONS = {
430
+ :on => :save,
431
+ :allow_nil => false,
432
+ :allow_blank => false,
433
+ :message => nil
434
+ }.freeze
435
+
436
+ ALL_RANGE_OPTIONS = [ :is, :within, :in, :minimum, :maximum ].freeze
437
+ ALL_NUMERICALITY_CHECKS = { :greater_than => '>', :greater_than_or_equal_to => '>=',
438
+ :equal_to => '==', :less_than => '<', :less_than_or_equal_to => '<=',
439
+ :odd => 'odd?', :even => 'even?' }.freeze
440
+
441
+ # Validates each attribute against a block.
442
+ #
443
+ # class Person < ActiveRecord::Base
444
+ # validates_each :first_name, :last_name do |record, attr, value|
445
+ # record.errors.add attr, 'starts with z.' if value[0] == ?z
446
+ # end
447
+ # end
448
+ #
449
+ # Options:
450
+ # * <tt>:on</tt> - Specifies when this validation is active (default is <tt>:save</tt>, other options <tt>:create</tt>, <tt>:update</tt>).
451
+ # * <tt>:allow_nil</tt> - Skip validation if attribute is +nil+.
452
+ # * <tt>:allow_blank</tt> - Skip validation if attribute is blank.
453
+ # * <tt>:if</tt> - Specifies a method, proc or string to call to determine if the validation should
454
+ # occur (e.g. <tt>:if => :allow_validation</tt>, or <tt>:if => Proc.new { |user| user.signup_step > 2 }</tt>). The
455
+ # method, proc or string should return or evaluate to a true or false value.
456
+ # * <tt>:unless</tt> - Specifies a method, proc or string to call to determine if the validation should
457
+ # not occur (e.g. <tt>:unless => :skip_validation</tt>, or <tt>:unless => Proc.new { |user| user.signup_step <= 2 }</tt>). The
458
+ # method, proc or string should return or evaluate to a true or false value.
459
+ def validates_each(*attrs)
460
+ options = attrs.extract_options!.symbolize_keys
461
+ attrs = attrs.flatten
462
+
463
+ # Declare the validation.
464
+ send(validation_method(options[:on] || :save), options) do |record|
465
+ attrs.each do |attr|
466
+ value = record.send(attr)
467
+ next if (value.nil? && options[:allow_nil]) || (value.blank? && options[:allow_blank])
468
+ yield record, attr, value
469
+ end
470
+ end
471
+ end
472
+
473
+ # Encapsulates the pattern of wanting to validate a password or email address field with a confirmation. Example:
474
+ #
475
+ # Model:
476
+ # class Person < ActiveRecord::Base
477
+ # validates_confirmation_of :user_name, :password
478
+ # validates_confirmation_of :email_address, :message => "should match confirmation"
479
+ # end
480
+ #
481
+ # View:
482
+ # <%= password_field "person", "password" %>
483
+ # <%= password_field "person", "password_confirmation" %>
484
+ #
485
+ # The added +password_confirmation+ attribute is virtual; it exists only as an in-memory attribute for validating the password.
486
+ # To achieve this, the validation adds accessors to the model for the confirmation attribute. NOTE: This check is performed
487
+ # only if +password_confirmation+ is not +nil+, and by default only on save. To require confirmation, make sure to add a presence
488
+ # check for the confirmation attribute:
489
+ #
490
+ # validates_presence_of :password_confirmation, :if => :password_changed?
491
+ #
492
+ # Configuration options:
493
+ # * <tt>:message</tt> - A custom error message (default is: "doesn't match confirmation").
494
+ # * <tt>:on</tt> - Specifies when this validation is active (default is <tt>:save</tt>, other options <tt>:create</tt>, <tt>:update</tt>).
495
+ # * <tt>:if</tt> - Specifies a method, proc or string to call to determine if the validation should
496
+ # occur (e.g. <tt>:if => :allow_validation</tt>, or <tt>:if => Proc.new { |user| user.signup_step > 2 }</tt>). The
497
+ # method, proc or string should return or evaluate to a true or false value.
498
+ # * <tt>:unless</tt> - Specifies a method, proc or string to call to determine if the validation should
499
+ # not occur (e.g. <tt>:unless => :skip_validation</tt>, or <tt>:unless => Proc.new { |user| user.signup_step <= 2 }</tt>). The
500
+ # method, proc or string should return or evaluate to a true or false value.
501
+ def validates_confirmation_of(*attr_names)
502
+ configuration = { :on => :save }
503
+ configuration.update(attr_names.extract_options!)
504
+
505
+ attr_accessor(*(attr_names.map { |n| "#{n}_confirmation" }))
506
+
507
+ validates_each(attr_names, configuration) do |record, attr_name, value|
508
+ unless record.send("#{attr_name}_confirmation").nil? or value == record.send("#{attr_name}_confirmation")
509
+ record.errors.add(attr_name, :confirmation, :default => configuration[:message])
510
+ end
511
+ end
512
+ end
513
+
514
+ # Encapsulates the pattern of wanting to validate the acceptance of a terms of service check box (or similar agreement). Example:
515
+ #
516
+ # class Person < ActiveRecord::Base
517
+ # validates_acceptance_of :terms_of_service
518
+ # validates_acceptance_of :eula, :message => "must be abided"
519
+ # end
520
+ #
521
+ # If the database column does not exist, the +terms_of_service+ attribute is entirely virtual. This check is
522
+ # performed only if +terms_of_service+ is not +nil+ and by default on save.
523
+ #
524
+ # Configuration options:
525
+ # * <tt>:message</tt> - A custom error message (default is: "must be accepted").
526
+ # * <tt>:on</tt> - Specifies when this validation is active (default is <tt>:save</tt>, other options <tt>:create</tt>, <tt>:update</tt>).
527
+ # * <tt>:allow_nil</tt> - Skip validation if attribute is +nil+ (default is true).
528
+ # * <tt>:accept</tt> - Specifies value that is considered accepted. The default value is a string "1", which
529
+ # makes it easy to relate to an HTML checkbox. This should be set to +true+ if you are validating a database
530
+ # column, since the attribute is typecast from "1" to +true+ before validation.
531
+ # * <tt>:if</tt> - Specifies a method, proc or string to call to determine if the validation should
532
+ # occur (e.g. <tt>:if => :allow_validation</tt>, or <tt>:if => Proc.new { |user| user.signup_step > 2 }</tt>). The
533
+ # method, proc or string should return or evaluate to a true or false value.
534
+ # * <tt>:unless</tt> - Specifies a method, proc or string to call to determine if the validation should
535
+ # not occur (e.g. <tt>:unless => :skip_validation</tt>, or <tt>:unless => Proc.new { |user| user.signup_step <= 2 }</tt>). The
536
+ # method, proc or string should return or evaluate to a true or false value.
537
+ def validates_acceptance_of(*attr_names)
538
+ configuration = { :on => :save, :allow_nil => true, :accept => "1" }
539
+ configuration.update(attr_names.extract_options!)
540
+
541
+ db_cols = begin
542
+ column_names
543
+ rescue Exception # To ignore both statement and connection errors
544
+ []
545
+ end
546
+ names = attr_names.reject { |name| db_cols.include?(name.to_s) }
547
+ attr_accessor(*names)
548
+
549
+ validates_each(attr_names,configuration) do |record, attr_name, value|
550
+ unless value == configuration[:accept]
551
+ record.errors.add(attr_name, :accepted, :default => configuration[:message])
552
+ end
553
+ end
554
+ end
555
+
556
+ # Validates that the specified attributes are not blank (as defined by Object#blank?). Happens by default on save. Example:
557
+ #
558
+ # class Person < ActiveRecord::Base
559
+ # validates_presence_of :first_name
560
+ # end
561
+ #
562
+ # The first_name attribute must be in the object and it cannot be blank.
563
+ #
564
+ # If you want to validate the presence of a boolean field (where the real values are true and false),
565
+ # you will want to use <tt>validates_inclusion_of :field_name, :in => [true, false]</tt>.
566
+ #
567
+ # This is due to the way Object#blank? handles boolean values: <tt>false.blank? # => true</tt>.
568
+ #
569
+ # Configuration options:
570
+ # * <tt>message</tt> - A custom error message (default is: "can't be blank").
571
+ # * <tt>on</tt> - Specifies when this validation is active (default is <tt>:save</tt>, other options <tt>:create</tt>,
572
+ # <tt>:update</tt>).
573
+ # * <tt>if</tt> - Specifies a method, proc or string to call to determine if the validation should
574
+ # occur (e.g. <tt>:if => :allow_validation</tt>, or <tt>:if => Proc.new { |user| user.signup_step > 2 }</tt>).
575
+ # The method, proc or string should return or evaluate to a true or false value.
576
+ # * <tt>unless</tt> - Specifies a method, proc or string to call to determine if the validation should
577
+ # not occur (e.g. <tt>:unless => :skip_validation</tt>, or <tt>:unless => Proc.new { |user| user.signup_step <= 2 }</tt>).
578
+ # The method, proc or string should return or evaluate to a true or false value.
579
+ #
580
+ def validates_presence_of(*attr_names)
581
+ configuration = { :on => :save }
582
+ configuration.update(attr_names.extract_options!)
583
+
584
+ # can't use validates_each here, because it cannot cope with nonexistent attributes,
585
+ # while errors.add_on_empty can
586
+ send(validation_method(configuration[:on]), configuration) do |record|
587
+ record.errors.add_on_blank(attr_names, configuration[:message])
588
+ end
589
+ end
590
+
591
+ # Validates that the specified attribute matches the length restrictions supplied. Only one option can be used at a time:
592
+ #
593
+ # class Person < ActiveRecord::Base
594
+ # validates_length_of :first_name, :maximum=>30
595
+ # validates_length_of :last_name, :maximum=>30, :message=>"less than {{count}} if you don't mind"
596
+ # validates_length_of :fax, :in => 7..32, :allow_nil => true
597
+ # validates_length_of :phone, :in => 7..32, :allow_blank => true
598
+ # validates_length_of :user_name, :within => 6..20, :too_long => "pick a shorter name", :too_short => "pick a longer name"
599
+ # validates_length_of :fav_bra_size, :minimum => 1, :too_short => "please enter at least {{count}} character"
600
+ # validates_length_of :smurf_leader, :is => 4, :message => "papa is spelled with {{count}} characters... don't play me."
601
+ # validates_length_of :essay, :minimum => 100, :too_short => "Your essay must be at least {{count}} words."), :tokenizer => lambda {|str| str.scan(/\w+/) }
602
+ # end
603
+ #
604
+ # Configuration options:
605
+ # * <tt>:minimum</tt> - The minimum size of the attribute.
606
+ # * <tt>:maximum</tt> - The maximum size of the attribute.
607
+ # * <tt>:is</tt> - The exact size of the attribute.
608
+ # * <tt>:within</tt> - A range specifying the minimum and maximum size of the attribute.
609
+ # * <tt>:in</tt> - A synonym(or alias) for <tt>:within</tt>.
610
+ # * <tt>:allow_nil</tt> - Attribute may be +nil+; skip validation.
611
+ # * <tt>:allow_blank</tt> - Attribute may be blank; skip validation.
612
+ # * <tt>:too_long</tt> - The error message if the attribute goes over the maximum (default is: "is too long (maximum is {{count}} characters)").
613
+ # * <tt>:too_short</tt> - The error message if the attribute goes under the minimum (default is: "is too short (min is {{count}} characters)").
614
+ # * <tt>:wrong_length</tt> - The error message if using the <tt>:is</tt> method and the attribute is the wrong size (default is: "is the wrong length (should be {{count}} characters)").
615
+ # * <tt>:message</tt> - The error message to use for a <tt>:minimum</tt>, <tt>:maximum</tt>, or <tt>:is</tt> violation. An alias of the appropriate <tt>too_long</tt>/<tt>too_short</tt>/<tt>wrong_length</tt> message.
616
+ # * <tt>:on</tt> - Specifies when this validation is active (default is <tt>:save</tt>, other options <tt>:create</tt>, <tt>:update</tt>).
617
+ # * <tt>:if</tt> - Specifies a method, proc or string to call to determine if the validation should
618
+ # occur (e.g. <tt>:if => :allow_validation</tt>, or <tt>:if => Proc.new { |user| user.signup_step > 2 }</tt>). The
619
+ # method, proc or string should return or evaluate to a true or false value.
620
+ # * <tt>:unless</tt> - Specifies a method, proc or string to call to determine if the validation should
621
+ # not occur (e.g. <tt>:unless => :skip_validation</tt>, or <tt>:unless => Proc.new { |user| user.signup_step <= 2 }</tt>). The
622
+ # method, proc or string should return or evaluate to a true or false value.
623
+ # * <tt>:tokenizer</tt> - Specifies how to split up the attribute string. (e.g. <tt>:tokenizer => lambda {|str| str.scan(/\w+/)}</tt> to
624
+ # count words as in above example.)
625
+ # Defaults to <tt>lambda{ |value| value.split(//) }</tt> which counts individual characters.
626
+ def validates_length_of(*attrs)
627
+ # Merge given options with defaults.
628
+ options = {
629
+ :tokenizer => lambda {|value| value.split(//)}
630
+ }.merge(DEFAULT_VALIDATION_OPTIONS)
631
+ options.update(attrs.extract_options!.symbolize_keys)
632
+
633
+ # Ensure that one and only one range option is specified.
634
+ range_options = ALL_RANGE_OPTIONS & options.keys
635
+ case range_options.size
636
+ when 0
637
+ raise ArgumentError, 'Range unspecified. Specify the :within, :maximum, :minimum, or :is option.'
638
+ when 1
639
+ # Valid number of options; do nothing.
640
+ else
641
+ raise ArgumentError, 'Too many range options specified. Choose only one.'
642
+ end
643
+
644
+ # Get range option and value.
645
+ option = range_options.first
646
+ option_value = options[range_options.first]
647
+ key = {:is => :wrong_length, :minimum => :too_short, :maximum => :too_long}[option]
648
+ custom_message = options[:message] || options[key]
649
+
650
+ case option
651
+ when :within, :in
652
+ raise ArgumentError, ":#{option} must be a Range" unless option_value.is_a?(Range)
653
+
654
+ validates_each(attrs, options) do |record, attr, value|
655
+ value = options[:tokenizer].call(value) if value.kind_of?(String)
656
+ if value.nil? or value.size < option_value.begin
657
+ record.errors.add(attr, :too_short, :default => custom_message || options[:too_short], :count => option_value.begin)
658
+ elsif value.size > option_value.end
659
+ record.errors.add(attr, :too_long, :default => custom_message || options[:too_long], :count => option_value.end)
660
+ end
661
+ end
662
+ when :is, :minimum, :maximum
663
+ raise ArgumentError, ":#{option} must be a nonnegative Integer" unless option_value.is_a?(Integer) and option_value >= 0
664
+
665
+ # Declare different validations per option.
666
+ validity_checks = { :is => "==", :minimum => ">=", :maximum => "<=" }
667
+
668
+ validates_each(attrs, options) do |record, attr, value|
669
+ value = options[:tokenizer].call(value) if value.kind_of?(String)
670
+ unless !value.nil? and value.size.method(validity_checks[option])[option_value]
671
+ record.errors.add(attr, key, :default => custom_message, :count => option_value)
672
+ end
673
+ end
674
+ end
675
+ end
676
+
677
+ alias_method :validates_size_of, :validates_length_of
678
+
679
+
680
+ # Validates whether the value of the specified attributes are unique across the system. Useful for making sure that only one user
681
+ # can be named "davidhh".
682
+ #
683
+ # class Person < ActiveRecord::Base
684
+ # validates_uniqueness_of :user_name, :scope => :account_id
685
+ # end
686
+ #
687
+ # It can also validate whether the value of the specified attributes are unique based on multiple scope parameters. For example,
688
+ # making sure that a teacher can only be on the schedule once per semester for a particular class.
689
+ #
690
+ # class TeacherSchedule < ActiveRecord::Base
691
+ # validates_uniqueness_of :teacher_id, :scope => [:semester_id, :class_id]
692
+ # end
693
+ #
694
+ # When the record is created, a check is performed to make sure that no record exists in the database with the given value for the specified
695
+ # attribute (that maps to a column). When the record is updated, the same check is made but disregarding the record itself.
696
+ #
697
+ # Configuration options:
698
+ # * <tt>:message</tt> - Specifies a custom error message (default is: "has already been taken").
699
+ # * <tt>:scope</tt> - One or more columns by which to limit the scope of the uniqueness constraint.
700
+ # * <tt>:case_sensitive</tt> - Looks for an exact match. Ignored by non-text columns (+true+ by default).
701
+ # * <tt>:allow_nil</tt> - If set to true, skips this validation if the attribute is +nil+ (default is +false+).
702
+ # * <tt>:allow_blank</tt> - If set to true, skips this validation if the attribute is blank (default is +false+).
703
+ # * <tt>:if</tt> - Specifies a method, proc or string to call to determine if the validation should
704
+ # occur (e.g. <tt>:if => :allow_validation</tt>, or <tt>:if => Proc.new { |user| user.signup_step > 2 }</tt>). The
705
+ # method, proc or string should return or evaluate to a true or false value.
706
+ # * <tt>:unless</tt> - Specifies a method, proc or string to call to determine if the validation should
707
+ # not occur (e.g. <tt>:unless => :skip_validation</tt>, or <tt>:unless => Proc.new { |user| user.signup_step <= 2 }</tt>). The
708
+ # method, proc or string should return or evaluate to a true or false value.
709
+ #
710
+ # === Concurrency and integrity
711
+ #
712
+ # Using this validation method in conjunction with ActiveRecord::Base#save
713
+ # does not guarantee the absence of duplicate record insertions, because
714
+ # uniqueness checks on the application level are inherently prone to race
715
+ # conditions. For example, suppose that two users try to post a Comment at
716
+ # the same time, and a Comment's title must be unique. At the database-level,
717
+ # the actions performed by these users could be interleaved in the following manner:
718
+ #
719
+ # User 1 | User 2
720
+ # ------------------------------------+--------------------------------------
721
+ # # User 1 checks whether there's |
722
+ # # already a comment with the title |
723
+ # # 'My Post'. This is not the case. |
724
+ # SELECT * FROM comments |
725
+ # WHERE title = 'My Post' |
726
+ # |
727
+ # | # User 2 does the same thing and also
728
+ # | # infers that his title is unique.
729
+ # | SELECT * FROM comments
730
+ # | WHERE title = 'My Post'
731
+ # |
732
+ # # User 1 inserts his comment. |
733
+ # INSERT INTO comments |
734
+ # (title, content) VALUES |
735
+ # ('My Post', 'hi!') |
736
+ # |
737
+ # | # User 2 does the same thing.
738
+ # | INSERT INTO comments
739
+ # | (title, content) VALUES
740
+ # | ('My Post', 'hello!')
741
+ # |
742
+ # | # ^^^^^^
743
+ # | # Boom! We now have a duplicate
744
+ # | # title!
745
+ #
746
+ # This could even happen if you use transactions with the 'serializable'
747
+ # isolation level. There are several ways to get around this problem:
748
+ # - By locking the database table before validating, and unlocking it after
749
+ # saving. However, table locking is very expensive, and thus not
750
+ # recommended.
751
+ # - By locking a lock file before validating, and unlocking it after saving.
752
+ # This does not work if you've scaled your Rails application across
753
+ # multiple web servers (because they cannot share lock files, or cannot
754
+ # do that efficiently), and thus not recommended.
755
+ # - Creating a unique index on the field, by using
756
+ # ActiveRecord::ConnectionAdapters::SchemaStatements#add_index. In the
757
+ # rare case that a race condition occurs, the database will guarantee
758
+ # the field's uniqueness.
759
+ #
760
+ # When the database catches such a duplicate insertion,
761
+ # ActiveRecord::Base#save will raise an ActiveRecord::StatementInvalid
762
+ # exception. You can either choose to let this error propagate (which
763
+ # will result in the default Rails exception page being shown), or you
764
+ # can catch it and restart the transaction (e.g. by telling the user
765
+ # that the title already exists, and asking him to re-enter the title).
766
+ # This technique is also known as optimistic concurrency control:
767
+ # http://en.wikipedia.org/wiki/Optimistic_concurrency_control
768
+ #
769
+ # Active Record currently provides no way to distinguish unique
770
+ # index constraint errors from other types of database errors, so you
771
+ # will have to parse the (database-specific) exception message to detect
772
+ # such a case.
773
+ def validates_uniqueness_of(*attr_names)
774
+ configuration = { :case_sensitive => true }
775
+ configuration.update(attr_names.extract_options!)
776
+
777
+ validates_each(attr_names,configuration) do |record, attr_name, value|
778
+ # The check for an existing value should be run from a class that
779
+ # isn't abstract. This means working down from the current class
780
+ # (self), to the first non-abstract class. Since classes don't know
781
+ # their subclasses, we have to build the hierarchy between self and
782
+ # the record's class.
783
+ class_hierarchy = [record.class]
784
+ while class_hierarchy.first != self
785
+ class_hierarchy.insert(0, class_hierarchy.first.superclass)
786
+ end
787
+
788
+ # Now we can work our way down the tree to the first non-abstract
789
+ # class (which has a database table to query from).
790
+ finder_class = class_hierarchy.detect { |klass| !klass.abstract_class? }
791
+
792
+ column = finder_class.columns_hash[attr_name.to_s]
793
+
794
+ if value.nil?
795
+ comparison_operator = "IS ?"
796
+ elsif column.text?
797
+ comparison_operator = "#{connection.case_sensitive_equality_operator} ?"
798
+ value = column.limit ? value.to_s.mb_chars[0, column.limit] : value.to_s
799
+ else
800
+ comparison_operator = "= ?"
801
+ end
802
+
803
+ sql_attribute = "#{record.class.quoted_table_name}.#{connection.quote_column_name(attr_name)}"
804
+
805
+ if value.nil? || (configuration[:case_sensitive] || !column.text?)
806
+ condition_sql = "#{sql_attribute} #{comparison_operator}"
807
+ condition_params = [value]
808
+ else
809
+ condition_sql = "LOWER(#{sql_attribute}) #{comparison_operator}"
810
+ condition_params = [value.mb_chars.downcase]
811
+ end
812
+
813
+ if scope = configuration[:scope]
814
+ Array(scope).map do |scope_item|
815
+ scope_value = record.send(scope_item)
816
+ condition_sql << " AND " << attribute_condition("#{record.class.quoted_table_name}.#{scope_item}", scope_value)
817
+ condition_params << scope_value
818
+ end
819
+ end
820
+
821
+ unless record.new_record?
822
+ condition_sql << " AND #{record.class.quoted_table_name}.#{record.class.primary_key} <> ?"
823
+ condition_params << record.send(:id)
824
+ end
825
+
826
+ finder_class.with_exclusive_scope do
827
+ if finder_class.exists?([condition_sql, *condition_params])
828
+ record.errors.add(attr_name, :taken, :default => configuration[:message], :value => value)
829
+ end
830
+ end
831
+ end
832
+ end
833
+
834
+
835
+ # Validates whether the value of the specified attribute is of the correct form by matching it against the regular expression
836
+ # provided.
837
+ #
838
+ # class Person < ActiveRecord::Base
839
+ # validates_format_of :email, :with => /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\Z/i, :on => :create
840
+ # end
841
+ #
842
+ # Note: use <tt>\A</tt> and <tt>\Z</tt> to match the start and end of the string, <tt>^</tt> and <tt>$</tt> match the start/end of a line.
843
+ #
844
+ # A regular expression must be provided or else an exception will be raised.
845
+ #
846
+ # Configuration options:
847
+ # * <tt>:message</tt> - A custom error message (default is: "is invalid").
848
+ # * <tt>:allow_nil</tt> - If set to true, skips this validation if the attribute is +nil+ (default is +false+).
849
+ # * <tt>:allow_blank</tt> - If set to true, skips this validation if the attribute is blank (default is +false+).
850
+ # * <tt>:with</tt> - The regular expression used to validate the format with (note: must be supplied!).
851
+ # * <tt>:on</tt> - Specifies when this validation is active (default is <tt>:save</tt>, other options <tt>:create</tt>, <tt>:update</tt>).
852
+ # * <tt>:if</tt> - Specifies a method, proc or string to call to determine if the validation should
853
+ # occur (e.g. <tt>:if => :allow_validation</tt>, or <tt>:if => Proc.new { |user| user.signup_step > 2 }</tt>). The
854
+ # method, proc or string should return or evaluate to a true or false value.
855
+ # * <tt>:unless</tt> - Specifies a method, proc or string to call to determine if the validation should
856
+ # not occur (e.g. <tt>:unless => :skip_validation</tt>, or <tt>:unless => Proc.new { |user| user.signup_step <= 2 }</tt>). The
857
+ # method, proc or string should return or evaluate to a true or false value.
858
+ def validates_format_of(*attr_names)
859
+ configuration = { :on => :save, :with => nil }
860
+ configuration.update(attr_names.extract_options!)
861
+
862
+ raise(ArgumentError, "A regular expression must be supplied as the :with option of the configuration hash") unless configuration[:with].is_a?(Regexp)
863
+
864
+ validates_each(attr_names, configuration) do |record, attr_name, value|
865
+ unless value.to_s =~ configuration[:with]
866
+ record.errors.add(attr_name, :invalid, :default => configuration[:message], :value => value)
867
+ end
868
+ end
869
+ end
870
+
871
+ # Validates whether the value of the specified attribute is available in a particular enumerable object.
872
+ #
873
+ # class Person < ActiveRecord::Base
874
+ # validates_inclusion_of :gender, :in => %w( m f )
875
+ # validates_inclusion_of :age, :in => 0..99
876
+ # validates_inclusion_of :format, :in => %w( jpg gif png ), :message => "extension {{value}} is not included in the list"
877
+ # end
878
+ #
879
+ # Configuration options:
880
+ # * <tt>:in</tt> - An enumerable object of available items.
881
+ # * <tt>:message</tt> - Specifies a custom error message (default is: "is not included in the list").
882
+ # * <tt>:allow_nil</tt> - If set to true, skips this validation if the attribute is +nil+ (default is +false+).
883
+ # * <tt>:allow_blank</tt> - If set to true, skips this validation if the attribute is blank (default is +false+).
884
+ # * <tt>:if</tt> - Specifies a method, proc or string to call to determine if the validation should
885
+ # occur (e.g. <tt>:if => :allow_validation</tt>, or <tt>:if => Proc.new { |user| user.signup_step > 2 }</tt>). The
886
+ # method, proc or string should return or evaluate to a true or false value.
887
+ # * <tt>:unless</tt> - Specifies a method, proc or string to call to determine if the validation should
888
+ # not occur (e.g. <tt>:unless => :skip_validation</tt>, or <tt>:unless => Proc.new { |user| user.signup_step <= 2 }</tt>). The
889
+ # method, proc or string should return or evaluate to a true or false value.
890
+ def validates_inclusion_of(*attr_names)
891
+ configuration = { :on => :save }
892
+ configuration.update(attr_names.extract_options!)
893
+
894
+ enum = configuration[:in] || configuration[:within]
895
+
896
+ raise(ArgumentError, "An object with the method include? is required must be supplied as the :in option of the configuration hash") unless enum.respond_to?(:include?)
897
+
898
+ validates_each(attr_names, configuration) do |record, attr_name, value|
899
+ unless enum.include?(value)
900
+ record.errors.add(attr_name, :inclusion, :default => configuration[:message], :value => value)
901
+ end
902
+ end
903
+ end
904
+
905
+ # Validates that the value of the specified attribute is not in a particular enumerable object.
906
+ #
907
+ # class Person < ActiveRecord::Base
908
+ # validates_exclusion_of :username, :in => %w( admin superuser ), :message => "You don't belong here"
909
+ # validates_exclusion_of :age, :in => 30..60, :message => "This site is only for under 30 and over 60"
910
+ # validates_exclusion_of :format, :in => %w( mov avi ), :message => "extension {{value}} is not allowed"
911
+ # end
912
+ #
913
+ # Configuration options:
914
+ # * <tt>:in</tt> - An enumerable object of items that the value shouldn't be part of.
915
+ # * <tt>:message</tt> - Specifies a custom error message (default is: "is reserved").
916
+ # * <tt>:allow_nil</tt> - If set to true, skips this validation if the attribute is +nil+ (default is +false+).
917
+ # * <tt>:allow_blank</tt> - If set to true, skips this validation if the attribute is blank (default is +false+).
918
+ # * <tt>:if</tt> - Specifies a method, proc or string to call to determine if the validation should
919
+ # occur (e.g. <tt>:if => :allow_validation</tt>, or <tt>:if => Proc.new { |user| user.signup_step > 2 }</tt>). The
920
+ # method, proc or string should return or evaluate to a true or false value.
921
+ # * <tt>:unless</tt> - Specifies a method, proc or string to call to determine if the validation should
922
+ # not occur (e.g. <tt>:unless => :skip_validation</tt>, or <tt>:unless => Proc.new { |user| user.signup_step <= 2 }</tt>). The
923
+ # method, proc or string should return or evaluate to a true or false value.
924
+ def validates_exclusion_of(*attr_names)
925
+ configuration = { :on => :save }
926
+ configuration.update(attr_names.extract_options!)
927
+
928
+ enum = configuration[:in] || configuration[:within]
929
+
930
+ raise(ArgumentError, "An object with the method include? is required must be supplied as the :in option of the configuration hash") unless enum.respond_to?(:include?)
931
+
932
+ validates_each(attr_names, configuration) do |record, attr_name, value|
933
+ if enum.include?(value)
934
+ record.errors.add(attr_name, :exclusion, :default => configuration[:message], :value => value)
935
+ end
936
+ end
937
+ end
938
+
939
+ # Validates whether the associated object or objects are all valid themselves. Works with any kind of association.
940
+ #
941
+ # class Book < ActiveRecord::Base
942
+ # has_many :pages
943
+ # belongs_to :library
944
+ #
945
+ # validates_associated :pages, :library
946
+ # end
947
+ #
948
+ # Warning: If, after the above definition, you then wrote:
949
+ #
950
+ # class Page < ActiveRecord::Base
951
+ # belongs_to :book
952
+ #
953
+ # validates_associated :book
954
+ # end
955
+ #
956
+ # this would specify a circular dependency and cause infinite recursion.
957
+ #
958
+ # NOTE: This validation will not fail if the association hasn't been assigned. If you want to ensure that the association
959
+ # is both present and guaranteed to be valid, you also need to use +validates_presence_of+.
960
+ #
961
+ # Configuration options:
962
+ # * <tt>:message</tt> - A custom error message (default is: "is invalid")
963
+ # * <tt>:on</tt> - Specifies when this validation is active (default is <tt>:save</tt>, other options <tt>:create</tt>, <tt>:update</tt>).
964
+ # * <tt>:if</tt> - Specifies a method, proc or string to call to determine if the validation should
965
+ # occur (e.g. <tt>:if => :allow_validation</tt>, or <tt>:if => Proc.new { |user| user.signup_step > 2 }</tt>). The
966
+ # method, proc or string should return or evaluate to a true or false value.
967
+ # * <tt>:unless</tt> - Specifies a method, proc or string to call to determine if the validation should
968
+ # not occur (e.g. <tt>:unless => :skip_validation</tt>, or <tt>:unless => Proc.new { |user| user.signup_step <= 2 }</tt>). The
969
+ # method, proc or string should return or evaluate to a true or false value.
970
+ def validates_associated(*attr_names)
971
+ configuration = { :on => :save }
972
+ configuration.update(attr_names.extract_options!)
973
+
974
+ validates_each(attr_names, configuration) do |record, attr_name, value|
975
+ unless (value.is_a?(Array) ? value : [value]).collect { |r| r.nil? || r.valid? }.all?
976
+ record.errors.add(attr_name, :invalid, :default => configuration[:message], :value => value)
977
+ end
978
+ end
979
+ end
980
+
981
+ # Validates whether the value of the specified attribute is numeric by trying to convert it to
982
+ # a float with Kernel.Float (if <tt>only_integer</tt> is false) or applying it to the regular expression
983
+ # <tt>/\A[\+\-]?\d+\Z/</tt> (if <tt>only_integer</tt> is set to true).
984
+ #
985
+ # class Person < ActiveRecord::Base
986
+ # validates_numericality_of :value, :on => :create
987
+ # end
988
+ #
989
+ # Configuration options:
990
+ # * <tt>:message</tt> - A custom error message (default is: "is not a number").
991
+ # * <tt>:on</tt> - Specifies when this validation is active (default is <tt>:save</tt>, other options <tt>:create</tt>, <tt>:update</tt>).
992
+ # * <tt>:only_integer</tt> - Specifies whether the value has to be an integer, e.g. an integral value (default is +false+).
993
+ # * <tt>:allow_nil</tt> - Skip validation if attribute is +nil+ (default is +false+). Notice that for fixnum and float columns empty strings are converted to +nil+.
994
+ # * <tt>:greater_than</tt> - Specifies the value must be greater than the supplied value.
995
+ # * <tt>:greater_than_or_equal_to</tt> - Specifies the value must be greater than or equal the supplied value.
996
+ # * <tt>:equal_to</tt> - Specifies the value must be equal to the supplied value.
997
+ # * <tt>:less_than</tt> - Specifies the value must be less than the supplied value.
998
+ # * <tt>:less_than_or_equal_to</tt> - Specifies the value must be less than or equal the supplied value.
999
+ # * <tt>:odd</tt> - Specifies the value must be an odd number.
1000
+ # * <tt>:even</tt> - Specifies the value must be an even number.
1001
+ # * <tt>:if</tt> - Specifies a method, proc or string to call to determine if the validation should
1002
+ # occur (e.g. <tt>:if => :allow_validation</tt>, or <tt>:if => Proc.new { |user| user.signup_step > 2 }</tt>). The
1003
+ # method, proc or string should return or evaluate to a true or false value.
1004
+ # * <tt>:unless</tt> - Specifies a method, proc or string to call to determine if the validation should
1005
+ # not occur (e.g. <tt>:unless => :skip_validation</tt>, or <tt>:unless => Proc.new { |user| user.signup_step <= 2 }</tt>). The
1006
+ # method, proc or string should return or evaluate to a true or false value.
1007
+ def validates_numericality_of(*attr_names)
1008
+ configuration = { :on => :save, :only_integer => false, :allow_nil => false }
1009
+ configuration.update(attr_names.extract_options!)
1010
+
1011
+
1012
+ numericality_options = ALL_NUMERICALITY_CHECKS.keys & configuration.keys
1013
+
1014
+ (numericality_options - [ :odd, :even ]).each do |option|
1015
+ raise ArgumentError, ":#{option} must be a number" unless configuration[option].is_a?(Numeric)
1016
+ end
1017
+
1018
+ validates_each(attr_names,configuration) do |record, attr_name, value|
1019
+ raw_value = record.send("#{attr_name}_before_type_cast") || value
1020
+
1021
+ next if configuration[:allow_nil] and raw_value.nil?
1022
+
1023
+ if configuration[:only_integer]
1024
+ unless raw_value.to_s =~ /\A[+-]?\d+\Z/
1025
+ record.errors.add(attr_name, :not_a_number, :value => raw_value, :default => configuration[:message])
1026
+ next
1027
+ end
1028
+ raw_value = raw_value.to_i
1029
+ else
1030
+ begin
1031
+ raw_value = Kernel.Float(raw_value)
1032
+ rescue ArgumentError, TypeError
1033
+ record.errors.add(attr_name, :not_a_number, :value => raw_value, :default => configuration[:message])
1034
+ next
1035
+ end
1036
+ end
1037
+
1038
+ numericality_options.each do |option|
1039
+ case option
1040
+ when :odd, :even
1041
+ unless raw_value.to_i.method(ALL_NUMERICALITY_CHECKS[option])[]
1042
+ record.errors.add(attr_name, option, :value => raw_value, :default => configuration[:message])
1043
+ end
1044
+ else
1045
+ record.errors.add(attr_name, option, :default => configuration[:message], :value => raw_value, :count => configuration[option]) unless raw_value.method(ALL_NUMERICALITY_CHECKS[option])[configuration[option]]
1046
+ end
1047
+ end
1048
+ end
1049
+ end
1050
+
1051
+ # Creates an object just like Base.create but calls save! instead of save
1052
+ # so an exception is raised if the record is invalid.
1053
+ def create!(attributes = nil, &block)
1054
+ if attributes.is_a?(Array)
1055
+ attributes.collect { |attr| create!(attr, &block) }
1056
+ else
1057
+ object = new(attributes)
1058
+ yield(object) if block_given?
1059
+ object.save!
1060
+ object
1061
+ end
1062
+ end
1063
+
1064
+ private
1065
+ def validation_method(on)
1066
+ case on
1067
+ when :save then :validate
1068
+ when :create then :validate_on_create
1069
+ when :update then :validate_on_update
1070
+ end
1071
+ end
1072
+ end
1073
+
1074
+ # The validation process on save can be skipped by passing false. The regular Base#save method is
1075
+ # replaced with this when the validations module is mixed in, which it is by default.
1076
+ def save_with_validation(perform_validation = true)
1077
+ if perform_validation && valid? || !perform_validation
1078
+ save_without_validation
1079
+ else
1080
+ false
1081
+ end
1082
+ end
1083
+
1084
+ # Attempts to save the record just like Base#save but will raise a RecordInvalid exception instead of returning false
1085
+ # if the record is not valid.
1086
+ def save_with_validation!
1087
+ if valid?
1088
+ save_without_validation!
1089
+ else
1090
+ raise RecordInvalid.new(self)
1091
+ end
1092
+ end
1093
+
1094
+ # Runs +validate+ and +validate_on_create+ or +validate_on_update+ and returns true if no errors were added otherwise false.
1095
+ def valid?
1096
+ errors.clear
1097
+
1098
+ run_callbacks(:validate)
1099
+ validate
1100
+
1101
+ if new_record?
1102
+ run_callbacks(:validate_on_create)
1103
+ validate_on_create
1104
+ else
1105
+ run_callbacks(:validate_on_update)
1106
+ validate_on_update
1107
+ end
1108
+
1109
+ errors.empty?
1110
+ end
1111
+
1112
+ # Performs the opposite of <tt>valid?</tt>. Returns true if errors were added, false otherwise.
1113
+ def invalid?
1114
+ !valid?
1115
+ end
1116
+
1117
+ # Returns the Errors object that holds all information about attribute error messages.
1118
+ def errors
1119
+ @errors ||= Errors.new(self)
1120
+ end
1121
+
1122
+ protected
1123
+ # Overwrite this method for validation checks on all saves and use <tt>Errors.add(field, msg)</tt> for invalid attributes.
1124
+ def validate
1125
+ end
1126
+
1127
+ # Overwrite this method for validation checks used only on creation.
1128
+ def validate_on_create
1129
+ end
1130
+
1131
+ # Overwrite this method for validation checks used only on updates.
1132
+ def validate_on_update
1133
+ end
1134
+ end
1135
+ end