mack-active_record 0.8.1 → 0.8.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (379) hide show
  1. data/lib/gems/activerecord-2.2.2/lib/active_record/aggregations.rb +261 -0
  2. data/lib/gems/activerecord-2.2.2/lib/active_record/association_preload.rb +374 -0
  3. data/lib/gems/activerecord-2.2.2/lib/active_record/associations/association_collection.rb +453 -0
  4. data/lib/gems/activerecord-2.2.2/lib/active_record/associations/association_proxy.rb +272 -0
  5. data/lib/gems/activerecord-2.2.2/lib/active_record/associations/belongs_to_association.rb +58 -0
  6. data/lib/gems/activerecord-2.2.2/lib/active_record/associations/belongs_to_polymorphic_association.rb +49 -0
  7. data/lib/gems/activerecord-2.2.2/lib/active_record/associations/has_and_belongs_to_many_association.rb +121 -0
  8. data/lib/gems/activerecord-2.2.2/lib/active_record/associations/has_many_association.rb +121 -0
  9. data/lib/gems/activerecord-2.2.2/lib/active_record/associations/has_many_through_association.rb +256 -0
  10. data/lib/gems/activerecord-2.2.2/lib/active_record/associations/has_one_association.rb +115 -0
  11. data/lib/gems/activerecord-2.2.2/lib/active_record/associations/has_one_through_association.rb +31 -0
  12. data/lib/gems/activerecord-2.2.2/lib/active_record/associations.rb +2227 -0
  13. data/lib/gems/activerecord-2.2.2/lib/active_record/attribute_methods.rb +387 -0
  14. data/lib/gems/activerecord-2.2.2/lib/active_record/base.rb +2967 -0
  15. data/lib/gems/activerecord-2.2.2/lib/active_record/calculations.rb +299 -0
  16. data/lib/gems/activerecord-2.2.2/lib/active_record/callbacks.rb +331 -0
  17. data/lib/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb +355 -0
  18. data/lib/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/connection_specification.rb +136 -0
  19. data/lib/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/database_statements.rb +201 -0
  20. data/lib/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/query_cache.rb +94 -0
  21. data/lib/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/quoting.rb +69 -0
  22. data/lib/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/schema_definitions.rb +705 -0
  23. data/lib/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/schema_statements.rb +434 -0
  24. data/lib/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract_adapter.rb +210 -0
  25. data/lib/gems/activerecord-2.2.2/lib/active_record/connection_adapters/mysql_adapter.rb +585 -0
  26. data/lib/gems/activerecord-2.2.2/lib/active_record/connection_adapters/postgresql_adapter.rb +1065 -0
  27. data/lib/gems/activerecord-2.2.2/lib/active_record/connection_adapters/sqlite3_adapter.rb +34 -0
  28. data/lib/gems/activerecord-2.2.2/lib/active_record/connection_adapters/sqlite_adapter.rb +418 -0
  29. data/lib/gems/activerecord-2.2.2/lib/active_record/dirty.rb +183 -0
  30. data/lib/gems/activerecord-2.2.2/lib/active_record/dynamic_finder_match.rb +41 -0
  31. data/lib/gems/activerecord-2.2.2/lib/active_record/fixtures.rb +998 -0
  32. data/lib/gems/activerecord-2.2.2/lib/active_record/i18n_interpolation_deprecation.rb +26 -0
  33. data/lib/gems/activerecord-2.2.2/lib/active_record/locale/en.yml +54 -0
  34. data/lib/gems/activerecord-2.2.2/lib/active_record/locking/optimistic.rb +148 -0
  35. data/lib/gems/activerecord-2.2.2/lib/active_record/locking/pessimistic.rb +77 -0
  36. data/lib/gems/activerecord-2.2.2/lib/active_record/migration.rb +560 -0
  37. data/lib/gems/activerecord-2.2.2/lib/active_record/named_scope.rb +181 -0
  38. data/lib/gems/activerecord-2.2.2/lib/active_record/observer.rb +197 -0
  39. data/lib/gems/activerecord-2.2.2/lib/active_record/query_cache.rb +21 -0
  40. data/lib/gems/activerecord-2.2.2/lib/active_record/reflection.rb +307 -0
  41. data/lib/gems/activerecord-2.2.2/lib/active_record/schema.rb +51 -0
  42. data/lib/gems/activerecord-2.2.2/lib/active_record/schema_dumper.rb +177 -0
  43. data/lib/gems/activerecord-2.2.2/lib/active_record/serialization.rb +98 -0
  44. data/lib/gems/activerecord-2.2.2/lib/active_record/serializers/json_serializer.rb +80 -0
  45. data/lib/gems/activerecord-2.2.2/lib/active_record/serializers/xml_serializer.rb +338 -0
  46. data/lib/gems/activerecord-2.2.2/lib/active_record/test_case.rb +60 -0
  47. data/lib/gems/activerecord-2.2.2/lib/active_record/timestamp.rb +41 -0
  48. data/lib/gems/activerecord-2.2.2/lib/active_record/transactions.rb +185 -0
  49. data/lib/gems/activerecord-2.2.2/lib/active_record/validations.rb +1061 -0
  50. data/lib/gems/activerecord-2.2.2/lib/active_record/version.rb +9 -0
  51. data/lib/gems/activerecord-2.2.2/lib/active_record.rb +81 -0
  52. data/lib/gems/activerecord-2.2.2/lib/activerecord.rb +1 -0
  53. data/lib/gems/activesupport-2.2.2/lib/active_support/base64.rb +33 -0
  54. data/lib/gems/activesupport-2.2.2/lib/active_support/basic_object.rb +24 -0
  55. data/lib/gems/activesupport-2.2.2/lib/active_support/buffered_logger.rb +122 -0
  56. data/lib/gems/activesupport-2.2.2/lib/active_support/cache/compressed_mem_cache_store.rb +20 -0
  57. data/lib/gems/activesupport-2.2.2/lib/active_support/cache/drb_store.rb +15 -0
  58. data/lib/gems/activesupport-2.2.2/lib/active_support/cache/file_store.rb +72 -0
  59. data/lib/gems/activesupport-2.2.2/lib/active_support/cache/mem_cache_store.rb +127 -0
  60. data/lib/gems/activesupport-2.2.2/lib/active_support/cache/memory_store.rb +52 -0
  61. data/lib/gems/activesupport-2.2.2/lib/active_support/cache/synchronized_memory_store.rb +47 -0
  62. data/lib/gems/activesupport-2.2.2/lib/active_support/cache.rb +223 -0
  63. data/lib/gems/activesupport-2.2.2/lib/active_support/callbacks.rb +280 -0
  64. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/array/access.rb +53 -0
  65. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/array/conversions.rb +183 -0
  66. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/array/extract_options.rb +20 -0
  67. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/array/grouping.rb +106 -0
  68. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/array/random_access.rb +12 -0
  69. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/array.rb +13 -0
  70. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/base64/encoding.rb +16 -0
  71. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/base64.rb +4 -0
  72. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/benchmark.rb +12 -0
  73. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/bigdecimal/conversions.rb +37 -0
  74. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/bigdecimal.rb +6 -0
  75. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/blank.rb +58 -0
  76. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/cgi/escape_skipping_slashes.rb +14 -0
  77. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/cgi.rb +5 -0
  78. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/class/attribute_accessors.rb +54 -0
  79. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/class/delegating_attributes.rb +46 -0
  80. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/class/inheritable_attributes.rb +140 -0
  81. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/class/removal.rb +50 -0
  82. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/class.rb +4 -0
  83. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/date/behavior.rb +42 -0
  84. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/date/calculations.rb +230 -0
  85. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/date/conversions.rb +107 -0
  86. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/date.rb +10 -0
  87. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/date_time/calculations.rb +126 -0
  88. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/date_time/conversions.rb +96 -0
  89. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/date_time.rb +12 -0
  90. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/duplicable.rb +43 -0
  91. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/enumerable.rb +107 -0
  92. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/exception.rb +41 -0
  93. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/file/atomic.rb +46 -0
  94. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/file.rb +5 -0
  95. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/float/rounding.rb +24 -0
  96. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/float/time.rb +27 -0
  97. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/float.rb +7 -0
  98. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/hash/conversions.rb +259 -0
  99. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/hash/deep_merge.rb +23 -0
  100. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/hash/diff.rb +19 -0
  101. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/hash/except.rb +25 -0
  102. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/hash/indifferent_access.rb +137 -0
  103. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/hash/keys.rb +52 -0
  104. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/hash/reverse_merge.rb +35 -0
  105. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/hash/slice.rb +33 -0
  106. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/hash.rb +14 -0
  107. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/integer/even_odd.rb +29 -0
  108. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/integer/inflections.rb +20 -0
  109. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/integer/time.rb +45 -0
  110. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/integer.rb +9 -0
  111. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/kernel/agnostics.rb +11 -0
  112. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/kernel/daemonizing.rb +7 -0
  113. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/kernel/debugger.rb +13 -0
  114. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/kernel/reporting.rb +59 -0
  115. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/kernel/requires.rb +24 -0
  116. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/kernel.rb +5 -0
  117. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/load_error.rb +38 -0
  118. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/logger.rb +143 -0
  119. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/module/aliasing.rb +74 -0
  120. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/module/attr_accessor_with_default.rb +31 -0
  121. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/module/attr_internal.rb +32 -0
  122. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/module/attribute_accessors.rb +58 -0
  123. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/module/delegation.rb +95 -0
  124. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/module/inclusion.rb +30 -0
  125. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/module/introspection.rb +90 -0
  126. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/module/loading.rb +23 -0
  127. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/module/model_naming.rb +23 -0
  128. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/module/synchronization.rb +39 -0
  129. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/module.rb +23 -0
  130. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/name_error.rb +17 -0
  131. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/numeric/bytes.rb +44 -0
  132. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/numeric/conversions.rb +19 -0
  133. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/numeric/time.rb +81 -0
  134. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/numeric.rb +9 -0
  135. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/object/conversions.rb +14 -0
  136. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/object/extending.rb +80 -0
  137. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/object/instance_variables.rb +74 -0
  138. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/object/metaclass.rb +13 -0
  139. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/object/misc.rb +74 -0
  140. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/object.rb +5 -0
  141. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/pathname/clean_within.rb +14 -0
  142. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/pathname.rb +7 -0
  143. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/proc.rb +12 -0
  144. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/process/daemon.rb +25 -0
  145. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/process.rb +1 -0
  146. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/range/blockless_step.rb +32 -0
  147. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/range/conversions.rb +27 -0
  148. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/range/include_range.rb +30 -0
  149. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/range/overlaps.rb +15 -0
  150. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/range.rb +11 -0
  151. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/rexml.rb +36 -0
  152. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/string/access.rb +82 -0
  153. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/string/behavior.rb +13 -0
  154. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/string/conversions.rb +28 -0
  155. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/string/filters.rb +26 -0
  156. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/string/inflections.rb +167 -0
  157. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/string/iterators.rb +21 -0
  158. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/string/multibyte.rb +81 -0
  159. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/string/starts_ends_with.rb +35 -0
  160. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/string/xchar.rb +11 -0
  161. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/string.rb +22 -0
  162. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/symbol.rb +14 -0
  163. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/time/behavior.rb +13 -0
  164. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/time/calculations.rb +303 -0
  165. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/time/conversions.rb +90 -0
  166. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/time/zones.rb +86 -0
  167. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/time.rb +42 -0
  168. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext.rb +4 -0
  169. data/lib/gems/activesupport-2.2.2/lib/active_support/dependencies.rb +621 -0
  170. data/lib/gems/activesupport-2.2.2/lib/active_support/deprecation.rb +243 -0
  171. data/lib/gems/activesupport-2.2.2/lib/active_support/duration.rb +96 -0
  172. data/lib/gems/activesupport-2.2.2/lib/active_support/gzip.rb +25 -0
  173. data/lib/gems/activesupport-2.2.2/lib/active_support/inflections.rb +55 -0
  174. data/lib/gems/activesupport-2.2.2/lib/active_support/inflector.rb +397 -0
  175. data/lib/gems/activesupport-2.2.2/lib/active_support/json/decoding.rb +63 -0
  176. data/lib/gems/activesupport-2.2.2/lib/active_support/json/encoders/date.rb +21 -0
  177. data/lib/gems/activesupport-2.2.2/lib/active_support/json/encoders/date_time.rb +21 -0
  178. data/lib/gems/activesupport-2.2.2/lib/active_support/json/encoders/enumerable.rb +12 -0
  179. data/lib/gems/activesupport-2.2.2/lib/active_support/json/encoders/false_class.rb +5 -0
  180. data/lib/gems/activesupport-2.2.2/lib/active_support/json/encoders/hash.rb +47 -0
  181. data/lib/gems/activesupport-2.2.2/lib/active_support/json/encoders/nil_class.rb +5 -0
  182. data/lib/gems/activesupport-2.2.2/lib/active_support/json/encoders/numeric.rb +5 -0
  183. data/lib/gems/activesupport-2.2.2/lib/active_support/json/encoders/object.rb +6 -0
  184. data/lib/gems/activesupport-2.2.2/lib/active_support/json/encoders/regexp.rb +5 -0
  185. data/lib/gems/activesupport-2.2.2/lib/active_support/json/encoders/string.rb +36 -0
  186. data/lib/gems/activesupport-2.2.2/lib/active_support/json/encoders/symbol.rb +5 -0
  187. data/lib/gems/activesupport-2.2.2/lib/active_support/json/encoders/time.rb +21 -0
  188. data/lib/gems/activesupport-2.2.2/lib/active_support/json/encoders/true_class.rb +5 -0
  189. data/lib/gems/activesupport-2.2.2/lib/active_support/json/encoding.rb +37 -0
  190. data/lib/gems/activesupport-2.2.2/lib/active_support/json/variable.rb +10 -0
  191. data/lib/gems/activesupport-2.2.2/lib/active_support/json.rb +23 -0
  192. data/lib/gems/activesupport-2.2.2/lib/active_support/locale/en.yml +32 -0
  193. data/lib/gems/activesupport-2.2.2/lib/active_support/memoizable.rb +82 -0
  194. data/lib/gems/activesupport-2.2.2/lib/active_support/multibyte/chars.rb +679 -0
  195. data/lib/gems/activesupport-2.2.2/lib/active_support/multibyte/exceptions.rb +8 -0
  196. data/lib/gems/activesupport-2.2.2/lib/active_support/multibyte/unicode_database.rb +71 -0
  197. data/lib/gems/activesupport-2.2.2/lib/active_support/multibyte.rb +33 -0
  198. data/lib/gems/activesupport-2.2.2/lib/active_support/option_merger.rb +17 -0
  199. data/lib/gems/activesupport-2.2.2/lib/active_support/ordered_hash.rb +58 -0
  200. data/lib/gems/activesupport-2.2.2/lib/active_support/ordered_options.rb +19 -0
  201. data/lib/gems/activesupport-2.2.2/lib/active_support/rescuable.rb +108 -0
  202. data/lib/gems/activesupport-2.2.2/lib/active_support/secure_random.rb +197 -0
  203. data/lib/gems/activesupport-2.2.2/lib/active_support/string_inquirer.rb +21 -0
  204. data/lib/gems/activesupport-2.2.2/lib/active_support/test_case.rb +24 -0
  205. data/lib/gems/activesupport-2.2.2/lib/active_support/testing/core_ext/test/unit/assertions.rb +72 -0
  206. data/lib/gems/activesupport-2.2.2/lib/active_support/testing/core_ext/test.rb +6 -0
  207. data/lib/gems/activesupport-2.2.2/lib/active_support/testing/default.rb +9 -0
  208. data/lib/gems/activesupport-2.2.2/lib/active_support/testing/performance.rb +452 -0
  209. data/lib/gems/activesupport-2.2.2/lib/active_support/testing/setup_and_teardown.rb +120 -0
  210. data/lib/gems/activesupport-2.2.2/lib/active_support/time_with_zone.rb +328 -0
  211. data/lib/gems/activesupport-2.2.2/lib/active_support/values/time_zone.rb +403 -0
  212. data/lib/gems/activesupport-2.2.2/lib/active_support/values/unicode_tables.dat +0 -0
  213. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/builder-2.1.2/blankslate.rb +113 -0
  214. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/builder-2.1.2/builder/blankslate.rb +20 -0
  215. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/builder-2.1.2/builder/css.rb +250 -0
  216. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/builder-2.1.2/builder/xchar.rb +115 -0
  217. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/builder-2.1.2/builder/xmlbase.rb +139 -0
  218. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/builder-2.1.2/builder/xmlevents.rb +63 -0
  219. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/builder-2.1.2/builder/xmlmarkup.rb +328 -0
  220. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/builder-2.1.2/builder.rb +13 -0
  221. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/i18n-0.0.1/i18n/backend/simple.rb +216 -0
  222. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/i18n-0.0.1/i18n/exceptions.rb +53 -0
  223. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/i18n-0.0.1/i18n.rb +194 -0
  224. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/memcache-client-1.5.1/memcache.rb +849 -0
  225. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/data_timezone.rb +47 -0
  226. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/data_timezone_info.rb +228 -0
  227. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Algiers.rb +55 -0
  228. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Cairo.rb +219 -0
  229. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Casablanca.rb +40 -0
  230. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Harare.rb +18 -0
  231. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Johannesburg.rb +25 -0
  232. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Monrovia.rb +22 -0
  233. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Nairobi.rb +23 -0
  234. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Argentina/Buenos_Aires.rb +166 -0
  235. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Argentina/San_Juan.rb +86 -0
  236. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Bogota.rb +23 -0
  237. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Caracas.rb +23 -0
  238. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Chicago.rb +283 -0
  239. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Chihuahua.rb +136 -0
  240. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Denver.rb +204 -0
  241. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Godthab.rb +161 -0
  242. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Guatemala.rb +27 -0
  243. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Halifax.rb +274 -0
  244. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Indiana/Indianapolis.rb +149 -0
  245. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Juneau.rb +194 -0
  246. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/La_Paz.rb +22 -0
  247. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Lima.rb +35 -0
  248. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Los_Angeles.rb +232 -0
  249. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Mazatlan.rb +139 -0
  250. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Mexico_City.rb +144 -0
  251. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Monterrey.rb +131 -0
  252. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/New_York.rb +282 -0
  253. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Phoenix.rb +30 -0
  254. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Regina.rb +74 -0
  255. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Santiago.rb +205 -0
  256. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Sao_Paulo.rb +171 -0
  257. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/St_Johns.rb +288 -0
  258. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Tijuana.rb +196 -0
  259. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Almaty.rb +67 -0
  260. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Baghdad.rb +73 -0
  261. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Baku.rb +161 -0
  262. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Bangkok.rb +20 -0
  263. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Chongqing.rb +33 -0
  264. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Colombo.rb +30 -0
  265. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Dhaka.rb +27 -0
  266. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Hong_Kong.rb +87 -0
  267. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Irkutsk.rb +165 -0
  268. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Jakarta.rb +30 -0
  269. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Jerusalem.rb +163 -0
  270. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Kabul.rb +20 -0
  271. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Kamchatka.rb +163 -0
  272. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Karachi.rb +30 -0
  273. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Katmandu.rb +20 -0
  274. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Kolkata.rb +25 -0
  275. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Krasnoyarsk.rb +163 -0
  276. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Kuala_Lumpur.rb +31 -0
  277. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Kuwait.rb +18 -0
  278. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Magadan.rb +163 -0
  279. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Muscat.rb +18 -0
  280. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Novosibirsk.rb +164 -0
  281. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Rangoon.rb +24 -0
  282. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Riyadh.rb +18 -0
  283. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Seoul.rb +34 -0
  284. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Shanghai.rb +35 -0
  285. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Singapore.rb +33 -0
  286. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Taipei.rb +59 -0
  287. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Tashkent.rb +47 -0
  288. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Tbilisi.rb +78 -0
  289. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Tehran.rb +121 -0
  290. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Tokyo.rb +30 -0
  291. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Ulaanbaatar.rb +65 -0
  292. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Urumqi.rb +33 -0
  293. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Vladivostok.rb +164 -0
  294. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Yakutsk.rb +163 -0
  295. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Yekaterinburg.rb +165 -0
  296. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Yerevan.rb +165 -0
  297. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Atlantic/Azores.rb +270 -0
  298. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Atlantic/Cape_Verde.rb +23 -0
  299. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Atlantic/South_Georgia.rb +18 -0
  300. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Adelaide.rb +187 -0
  301. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Brisbane.rb +35 -0
  302. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Darwin.rb +29 -0
  303. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Hobart.rb +193 -0
  304. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Melbourne.rb +185 -0
  305. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Perth.rb +37 -0
  306. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Sydney.rb +185 -0
  307. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Etc/UTC.rb +16 -0
  308. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Amsterdam.rb +228 -0
  309. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Athens.rb +185 -0
  310. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Belgrade.rb +163 -0
  311. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Berlin.rb +188 -0
  312. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Bratislava.rb +13 -0
  313. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Brussels.rb +232 -0
  314. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Bucharest.rb +181 -0
  315. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Budapest.rb +197 -0
  316. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Copenhagen.rb +179 -0
  317. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Dublin.rb +276 -0
  318. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Helsinki.rb +163 -0
  319. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Istanbul.rb +218 -0
  320. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Kiev.rb +168 -0
  321. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Lisbon.rb +268 -0
  322. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Ljubljana.rb +13 -0
  323. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/London.rb +288 -0
  324. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Madrid.rb +211 -0
  325. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Minsk.rb +170 -0
  326. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Moscow.rb +181 -0
  327. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Paris.rb +232 -0
  328. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Prague.rb +187 -0
  329. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Riga.rb +176 -0
  330. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Rome.rb +215 -0
  331. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Sarajevo.rb +13 -0
  332. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Skopje.rb +13 -0
  333. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Sofia.rb +173 -0
  334. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Stockholm.rb +165 -0
  335. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Tallinn.rb +172 -0
  336. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Vienna.rb +183 -0
  337. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Vilnius.rb +170 -0
  338. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Warsaw.rb +212 -0
  339. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Zagreb.rb +13 -0
  340. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Auckland.rb +202 -0
  341. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Fiji.rb +23 -0
  342. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Guam.rb +22 -0
  343. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Honolulu.rb +28 -0
  344. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Majuro.rb +20 -0
  345. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Midway.rb +25 -0
  346. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Noumea.rb +25 -0
  347. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Pago_Pago.rb +26 -0
  348. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Port_Moresby.rb +20 -0
  349. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Tongatapu.rb +27 -0
  350. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/info_timezone.rb +52 -0
  351. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/linked_timezone.rb +51 -0
  352. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/linked_timezone_info.rb +44 -0
  353. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/offset_rationals.rb +98 -0
  354. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/ruby_core_support.rb +56 -0
  355. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/time_or_datetime.rb +292 -0
  356. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone.rb +508 -0
  357. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone_definition.rb +56 -0
  358. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone_info.rb +40 -0
  359. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone_offset_info.rb +94 -0
  360. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone_period.rb +198 -0
  361. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone_transition_info.rb +129 -0
  362. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo.rb +33 -0
  363. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/xml-simple-1.0.11/xmlsimple.rb +1021 -0
  364. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor.rb +34 -0
  365. data/lib/gems/activesupport-2.2.2/lib/active_support/version.rb +9 -0
  366. data/lib/gems/activesupport-2.2.2/lib/active_support/whiny_nil.rb +58 -0
  367. data/lib/gems/activesupport-2.2.2/lib/active_support.rb +61 -0
  368. data/lib/gems/activesupport-2.2.2/lib/activesupport.rb +1 -0
  369. data/lib/gems.rb +13 -0
  370. data/lib/mack-active_record/database.rb +4 -4
  371. data/lib/mack-active_record/migration_generator/migration_generator.rb +6 -2
  372. data/lib/mack-active_record/model_generator/manifest.yml +3 -3
  373. data/lib/mack-active_record/model_generator/model_generator.rb +8 -1
  374. data/lib/mack-active_record/model_generator/templates/model.rb.template +1 -1
  375. data/lib/mack-active_record/model_generator/templates/rspec.rb.template +1 -1
  376. data/lib/mack-active_record/model_generator/templates/test.rb.template +1 -1
  377. data/lib/mack-active_record.rb +3 -1
  378. data/lib/mack-active_record_tasks.rb +3 -0
  379. metadata +457 -16
@@ -0,0 +1,387 @@
1
+ module ActiveRecord
2
+ module AttributeMethods #:nodoc:
3
+ DEFAULT_SUFFIXES = %w(= ? _before_type_cast)
4
+ ATTRIBUTE_TYPES_CACHED_BY_DEFAULT = [:datetime, :timestamp, :time, :date]
5
+
6
+ def self.included(base)
7
+ base.extend ClassMethods
8
+ base.attribute_method_suffix(*DEFAULT_SUFFIXES)
9
+ base.cattr_accessor :attribute_types_cached_by_default, :instance_writer => false
10
+ base.attribute_types_cached_by_default = ATTRIBUTE_TYPES_CACHED_BY_DEFAULT
11
+ base.cattr_accessor :time_zone_aware_attributes, :instance_writer => false
12
+ base.time_zone_aware_attributes = false
13
+ base.class_inheritable_accessor :skip_time_zone_conversion_for_attributes, :instance_writer => false
14
+ base.skip_time_zone_conversion_for_attributes = []
15
+ end
16
+
17
+ # Declare and check for suffixed attribute methods.
18
+ module ClassMethods
19
+ # Declares a method available for all attributes with the given suffix.
20
+ # Uses +method_missing+ and <tt>respond_to?</tt> to rewrite the method
21
+ #
22
+ # #{attr}#{suffix}(*args, &block)
23
+ #
24
+ # to
25
+ #
26
+ # attribute#{suffix}(#{attr}, *args, &block)
27
+ #
28
+ # An <tt>attribute#{suffix}</tt> instance method must exist and accept at least
29
+ # the +attr+ argument.
30
+ #
31
+ # For example:
32
+ #
33
+ # class Person < ActiveRecord::Base
34
+ # attribute_method_suffix '_changed?'
35
+ #
36
+ # private
37
+ # def attribute_changed?(attr)
38
+ # ...
39
+ # end
40
+ # end
41
+ #
42
+ # person = Person.find(1)
43
+ # person.name_changed? # => false
44
+ # person.name = 'Hubert'
45
+ # person.name_changed? # => true
46
+ def attribute_method_suffix(*suffixes)
47
+ attribute_method_suffixes.concat suffixes
48
+ rebuild_attribute_method_regexp
49
+ end
50
+
51
+ # Returns MatchData if method_name is an attribute method.
52
+ def match_attribute_method?(method_name)
53
+ rebuild_attribute_method_regexp unless defined?(@@attribute_method_regexp) && @@attribute_method_regexp
54
+ @@attribute_method_regexp.match(method_name)
55
+ end
56
+
57
+
58
+ # Contains the names of the generated attribute methods.
59
+ def generated_methods #:nodoc:
60
+ @generated_methods ||= Set.new
61
+ end
62
+
63
+ def generated_methods?
64
+ !generated_methods.empty?
65
+ end
66
+
67
+ # Generates all the attribute related methods for columns in the database
68
+ # accessors, mutators and query methods.
69
+ def define_attribute_methods
70
+ return if generated_methods?
71
+ columns_hash.each do |name, column|
72
+ unless instance_method_already_implemented?(name)
73
+ if self.serialized_attributes[name]
74
+ define_read_method_for_serialized_attribute(name)
75
+ elsif create_time_zone_conversion_attribute?(name, column)
76
+ define_read_method_for_time_zone_conversion(name)
77
+ else
78
+ define_read_method(name.to_sym, name, column)
79
+ end
80
+ end
81
+
82
+ unless instance_method_already_implemented?("#{name}=")
83
+ if create_time_zone_conversion_attribute?(name, column)
84
+ define_write_method_for_time_zone_conversion(name)
85
+ else
86
+ define_write_method(name.to_sym)
87
+ end
88
+ end
89
+
90
+ unless instance_method_already_implemented?("#{name}?")
91
+ define_question_method(name)
92
+ end
93
+ end
94
+ end
95
+
96
+ # Checks whether the method is defined in the model or any of its subclasses
97
+ # that also derive from Active Record. Raises DangerousAttributeError if the
98
+ # method is defined by Active Record though.
99
+ def instance_method_already_implemented?(method_name)
100
+ method_name = method_name.to_s
101
+ return true if method_name =~ /^id(=$|\?$|$)/
102
+ @_defined_class_methods ||= ancestors.first(ancestors.index(ActiveRecord::Base)).sum([]) { |m| m.public_instance_methods(false) | m.private_instance_methods(false) | m.protected_instance_methods(false) }.map(&:to_s).to_set
103
+ @@_defined_activerecord_methods ||= (ActiveRecord::Base.public_instance_methods(false) | ActiveRecord::Base.private_instance_methods(false) | ActiveRecord::Base.protected_instance_methods(false)).map(&:to_s).to_set
104
+ raise DangerousAttributeError, "#{method_name} is defined by ActiveRecord" if @@_defined_activerecord_methods.include?(method_name)
105
+ @_defined_class_methods.include?(method_name)
106
+ end
107
+
108
+ alias :define_read_methods :define_attribute_methods
109
+
110
+ # +cache_attributes+ allows you to declare which converted attribute values should
111
+ # be cached. Usually caching only pays off for attributes with expensive conversion
112
+ # methods, like time related columns (e.g. +created_at+, +updated_at+).
113
+ def cache_attributes(*attribute_names)
114
+ attribute_names.each {|attr| cached_attributes << attr.to_s}
115
+ end
116
+
117
+ # Returns the attributes which are cached. By default time related columns
118
+ # with datatype <tt>:datetime, :timestamp, :time, :date</tt> are cached.
119
+ def cached_attributes
120
+ @cached_attributes ||=
121
+ columns.select{|c| attribute_types_cached_by_default.include?(c.type)}.map(&:name).to_set
122
+ end
123
+
124
+ # Returns +true+ if the provided attribute is being cached.
125
+ def cache_attribute?(attr_name)
126
+ cached_attributes.include?(attr_name)
127
+ end
128
+
129
+ private
130
+ # Suffixes a, ?, c become regexp /(a|\?|c)$/
131
+ def rebuild_attribute_method_regexp
132
+ suffixes = attribute_method_suffixes.map { |s| Regexp.escape(s) }
133
+ @@attribute_method_regexp = /(#{suffixes.join('|')})$/.freeze
134
+ end
135
+
136
+ # Default to =, ?, _before_type_cast
137
+ def attribute_method_suffixes
138
+ @@attribute_method_suffixes ||= []
139
+ end
140
+
141
+ def create_time_zone_conversion_attribute?(name, column)
142
+ time_zone_aware_attributes && !skip_time_zone_conversion_for_attributes.include?(name.to_sym) && [:datetime, :timestamp].include?(column.type)
143
+ end
144
+
145
+ # Define an attribute reader method. Cope with nil column.
146
+ def define_read_method(symbol, attr_name, column)
147
+ cast_code = column.type_cast_code('v') if column
148
+ access_code = cast_code ? "(v=@attributes['#{attr_name}']) && #{cast_code}" : "@attributes['#{attr_name}']"
149
+
150
+ unless attr_name.to_s == self.primary_key.to_s
151
+ access_code = access_code.insert(0, "missing_attribute('#{attr_name}', caller) unless @attributes.has_key?('#{attr_name}'); ")
152
+ end
153
+
154
+ if cache_attribute?(attr_name)
155
+ access_code = "@attributes_cache['#{attr_name}'] ||= (#{access_code})"
156
+ end
157
+ evaluate_attribute_method attr_name, "def #{symbol}; #{access_code}; end"
158
+ end
159
+
160
+ # Define read method for serialized attribute.
161
+ def define_read_method_for_serialized_attribute(attr_name)
162
+ evaluate_attribute_method attr_name, "def #{attr_name}; unserialize_attribute('#{attr_name}'); end"
163
+ end
164
+
165
+ # Defined for all +datetime+ and +timestamp+ attributes when +time_zone_aware_attributes+ are enabled.
166
+ # This enhanced read method automatically converts the UTC time stored in the database to the time zone stored in Time.zone.
167
+ def define_read_method_for_time_zone_conversion(attr_name)
168
+ method_body = <<-EOV
169
+ def #{attr_name}(reload = false)
170
+ cached = @attributes_cache['#{attr_name}']
171
+ return cached if cached && !reload
172
+ time = read_attribute('#{attr_name}')
173
+ @attributes_cache['#{attr_name}'] = time.acts_like?(:time) ? time.in_time_zone : time
174
+ end
175
+ EOV
176
+ evaluate_attribute_method attr_name, method_body
177
+ end
178
+
179
+ # Defines a predicate method <tt>attr_name?</tt>.
180
+ def define_question_method(attr_name)
181
+ evaluate_attribute_method attr_name, "def #{attr_name}?; query_attribute('#{attr_name}'); end", "#{attr_name}?"
182
+ end
183
+
184
+ def define_write_method(attr_name)
185
+ evaluate_attribute_method attr_name, "def #{attr_name}=(new_value);write_attribute('#{attr_name}', new_value);end", "#{attr_name}="
186
+ end
187
+
188
+ # Defined for all +datetime+ and +timestamp+ attributes when +time_zone_aware_attributes+ are enabled.
189
+ # This enhanced write method will automatically convert the time passed to it to the zone stored in Time.zone.
190
+ def define_write_method_for_time_zone_conversion(attr_name)
191
+ method_body = <<-EOV
192
+ def #{attr_name}=(time)
193
+ unless time.acts_like?(:time)
194
+ time = time.is_a?(String) ? Time.zone.parse(time) : time.to_time rescue time
195
+ end
196
+ time = time.in_time_zone rescue nil if time
197
+ write_attribute(:#{attr_name}, time)
198
+ end
199
+ EOV
200
+ evaluate_attribute_method attr_name, method_body, "#{attr_name}="
201
+ end
202
+
203
+ # Evaluate the definition for an attribute related method
204
+ def evaluate_attribute_method(attr_name, method_definition, method_name=attr_name)
205
+
206
+ unless method_name.to_s == primary_key.to_s
207
+ generated_methods << method_name
208
+ end
209
+
210
+ begin
211
+ class_eval(method_definition, __FILE__, __LINE__)
212
+ rescue SyntaxError => err
213
+ generated_methods.delete(attr_name)
214
+ if logger
215
+ logger.warn "Exception occurred during reader method compilation."
216
+ logger.warn "Maybe #{attr_name} is not a valid Ruby identifier?"
217
+ logger.warn err.message
218
+ end
219
+ end
220
+ end
221
+ end # ClassMethods
222
+
223
+
224
+ # Allows access to the object attributes, which are held in the <tt>@attributes</tt> hash, as though they
225
+ # were first-class methods. So a Person class with a name attribute can use Person#name and
226
+ # Person#name= and never directly use the attributes hash -- except for multiple assigns with
227
+ # ActiveRecord#attributes=. A Milestone class can also ask Milestone#completed? to test that
228
+ # the completed attribute is not +nil+ or 0.
229
+ #
230
+ # It's also possible to instantiate related objects, so a Client class belonging to the clients
231
+ # table with a +master_id+ foreign key can instantiate master through Client#master.
232
+ def method_missing(method_id, *args, &block)
233
+ method_name = method_id.to_s
234
+
235
+ if self.class.private_method_defined?(method_name)
236
+ raise NoMethodError.new("Attempt to call private method", method_name, args)
237
+ end
238
+
239
+ # If we haven't generated any methods yet, generate them, then
240
+ # see if we've created the method we're looking for.
241
+ if !self.class.generated_methods?
242
+ self.class.define_attribute_methods
243
+ if self.class.generated_methods.include?(method_name)
244
+ return self.send(method_id, *args, &block)
245
+ end
246
+ end
247
+
248
+ if self.class.primary_key.to_s == method_name
249
+ id
250
+ elsif md = self.class.match_attribute_method?(method_name)
251
+ attribute_name, method_type = md.pre_match, md.to_s
252
+ if @attributes.include?(attribute_name)
253
+ __send__("attribute#{method_type}", attribute_name, *args, &block)
254
+ else
255
+ super
256
+ end
257
+ elsif @attributes.include?(method_name)
258
+ read_attribute(method_name)
259
+ else
260
+ super
261
+ end
262
+ end
263
+
264
+ # Returns the value of the attribute identified by <tt>attr_name</tt> after it has been typecast (for example,
265
+ # "2004-12-12" in a data column is cast to a date object, like Date.new(2004, 12, 12)).
266
+ def read_attribute(attr_name)
267
+ attr_name = attr_name.to_s
268
+ if !(value = @attributes[attr_name]).nil?
269
+ if column = column_for_attribute(attr_name)
270
+ if unserializable_attribute?(attr_name, column)
271
+ unserialize_attribute(attr_name)
272
+ else
273
+ column.type_cast(value)
274
+ end
275
+ else
276
+ value
277
+ end
278
+ else
279
+ nil
280
+ end
281
+ end
282
+
283
+ def read_attribute_before_type_cast(attr_name)
284
+ @attributes[attr_name]
285
+ end
286
+
287
+ # Returns true if the attribute is of a text column and marked for serialization.
288
+ def unserializable_attribute?(attr_name, column)
289
+ column.text? && self.class.serialized_attributes[attr_name]
290
+ end
291
+
292
+ # Returns the unserialized object of the attribute.
293
+ def unserialize_attribute(attr_name)
294
+ unserialized_object = object_from_yaml(@attributes[attr_name])
295
+
296
+ if unserialized_object.is_a?(self.class.serialized_attributes[attr_name]) || unserialized_object.nil?
297
+ @attributes.frozen? ? unserialized_object : @attributes[attr_name] = unserialized_object
298
+ else
299
+ raise SerializationTypeMismatch,
300
+ "#{attr_name} was supposed to be a #{self.class.serialized_attributes[attr_name]}, but was a #{unserialized_object.class.to_s}"
301
+ end
302
+ end
303
+
304
+
305
+ # Updates the attribute identified by <tt>attr_name</tt> with the specified +value+. Empty strings for fixnum and float
306
+ # columns are turned into +nil+.
307
+ def write_attribute(attr_name, value)
308
+ attr_name = attr_name.to_s
309
+ @attributes_cache.delete(attr_name)
310
+ if (column = column_for_attribute(attr_name)) && column.number?
311
+ @attributes[attr_name] = convert_number_column_value(value)
312
+ else
313
+ @attributes[attr_name] = value
314
+ end
315
+ end
316
+
317
+
318
+ def query_attribute(attr_name)
319
+ unless value = read_attribute(attr_name)
320
+ false
321
+ else
322
+ column = self.class.columns_hash[attr_name]
323
+ if column.nil?
324
+ if Numeric === value || value !~ /[^0-9]/
325
+ !value.to_i.zero?
326
+ else
327
+ !value.blank?
328
+ end
329
+ elsif column.number?
330
+ !value.zero?
331
+ else
332
+ !value.blank?
333
+ end
334
+ end
335
+ end
336
+
337
+ # A Person object with a name attribute can ask <tt>person.respond_to?(:name)</tt>,
338
+ # <tt>person.respond_to?(:name=)</tt>, and <tt>person.respond_to?(:name?)</tt>
339
+ # which will all return +true+.
340
+ alias :respond_to_without_attributes? :respond_to?
341
+ def respond_to?(method, include_private_methods = false)
342
+ method_name = method.to_s
343
+ if super
344
+ return true
345
+ elsif !include_private_methods && super(method, true)
346
+ # If we're here than we haven't found among non-private methods
347
+ # but found among all methods. Which means that given method is private.
348
+ return false
349
+ elsif !self.class.generated_methods?
350
+ self.class.define_attribute_methods
351
+ if self.class.generated_methods.include?(method_name)
352
+ return true
353
+ end
354
+ end
355
+
356
+ if @attributes.nil?
357
+ return super
358
+ elsif @attributes.include?(method_name)
359
+ return true
360
+ elsif md = self.class.match_attribute_method?(method_name)
361
+ return true if @attributes.include?(md.pre_match)
362
+ end
363
+ super
364
+ end
365
+
366
+ private
367
+
368
+ def missing_attribute(attr_name, stack)
369
+ raise ActiveRecord::MissingAttributeError, "missing attribute: #{attr_name}", stack
370
+ end
371
+
372
+ # Handle *? for method_missing.
373
+ def attribute?(attribute_name)
374
+ query_attribute(attribute_name)
375
+ end
376
+
377
+ # Handle *= for method_missing.
378
+ def attribute=(attribute_name, value)
379
+ write_attribute(attribute_name, value)
380
+ end
381
+
382
+ # Handle *_before_type_cast for method_missing.
383
+ def attribute_before_type_cast(attribute_name)
384
+ read_attribute_before_type_cast(attribute_name)
385
+ end
386
+ end
387
+ end