mack-facets 0.8.2 → 0.8.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (820) hide show
  1. data/lib/gems.rb +5 -1
  2. data/lib/gems/activesupport-2.2.2/lib/active_support.rb +61 -0
  3. data/lib/gems/activesupport-2.2.2/lib/active_support/base64.rb +33 -0
  4. data/lib/gems/activesupport-2.2.2/lib/active_support/basic_object.rb +24 -0
  5. data/lib/gems/activesupport-2.2.2/lib/active_support/buffered_logger.rb +122 -0
  6. data/lib/gems/activesupport-2.2.2/lib/active_support/cache.rb +223 -0
  7. data/lib/gems/activesupport-2.2.2/lib/active_support/cache/compressed_mem_cache_store.rb +20 -0
  8. data/lib/gems/activesupport-2.2.2/lib/active_support/cache/drb_store.rb +15 -0
  9. data/lib/gems/activesupport-2.2.2/lib/active_support/cache/file_store.rb +72 -0
  10. data/lib/gems/activesupport-2.2.2/lib/active_support/cache/mem_cache_store.rb +127 -0
  11. data/lib/gems/activesupport-2.2.2/lib/active_support/cache/memory_store.rb +52 -0
  12. data/lib/gems/activesupport-2.2.2/lib/active_support/cache/synchronized_memory_store.rb +47 -0
  13. data/lib/gems/activesupport-2.2.2/lib/active_support/callbacks.rb +280 -0
  14. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext.rb +4 -0
  15. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/array.rb +13 -0
  16. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/array/access.rb +53 -0
  17. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/array/conversions.rb +183 -0
  18. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/array/extract_options.rb +20 -0
  19. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/array/grouping.rb +106 -0
  20. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/array/random_access.rb +12 -0
  21. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/base64.rb +4 -0
  22. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/base64/encoding.rb +16 -0
  23. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/benchmark.rb +12 -0
  24. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/bigdecimal.rb +6 -0
  25. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/bigdecimal/conversions.rb +37 -0
  26. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/blank.rb +58 -0
  27. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/cgi.rb +5 -0
  28. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/cgi/escape_skipping_slashes.rb +14 -0
  29. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/class.rb +4 -0
  30. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/class/attribute_accessors.rb +54 -0
  31. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/class/delegating_attributes.rb +46 -0
  32. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/class/inheritable_attributes.rb +140 -0
  33. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/class/removal.rb +50 -0
  34. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/date.rb +10 -0
  35. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/date/behavior.rb +42 -0
  36. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/date/calculations.rb +230 -0
  37. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/date/conversions.rb +107 -0
  38. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/date_time.rb +12 -0
  39. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/date_time/calculations.rb +126 -0
  40. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/date_time/conversions.rb +96 -0
  41. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/duplicable.rb +43 -0
  42. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/enumerable.rb +107 -0
  43. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/exception.rb +41 -0
  44. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/file.rb +5 -0
  45. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/file/atomic.rb +46 -0
  46. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/float.rb +7 -0
  47. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/float/rounding.rb +24 -0
  48. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/float/time.rb +27 -0
  49. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/hash.rb +14 -0
  50. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/hash/conversions.rb +259 -0
  51. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/hash/deep_merge.rb +23 -0
  52. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/hash/diff.rb +19 -0
  53. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/hash/except.rb +25 -0
  54. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/hash/indifferent_access.rb +137 -0
  55. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/hash/keys.rb +52 -0
  56. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/hash/reverse_merge.rb +35 -0
  57. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/hash/slice.rb +33 -0
  58. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/integer.rb +9 -0
  59. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/integer/even_odd.rb +29 -0
  60. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/integer/inflections.rb +20 -0
  61. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/integer/time.rb +45 -0
  62. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/kernel.rb +5 -0
  63. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/kernel/agnostics.rb +11 -0
  64. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/kernel/daemonizing.rb +7 -0
  65. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/kernel/debugger.rb +13 -0
  66. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/kernel/reporting.rb +59 -0
  67. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/kernel/requires.rb +24 -0
  68. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/load_error.rb +38 -0
  69. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/logger.rb +143 -0
  70. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/module.rb +23 -0
  71. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/module/aliasing.rb +74 -0
  72. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/module/attr_accessor_with_default.rb +31 -0
  73. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/module/attr_internal.rb +32 -0
  74. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/module/attribute_accessors.rb +58 -0
  75. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/module/delegation.rb +95 -0
  76. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/module/inclusion.rb +30 -0
  77. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/module/introspection.rb +90 -0
  78. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/module/loading.rb +23 -0
  79. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/module/model_naming.rb +23 -0
  80. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/module/synchronization.rb +39 -0
  81. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/name_error.rb +17 -0
  82. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/numeric.rb +9 -0
  83. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/numeric/bytes.rb +44 -0
  84. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/numeric/conversions.rb +19 -0
  85. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/numeric/time.rb +81 -0
  86. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/object.rb +5 -0
  87. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/object/conversions.rb +14 -0
  88. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/object/extending.rb +80 -0
  89. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/object/instance_variables.rb +74 -0
  90. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/object/metaclass.rb +13 -0
  91. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/object/misc.rb +74 -0
  92. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/pathname.rb +7 -0
  93. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/pathname/clean_within.rb +14 -0
  94. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/proc.rb +12 -0
  95. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/process.rb +1 -0
  96. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/process/daemon.rb +25 -0
  97. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/range.rb +11 -0
  98. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/range/blockless_step.rb +32 -0
  99. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/range/conversions.rb +27 -0
  100. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/range/include_range.rb +30 -0
  101. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/range/overlaps.rb +15 -0
  102. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/rexml.rb +36 -0
  103. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/string.rb +22 -0
  104. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/string/access.rb +82 -0
  105. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/string/behavior.rb +13 -0
  106. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/string/conversions.rb +28 -0
  107. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/string/filters.rb +26 -0
  108. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/string/inflections.rb +167 -0
  109. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/string/iterators.rb +21 -0
  110. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/string/multibyte.rb +81 -0
  111. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/string/starts_ends_with.rb +35 -0
  112. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/string/xchar.rb +11 -0
  113. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/symbol.rb +14 -0
  114. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/time.rb +42 -0
  115. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/time/behavior.rb +13 -0
  116. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/time/calculations.rb +303 -0
  117. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/time/conversions.rb +90 -0
  118. data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/time/zones.rb +86 -0
  119. data/lib/gems/activesupport-2.2.2/lib/active_support/dependencies.rb +621 -0
  120. data/lib/gems/activesupport-2.2.2/lib/active_support/deprecation.rb +243 -0
  121. data/lib/gems/activesupport-2.2.2/lib/active_support/duration.rb +96 -0
  122. data/lib/gems/activesupport-2.2.2/lib/active_support/gzip.rb +25 -0
  123. data/lib/gems/activesupport-2.2.2/lib/active_support/inflections.rb +55 -0
  124. data/lib/gems/activesupport-2.2.2/lib/active_support/inflector.rb +397 -0
  125. data/lib/gems/activesupport-2.2.2/lib/active_support/json.rb +23 -0
  126. data/lib/gems/activesupport-2.2.2/lib/active_support/json/decoding.rb +63 -0
  127. data/lib/gems/activesupport-2.2.2/lib/active_support/json/encoders/date.rb +21 -0
  128. data/lib/gems/activesupport-2.2.2/lib/active_support/json/encoders/date_time.rb +21 -0
  129. data/lib/gems/activesupport-2.2.2/lib/active_support/json/encoders/enumerable.rb +12 -0
  130. data/lib/gems/activesupport-2.2.2/lib/active_support/json/encoders/false_class.rb +5 -0
  131. data/lib/gems/activesupport-2.2.2/lib/active_support/json/encoders/hash.rb +47 -0
  132. data/lib/gems/activesupport-2.2.2/lib/active_support/json/encoders/nil_class.rb +5 -0
  133. data/lib/gems/activesupport-2.2.2/lib/active_support/json/encoders/numeric.rb +5 -0
  134. data/lib/gems/activesupport-2.2.2/lib/active_support/json/encoders/object.rb +6 -0
  135. data/lib/gems/activesupport-2.2.2/lib/active_support/json/encoders/regexp.rb +5 -0
  136. data/lib/gems/activesupport-2.2.2/lib/active_support/json/encoders/string.rb +36 -0
  137. data/lib/gems/activesupport-2.2.2/lib/active_support/json/encoders/symbol.rb +5 -0
  138. data/lib/gems/activesupport-2.2.2/lib/active_support/json/encoders/time.rb +21 -0
  139. data/lib/gems/activesupport-2.2.2/lib/active_support/json/encoders/true_class.rb +5 -0
  140. data/lib/gems/activesupport-2.2.2/lib/active_support/json/encoding.rb +37 -0
  141. data/lib/gems/activesupport-2.2.2/lib/active_support/json/variable.rb +10 -0
  142. data/lib/gems/activesupport-2.2.2/lib/active_support/locale/en.yml +32 -0
  143. data/lib/gems/activesupport-2.2.2/lib/active_support/memoizable.rb +82 -0
  144. data/lib/gems/activesupport-2.2.2/lib/active_support/multibyte.rb +33 -0
  145. data/lib/gems/activesupport-2.2.2/lib/active_support/multibyte/chars.rb +679 -0
  146. data/lib/gems/activesupport-2.2.2/lib/active_support/multibyte/exceptions.rb +8 -0
  147. data/lib/gems/activesupport-2.2.2/lib/active_support/multibyte/unicode_database.rb +71 -0
  148. data/lib/gems/activesupport-2.2.2/lib/active_support/option_merger.rb +17 -0
  149. data/lib/gems/activesupport-2.2.2/lib/active_support/ordered_hash.rb +58 -0
  150. data/lib/gems/activesupport-2.2.2/lib/active_support/ordered_options.rb +19 -0
  151. data/lib/gems/activesupport-2.2.2/lib/active_support/rescuable.rb +108 -0
  152. data/lib/gems/activesupport-2.2.2/lib/active_support/secure_random.rb +197 -0
  153. data/lib/gems/activesupport-2.2.2/lib/active_support/string_inquirer.rb +21 -0
  154. data/lib/gems/activesupport-2.2.2/lib/active_support/test_case.rb +24 -0
  155. data/lib/gems/activesupport-2.2.2/lib/active_support/testing/core_ext/test.rb +6 -0
  156. data/lib/gems/activesupport-2.2.2/lib/active_support/testing/core_ext/test/unit/assertions.rb +72 -0
  157. data/lib/gems/activesupport-2.2.2/lib/active_support/testing/default.rb +9 -0
  158. data/lib/gems/activesupport-2.2.2/lib/active_support/testing/performance.rb +452 -0
  159. data/lib/gems/activesupport-2.2.2/lib/active_support/testing/setup_and_teardown.rb +120 -0
  160. data/lib/gems/activesupport-2.2.2/lib/active_support/time_with_zone.rb +328 -0
  161. data/lib/gems/activesupport-2.2.2/lib/active_support/values/time_zone.rb +403 -0
  162. data/lib/gems/activesupport-2.2.2/lib/active_support/values/unicode_tables.dat +0 -0
  163. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor.rb +34 -0
  164. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/builder-2.1.2/blankslate.rb +113 -0
  165. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/builder-2.1.2/builder.rb +13 -0
  166. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/builder-2.1.2/builder/blankslate.rb +20 -0
  167. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/builder-2.1.2/builder/css.rb +250 -0
  168. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/builder-2.1.2/builder/xchar.rb +115 -0
  169. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/builder-2.1.2/builder/xmlbase.rb +139 -0
  170. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/builder-2.1.2/builder/xmlevents.rb +63 -0
  171. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/builder-2.1.2/builder/xmlmarkup.rb +328 -0
  172. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/i18n-0.0.1/i18n.rb +194 -0
  173. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/i18n-0.0.1/i18n/backend/simple.rb +216 -0
  174. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/i18n-0.0.1/i18n/exceptions.rb +53 -0
  175. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/memcache-client-1.5.1/memcache.rb +849 -0
  176. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo.rb +33 -0
  177. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/data_timezone.rb +47 -0
  178. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/data_timezone_info.rb +228 -0
  179. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Algiers.rb +55 -0
  180. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Cairo.rb +219 -0
  181. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Casablanca.rb +40 -0
  182. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Harare.rb +18 -0
  183. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Johannesburg.rb +25 -0
  184. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Monrovia.rb +22 -0
  185. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Nairobi.rb +23 -0
  186. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Argentina/Buenos_Aires.rb +166 -0
  187. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Argentina/San_Juan.rb +86 -0
  188. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Bogota.rb +23 -0
  189. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Caracas.rb +23 -0
  190. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Chicago.rb +283 -0
  191. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Chihuahua.rb +136 -0
  192. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Denver.rb +204 -0
  193. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Godthab.rb +161 -0
  194. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Guatemala.rb +27 -0
  195. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Halifax.rb +274 -0
  196. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Indiana/Indianapolis.rb +149 -0
  197. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Juneau.rb +194 -0
  198. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/La_Paz.rb +22 -0
  199. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Lima.rb +35 -0
  200. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Los_Angeles.rb +232 -0
  201. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Mazatlan.rb +139 -0
  202. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Mexico_City.rb +144 -0
  203. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Monterrey.rb +131 -0
  204. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/New_York.rb +282 -0
  205. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Phoenix.rb +30 -0
  206. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Regina.rb +74 -0
  207. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Santiago.rb +205 -0
  208. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Sao_Paulo.rb +171 -0
  209. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/St_Johns.rb +288 -0
  210. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Tijuana.rb +196 -0
  211. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Almaty.rb +67 -0
  212. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Baghdad.rb +73 -0
  213. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Baku.rb +161 -0
  214. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Bangkok.rb +20 -0
  215. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Chongqing.rb +33 -0
  216. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Colombo.rb +30 -0
  217. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Dhaka.rb +27 -0
  218. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Hong_Kong.rb +87 -0
  219. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Irkutsk.rb +165 -0
  220. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Jakarta.rb +30 -0
  221. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Jerusalem.rb +163 -0
  222. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Kabul.rb +20 -0
  223. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Kamchatka.rb +163 -0
  224. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Karachi.rb +30 -0
  225. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Katmandu.rb +20 -0
  226. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Kolkata.rb +25 -0
  227. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Krasnoyarsk.rb +163 -0
  228. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Kuala_Lumpur.rb +31 -0
  229. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Kuwait.rb +18 -0
  230. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Magadan.rb +163 -0
  231. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Muscat.rb +18 -0
  232. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Novosibirsk.rb +164 -0
  233. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Rangoon.rb +24 -0
  234. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Riyadh.rb +18 -0
  235. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Seoul.rb +34 -0
  236. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Shanghai.rb +35 -0
  237. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Singapore.rb +33 -0
  238. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Taipei.rb +59 -0
  239. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Tashkent.rb +47 -0
  240. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Tbilisi.rb +78 -0
  241. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Tehran.rb +121 -0
  242. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Tokyo.rb +30 -0
  243. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Ulaanbaatar.rb +65 -0
  244. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Urumqi.rb +33 -0
  245. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Vladivostok.rb +164 -0
  246. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Yakutsk.rb +163 -0
  247. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Yekaterinburg.rb +165 -0
  248. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Yerevan.rb +165 -0
  249. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Atlantic/Azores.rb +270 -0
  250. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Atlantic/Cape_Verde.rb +23 -0
  251. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Atlantic/South_Georgia.rb +18 -0
  252. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Adelaide.rb +187 -0
  253. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Brisbane.rb +35 -0
  254. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Darwin.rb +29 -0
  255. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Hobart.rb +193 -0
  256. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Melbourne.rb +185 -0
  257. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Perth.rb +37 -0
  258. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Sydney.rb +185 -0
  259. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Etc/UTC.rb +16 -0
  260. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Amsterdam.rb +228 -0
  261. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Athens.rb +185 -0
  262. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Belgrade.rb +163 -0
  263. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Berlin.rb +188 -0
  264. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Bratislava.rb +13 -0
  265. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Brussels.rb +232 -0
  266. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Bucharest.rb +181 -0
  267. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Budapest.rb +197 -0
  268. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Copenhagen.rb +179 -0
  269. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Dublin.rb +276 -0
  270. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Helsinki.rb +163 -0
  271. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Istanbul.rb +218 -0
  272. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Kiev.rb +168 -0
  273. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Lisbon.rb +268 -0
  274. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Ljubljana.rb +13 -0
  275. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/London.rb +288 -0
  276. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Madrid.rb +211 -0
  277. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Minsk.rb +170 -0
  278. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Moscow.rb +181 -0
  279. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Paris.rb +232 -0
  280. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Prague.rb +187 -0
  281. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Riga.rb +176 -0
  282. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Rome.rb +215 -0
  283. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Sarajevo.rb +13 -0
  284. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Skopje.rb +13 -0
  285. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Sofia.rb +173 -0
  286. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Stockholm.rb +165 -0
  287. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Tallinn.rb +172 -0
  288. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Vienna.rb +183 -0
  289. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Vilnius.rb +170 -0
  290. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Warsaw.rb +212 -0
  291. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Zagreb.rb +13 -0
  292. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Auckland.rb +202 -0
  293. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Fiji.rb +23 -0
  294. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Guam.rb +22 -0
  295. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Honolulu.rb +28 -0
  296. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Majuro.rb +20 -0
  297. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Midway.rb +25 -0
  298. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Noumea.rb +25 -0
  299. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Pago_Pago.rb +26 -0
  300. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Port_Moresby.rb +20 -0
  301. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Tongatapu.rb +27 -0
  302. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/info_timezone.rb +52 -0
  303. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/linked_timezone.rb +51 -0
  304. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/linked_timezone_info.rb +44 -0
  305. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/offset_rationals.rb +98 -0
  306. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/ruby_core_support.rb +56 -0
  307. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/time_or_datetime.rb +292 -0
  308. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone.rb +508 -0
  309. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone_definition.rb +56 -0
  310. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone_info.rb +40 -0
  311. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone_offset_info.rb +94 -0
  312. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone_period.rb +198 -0
  313. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone_transition_info.rb +129 -0
  314. data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/xml-simple-1.0.11/xmlsimple.rb +1021 -0
  315. data/lib/gems/activesupport-2.2.2/lib/active_support/version.rb +9 -0
  316. data/lib/gems/activesupport-2.2.2/lib/active_support/whiny_nil.rb +58 -0
  317. data/lib/gems/activesupport-2.2.2/lib/activesupport.rb +1 -0
  318. data/lib/gems/extlib-0.9.9/Rakefile +182 -0
  319. data/lib/gems/extlib-0.9.9/lib/extlib.rb +56 -0
  320. data/lib/gems/{extlib-0.9.8 → extlib-0.9.9}/lib/extlib/assertions.rb +0 -0
  321. data/lib/gems/extlib-0.9.9/lib/extlib/blank.rb +89 -0
  322. data/lib/gems/extlib-0.9.9/lib/extlib/boolean.rb +11 -0
  323. data/lib/gems/extlib-0.9.9/lib/extlib/class.rb +175 -0
  324. data/lib/gems/extlib-0.9.9/lib/extlib/datetime.rb +27 -0
  325. data/lib/gems/extlib-0.9.9/lib/extlib/dictionary.rb +433 -0
  326. data/lib/gems/extlib-0.9.9/lib/extlib/hash.rb +442 -0
  327. data/lib/gems/{extlib-0.9.8 → extlib-0.9.9}/lib/extlib/hook.rb +0 -0
  328. data/lib/gems/extlib-0.9.9/lib/extlib/inflection.rb +434 -0
  329. data/lib/gems/extlib-0.9.9/lib/extlib/lazy_array.rb +397 -0
  330. data/lib/gems/extlib-0.9.9/lib/extlib/logger.rb +202 -0
  331. data/lib/gems/extlib-0.9.9/lib/extlib/mash.rb +148 -0
  332. data/lib/gems/extlib-0.9.9/lib/extlib/module.rb +41 -0
  333. data/lib/gems/extlib-0.9.9/lib/extlib/nil.rb +5 -0
  334. data/lib/gems/extlib-0.9.9/lib/extlib/numeric.rb +5 -0
  335. data/lib/gems/extlib-0.9.9/lib/extlib/object.rb +162 -0
  336. data/lib/gems/extlib-0.9.9/lib/extlib/object_space.rb +13 -0
  337. data/lib/gems/extlib-0.9.9/lib/extlib/pathname.rb +15 -0
  338. data/lib/gems/extlib-0.9.9/lib/extlib/pooling.rb +231 -0
  339. data/lib/gems/extlib-0.9.9/lib/extlib/rubygems.rb +38 -0
  340. data/lib/gems/extlib-0.9.9/lib/extlib/simple_set.rb +66 -0
  341. data/lib/gems/extlib-0.9.9/lib/extlib/string.rb +175 -0
  342. data/lib/gems/extlib-0.9.9/lib/extlib/struct.rb +17 -0
  343. data/lib/gems/extlib-0.9.9/lib/extlib/symbol.rb +21 -0
  344. data/lib/gems/{extlib-0.9.8 → extlib-0.9.9}/lib/extlib/tasks/release.rb +0 -0
  345. data/lib/gems/extlib-0.9.9/lib/extlib/time.rb +41 -0
  346. data/lib/gems/extlib-0.9.9/lib/extlib/version.rb +3 -0
  347. data/lib/gems/extlib-0.9.9/lib/extlib/virtual_file.rb +10 -0
  348. data/lib/mack-facets.rb +11 -15
  349. data/lib/mack-facets/1_9/test/unit/error.rb +15 -0
  350. data/lib/mack-facets/extensions/array.rb +0 -5
  351. data/lib/mack-facets/extensions/date_time.rb +5 -2
  352. data/lib/mack-facets/extensions/duration.rb +85 -0
  353. data/lib/mack-facets/extensions/kernel.rb +8 -0
  354. data/lib/mack-facets/extensions/string.rb +7 -86
  355. data/lib/mack-facets/utils/method_list.rb +49 -0
  356. metadata +413 -511
  357. data/lib/gems/extlib-0.9.8/lib/extlib.rb +0 -56
  358. data/lib/gems/extlib-0.9.8/lib/extlib/blank.rb +0 -59
  359. data/lib/gems/extlib-0.9.8/lib/extlib/boolean.rb +0 -11
  360. data/lib/gems/extlib-0.9.8/lib/extlib/class.rb +0 -175
  361. data/lib/gems/extlib-0.9.8/lib/extlib/datetime.rb +0 -9
  362. data/lib/gems/extlib-0.9.8/lib/extlib/dictionary.rb +0 -433
  363. data/lib/gems/extlib-0.9.8/lib/extlib/hash.rb +0 -419
  364. data/lib/gems/extlib-0.9.8/lib/extlib/inflection.rb +0 -435
  365. data/lib/gems/extlib-0.9.8/lib/extlib/lazy_array.rb +0 -106
  366. data/lib/gems/extlib-0.9.8/lib/extlib/logger.rb +0 -202
  367. data/lib/gems/extlib-0.9.8/lib/extlib/mash.rb +0 -148
  368. data/lib/gems/extlib-0.9.8/lib/extlib/module.rb +0 -41
  369. data/lib/gems/extlib-0.9.8/lib/extlib/nil.rb +0 -5
  370. data/lib/gems/extlib-0.9.8/lib/extlib/numeric.rb +0 -5
  371. data/lib/gems/extlib-0.9.8/lib/extlib/object.rb +0 -175
  372. data/lib/gems/extlib-0.9.8/lib/extlib/object_space.rb +0 -13
  373. data/lib/gems/extlib-0.9.8/lib/extlib/pathname.rb +0 -5
  374. data/lib/gems/extlib-0.9.8/lib/extlib/pooling.rb +0 -239
  375. data/lib/gems/extlib-0.9.8/lib/extlib/rubygems.rb +0 -38
  376. data/lib/gems/extlib-0.9.8/lib/extlib/simple_set.rb +0 -39
  377. data/lib/gems/extlib-0.9.8/lib/extlib/string.rb +0 -132
  378. data/lib/gems/extlib-0.9.8/lib/extlib/struct.rb +0 -8
  379. data/lib/gems/extlib-0.9.8/lib/extlib/symbol.rb +0 -17
  380. data/lib/gems/extlib-0.9.8/lib/extlib/time.rb +0 -19
  381. data/lib/gems/extlib-0.9.8/lib/extlib/version.rb +0 -3
  382. data/lib/gems/extlib-0.9.8/lib/extlib/virtual_file.rb +0 -10
  383. data/lib/gems/facets-2.4.5/VERSION +0 -1
  384. data/lib/gems/facets-2.4.5/lib/core/facets-live.rb +0 -17
  385. data/lib/gems/facets-2.4.5/lib/core/facets-load.rb +0 -12
  386. data/lib/gems/facets-2.4.5/lib/core/facets.rb +0 -11
  387. data/lib/gems/facets-2.4.5/lib/core/facets/array.rb +0 -6
  388. data/lib/gems/facets-2.4.5/lib/core/facets/array/combination.rb +0 -59
  389. data/lib/gems/facets-2.4.5/lib/core/facets/array/conjoin.rb +0 -58
  390. data/lib/gems/facets-2.4.5/lib/core/facets/array/delete.rb +0 -61
  391. data/lib/gems/facets-2.4.5/lib/core/facets/array/index.rb +0 -48
  392. data/lib/gems/facets-2.4.5/lib/core/facets/array/indexable.rb +0 -73
  393. data/lib/gems/facets-2.4.5/lib/core/facets/array/merge.rb +0 -21
  394. data/lib/gems/facets-2.4.5/lib/core/facets/array/not_empty.rb +0 -13
  395. data/lib/gems/facets-2.4.5/lib/core/facets/array/only.rb +0 -21
  396. data/lib/gems/facets-2.4.5/lib/core/facets/array/pad.rb +0 -41
  397. data/lib/gems/facets-2.4.5/lib/core/facets/array/permutation.rb +0 -30
  398. data/lib/gems/facets-2.4.5/lib/core/facets/array/product.rb +0 -57
  399. data/lib/gems/facets-2.4.5/lib/core/facets/array/recursively.rb +0 -30
  400. data/lib/gems/facets-2.4.5/lib/core/facets/array/rotate.rb +0 -42
  401. data/lib/gems/facets-2.4.5/lib/core/facets/array/select.rb +0 -16
  402. data/lib/gems/facets-2.4.5/lib/core/facets/array/splice.rb +0 -30
  403. data/lib/gems/facets-2.4.5/lib/core/facets/array/stackable.rb +0 -33
  404. data/lib/gems/facets-2.4.5/lib/core/facets/array/traverse.rb +0 -22
  405. data/lib/gems/facets-2.4.5/lib/core/facets/binding.rb +0 -6
  406. data/lib/gems/facets-2.4.5/lib/core/facets/binding/caller.rb +0 -54
  407. data/lib/gems/facets-2.4.5/lib/core/facets/binding/defined.rb +0 -13
  408. data/lib/gems/facets-2.4.5/lib/core/facets/binding/eval.rb +0 -18
  409. data/lib/gems/facets-2.4.5/lib/core/facets/binding/local_variables.rb +0 -15
  410. data/lib/gems/facets-2.4.5/lib/core/facets/binding/self.rb +0 -12
  411. data/lib/gems/facets-2.4.5/lib/core/facets/bitmask.rb +0 -104
  412. data/lib/gems/facets-2.4.5/lib/core/facets/blank.rb +0 -60
  413. data/lib/gems/facets-2.4.5/lib/core/facets/boolean.rb +0 -156
  414. data/lib/gems/facets-2.4.5/lib/core/facets/callstack.rb +0 -52
  415. data/lib/gems/facets-2.4.5/lib/core/facets/cattr.rb +0 -2
  416. data/lib/gems/facets-2.4.5/lib/core/facets/class.rb +0 -6
  417. data/lib/gems/facets-2.4.5/lib/core/facets/class/cattr.rb +0 -115
  418. data/lib/gems/facets-2.4.5/lib/core/facets/class/cattr_accessor.rb +0 -1
  419. data/lib/gems/facets-2.4.5/lib/core/facets/class/cattr_reader.rb +0 -1
  420. data/lib/gems/facets-2.4.5/lib/core/facets/class/cattr_writer.rb +0 -1
  421. data/lib/gems/facets-2.4.5/lib/core/facets/class/descendents.rb +0 -36
  422. data/lib/gems/facets-2.4.5/lib/core/facets/class/methodize.rb +0 -14
  423. data/lib/gems/facets-2.4.5/lib/core/facets/class/pathize.rb +0 -14
  424. data/lib/gems/facets-2.4.5/lib/core/facets/class/prepend.rb +0 -50
  425. data/lib/gems/facets-2.4.5/lib/core/facets/class/subclasses.rb +0 -2
  426. data/lib/gems/facets-2.4.5/lib/core/facets/class/to_proc.rb +0 -42
  427. data/lib/gems/facets-2.4.5/lib/core/facets/comparable.rb +0 -6
  428. data/lib/gems/facets-2.4.5/lib/core/facets/comparable/bound.rb +0 -65
  429. data/lib/gems/facets-2.4.5/lib/core/facets/comparable/cmp.rb +0 -38
  430. data/lib/gems/facets-2.4.5/lib/core/facets/comparable/comparable.rb +0 -42
  431. data/lib/gems/facets-2.4.5/lib/core/facets/dir.rb +0 -6
  432. data/lib/gems/facets-2.4.5/lib/core/facets/dir/ascend.rb +0 -59
  433. data/lib/gems/facets-2.4.5/lib/core/facets/dir/descend.rb +0 -1
  434. data/lib/gems/facets-2.4.5/lib/core/facets/dir/multiglob.rb +0 -92
  435. data/lib/gems/facets-2.4.5/lib/core/facets/dir/parent.rb +0 -13
  436. data/lib/gems/facets-2.4.5/lib/core/facets/dir/recurse.rb +0 -29
  437. data/lib/gems/facets-2.4.5/lib/core/facets/enumerable.rb +0 -6
  438. data/lib/gems/facets-2.4.5/lib/core/facets/enumerable/accumulate.rb +0 -21
  439. data/lib/gems/facets-2.4.5/lib/core/facets/enumerable/cluster_by.rb +0 -21
  440. data/lib/gems/facets-2.4.5/lib/core/facets/enumerable/collect.rb +0 -54
  441. data/lib/gems/facets-2.4.5/lib/core/facets/enumerable/commonality.rb +0 -33
  442. data/lib/gems/facets-2.4.5/lib/core/facets/enumerable/count.rb +0 -26
  443. data/lib/gems/facets-2.4.5/lib/core/facets/enumerable/divide.rb +0 -33
  444. data/lib/gems/facets-2.4.5/lib/core/facets/enumerable/duplicates.rb +0 -38
  445. data/lib/gems/facets-2.4.5/lib/core/facets/enumerable/each_by.rb +0 -33
  446. data/lib/gems/facets-2.4.5/lib/core/facets/enumerable/entropy.rb +0 -37
  447. data/lib/gems/facets-2.4.5/lib/core/facets/enumerable/frequency.rb +0 -18
  448. data/lib/gems/facets-2.4.5/lib/core/facets/enumerable/group_by.rb +0 -27
  449. data/lib/gems/facets-2.4.5/lib/core/facets/enumerable/inject.rb +0 -31
  450. data/lib/gems/facets-2.4.5/lib/core/facets/enumerable/map_send.rb +0 -12
  451. data/lib/gems/facets-2.4.5/lib/core/facets/enumerable/mash.rb +0 -32
  452. data/lib/gems/facets-2.4.5/lib/core/facets/enumerable/mode.rb +0 -16
  453. data/lib/gems/facets-2.4.5/lib/core/facets/enumerable/modulate.rb +0 -22
  454. data/lib/gems/facets-2.4.5/lib/core/facets/enumerable/none.rb +0 -31
  455. data/lib/gems/facets-2.4.5/lib/core/facets/enumerable/occur.rb +0 -38
  456. data/lib/gems/facets-2.4.5/lib/core/facets/enumerable/one.rb +0 -38
  457. data/lib/gems/facets-2.4.5/lib/core/facets/enumerable/probability.rb +0 -36
  458. data/lib/gems/facets-2.4.5/lib/core/facets/enumerable/split.rb +0 -27
  459. data/lib/gems/facets-2.4.5/lib/core/facets/enumerable/sum.rb +0 -16
  460. data/lib/gems/facets-2.4.5/lib/core/facets/enumerable/uniq_by.rb +0 -18
  461. data/lib/gems/facets-2.4.5/lib/core/facets/exception.rb +0 -6
  462. data/lib/gems/facets-2.4.5/lib/core/facets/exception/detail.rb +0 -19
  463. data/lib/gems/facets-2.4.5/lib/core/facets/exception/suppress.rb +0 -21
  464. data/lib/gems/facets-2.4.5/lib/core/facets/file.rb +0 -6
  465. data/lib/gems/facets-2.4.5/lib/core/facets/file/append.rb +0 -14
  466. data/lib/gems/facets-2.4.5/lib/core/facets/file/create.rb +0 -21
  467. data/lib/gems/facets-2.4.5/lib/core/facets/file/null.rb +0 -21
  468. data/lib/gems/facets-2.4.5/lib/core/facets/file/read.rb +0 -41
  469. data/lib/gems/facets-2.4.5/lib/core/facets/file/rewrite.rb +0 -88
  470. data/lib/gems/facets-2.4.5/lib/core/facets/file/rootname.rb +0 -33
  471. data/lib/gems/facets-2.4.5/lib/core/facets/file/split_root.rb +0 -10
  472. data/lib/gems/facets-2.4.5/lib/core/facets/file/write.rb +0 -22
  473. data/lib/gems/facets-2.4.5/lib/core/facets/file/writelines.rb +0 -24
  474. data/lib/gems/facets-2.4.5/lib/core/facets/filetest.rb +0 -6
  475. data/lib/gems/facets-2.4.5/lib/core/facets/filetest/root.rb +0 -17
  476. data/lib/gems/facets-2.4.5/lib/core/facets/float.rb +0 -6
  477. data/lib/gems/facets-2.4.5/lib/core/facets/float/round.rb +0 -2
  478. data/lib/gems/facets-2.4.5/lib/core/facets/functor.rb +0 -77
  479. data/lib/gems/facets-2.4.5/lib/core/facets/hash.rb +0 -6
  480. data/lib/gems/facets-2.4.5/lib/core/facets/hash/alias.rb +0 -31
  481. data/lib/gems/facets-2.4.5/lib/core/facets/hash/argumentize.rb +0 -22
  482. data/lib/gems/facets-2.4.5/lib/core/facets/hash/at.rb +0 -8
  483. data/lib/gems/facets-2.4.5/lib/core/facets/hash/autonew.rb +0 -42
  484. data/lib/gems/facets-2.4.5/lib/core/facets/hash/collate.rb +0 -45
  485. data/lib/gems/facets-2.4.5/lib/core/facets/hash/delete.rb +0 -47
  486. data/lib/gems/facets-2.4.5/lib/core/facets/hash/diff.rb +0 -11
  487. data/lib/gems/facets-2.4.5/lib/core/facets/hash/except.rb +0 -27
  488. data/lib/gems/facets-2.4.5/lib/core/facets/hash/insert.rb +0 -19
  489. data/lib/gems/facets-2.4.5/lib/core/facets/hash/inverse.rb +0 -27
  490. data/lib/gems/facets-2.4.5/lib/core/facets/hash/join.rb +0 -14
  491. data/lib/gems/facets-2.4.5/lib/core/facets/hash/keys.rb +0 -45
  492. data/lib/gems/facets-2.4.5/lib/core/facets/hash/mash.rb +0 -18
  493. data/lib/gems/facets-2.4.5/lib/core/facets/hash/merge.rb +0 -30
  494. data/lib/gems/facets-2.4.5/lib/core/facets/hash/op.rb +0 -7
  495. data/lib/gems/facets-2.4.5/lib/core/facets/hash/op_add.rb +0 -12
  496. data/lib/gems/facets-2.4.5/lib/core/facets/hash/op_and.rb +0 -33
  497. data/lib/gems/facets-2.4.5/lib/core/facets/hash/op_mul.rb +0 -18
  498. data/lib/gems/facets-2.4.5/lib/core/facets/hash/op_or.rb +0 -12
  499. data/lib/gems/facets-2.4.5/lib/core/facets/hash/op_push.rb +0 -17
  500. data/lib/gems/facets-2.4.5/lib/core/facets/hash/op_sub.rb +0 -26
  501. data/lib/gems/facets-2.4.5/lib/core/facets/hash/recursive_merge.rb +0 -33
  502. data/lib/gems/facets-2.4.5/lib/core/facets/hash/recursively.rb +0 -29
  503. data/lib/gems/facets-2.4.5/lib/core/facets/hash/rekey.rb +0 -59
  504. data/lib/gems/facets-2.4.5/lib/core/facets/hash/select.rb +0 -14
  505. data/lib/gems/facets-2.4.5/lib/core/facets/hash/slice.rb +0 -33
  506. data/lib/gems/facets-2.4.5/lib/core/facets/hash/swap.rb +0 -17
  507. data/lib/gems/facets-2.4.5/lib/core/facets/hash/to_h.rb +0 -1
  508. data/lib/gems/facets-2.4.5/lib/core/facets/hash/to_proc.rb +0 -41
  509. data/lib/gems/facets-2.4.5/lib/core/facets/hash/to_struct.rb +0 -17
  510. data/lib/gems/facets-2.4.5/lib/core/facets/hash/traverse.rb +0 -41
  511. data/lib/gems/facets-2.4.5/lib/core/facets/hash/update.rb +0 -81
  512. data/lib/gems/facets-2.4.5/lib/core/facets/hash/weave.rb +0 -81
  513. data/lib/gems/facets-2.4.5/lib/core/facets/hash/zipnew.rb +0 -2
  514. data/lib/gems/facets-2.4.5/lib/core/facets/indexable.rb +0 -251
  515. data/lib/gems/facets-2.4.5/lib/core/facets/integer.rb +0 -6
  516. data/lib/gems/facets-2.4.5/lib/core/facets/integer/even.rb +0 -1
  517. data/lib/gems/facets-2.4.5/lib/core/facets/integer/factorial.rb +0 -30
  518. data/lib/gems/facets-2.4.5/lib/core/facets/integer/multiple.rb +0 -15
  519. data/lib/gems/facets-2.4.5/lib/core/facets/integer/odd.rb +0 -35
  520. data/lib/gems/facets-2.4.5/lib/core/facets/integer/of.rb +0 -18
  521. data/lib/gems/facets-2.4.5/lib/core/facets/integer/ordinal.rb +0 -24
  522. data/lib/gems/facets-2.4.5/lib/core/facets/kernel.rb +0 -6
  523. data/lib/gems/facets-2.4.5/lib/core/facets/kernel/__callee__.rb +0 -1
  524. data/lib/gems/facets-2.4.5/lib/core/facets/kernel/__class__.rb +0 -9
  525. data/lib/gems/facets-2.4.5/lib/core/facets/kernel/__dir__.rb +0 -12
  526. data/lib/gems/facets-2.4.5/lib/core/facets/kernel/__get__.rb +0 -10
  527. data/lib/gems/facets-2.4.5/lib/core/facets/kernel/__method__.rb +0 -36
  528. data/lib/gems/facets-2.4.5/lib/core/facets/kernel/__set__.rb +0 -1
  529. data/lib/gems/facets-2.4.5/lib/core/facets/kernel/as.rb +0 -100
  530. data/lib/gems/facets-2.4.5/lib/core/facets/kernel/ask.rb +0 -27
  531. data/lib/gems/facets-2.4.5/lib/core/facets/kernel/attr_singleton.rb +0 -62
  532. data/lib/gems/facets-2.4.5/lib/core/facets/kernel/complete.rb +0 -18
  533. data/lib/gems/facets-2.4.5/lib/core/facets/kernel/constant.rb +0 -24
  534. data/lib/gems/facets-2.4.5/lib/core/facets/kernel/d.rb +0 -26
  535. data/lib/gems/facets-2.4.5/lib/core/facets/kernel/deep_copy.rb +0 -13
  536. data/lib/gems/facets-2.4.5/lib/core/facets/kernel/demo.rb +0 -23
  537. data/lib/gems/facets-2.4.5/lib/core/facets/kernel/ergo.rb +0 -42
  538. data/lib/gems/facets-2.4.5/lib/core/facets/kernel/here.rb +0 -12
  539. data/lib/gems/facets-2.4.5/lib/core/facets/kernel/in.rb +0 -13
  540. data/lib/gems/facets-2.4.5/lib/core/facets/kernel/instance.rb +0 -19
  541. data/lib/gems/facets-2.4.5/lib/core/facets/kernel/instance_assign.rb +0 -41
  542. data/lib/gems/facets-2.4.5/lib/core/facets/kernel/instance_class.rb +0 -24
  543. data/lib/gems/facets-2.4.5/lib/core/facets/kernel/instance_exec.rb +0 -40
  544. data/lib/gems/facets-2.4.5/lib/core/facets/kernel/instance_send.rb +0 -7
  545. data/lib/gems/facets-2.4.5/lib/core/facets/kernel/instance_variables.rb +0 -99
  546. data/lib/gems/facets-2.4.5/lib/core/facets/kernel/maybe.rb +0 -18
  547. data/lib/gems/facets-2.4.5/lib/core/facets/kernel/not_nil.rb +0 -17
  548. data/lib/gems/facets-2.4.5/lib/core/facets/kernel/object_class.rb +0 -10
  549. data/lib/gems/facets-2.4.5/lib/core/facets/kernel/object_hexid.rb +0 -12
  550. data/lib/gems/facets-2.4.5/lib/core/facets/kernel/object_send.rb +0 -32
  551. data/lib/gems/facets-2.4.5/lib/core/facets/kernel/p.rb +0 -24
  552. data/lib/gems/facets-2.4.5/lib/core/facets/kernel/populate.rb +0 -73
  553. data/lib/gems/facets-2.4.5/lib/core/facets/kernel/qua_class.rb +0 -19
  554. data/lib/gems/facets-2.4.5/lib/core/facets/kernel/require_all.rb +0 -21
  555. data/lib/gems/facets-2.4.5/lib/core/facets/kernel/require_local.rb +0 -24
  556. data/lib/gems/facets-2.4.5/lib/core/facets/kernel/resc.rb +0 -16
  557. data/lib/gems/facets-2.4.5/lib/core/facets/kernel/respond.rb +0 -23
  558. data/lib/gems/facets-2.4.5/lib/core/facets/kernel/returning.rb +0 -23
  559. data/lib/gems/facets-2.4.5/lib/core/facets/kernel/silence.rb +0 -75
  560. data/lib/gems/facets-2.4.5/lib/core/facets/kernel/singleton_class.rb +0 -19
  561. data/lib/gems/facets-2.4.5/lib/core/facets/kernel/tap.rb +0 -32
  562. data/lib/gems/facets-2.4.5/lib/core/facets/kernel/try.rb +0 -23
  563. data/lib/gems/facets-2.4.5/lib/core/facets/kernel/val.rb +0 -19
  564. data/lib/gems/facets-2.4.5/lib/core/facets/kernel/with.rb +0 -20
  565. data/lib/gems/facets-2.4.5/lib/core/facets/lazy.rb +0 -238
  566. data/lib/gems/facets-2.4.5/lib/core/facets/matchdata.rb +0 -6
  567. data/lib/gems/facets-2.4.5/lib/core/facets/matchdata/match.rb +0 -15
  568. data/lib/gems/facets-2.4.5/lib/core/facets/matchdata/matchset.rb +0 -44
  569. data/lib/gems/facets-2.4.5/lib/core/facets/metaid.rb +0 -94
  570. data/lib/gems/facets-2.4.5/lib/core/facets/module.rb +0 -6
  571. data/lib/gems/facets-2.4.5/lib/core/facets/module/abstract.rb +0 -21
  572. data/lib/gems/facets-2.4.5/lib/core/facets/module/alias_accessor.rb +0 -45
  573. data/lib/gems/facets-2.4.5/lib/core/facets/module/alias_method_chain.rb +0 -50
  574. data/lib/gems/facets-2.4.5/lib/core/facets/module/alias_module_function.rb +0 -30
  575. data/lib/gems/facets-2.4.5/lib/core/facets/module/ancestor.rb +0 -16
  576. data/lib/gems/facets-2.4.5/lib/core/facets/module/basename.rb +0 -31
  577. data/lib/gems/facets-2.4.5/lib/core/facets/module/can.rb +0 -14
  578. data/lib/gems/facets-2.4.5/lib/core/facets/module/class.rb +0 -12
  579. data/lib/gems/facets-2.4.5/lib/core/facets/module/conflict.rb +0 -63
  580. data/lib/gems/facets-2.4.5/lib/core/facets/module/include_function_module.rb +0 -25
  581. data/lib/gems/facets-2.4.5/lib/core/facets/module/instance_methods.rb +0 -40
  582. data/lib/gems/facets-2.4.5/lib/core/facets/module/integrate.rb +0 -2
  583. data/lib/gems/facets-2.4.5/lib/core/facets/module/is.rb +0 -57
  584. data/lib/gems/facets-2.4.5/lib/core/facets/module/methodize.rb +0 -14
  585. data/lib/gems/facets-2.4.5/lib/core/facets/module/modspace.rb +0 -22
  586. data/lib/gems/facets-2.4.5/lib/core/facets/module/module_load.rb +0 -56
  587. data/lib/gems/facets-2.4.5/lib/core/facets/module/nesting.rb +0 -18
  588. data/lib/gems/facets-2.4.5/lib/core/facets/module/op.rb +0 -95
  589. data/lib/gems/facets-2.4.5/lib/core/facets/module/pathize.rb +0 -22
  590. data/lib/gems/facets-2.4.5/lib/core/facets/module/prepend.rb +0 -26
  591. data/lib/gems/facets-2.4.5/lib/core/facets/module/redefine_method.rb +0 -35
  592. data/lib/gems/facets-2.4.5/lib/core/facets/module/redirect_method.rb +0 -45
  593. data/lib/gems/facets-2.4.5/lib/core/facets/module/rename_method.rb +0 -20
  594. data/lib/gems/facets-2.4.5/lib/core/facets/module/revise.rb +0 -62
  595. data/lib/gems/facets-2.4.5/lib/core/facets/module/spacename.rb +0 -25
  596. data/lib/gems/facets-2.4.5/lib/core/facets/module/wrap_method.rb +0 -28
  597. data/lib/gems/facets-2.4.5/lib/core/facets/nilclass.rb +0 -6
  598. data/lib/gems/facets-2.4.5/lib/core/facets/nilclass/ergo.rb +0 -1
  599. data/lib/gems/facets-2.4.5/lib/core/facets/nilclass/to_f.rb +0 -17
  600. data/lib/gems/facets-2.4.5/lib/core/facets/numeric.rb +0 -6
  601. data/lib/gems/facets-2.4.5/lib/core/facets/numeric/approx.rb +0 -15
  602. data/lib/gems/facets-2.4.5/lib/core/facets/numeric/distance.rb +0 -14
  603. data/lib/gems/facets-2.4.5/lib/core/facets/numeric/round.rb +0 -72
  604. data/lib/gems/facets-2.4.5/lib/core/facets/proc.rb +0 -6
  605. data/lib/gems/facets-2.4.5/lib/core/facets/proc/bind.rb +0 -22
  606. data/lib/gems/facets-2.4.5/lib/core/facets/proc/compose.rb +0 -42
  607. data/lib/gems/facets-2.4.5/lib/core/facets/proc/curry.rb +0 -31
  608. data/lib/gems/facets-2.4.5/lib/core/facets/proc/to_method.rb +0 -33
  609. data/lib/gems/facets-2.4.5/lib/core/facets/proc/update.rb +0 -9
  610. data/lib/gems/facets-2.4.5/lib/core/facets/range.rb +0 -6
  611. data/lib/gems/facets-2.4.5/lib/core/facets/range/combine.rb +0 -47
  612. data/lib/gems/facets-2.4.5/lib/core/facets/range/overlap.rb +0 -13
  613. data/lib/gems/facets-2.4.5/lib/core/facets/range/to_r.rb +0 -26
  614. data/lib/gems/facets-2.4.5/lib/core/facets/range/umbrella.rb +0 -1
  615. data/lib/gems/facets-2.4.5/lib/core/facets/range/within.rb +0 -66
  616. data/lib/gems/facets-2.4.5/lib/core/facets/regexp.rb +0 -6
  617. data/lib/gems/facets-2.4.5/lib/core/facets/regexp/arity.rb +0 -17
  618. data/lib/gems/facets-2.4.5/lib/core/facets/regexp/to_re.rb +0 -28
  619. data/lib/gems/facets-2.4.5/lib/core/facets/stackable.rb +0 -86
  620. data/lib/gems/facets-2.4.5/lib/core/facets/string.rb +0 -6
  621. data/lib/gems/facets-2.4.5/lib/core/facets/string/align.rb +0 -106
  622. data/lib/gems/facets-2.4.5/lib/core/facets/string/bracket.rb +0 -105
  623. data/lib/gems/facets-2.4.5/lib/core/facets/string/bytes.rb +0 -15
  624. data/lib/gems/facets-2.4.5/lib/core/facets/string/camelcase.rb +0 -26
  625. data/lib/gems/facets-2.4.5/lib/core/facets/string/capitalized.rb +0 -46
  626. data/lib/gems/facets-2.4.5/lib/core/facets/string/chars.rb +0 -16
  627. data/lib/gems/facets-2.4.5/lib/core/facets/string/chomp.rb +0 -33
  628. data/lib/gems/facets-2.4.5/lib/core/facets/string/cleave.rb +0 -36
  629. data/lib/gems/facets-2.4.5/lib/core/facets/string/divide.rb +0 -21
  630. data/lib/gems/facets-2.4.5/lib/core/facets/string/each_char.rb +0 -29
  631. data/lib/gems/facets-2.4.5/lib/core/facets/string/each_word.rb +0 -13
  632. data/lib/gems/facets-2.4.5/lib/core/facets/string/end_with.rb +0 -1
  633. data/lib/gems/facets-2.4.5/lib/core/facets/string/fold.rb +0 -39
  634. data/lib/gems/facets-2.4.5/lib/core/facets/string/interpolate.rb +0 -20
  635. data/lib/gems/facets-2.4.5/lib/core/facets/string/line_wrap.rb +0 -21
  636. data/lib/gems/facets-2.4.5/lib/core/facets/string/lines.rb +0 -16
  637. data/lib/gems/facets-2.4.5/lib/core/facets/string/methodize.rb +0 -17
  638. data/lib/gems/facets-2.4.5/lib/core/facets/string/modulize.rb +0 -21
  639. data/lib/gems/facets-2.4.5/lib/core/facets/string/mscan.rb +0 -19
  640. data/lib/gems/facets-2.4.5/lib/core/facets/string/natcmp.rb +0 -88
  641. data/lib/gems/facets-2.4.5/lib/core/facets/string/nchar.rb +0 -28
  642. data/lib/gems/facets-2.4.5/lib/core/facets/string/op_sub.rb +0 -14
  643. data/lib/gems/facets-2.4.5/lib/core/facets/string/pathize.rb +0 -16
  644. data/lib/gems/facets-2.4.5/lib/core/facets/string/range.rb +0 -77
  645. data/lib/gems/facets-2.4.5/lib/core/facets/string/rewrite.rb +0 -28
  646. data/lib/gems/facets-2.4.5/lib/core/facets/string/shatter.rb +0 -22
  647. data/lib/gems/facets-2.4.5/lib/core/facets/string/snakecase.rb +0 -21
  648. data/lib/gems/facets-2.4.5/lib/core/facets/string/splice.rb +0 -37
  649. data/lib/gems/facets-2.4.5/lib/core/facets/string/start_with.rb +0 -32
  650. data/lib/gems/facets-2.4.5/lib/core/facets/string/subtract.rb +0 -4
  651. data/lib/gems/facets-2.4.5/lib/core/facets/string/tab.rb +0 -103
  652. data/lib/gems/facets-2.4.5/lib/core/facets/string/titlecase.rb +0 -15
  653. data/lib/gems/facets-2.4.5/lib/core/facets/string/to_re.rb +0 -26
  654. data/lib/gems/facets-2.4.5/lib/core/facets/string/variablize.rb +0 -13
  655. data/lib/gems/facets-2.4.5/lib/core/facets/string/word_wrap.rb +0 -34
  656. data/lib/gems/facets-2.4.5/lib/core/facets/string/words.rb +0 -12
  657. data/lib/gems/facets-2.4.5/lib/core/facets/string/xor.rb +0 -22
  658. data/lib/gems/facets-2.4.5/lib/core/facets/symbol.rb +0 -6
  659. data/lib/gems/facets-2.4.5/lib/core/facets/symbol/chomp.rb +0 -24
  660. data/lib/gems/facets-2.4.5/lib/core/facets/symbol/generate.rb +0 -24
  661. data/lib/gems/facets-2.4.5/lib/core/facets/symbol/not.rb +0 -29
  662. data/lib/gems/facets-2.4.5/lib/core/facets/symbol/plain.rb +0 -17
  663. data/lib/gems/facets-2.4.5/lib/core/facets/symbol/query.rb +0 -1
  664. data/lib/gems/facets-2.4.5/lib/core/facets/symbol/re_s.rb +0 -18
  665. data/lib/gems/facets-2.4.5/lib/core/facets/symbol/setter.rb +0 -1
  666. data/lib/gems/facets-2.4.5/lib/core/facets/symbol/succ.rb +0 -19
  667. data/lib/gems/facets-2.4.5/lib/core/facets/symbol/to_proc.rb +0 -38
  668. data/lib/gems/facets-2.4.5/lib/core/facets/symbol/variablize.rb +0 -12
  669. data/lib/gems/facets-2.4.5/lib/core/facets/time.rb +0 -6
  670. data/lib/gems/facets-2.4.5/lib/core/facets/time/advance.rb +0 -17
  671. data/lib/gems/facets-2.4.5/lib/core/facets/time/ago.rb +0 -1
  672. data/lib/gems/facets-2.4.5/lib/core/facets/time/change.rb +0 -41
  673. data/lib/gems/facets-2.4.5/lib/core/facets/time/elapse.rb +0 -16
  674. data/lib/gems/facets-2.4.5/lib/core/facets/time/hence.rb +0 -94
  675. data/lib/gems/facets-2.4.5/lib/core/facets/time/round.rb +0 -17
  676. data/lib/gems/facets-2.4.5/lib/core/facets/time/set.rb +0 -21
  677. data/lib/gems/facets-2.4.5/lib/core/facets/time/stamp.rb +0 -44
  678. data/lib/gems/facets-2.4.5/lib/core/facets/time/to_time.rb +0 -21
  679. data/lib/gems/facets-2.4.5/lib/core/facets/time/trunc.rb +0 -15
  680. data/lib/gems/facets-2.4.5/lib/core/facets/to_hash.rb +0 -87
  681. data/lib/gems/facets-2.4.5/lib/core/facets/unboundmethod.rb +0 -6
  682. data/lib/gems/facets-2.4.5/lib/core/facets/unboundmethod/arguments.rb +0 -44
  683. data/lib/gems/facets-2.4.5/lib/core/facets/unboundmethod/name.rb +0 -25
  684. data/lib/gems/facets-2.4.5/lib/lore/facets/basicobject.rb +0 -14
  685. data/lib/gems/facets-2.4.5/lib/lore/facets/cgi.rb +0 -50
  686. data/lib/gems/facets-2.4.5/lib/lore/facets/continuation.rb +0 -57
  687. data/lib/gems/facets-2.4.5/lib/lore/facets/date.rb +0 -396
  688. data/lib/gems/facets-2.4.5/lib/lore/facets/fileutils.rb +0 -27
  689. data/lib/gems/facets-2.4.5/lib/lore/facets/fileutils/head.rb +0 -1
  690. data/lib/gems/facets-2.4.5/lib/lore/facets/fileutils/safe_ln.rb +0 -28
  691. data/lib/gems/facets-2.4.5/lib/lore/facets/fileutils/slice.rb +0 -141
  692. data/lib/gems/facets-2.4.5/lib/lore/facets/fileutils/tail.rb +0 -1
  693. data/lib/gems/facets-2.4.5/lib/lore/facets/fileutils/wc.rb +0 -114
  694. data/lib/gems/facets-2.4.5/lib/lore/facets/fileutils/whereis.rb +0 -64
  695. data/lib/gems/facets-2.4.5/lib/lore/facets/fileutils/which.rb +0 -101
  696. data/lib/gems/facets-2.4.5/lib/lore/facets/getoptlong.rb +0 -71
  697. data/lib/gems/facets-2.4.5/lib/lore/facets/logger.rb +0 -291
  698. data/lib/gems/facets-2.4.5/lib/lore/facets/ostruct.rb +0 -238
  699. data/lib/gems/facets-2.4.5/lib/lore/facets/pathname.rb +0 -172
  700. data/lib/gems/facets-2.4.5/lib/lore/facets/rbconfig.rb +0 -45
  701. data/lib/gems/facets-2.4.5/lib/lore/facets/set.rb +0 -27
  702. data/lib/gems/facets-2.4.5/lib/lore/facets/shellwords.rb +0 -89
  703. data/lib/gems/facets-2.4.5/lib/lore/facets/uri.rb +0 -249
  704. data/lib/gems/facets-2.4.5/lib/lore/facets/yaml.rb +0 -75
  705. data/lib/gems/facets-2.4.5/lib/lore/facets/zlib.rb +0 -38
  706. data/lib/gems/facets-2.4.5/lib/more/facets/1stclassmethod.rb +0 -140
  707. data/lib/gems/facets-2.4.5/lib/more/facets/advisable.rb +0 -162
  708. data/lib/gems/facets-2.4.5/lib/more/facets/annotations.rb +0 -302
  709. data/lib/gems/facets-2.4.5/lib/more/facets/ansicode.rb +0 -315
  710. data/lib/gems/facets-2.4.5/lib/more/facets/arguments.rb +0 -365
  711. data/lib/gems/facets-2.4.5/lib/more/facets/argvector.rb +0 -353
  712. data/lib/gems/facets-2.4.5/lib/more/facets/association.rb +0 -194
  713. data/lib/gems/facets-2.4.5/lib/more/facets/attr.rb +0 -208
  714. data/lib/gems/facets-2.4.5/lib/more/facets/autoarray.rb +0 -62
  715. data/lib/gems/facets-2.4.5/lib/more/facets/autoreload.rb +0 -150
  716. data/lib/gems/facets-2.4.5/lib/more/facets/basex.rb +0 -37
  717. data/lib/gems/facets-2.4.5/lib/more/facets/bbcode.rb +0 -397
  718. data/lib/gems/facets-2.4.5/lib/more/facets/bicrypt.rb +0 -265
  719. data/lib/gems/facets-2.4.5/lib/more/facets/binding/opvars.rb +0 -24
  720. data/lib/gems/facets-2.4.5/lib/more/facets/binreadable.rb +0 -221
  721. data/lib/gems/facets-2.4.5/lib/more/facets/blankslate.rb +0 -66
  722. data/lib/gems/facets-2.4.5/lib/more/facets/buildable.rb +0 -344
  723. data/lib/gems/facets-2.4.5/lib/more/facets/bytes.rb +0 -175
  724. data/lib/gems/facets-2.4.5/lib/more/facets/cachedecorator.rb +0 -117
  725. data/lib/gems/facets-2.4.5/lib/more/facets/capsule.rb +0 -258
  726. data/lib/gems/facets-2.4.5/lib/more/facets/chain.rb +0 -58
  727. data/lib/gems/facets-2.4.5/lib/more/facets/class_extension.rb +0 -114
  728. data/lib/gems/facets-2.4.5/lib/more/facets/classmethods.rb +0 -199
  729. data/lib/gems/facets-2.4.5/lib/more/facets/cloneable.rb +0 -76
  730. data/lib/gems/facets-2.4.5/lib/more/facets/command.rb +0 -439
  731. data/lib/gems/facets-2.4.5/lib/more/facets/consoleutils.rb +0 -113
  732. data/lib/gems/facets-2.4.5/lib/more/facets/coroutine.rb +0 -159
  733. data/lib/gems/facets-2.4.5/lib/more/facets/crypt.rb +0 -166
  734. data/lib/gems/facets-2.4.5/lib/more/facets/cssfilter.rb +0 -254
  735. data/lib/gems/facets-2.4.5/lib/more/facets/daemonize.rb +0 -44
  736. data/lib/gems/facets-2.4.5/lib/more/facets/dependency.rb +0 -151
  737. data/lib/gems/facets-2.4.5/lib/more/facets/dictionary.rb +0 -478
  738. data/lib/gems/facets-2.4.5/lib/more/facets/dictionarymatcher.rb +0 -136
  739. data/lib/gems/facets-2.4.5/lib/more/facets/downloader.rb +0 -281
  740. data/lib/gems/facets-2.4.5/lib/more/facets/duplicable.rb +0 -43
  741. data/lib/gems/facets-2.4.5/lib/more/facets/duration.rb +0 -540
  742. data/lib/gems/facets-2.4.5/lib/more/facets/elementor.rb +0 -133
  743. data/lib/gems/facets-2.4.5/lib/more/facets/elementwise.rb +0 -61
  744. data/lib/gems/facets-2.4.5/lib/more/facets/enumerablepass.rb +0 -217
  745. data/lib/gems/facets-2.4.5/lib/more/facets/equatable.rb +0 -120
  746. data/lib/gems/facets-2.4.5/lib/more/facets/eventhook.rb +0 -132
  747. data/lib/gems/facets-2.4.5/lib/more/facets/expirable.rb +0 -82
  748. data/lib/gems/facets-2.4.5/lib/more/facets/fileable.rb +0 -162
  749. data/lib/gems/facets-2.4.5/lib/more/facets/filelist.rb +0 -497
  750. data/lib/gems/facets-2.4.5/lib/more/facets/fileshell.rb +0 -202
  751. data/lib/gems/facets-2.4.5/lib/more/facets/hash/stringify_keys.rb +0 -1
  752. data/lib/gems/facets-2.4.5/lib/more/facets/hash/symbolize_keys.rb +0 -94
  753. data/lib/gems/facets-2.4.5/lib/more/facets/heap.rb +0 -22
  754. data/lib/gems/facets-2.4.5/lib/more/facets/htmlfilter.rb +0 -595
  755. data/lib/gems/facets-2.4.5/lib/more/facets/infinity.rb +0 -193
  756. data/lib/gems/facets-2.4.5/lib/more/facets/inheritor.rb +0 -130
  757. data/lib/gems/facets-2.4.5/lib/more/facets/ini.rb +0 -264
  758. data/lib/gems/facets-2.4.5/lib/more/facets/instantiable.rb +0 -47
  759. data/lib/gems/facets-2.4.5/lib/more/facets/instantise.rb +0 -1
  760. data/lib/gems/facets-2.4.5/lib/more/facets/instantize.rb +0 -95
  761. data/lib/gems/facets-2.4.5/lib/more/facets/interval.rb +0 -282
  762. data/lib/gems/facets-2.4.5/lib/more/facets/ioredirect.rb +0 -130
  763. data/lib/gems/facets-2.4.5/lib/more/facets/iteration.rb +0 -65
  764. data/lib/gems/facets-2.4.5/lib/more/facets/kernel/meta.rb +0 -32
  765. data/lib/gems/facets-2.4.5/lib/more/facets/linkedlist.rb +0 -222
  766. data/lib/gems/facets-2.4.5/lib/more/facets/lrucache.rb +0 -157
  767. data/lib/gems/facets-2.4.5/lib/more/facets/main.rb +0 -70
  768. data/lib/gems/facets-2.4.5/lib/more/facets/memoize.rb +0 -116
  769. data/lib/gems/facets-2.4.5/lib/more/facets/methodspace.rb +0 -141
  770. data/lib/gems/facets-2.4.5/lib/more/facets/minitar.rb +0 -1063
  771. data/lib/gems/facets-2.4.5/lib/more/facets/multipliers.rb +0 -109
  772. data/lib/gems/facets-2.4.5/lib/more/facets/multiton.rb +0 -386
  773. data/lib/gems/facets-2.4.5/lib/more/facets/nackclass.rb +0 -41
  774. data/lib/gems/facets-2.4.5/lib/more/facets/net/smtp_tls.rb +0 -131
  775. data/lib/gems/facets-2.4.5/lib/more/facets/nilstatus.rb +0 -47
  776. data/lib/gems/facets-2.4.5/lib/more/facets/nullclass.rb +0 -74
  777. data/lib/gems/facets-2.4.5/lib/more/facets/opencascade.rb +0 -94
  778. data/lib/gems/facets-2.4.5/lib/more/facets/opencollection.rb +0 -43
  779. data/lib/gems/facets-2.4.5/lib/more/facets/openhash.rb +0 -39
  780. data/lib/gems/facets-2.4.5/lib/more/facets/openobject.rb +0 -267
  781. data/lib/gems/facets-2.4.5/lib/more/facets/opesc.rb +0 -60
  782. data/lib/gems/facets-2.4.5/lib/more/facets/orderedhash.rb +0 -37
  783. data/lib/gems/facets-2.4.5/lib/more/facets/overload.rb +0 -94
  784. data/lib/gems/facets-2.4.5/lib/more/facets/paramix.rb +0 -202
  785. data/lib/gems/facets-2.4.5/lib/more/facets/partial.rb +0 -37
  786. data/lib/gems/facets-2.4.5/lib/more/facets/pathlist.rb +0 -112
  787. data/lib/gems/facets-2.4.5/lib/more/facets/platform.rb +0 -192
  788. data/lib/gems/facets-2.4.5/lib/more/facets/pool.rb +0 -91
  789. data/lib/gems/facets-2.4.5/lib/more/facets/pqueue.rb +0 -449
  790. data/lib/gems/facets-2.4.5/lib/more/facets/progressbar.rb +0 -253
  791. data/lib/gems/facets-2.4.5/lib/more/facets/prototype.rb +0 -88
  792. data/lib/gems/facets-2.4.5/lib/more/facets/random.rb +0 -451
  793. data/lib/gems/facets-2.4.5/lib/more/facets/rbsystem.rb +0 -222
  794. data/lib/gems/facets-2.4.5/lib/more/facets/recorder.rb +0 -109
  795. data/lib/gems/facets-2.4.5/lib/more/facets/reference.rb +0 -99
  796. data/lib/gems/facets-2.4.5/lib/more/facets/reflection.rb +0 -145
  797. data/lib/gems/facets-2.4.5/lib/more/facets/registerable.rb +0 -35
  798. data/lib/gems/facets-2.4.5/lib/more/facets/rwdelegator.rb +0 -74
  799. data/lib/gems/facets-2.4.5/lib/more/facets/semaphore.rb +0 -92
  800. data/lib/gems/facets-2.4.5/lib/more/facets/settings.rb +0 -248
  801. data/lib/gems/facets-2.4.5/lib/more/facets/snapshot.rb +0 -209
  802. data/lib/gems/facets-2.4.5/lib/more/facets/string/mask.rb +0 -278
  803. data/lib/gems/facets-2.4.5/lib/more/facets/string/words.rb +0 -173
  804. data/lib/gems/facets-2.4.5/lib/more/facets/succ.rb +0 -44
  805. data/lib/gems/facets-2.4.5/lib/more/facets/syncarray.rb +0 -114
  806. data/lib/gems/facets-2.4.5/lib/more/facets/synchash.rb +0 -157
  807. data/lib/gems/facets-2.4.5/lib/more/facets/tagiter.rb +0 -366
  808. data/lib/gems/facets-2.4.5/lib/more/facets/thread.rb +0 -51
  809. data/lib/gems/facets-2.4.5/lib/more/facets/timer.rb +0 -274
  810. data/lib/gems/facets-2.4.5/lib/more/facets/times.rb +0 -431
  811. data/lib/gems/facets-2.4.5/lib/more/facets/tracepoint.rb +0 -209
  812. data/lib/gems/facets-2.4.5/lib/more/facets/tuple.rb +0 -325
  813. data/lib/gems/facets-2.4.5/lib/more/facets/typecast.rb +0 -261
  814. data/lib/gems/facets-2.4.5/lib/more/facets/uninheritable.rb +0 -50
  815. data/lib/gems/facets-2.4.5/lib/more/facets/uploadutils.rb +0 -464
  816. data/lib/gems/facets-2.4.5/lib/more/facets/version.rb +0 -136
  817. data/lib/gems/facets-2.4.5/lib/more/facets/xmlhash.rb +0 -112
  818. data/lib/gems/facets-2.4.5/lib/more/facets/xoxo.rb +0 -259
  819. data/lib/gems/facets-2.4.5/lib/more/facets/ziputils.rb +0 -349
  820. data/lib/mack-facets/utils/blank_slate.rb +0 -3
@@ -0,0 +1,33 @@
1
+ # encoding: utf-8
2
+
3
+ require 'active_support/multibyte/chars'
4
+ require 'active_support/multibyte/exceptions'
5
+ require 'active_support/multibyte/unicode_database'
6
+
7
+ module ActiveSupport #:nodoc:
8
+ module Multibyte
9
+ # A list of all available normalization forms. See http://www.unicode.org/reports/tr15/tr15-29.html for more
10
+ # information about normalization.
11
+ NORMALIZATION_FORMS = [:c, :kc, :d, :kd]
12
+
13
+ # The Unicode version that is supported by the implementation
14
+ UNICODE_VERSION = '5.1.0'
15
+
16
+ # The default normalization used for operations that require normalization. It can be set to any of the
17
+ # normalizations in NORMALIZATION_FORMS.
18
+ #
19
+ # Example:
20
+ # ActiveSupport::Multibyte.default_normalization_form = :c
21
+ mattr_accessor :default_normalization_form
22
+ self.default_normalization_form = :kc
23
+
24
+ # The proxy class returned when calling mb_chars. You can use this accessor to configure your own proxy
25
+ # class so you can support other encodings. See the ActiveSupport::Multibyte::Chars implementation for
26
+ # an example how to do this.
27
+ #
28
+ # Example:
29
+ # ActiveSupport::Multibyte.proxy_class = CharsForUTF32
30
+ mattr_accessor :proxy_class
31
+ self.proxy_class = ActiveSupport::Multibyte::Chars
32
+ end
33
+ end
@@ -0,0 +1,679 @@
1
+ # encoding: utf-8
2
+
3
+ module ActiveSupport #:nodoc:
4
+ module Multibyte #:nodoc:
5
+ # Chars enables you to work transparently with UTF-8 encoding in the Ruby String class without having extensive
6
+ # knowledge about the encoding. A Chars object accepts a string upon initialization and proxies String methods in an
7
+ # encoding safe manner. All the normal String methods are also implemented on the proxy.
8
+ #
9
+ # String methods are proxied through the Chars object, and can be accessed through the +mb_chars+ method. Methods
10
+ # which would normally return a String object now return a Chars object so methods can be chained.
11
+ #
12
+ # "The Perfect String ".mb_chars.downcase.strip.normalize #=> "the perfect string"
13
+ #
14
+ # Chars objects are perfectly interchangeable with String objects as long as no explicit class checks are made.
15
+ # If certain methods do explicitly check the class, call +to_s+ before you pass chars objects to them.
16
+ #
17
+ # bad.explicit_checking_method "T".mb_chars.downcase.to_s
18
+ #
19
+ # The default Chars implementation assumes that the encoding of the string is UTF-8, if you want to handle different
20
+ # encodings you can write your own multibyte string handler and configure it through
21
+ # ActiveSupport::Multibyte.proxy_class.
22
+ #
23
+ # class CharsForUTF32
24
+ # def size
25
+ # @wrapped_string.size / 4
26
+ # end
27
+ #
28
+ # def self.accepts?(string)
29
+ # string.length % 4 == 0
30
+ # end
31
+ # end
32
+ #
33
+ # ActiveSupport::Multibyte.proxy_class = CharsForUTF32
34
+ class Chars
35
+ # Hangul character boundaries and properties
36
+ HANGUL_SBASE = 0xAC00
37
+ HANGUL_LBASE = 0x1100
38
+ HANGUL_VBASE = 0x1161
39
+ HANGUL_TBASE = 0x11A7
40
+ HANGUL_LCOUNT = 19
41
+ HANGUL_VCOUNT = 21
42
+ HANGUL_TCOUNT = 28
43
+ HANGUL_NCOUNT = HANGUL_VCOUNT * HANGUL_TCOUNT
44
+ HANGUL_SCOUNT = 11172
45
+ HANGUL_SLAST = HANGUL_SBASE + HANGUL_SCOUNT
46
+ HANGUL_JAMO_FIRST = 0x1100
47
+ HANGUL_JAMO_LAST = 0x11FF
48
+
49
+ # All the unicode whitespace
50
+ UNICODE_WHITESPACE = [
51
+ (0x0009..0x000D).to_a, # White_Space # Cc [5] <control-0009>..<control-000D>
52
+ 0x0020, # White_Space # Zs SPACE
53
+ 0x0085, # White_Space # Cc <control-0085>
54
+ 0x00A0, # White_Space # Zs NO-BREAK SPACE
55
+ 0x1680, # White_Space # Zs OGHAM SPACE MARK
56
+ 0x180E, # White_Space # Zs MONGOLIAN VOWEL SEPARATOR
57
+ (0x2000..0x200A).to_a, # White_Space # Zs [11] EN QUAD..HAIR SPACE
58
+ 0x2028, # White_Space # Zl LINE SEPARATOR
59
+ 0x2029, # White_Space # Zp PARAGRAPH SEPARATOR
60
+ 0x202F, # White_Space # Zs NARROW NO-BREAK SPACE
61
+ 0x205F, # White_Space # Zs MEDIUM MATHEMATICAL SPACE
62
+ 0x3000, # White_Space # Zs IDEOGRAPHIC SPACE
63
+ ].flatten.freeze
64
+
65
+ # BOM (byte order mark) can also be seen as whitespace, it's a non-rendering character used to distinguish
66
+ # between little and big endian. This is not an issue in utf-8, so it must be ignored.
67
+ UNICODE_LEADERS_AND_TRAILERS = UNICODE_WHITESPACE + [65279] # ZERO-WIDTH NO-BREAK SPACE aka BOM
68
+
69
+ # Returns a regular expression pattern that matches the passed Unicode codepoints
70
+ def self.codepoints_to_pattern(array_of_codepoints) #:nodoc:
71
+ array_of_codepoints.collect{ |e| [e].pack 'U*' }.join('|')
72
+ end
73
+ UNICODE_TRAILERS_PAT = /(#{codepoints_to_pattern(UNICODE_LEADERS_AND_TRAILERS)})+\Z/
74
+ UNICODE_LEADERS_PAT = /\A(#{codepoints_to_pattern(UNICODE_LEADERS_AND_TRAILERS)})+/
75
+
76
+ # Borrowed from the Kconv library by Shinji KONO - (also as seen on the W3C site)
77
+ UTF8_PAT = /\A(?:
78
+ [\x00-\x7f] |
79
+ [\xc2-\xdf] [\x80-\xbf] |
80
+ \xe0 [\xa0-\xbf] [\x80-\xbf] |
81
+ [\xe1-\xef] [\x80-\xbf] [\x80-\xbf] |
82
+ \xf0 [\x90-\xbf] [\x80-\xbf] [\x80-\xbf] |
83
+ [\xf1-\xf3] [\x80-\xbf] [\x80-\xbf] [\x80-\xbf] |
84
+ \xf4 [\x80-\x8f] [\x80-\xbf] [\x80-\xbf]
85
+ )*\z/xn
86
+
87
+ attr_reader :wrapped_string
88
+ alias to_s wrapped_string
89
+ alias to_str wrapped_string
90
+
91
+ if '1.9'.respond_to?(:force_encoding)
92
+ # Creates a new Chars instance by wrapping _string_.
93
+ def initialize(string)
94
+ @wrapped_string = string
95
+ @wrapped_string.force_encoding(Encoding::UTF_8) unless @wrapped_string.frozen?
96
+ end
97
+ else
98
+ def initialize(string) #:nodoc:
99
+ @wrapped_string = string
100
+ end
101
+ end
102
+
103
+ # Forward all undefined methods to the wrapped string.
104
+ def method_missing(method, *args, &block)
105
+ if method.to_s =~ /!$/
106
+ @wrapped_string.__send__(method, *args, &block)
107
+ self
108
+ else
109
+ result = @wrapped_string.__send__(method, *args, &block)
110
+ result.kind_of?(String) ? chars(result) : result
111
+ end
112
+ end
113
+
114
+ # Returns +true+ if _obj_ responds to the given method. Private methods are included in the search
115
+ # only if the optional second parameter evaluates to +true+.
116
+ def respond_to?(method, include_private=false)
117
+ super || @wrapped_string.respond_to?(method, include_private) || false
118
+ end
119
+
120
+ # Enable more predictable duck-typing on String-like classes. See Object#acts_like?.
121
+ def acts_like_string?
122
+ true
123
+ end
124
+
125
+ # Returns +true+ if the Chars class can and should act as a proxy for the string _string_. Returns
126
+ # +false+ otherwise.
127
+ def self.wants?(string)
128
+ $KCODE == 'UTF8' && consumes?(string)
129
+ end
130
+
131
+ # Returns +true+ when the proxy class can handle the string. Returns +false+ otherwise.
132
+ def self.consumes?(string)
133
+ # Unpack is a little bit faster than regular expressions.
134
+ string.unpack('U*')
135
+ true
136
+ rescue ArgumentError
137
+ false
138
+ end
139
+
140
+ include Comparable
141
+
142
+ # Returns <tt>-1</tt>, <tt>0</tt> or <tt>+1</tt> depending on whether the Chars object is to be sorted before,
143
+ # equal or after the object on the right side of the operation. It accepts any object that implements +to_s+.
144
+ # See <tt>String#<=></tt> for more details.
145
+ #
146
+ # Example:
147
+ # 'é'.mb_chars <=> 'ü'.mb_chars #=> -1
148
+ def <=>(other)
149
+ @wrapped_string <=> other.to_s
150
+ end
151
+
152
+ # Returns a new Chars object containing the _other_ object concatenated to the string.
153
+ #
154
+ # Example:
155
+ # ('Café'.mb_chars + ' périferôl').to_s #=> "Café périferôl"
156
+ def +(other)
157
+ self << other
158
+ end
159
+
160
+ # Like <tt>String#=~</tt> only it returns the character offset (in codepoints) instead of the byte offset.
161
+ #
162
+ # Example:
163
+ # 'Café périferôl'.mb_chars =~ /ô/ #=> 12
164
+ def =~(other)
165
+ translate_offset(@wrapped_string =~ other)
166
+ end
167
+
168
+ # Works just like <tt>String#split</tt>, with the exception that the items in the resulting list are Chars
169
+ # instances instead of String. This makes chaining methods easier.
170
+ #
171
+ # Example:
172
+ # 'Café périferôl'.mb_chars.split(/é/).map { |part| part.upcase.to_s } #=> ["CAF", " P", "RIFERÔL"]
173
+ def split(*args)
174
+ @wrapped_string.split(*args).map { |i| i.mb_chars }
175
+ end
176
+
177
+ # Inserts the passed string at specified codepoint offsets.
178
+ #
179
+ # Example:
180
+ # 'Café'.mb_chars.insert(4, ' périferôl').to_s #=> "Café périferôl"
181
+ def insert(offset, fragment)
182
+ unpacked = self.class.u_unpack(@wrapped_string)
183
+ unless offset > unpacked.length
184
+ @wrapped_string.replace(
185
+ self.class.u_unpack(@wrapped_string).insert(offset, *self.class.u_unpack(fragment)).pack('U*')
186
+ )
187
+ else
188
+ raise IndexError, "index #{offset} out of string"
189
+ end
190
+ self
191
+ end
192
+
193
+ # Returns +true+ if contained string contains _other_. Returns +false+ otherwise.
194
+ #
195
+ # Example:
196
+ # 'Café'.mb_chars.include?('é') #=> true
197
+ def include?(other)
198
+ # We have to redefine this method because Enumerable defines it.
199
+ @wrapped_string.include?(other)
200
+ end
201
+
202
+ # Returns the position _needle_ in the string, counting in codepoints. Returns +nil+ if _needle_ isn't found.
203
+ #
204
+ # Example:
205
+ # 'Café périferôl'.mb_chars.index('ô') #=> 12
206
+ # 'Café périferôl'.mb_chars.index(/\w/u) #=> 0
207
+ def index(needle, offset=0)
208
+ index = @wrapped_string.index(needle, offset)
209
+ index ? (self.class.u_unpack(@wrapped_string.slice(0...index)).size) : nil
210
+ end
211
+
212
+ # Like <tt>String#[]=</tt>, except instead of byte offsets you specify character offsets.
213
+ #
214
+ # Example:
215
+ #
216
+ # s = "Müller"
217
+ # s.mb_chars[2] = "e" # Replace character with offset 2
218
+ # s
219
+ # #=> "Müeler"
220
+ #
221
+ # s = "Müller"
222
+ # s.mb_chars[1, 2] = "ö" # Replace 2 characters at character offset 1
223
+ # s
224
+ # #=> "Möler"
225
+ def []=(*args)
226
+ replace_by = args.pop
227
+ # Indexed replace with regular expressions already works
228
+ if args.first.is_a?(Regexp)
229
+ @wrapped_string[*args] = replace_by
230
+ else
231
+ result = self.class.u_unpack(@wrapped_string)
232
+ if args[0].is_a?(Fixnum)
233
+ raise IndexError, "index #{args[0]} out of string" if args[0] >= result.length
234
+ min = args[0]
235
+ max = args[1].nil? ? min : (min + args[1] - 1)
236
+ range = Range.new(min, max)
237
+ replace_by = [replace_by].pack('U') if replace_by.is_a?(Fixnum)
238
+ elsif args.first.is_a?(Range)
239
+ raise RangeError, "#{args[0]} out of range" if args[0].min >= result.length
240
+ range = args[0]
241
+ else
242
+ needle = args[0].to_s
243
+ min = index(needle)
244
+ max = min + self.class.u_unpack(needle).length - 1
245
+ range = Range.new(min, max)
246
+ end
247
+ result[range] = self.class.u_unpack(replace_by)
248
+ @wrapped_string.replace(result.pack('U*'))
249
+ end
250
+ end
251
+
252
+ # Works just like <tt>String#rjust</tt>, only integer specifies characters instead of bytes.
253
+ #
254
+ # Example:
255
+ #
256
+ # "¾ cup".mb_chars.rjust(8).to_s
257
+ # #=> " ¾ cup"
258
+ #
259
+ # "¾ cup".mb_chars.rjust(8, " ").to_s # Use non-breaking whitespace
260
+ # #=> "   ¾ cup"
261
+ def rjust(integer, padstr=' ')
262
+ justify(integer, :right, padstr)
263
+ end
264
+
265
+ # Works just like <tt>String#ljust</tt>, only integer specifies characters instead of bytes.
266
+ #
267
+ # Example:
268
+ #
269
+ # "¾ cup".mb_chars.rjust(8).to_s
270
+ # #=> "¾ cup "
271
+ #
272
+ # "¾ cup".mb_chars.rjust(8, " ").to_s # Use non-breaking whitespace
273
+ # #=> "¾ cup   "
274
+ def ljust(integer, padstr=' ')
275
+ justify(integer, :left, padstr)
276
+ end
277
+
278
+ # Works just like <tt>String#center</tt>, only integer specifies characters instead of bytes.
279
+ #
280
+ # Example:
281
+ #
282
+ # "¾ cup".mb_chars.center(8).to_s
283
+ # #=> " ¾ cup "
284
+ #
285
+ # "¾ cup".mb_chars.center(8, " ").to_s # Use non-breaking whitespace
286
+ # #=> " ¾ cup  "
287
+ def center(integer, padstr=' ')
288
+ justify(integer, :center, padstr)
289
+ end
290
+
291
+ # Strips entire range of Unicode whitespace from the right of the string.
292
+ def rstrip
293
+ chars(@wrapped_string.gsub(UNICODE_TRAILERS_PAT, ''))
294
+ end
295
+
296
+ # Strips entire range of Unicode whitespace from the left of the string.
297
+ def lstrip
298
+ chars(@wrapped_string.gsub(UNICODE_LEADERS_PAT, ''))
299
+ end
300
+
301
+ # Strips entire range of Unicode whitespace from the right and left of the string.
302
+ def strip
303
+ rstrip.lstrip
304
+ end
305
+
306
+ # Returns the number of codepoints in the string
307
+ def size
308
+ self.class.u_unpack(@wrapped_string).size
309
+ end
310
+ alias_method :length, :size
311
+
312
+ # Reverses all characters in the string.
313
+ #
314
+ # Example:
315
+ # 'Café'.mb_chars.reverse.to_s #=> 'éfaC'
316
+ def reverse
317
+ chars(self.class.u_unpack(@wrapped_string).reverse.pack('U*'))
318
+ end
319
+
320
+ # Implements Unicode-aware slice with codepoints. Slicing on one point returns the codepoints for that
321
+ # character.
322
+ #
323
+ # Example:
324
+ # 'こんにちは'.mb_chars.slice(2..3).to_s #=> "にち"
325
+ def slice(*args)
326
+ if args.size > 2
327
+ raise ArgumentError, "wrong number of arguments (#{args.size} for 1)" # Do as if we were native
328
+ elsif (args.size == 2 && !(args.first.is_a?(Numeric) || args.first.is_a?(Regexp)))
329
+ raise TypeError, "cannot convert #{args.first.class} into Integer" # Do as if we were native
330
+ elsif (args.size == 2 && !args[1].is_a?(Numeric))
331
+ raise TypeError, "cannot convert #{args[1].class} into Integer" # Do as if we were native
332
+ elsif args[0].kind_of? Range
333
+ cps = self.class.u_unpack(@wrapped_string).slice(*args)
334
+ result = cps.nil? ? nil : cps.pack('U*')
335
+ elsif args[0].kind_of? Regexp
336
+ result = @wrapped_string.slice(*args)
337
+ elsif args.size == 1 && args[0].kind_of?(Numeric)
338
+ character = self.class.u_unpack(@wrapped_string)[args[0]]
339
+ result = character.nil? ? nil : [character].pack('U')
340
+ else
341
+ result = self.class.u_unpack(@wrapped_string).slice(*args).pack('U*')
342
+ end
343
+ result.nil? ? nil : chars(result)
344
+ end
345
+ alias_method :[], :slice
346
+
347
+ # Convert characters in the string to uppercase.
348
+ #
349
+ # Example:
350
+ # 'Laurent, òu sont les tests?'.mb_chars.upcase.to_s #=> "LAURENT, ÒU SONT LES TESTS?"
351
+ def upcase
352
+ apply_mapping :uppercase_mapping
353
+ end
354
+
355
+ # Convert characters in the string to lowercase.
356
+ #
357
+ # Example:
358
+ # 'VĚDA A VÝZKUM'.mb_chars.downcase.to_s #=> "věda a výzkum"
359
+ def downcase
360
+ apply_mapping :lowercase_mapping
361
+ end
362
+
363
+ # Converts the first character to uppercase and the remainder to lowercase.
364
+ #
365
+ # Example:
366
+ # 'über'.mb_chars.capitalize.to_s #=> "Über"
367
+ def capitalize
368
+ (slice(0) || chars('')).upcase + (slice(1..-1) || chars('')).downcase
369
+ end
370
+
371
+ # Returns the KC normalization of the string by default. NFKC is considered the best normalization form for
372
+ # passing strings to databases and validations.
373
+ #
374
+ # * <tt>str</tt> - The string to perform normalization on.
375
+ # * <tt>form</tt> - The form you want to normalize in. Should be one of the following:
376
+ # <tt>:c</tt>, <tt>:kc</tt>, <tt>:d</tt>, or <tt>:kd</tt>. Default is
377
+ # ActiveSupport::Multibyte.default_normalization_form
378
+ def normalize(form=ActiveSupport::Multibyte.default_normalization_form)
379
+ # See http://www.unicode.org/reports/tr15, Table 1
380
+ codepoints = self.class.u_unpack(@wrapped_string)
381
+ chars(case form
382
+ when :d
383
+ self.class.reorder_characters(self.class.decompose_codepoints(:canonical, codepoints))
384
+ when :c
385
+ self.class.compose_codepoints(self.class.reorder_characters(self.class.decompose_codepoints(:canonical, codepoints)))
386
+ when :kd
387
+ self.class.reorder_characters(self.class.decompose_codepoints(:compatability, codepoints))
388
+ when :kc
389
+ self.class.compose_codepoints(self.class.reorder_characters(self.class.decompose_codepoints(:compatability, codepoints)))
390
+ else
391
+ raise ArgumentError, "#{form} is not a valid normalization variant", caller
392
+ end.pack('U*'))
393
+ end
394
+
395
+ # Performs canonical decomposition on all the characters.
396
+ #
397
+ # Example:
398
+ # 'é'.length #=> 2
399
+ # 'é'.mb_chars.decompose.to_s.length #=> 3
400
+ def decompose
401
+ chars(self.class.decompose_codepoints(:canonical, self.class.u_unpack(@wrapped_string)).pack('U*'))
402
+ end
403
+
404
+ # Performs composition on all the characters.
405
+ #
406
+ # Example:
407
+ # 'é'.length #=> 3
408
+ # 'é'.mb_chars.compose.to_s.length #=> 2
409
+ def compose
410
+ chars(self.class.compose_codepoints(self.class.u_unpack(@wrapped_string)).pack('U*'))
411
+ end
412
+
413
+ # Returns the number of grapheme clusters in the string.
414
+ #
415
+ # Example:
416
+ # 'क्षि'.mb_chars.length #=> 4
417
+ # 'क्षि'.mb_chars.g_length #=> 3
418
+ def g_length
419
+ self.class.g_unpack(@wrapped_string).length
420
+ end
421
+
422
+ # Replaces all ISO-8859-1 or CP1252 characters by their UTF-8 equivalent resulting in a valid UTF-8 string.
423
+ def tidy_bytes
424
+ chars(self.class.tidy_bytes(@wrapped_string))
425
+ end
426
+
427
+ %w(lstrip rstrip strip reverse upcase downcase slice tidy_bytes capitalize).each do |method|
428
+ define_method("#{method}!") do |*args|
429
+ unless args.nil?
430
+ @wrapped_string = send(method, *args).to_s
431
+ else
432
+ @wrapped_string = send(method).to_s
433
+ end
434
+ self
435
+ end
436
+ end
437
+
438
+ class << self
439
+
440
+ # Unpack the string at codepoints boundaries. Raises an EncodingError when the encoding of the string isn't
441
+ # valid UTF-8.
442
+ #
443
+ # Example:
444
+ # Chars.u_unpack('Café') #=> [67, 97, 102, 233]
445
+ def u_unpack(string)
446
+ begin
447
+ string.unpack 'U*'
448
+ rescue ArgumentError
449
+ raise EncodingError, 'malformed UTF-8 character'
450
+ end
451
+ end
452
+
453
+ # Detect whether the codepoint is in a certain character class. Returns +true+ when it's in the specified
454
+ # character class and +false+ otherwise. Valid character classes are: <tt>:cr</tt>, <tt>:lf</tt>, <tt>:l</tt>,
455
+ # <tt>:v</tt>, <tt>:lv</tt>, <tt>:lvt</tt> and <tt>:t</tt>.
456
+ #
457
+ # Primarily used by the grapheme cluster support.
458
+ def in_char_class?(codepoint, classes)
459
+ classes.detect { |c| UCD.boundary[c] === codepoint } ? true : false
460
+ end
461
+
462
+ # Unpack the string at grapheme boundaries. Returns a list of character lists.
463
+ #
464
+ # Example:
465
+ # Chars.g_unpack('क्षि') #=> [[2325, 2381], [2359], [2367]]
466
+ # Chars.g_unpack('Café') #=> [[67], [97], [102], [233]]
467
+ def g_unpack(string)
468
+ codepoints = u_unpack(string)
469
+ unpacked = []
470
+ pos = 0
471
+ marker = 0
472
+ eoc = codepoints.length
473
+ while(pos < eoc)
474
+ pos += 1
475
+ previous = codepoints[pos-1]
476
+ current = codepoints[pos]
477
+ if (
478
+ # CR X LF
479
+ one = ( previous == UCD.boundary[:cr] and current == UCD.boundary[:lf] ) or
480
+ # L X (L|V|LV|LVT)
481
+ two = ( UCD.boundary[:l] === previous and in_char_class?(current, [:l,:v,:lv,:lvt]) ) or
482
+ # (LV|V) X (V|T)
483
+ three = ( in_char_class?(previous, [:lv,:v]) and in_char_class?(current, [:v,:t]) ) or
484
+ # (LVT|T) X (T)
485
+ four = ( in_char_class?(previous, [:lvt,:t]) and UCD.boundary[:t] === current ) or
486
+ # X Extend
487
+ five = (UCD.boundary[:extend] === current)
488
+ )
489
+ else
490
+ unpacked << codepoints[marker..pos-1]
491
+ marker = pos
492
+ end
493
+ end
494
+ unpacked
495
+ end
496
+
497
+ # Reverse operation of g_unpack.
498
+ #
499
+ # Example:
500
+ # Chars.g_pack(Chars.g_unpack('क्षि')) #=> 'क्षि'
501
+ def g_pack(unpacked)
502
+ (unpacked.flatten).pack('U*')
503
+ end
504
+
505
+ def padding(padsize, padstr=' ') #:nodoc:
506
+ if padsize != 0
507
+ new(padstr * ((padsize / u_unpack(padstr).size) + 1)).slice(0, padsize)
508
+ else
509
+ ''
510
+ end
511
+ end
512
+
513
+ # Re-order codepoints so the string becomes canonical.
514
+ def reorder_characters(codepoints)
515
+ length = codepoints.length- 1
516
+ pos = 0
517
+ while pos < length do
518
+ cp1, cp2 = UCD.codepoints[codepoints[pos]], UCD.codepoints[codepoints[pos+1]]
519
+ if (cp1.combining_class > cp2.combining_class) && (cp2.combining_class > 0)
520
+ codepoints[pos..pos+1] = cp2.code, cp1.code
521
+ pos += (pos > 0 ? -1 : 1)
522
+ else
523
+ pos += 1
524
+ end
525
+ end
526
+ codepoints
527
+ end
528
+
529
+ # Decompose composed characters to the decomposed form.
530
+ def decompose_codepoints(type, codepoints)
531
+ codepoints.inject([]) do |decomposed, cp|
532
+ # if it's a hangul syllable starter character
533
+ if HANGUL_SBASE <= cp and cp < HANGUL_SLAST
534
+ sindex = cp - HANGUL_SBASE
535
+ ncp = [] # new codepoints
536
+ ncp << HANGUL_LBASE + sindex / HANGUL_NCOUNT
537
+ ncp << HANGUL_VBASE + (sindex % HANGUL_NCOUNT) / HANGUL_TCOUNT
538
+ tindex = sindex % HANGUL_TCOUNT
539
+ ncp << (HANGUL_TBASE + tindex) unless tindex == 0
540
+ decomposed.concat ncp
541
+ # if the codepoint is decomposable in with the current decomposition type
542
+ elsif (ncp = UCD.codepoints[cp].decomp_mapping) and (!UCD.codepoints[cp].decomp_type || type == :compatability)
543
+ decomposed.concat decompose_codepoints(type, ncp.dup)
544
+ else
545
+ decomposed << cp
546
+ end
547
+ end
548
+ end
549
+
550
+ # Compose decomposed characters to the composed form.
551
+ def compose_codepoints(codepoints)
552
+ pos = 0
553
+ eoa = codepoints.length - 1
554
+ starter_pos = 0
555
+ starter_char = codepoints[0]
556
+ previous_combining_class = -1
557
+ while pos < eoa
558
+ pos += 1
559
+ lindex = starter_char - HANGUL_LBASE
560
+ # -- Hangul
561
+ if 0 <= lindex and lindex < HANGUL_LCOUNT
562
+ vindex = codepoints[starter_pos+1] - HANGUL_VBASE rescue vindex = -1
563
+ if 0 <= vindex and vindex < HANGUL_VCOUNT
564
+ tindex = codepoints[starter_pos+2] - HANGUL_TBASE rescue tindex = -1
565
+ if 0 <= tindex and tindex < HANGUL_TCOUNT
566
+ j = starter_pos + 2
567
+ eoa -= 2
568
+ else
569
+ tindex = 0
570
+ j = starter_pos + 1
571
+ eoa -= 1
572
+ end
573
+ codepoints[starter_pos..j] = (lindex * HANGUL_VCOUNT + vindex) * HANGUL_TCOUNT + tindex + HANGUL_SBASE
574
+ end
575
+ starter_pos += 1
576
+ starter_char = codepoints[starter_pos]
577
+ # -- Other characters
578
+ else
579
+ current_char = codepoints[pos]
580
+ current = UCD.codepoints[current_char]
581
+ if current.combining_class > previous_combining_class
582
+ if ref = UCD.composition_map[starter_char]
583
+ composition = ref[current_char]
584
+ else
585
+ composition = nil
586
+ end
587
+ unless composition.nil?
588
+ codepoints[starter_pos] = composition
589
+ starter_char = composition
590
+ codepoints.delete_at pos
591
+ eoa -= 1
592
+ pos -= 1
593
+ previous_combining_class = -1
594
+ else
595
+ previous_combining_class = current.combining_class
596
+ end
597
+ else
598
+ previous_combining_class = current.combining_class
599
+ end
600
+ if current.combining_class == 0
601
+ starter_pos = pos
602
+ starter_char = codepoints[pos]
603
+ end
604
+ end
605
+ end
606
+ codepoints
607
+ end
608
+
609
+ # Replaces all ISO-8859-1 or CP1252 characters by their UTF-8 equivalent resulting in a valid UTF-8 string.
610
+ def tidy_bytes(string)
611
+ string.split(//u).map do |c|
612
+ if !UTF8_PAT.match(c)
613
+ n = c.unpack('C')[0]
614
+ n < 128 ? n.chr :
615
+ n < 160 ? [UCD.cp1252[n] || n].pack('U') :
616
+ n < 192 ? "\xC2" + n.chr : "\xC3" + (n-64).chr
617
+ else
618
+ c
619
+ end
620
+ end.join
621
+ end
622
+ end
623
+
624
+ protected
625
+
626
+ def translate_offset(byte_offset) #:nodoc:
627
+ return nil if byte_offset.nil?
628
+ return 0 if @wrapped_string == ''
629
+ chunk = @wrapped_string[0..byte_offset]
630
+ begin
631
+ begin
632
+ chunk.unpack('U*').length - 1
633
+ rescue ArgumentError => e
634
+ chunk = @wrapped_string[0..(byte_offset+=1)]
635
+ # Stop retrying at the end of the string
636
+ raise e unless byte_offset < chunk.length
637
+ # We damaged a character, retry
638
+ retry
639
+ end
640
+ # Catch the ArgumentError so we can throw our own
641
+ rescue ArgumentError
642
+ raise EncodingError, 'malformed UTF-8 character'
643
+ end
644
+ end
645
+
646
+ def justify(integer, way, padstr=' ') #:nodoc:
647
+ raise ArgumentError, "zero width padding" if padstr.length == 0
648
+ padsize = integer - size
649
+ padsize = padsize > 0 ? padsize : 0
650
+ case way
651
+ when :right
652
+ result = @wrapped_string.dup.insert(0, self.class.padding(padsize, padstr))
653
+ when :left
654
+ result = @wrapped_string.dup.insert(-1, self.class.padding(padsize, padstr))
655
+ when :center
656
+ lpad = self.class.padding((padsize / 2.0).floor, padstr)
657
+ rpad = self.class.padding((padsize / 2.0).ceil, padstr)
658
+ result = @wrapped_string.dup.insert(0, lpad).insert(-1, rpad)
659
+ end
660
+ chars(result)
661
+ end
662
+
663
+ def apply_mapping(mapping) #:nodoc:
664
+ chars(self.class.u_unpack(@wrapped_string).map do |codepoint|
665
+ cp = UCD.codepoints[codepoint]
666
+ if cp and (ncp = cp.send(mapping)) and ncp > 0
667
+ ncp
668
+ else
669
+ codepoint
670
+ end
671
+ end.pack('U*'))
672
+ end
673
+
674
+ def chars(string) #:nodoc:
675
+ self.class.new(string)
676
+ end
677
+ end
678
+ end
679
+ end