facets 3.1.0 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (755) hide show
  1. checksums.yaml +5 -5
  2. data/HISTORY.md +141 -0
  3. data/LICENSE.txt +21 -343
  4. data/README.md +26 -19
  5. data/lib/core/facets/array/arrange.rb +1 -42
  6. data/lib/core/facets/array/average.rb +0 -1
  7. data/lib/core/facets/array/before.rb +1 -1
  8. data/lib/core/facets/array/delete_first.rb +21 -0
  9. data/lib/core/facets/array/duplicates.rb +13 -0
  10. data/lib/core/facets/array/indexes.rb +113 -0
  11. data/lib/core/facets/array/nonuniq.rb +6 -8
  12. data/lib/core/facets/array/occurrence.rb +4 -1
  13. data/lib/core/facets/array/remove.rb +39 -0
  14. data/lib/core/facets/array/span.rb +29 -0
  15. data/lib/core/facets/array/split_at.rb +25 -0
  16. data/lib/core/facets/array/standard_deviation.rb +7 -2
  17. data/lib/core/facets/array/step.rb +12 -14
  18. data/lib/core/facets/array/to_ranges.rb +48 -0
  19. data/lib/core/facets/array/uniq_by.rb +3 -3
  20. data/lib/core/facets/binding/caller.rb +8 -2
  21. data/lib/core/facets/binding/op_get.rb +7 -11
  22. data/lib/core/facets/binding/self.rb +4 -10
  23. data/lib/core/facets/boolean.rb +1 -1
  24. data/lib/core/facets/class/descendants.rb +0 -2
  25. data/lib/core/facets/class.rb +2 -2
  26. data/lib/core/facets/comparable/bound.rb +13 -1
  27. data/lib/core/facets/comparable/clip.rb +3 -32
  28. data/lib/core/facets/denumerable.rb +0 -3
  29. data/lib/core/facets/dir/find.rb +20 -0
  30. data/lib/core/facets/dir/recurse.rb +8 -26
  31. data/lib/core/facets/enumerable/compact_map.rb +2 -12
  32. data/lib/core/facets/enumerable/defer.rb +2 -13
  33. data/lib/core/facets/enumerable/each_by.rb +0 -2
  34. data/lib/core/facets/enumerable/frequency.rb +2 -2
  35. data/lib/core/facets/enumerable/hinge.rb +3 -4
  36. data/lib/core/facets/enumerable/map_with_index.rb +3 -6
  37. data/lib/core/facets/enumerable/mash.rb +5 -28
  38. data/lib/core/facets/enumerable/uniq_by.rb +4 -8
  39. data/lib/core/facets/enumerable/with_position.rb +58 -0
  40. data/lib/core/facets/enumerator.rb +2 -75
  41. data/lib/core/facets/exception/error_print.rb +6 -71
  42. data/lib/core/facets/file/null.rb +3 -15
  43. data/lib/core/facets/file/read_binary.rb +3 -12
  44. data/lib/core/facets/hash/except.rb +0 -7
  45. data/lib/core/facets/hash/fetch_nested.rb +8 -9
  46. data/lib/core/facets/hash/graph.rb +1 -1
  47. data/lib/core/facets/hash/rekey.rb +3 -3
  48. data/lib/core/facets/hash/revalue.rb +3 -3
  49. data/lib/core/facets/hash/{to_proc.rb → setter.rb} +8 -9
  50. data/lib/core/facets/hash/slice.rb +0 -26
  51. data/lib/core/facets/hash/update_keys.rb +4 -11
  52. data/lib/core/facets/hash/update_values.rb +4 -10
  53. data/lib/core/facets/indexable.rb +6 -4
  54. data/lib/core/facets/kernel/callstack.rb +5 -24
  55. data/lib/core/facets/kernel/eigenclass.rb +6 -6
  56. data/lib/core/facets/kernel/extension.rb +3 -6
  57. data/lib/core/facets/kernel/functor.rb +16 -0
  58. data/lib/core/facets/kernel/instance_class.rb +4 -20
  59. data/lib/core/facets/kernel/instance_send.rb +5 -3
  60. data/lib/core/facets/kernel/load_relative.rb +8 -20
  61. data/lib/core/facets/kernel/memo.rb +4 -26
  62. data/lib/core/facets/kernel/meta_class.rb +10 -6
  63. data/lib/core/facets/kernel/object_class.rb +5 -6
  64. data/lib/core/facets/kernel/object_send.rb +5 -26
  65. data/lib/core/facets/kernel/qua_class.rb +4 -20
  66. data/lib/core/facets/kernel/require_all.rb +8 -20
  67. data/lib/core/facets/kernel/returning.rb +3 -19
  68. data/lib/core/facets/kernel/tap.rb +3 -36
  69. data/lib/core/facets/kernel/tee.rb +2 -0
  70. data/lib/core/facets/kernel/try.rb +38 -28
  71. data/lib/core/facets/kernel.rb +2 -4
  72. data/lib/core/facets/lazy.rb +1 -1
  73. data/lib/core/facets/module/alias_method_chain.rb +4 -43
  74. data/lib/core/facets/module/attr_setter.rb +3 -2
  75. data/lib/core/facets/module/can.rb +5 -16
  76. data/lib/core/facets/module/class_extend.rb +2 -2
  77. data/lib/core/facets/object/dup.rb +0 -46
  78. data/lib/core/facets/proc/bind.rb +0 -2
  79. data/lib/core/facets/proc/compose.rb +7 -28
  80. data/lib/core/facets/proc/to_method.rb +0 -1
  81. data/lib/core/facets/proc/update.rb +8 -1
  82. data/lib/core/facets/range/intersection.rb +42 -0
  83. data/lib/core/facets/range/nudge.rb +6 -8
  84. data/lib/core/facets/string/ascii_only.rb +2 -2
  85. data/lib/core/facets/string/cleanlines.rb +0 -2
  86. data/lib/core/facets/string/dashcase.rb +21 -0
  87. data/lib/core/facets/string/lchomp.rb +7 -14
  88. data/lib/core/facets/string/newlines.rb +0 -2
  89. data/lib/core/facets/string/snakecase.rb +12 -5
  90. data/lib/core/facets/string/words.rb +13 -1
  91. data/lib/core/facets/string.rb +0 -1
  92. data/lib/core/facets/struct/attributes.rb +2 -3
  93. data/lib/core/facets/time/trunc.rb +12 -5
  94. data/lib/core/facets/unboundmethod/arguments.rb +1 -0
  95. data/lib/core/facets/version.rb +1 -17
  96. data/lib/core/facets.rb +0 -1
  97. data/lib/standard/facets/argvector.rb +1 -1
  98. data/lib/standard/facets/cgi/escape_html.rb +14 -25
  99. data/lib/standard/facets/cloneable.rb +4 -51
  100. data/lib/standard/facets/continuation.rb +2 -56
  101. data/lib/standard/facets/crypt3.rb +126 -0
  102. data/lib/standard/facets/date/cmp.rb +32 -0
  103. data/lib/standard/facets/date.rb +1 -0
  104. data/lib/standard/facets/digest.rb +0 -1
  105. data/lib/standard/facets/fileutils/cp_rx.rb +0 -2
  106. data/lib/standard/facets/fileutils/ln_r.rb +0 -1
  107. data/lib/standard/facets/find/select.rb +0 -2
  108. data/lib/standard/facets/getoptlong.rb +3 -59
  109. data/lib/standard/facets/load_monitor.rb +2 -26
  110. data/lib/standard/facets/math/gini_coefficient.rb +5 -4
  111. data/lib/standard/facets/math/kldivergence.rb +8 -7
  112. data/lib/standard/facets/math/percentile.rb +1 -1
  113. data/lib/standard/facets/multiton.rb +1 -1
  114. data/lib/standard/facets/ostruct/initialize.rb +4 -19
  115. data/lib/standard/facets/ostruct/to_ostruct.rb +2 -1
  116. data/lib/standard/facets/ostruct.rb +0 -88
  117. data/lib/standard/facets/pathname/empty.rb +2 -10
  118. data/lib/standard/facets/pathname/glob.rb +19 -12
  119. data/lib/standard/facets/pathname/null.rb +3 -14
  120. data/lib/standard/facets/random.rb +47 -133
  121. data/lib/standard/facets/tuple.rb +2 -4
  122. data/lib/standard/facets/uri.rb +3 -2
  123. metadata +29 -1172
  124. data/.index +0 -80
  125. data/.yardopts +0 -10
  126. data/NOTICE.rdoc +0 -167
  127. data/demo/applique/assertion_framework.rb +0 -1
  128. data/demo/applique/file_helpers.rb +0 -34
  129. data/demo/core/array/after.md +0 -13
  130. data/demo/core/array/arrange.md +0 -17
  131. data/demo/core/array/before.md +0 -14
  132. data/demo/core/array/collapse.md +0 -15
  133. data/demo/core/array/collisions.md +0 -30
  134. data/demo/core/array/commonality.md +0 -31
  135. data/demo/core/array/conjoin.md +0 -47
  136. data/demo/core/array/contains.md +0 -9
  137. data/demo/core/array/delete_unless.md +0 -13
  138. data/demo/core/array/delete_values.md +0 -10
  139. data/demo/core/array/delete_values_at.md +0 -15
  140. data/demo/core/array/divide.md +0 -14
  141. data/demo/core/array/duplicates.md +0 -14
  142. data/demo/core/array/each_overlap.md +0 -12
  143. data/demo/core/array/each_pair.md +0 -13
  144. data/demo/core/array/each_value.md +0 -12
  145. data/demo/core/array/entropy.md +0 -13
  146. data/demo/core/array/extract_options.md +0 -13
  147. data/demo/core/array/first.md +0 -11
  148. data/demo/core/array/from.md +0 -11
  149. data/demo/core/array/ideal_entropy.md +0 -11
  150. data/demo/core/array/intersection.md +0 -11
  151. data/demo/core/array/last.md +0 -11
  152. data/demo/core/array/median.md +0 -23
  153. data/demo/core/array/merge.md +0 -15
  154. data/demo/core/array/missing.md +0 -10
  155. data/demo/core/array/mode.md +0 -9
  156. data/demo/core/array/nonuniq.md +0 -16
  157. data/demo/core/array/not_empty.md +0 -8
  158. data/demo/core/array/occur.md +0 -18
  159. data/demo/core/array/occurrence.md +0 -13
  160. data/demo/core/array/only.md +0 -9
  161. data/demo/core/array/op_pow.md +0 -10
  162. data/demo/core/array/pad.md +0 -28
  163. data/demo/core/array/peek.md +0 -10
  164. data/demo/core/array/poke.md +0 -15
  165. data/demo/core/array/probability +0 -8
  166. data/demo/core/array/pull.md +0 -10
  167. data/demo/core/array/recurse.md +0 -10
  168. data/demo/core/array/recursively.md +0 -20
  169. data/demo/core/array/reject_values.md +0 -10
  170. data/demo/core/array/splice.md +0 -14
  171. data/demo/core/array/split.md +0 -13
  172. data/demo/core/array/squeeze.md +0 -14
  173. data/demo/core/array/step.md +0 -16
  174. data/demo/core/array/store.md +0 -9
  175. data/demo/core/array/thru.md +0 -12
  176. data/demo/core/array/to_h.md +0 -11
  177. data/demo/core/array/traverse.md +0 -20
  178. data/demo/core/array/uniq_by.md +0 -16
  179. data/demo/core/array/unique_permutation.md +0 -14
  180. data/demo/core/array/zip.md +0 -8
  181. data/demo/core/binding/caller.md +0 -57
  182. data/demo/core/binding/defined.md +0 -10
  183. data/demo/core/binding/opvars.md +0 -16
  184. data/demo/core/binding/self.md +0 -6
  185. data/demo/core/class/descendants.md +0 -13
  186. data/demo/core/class/to_proc.md +0 -11
  187. data/demo/core/comparable/at_least.md +0 -11
  188. data/demo/core/comparable/at_most.md +0 -11
  189. data/demo/core/comparable/bound.md +0 -13
  190. data/demo/core/comparable/cap.md +0 -11
  191. data/demo/core/comparable/clip.md +0 -29
  192. data/demo/core/comparable/cmp.md +0 -18
  193. data/demo/core/comparable/op_get.md +0 -32
  194. data/demo/core/dir/ascend.md +0 -24
  195. data/demo/core/dir/descend.md +0 -16
  196. data/demo/core/dir/multiglob.md +0 -41
  197. data/demo/core/dir/parent.md +0 -6
  198. data/demo/core/dir/recurse.md +0 -41
  199. data/demo/core/exception/detail.md +0 -19
  200. data/demo/core/facets.md +0 -6
  201. data/demo/core/filetest/root.md +0 -13
  202. data/demo/core/hash/recursively.md +0 -21
  203. data/demo/core/indexable.md +0 -95
  204. data/demo/core/integer/bitmask.md +0 -46
  205. data/demo/core/integer/factorial.md +0 -10
  206. data/demo/core/integer/length.md +0 -7
  207. data/demo/core/integer/multiple.md +0 -12
  208. data/demo/core/integer/of.md +0 -11
  209. data/demo/core/integer/ordinal.md +0 -11
  210. data/demo/core/integer/times_collect.md +0 -9
  211. data/demo/core/matchdata/match.md +0 -7
  212. data/demo/core/matchdata/matchset.md +0 -7
  213. data/demo/core/matchdata/matchtree.md +0 -10
  214. data/demo/core/module/cattr.md +0 -43
  215. data/demo/core/module/class_extend.md +0 -64
  216. data/demo/core/module/class_inheritor.md +0 -126
  217. data/demo/core/module/copy_inheritor.md +0 -30
  218. data/demo/core/module/include_as.md +0 -31
  219. data/demo/core/module/method_space.md +0 -24
  220. data/demo/core/string/acronym.md +0 -9
  221. data/demo/core/string/align.md +0 -34
  222. data/demo/core/string/ascii_only.md +0 -37
  223. data/demo/core/string/bracket.md +0 -35
  224. data/demo/core/string/camelcase.md +0 -47
  225. data/demo/core/string/capitalized.md +0 -27
  226. data/demo/core/string/characters.md +0 -11
  227. data/demo/core/string/cleanlines.md +0 -10
  228. data/demo/core/string/cleave.md +0 -49
  229. data/demo/core/string/compress_lines.md +0 -22
  230. data/demo/core/string/crypt.md +0 -15
  231. data/demo/core/string/divide.md +0 -9
  232. data/demo/core/string/each_word.md +0 -11
  233. data/demo/core/string/edit_distance.md +0 -15
  234. data/demo/core/string/exclude.md +0 -15
  235. data/demo/core/string/expand_tabs.md +0 -69
  236. data/demo/core/string/fold.md +0 -14
  237. data/demo/core/string/indent.md +0 -65
  238. data/demo/core/string/index_all.md +0 -14
  239. data/demo/core/string/interpolate.md +0 -8
  240. data/demo/core/string/lchomp.md +0 -14
  241. data/demo/core/string/line_wrap.md +0 -7
  242. data/demo/core/string/lowercase.md +0 -12
  243. data/demo/core/string/methodize.md +0 -22
  244. data/demo/core/string/modulize.md +0 -22
  245. data/demo/core/string/mscan.md +0 -10
  246. data/demo/core/string/natcmp.md +0 -10
  247. data/demo/core/string/nchar.md +0 -9
  248. data/demo/core/string/newlines.md +0 -9
  249. data/demo/core/string/number.md +0 -27
  250. data/demo/core/string/op_div.md +0 -10
  251. data/demo/core/string/op_sub.md +0 -7
  252. data/demo/core/string/pathize.md +0 -22
  253. data/demo/core/string/quote.md +0 -20
  254. data/demo/core/string/random.md +0 -25
  255. data/demo/core/string/range.md +0 -19
  256. data/demo/core/string/remove.md +0 -33
  257. data/demo/core/string/rewrite.md +0 -9
  258. data/demo/core/string/shatter.md +0 -9
  259. data/demo/core/string/similarity.md +0 -12
  260. data/demo/core/string/snakecase.md +0 -14
  261. data/demo/core/string/splice.md +0 -28
  262. data/demo/core/string/squish.md +0 -27
  263. data/demo/core/string/store.md +0 -10
  264. data/demo/core/string/subtract.md +0 -8
  265. data/demo/core/string/titlecase.md +0 -8
  266. data/demo/core/string/to_re.md +0 -22
  267. data/demo/core/string/trim.md +0 -92
  268. data/demo/core/string/unbracket.md +0 -24
  269. data/demo/core/string/underscore.md +0 -17
  270. data/demo/core/string/unfold.md +0 -9
  271. data/demo/core/string/unindent.md +0 -65
  272. data/demo/core/string/unquote.md +0 -6
  273. data/demo/core/string/uppercase.md +0 -15
  274. data/demo/core/string/variablize.md +0 -7
  275. data/demo/core/string/word_wrap.md +0 -54
  276. data/demo/core/string/words.md +0 -13
  277. data/demo/core/string/xor.md +0 -8
  278. data/demo/standard/02_cloneable.rdoc +0 -46
  279. data/demo/standard/03_enumargs.rdoc +0 -75
  280. data/demo/standard/04_equitable.rdoc +0 -35
  281. data/demo/standard/05_instantiable.rdoc +0 -42
  282. data/demo/standard/basic_object.rdoc +0 -22
  283. data/demo/standard/memoizable.rdoc +0 -134
  284. data/demo/standard/mulititon.rdoc +0 -156
  285. data/lib/core/facets/applique/file_helpers.rb +0 -33
  286. data/lib/core/facets/array/intersection.rb +0 -25
  287. data/lib/core/facets/array/op_pow.rb +0 -12
  288. data/lib/core/facets/array/to_h.rb +0 -19
  289. data/lib/core/facets/class/singleton.rb +0 -1
  290. data/lib/core/facets/class/singleton_class.rb +0 -16
  291. data/lib/core/facets/class/subclasses.rb +0 -28
  292. data/lib/core/facets/dir/each_child.rb +0 -16
  293. data/lib/core/facets/enumerable/filter.rb +0 -33
  294. data/lib/core/facets/enumerable/sum.rb +0 -40
  295. data/lib/core/facets/exception/set_message.rb +0 -10
  296. data/lib/core/facets/file/write.rb +0 -24
  297. data/lib/core/facets/fixnum.rb +0 -7
  298. data/lib/core/facets/kernel/__dir__.rb +0 -28
  299. data/lib/core/facets/kernel/constant.rb +0 -22
  300. data/lib/core/facets/kernel/instance_exec.rb +0 -47
  301. data/lib/core/facets/kernel/p.rb +0 -24
  302. data/lib/core/facets/kernel/singleton_class.rb +0 -10
  303. data/lib/core/facets/matchdata/match.rb +0 -15
  304. data/lib/core/facets/method/curry.rb +0 -13
  305. data/lib/core/facets/numeric/negative.rb +0 -1
  306. data/lib/core/facets/numeric/positive.rb +0 -15
  307. data/lib/core/facets/object/itself.rb +0 -16
  308. data/lib/core/facets/object/try_dup.rb +0 -1
  309. data/lib/core/facets/process/daemon.rb +0 -32
  310. data/lib/core/facets/range/overlap.rb +0 -12
  311. data/lib/core/facets/string/characters.rb +0 -13
  312. data/lib/core/facets/string/crypt.rb +0 -22
  313. data/lib/core/facets/symbol/succ.rb +0 -23
  314. data/lib/core/facets.yml +0 -80
  315. data/lib/standard/facets/basicobject.rb +0 -75
  316. data/lib/standard/facets/digest/base64digest.rb +0 -45
  317. data/lib/standard/facets/ostruct/each.rb +0 -11
  318. data/lib/standard/facets/ostruct/merge.rb +0 -21
  319. data/lib/standard/facets/ostruct/op_fetch.rb +0 -29
  320. data/lib/standard/facets/ostruct/op_store.rb +0 -1
  321. data/lib/standard/facets/ostruct/to_h.rb +0 -10
  322. data/test/core/array/test_arrange.rb +0 -37
  323. data/test/core/array/test_average.rb +0 -16
  324. data/test/core/array/test_before.rb +0 -48
  325. data/test/core/array/test_collapse.rb +0 -23
  326. data/test/core/array/test_commonality.rb +0 -35
  327. data/test/core/array/test_conjoin.rb +0 -50
  328. data/test/core/array/test_contains.rb +0 -14
  329. data/test/core/array/test_delete.rb +0 -42
  330. data/test/core/array/test_delete_unless.rb +0 -17
  331. data/test/core/array/test_delete_values.rb +0 -31
  332. data/test/core/array/test_divide.rb +0 -24
  333. data/test/core/array/test_duplicates.rb +0 -29
  334. data/test/core/array/test_each_overlap.rb +0 -31
  335. data/test/core/array/test_each_pair.rb +0 -16
  336. data/test/core/array/test_each_value.rb +0 -16
  337. data/test/core/array/test_entropy.rb +0 -23
  338. data/test/core/array/test_extract_options.rb +0 -28
  339. data/test/core/array/test_first.rb +0 -17
  340. data/test/core/array/test_from.rb +0 -42
  341. data/test/core/array/test_intersection.rb +0 -19
  342. data/test/core/array/test_last.rb +0 -17
  343. data/test/core/array/test_median.rb +0 -27
  344. data/test/core/array/test_merge.rb +0 -27
  345. data/test/core/array/test_missing.rb +0 -12
  346. data/test/core/array/test_mode.rb +0 -17
  347. data/test/core/array/test_nonuniq.rb +0 -25
  348. data/test/core/array/test_not_empty.rb +0 -17
  349. data/test/core/array/test_occur.rb +0 -52
  350. data/test/core/array/test_occurrence.rb +0 -20
  351. data/test/core/array/test_only.rb +0 -17
  352. data/test/core/array/test_op_pow.rb +0 -13
  353. data/test/core/array/test_pad.rb +0 -40
  354. data/test/core/array/test_peek.rb +0 -28
  355. data/test/core/array/test_poke.rb +0 -21
  356. data/test/core/array/test_probability.rb +0 -18
  357. data/test/core/array/test_pull.rb +0 -15
  358. data/test/core/array/test_recurse.rb +0 -40
  359. data/test/core/array/test_recursively.rb +0 -33
  360. data/test/core/array/test_reject_values.rb +0 -17
  361. data/test/core/array/test_splice.rb +0 -21
  362. data/test/core/array/test_split.rb +0 -22
  363. data/test/core/array/test_squeeze.rb +0 -22
  364. data/test/core/array/test_standard_deviation.rb +0 -18
  365. data/test/core/array/test_step.rb +0 -28
  366. data/test/core/array/test_store.rb +0 -22
  367. data/test/core/array/test_to_h.rb +0 -14
  368. data/test/core/array/test_traverse.rb +0 -26
  369. data/test/core/array/test_uniq_by.rb +0 -24
  370. data/test/core/array/test_unique_permutation.rb +0 -23
  371. data/test/core/array/test_variance.rb +0 -17
  372. data/test/core/array/test_zip.rb +0 -13
  373. data/test/core/binding/test_caller.rb +0 -69
  374. data/test/core/binding/test_defined.rb +0 -18
  375. data/test/core/binding/test_op.rb +0 -24
  376. data/test/core/binding/test_self.rb +0 -16
  377. data/test/core/class/test_descendents.rb +0 -19
  378. data/test/core/class/test_preallocate.rb +0 -32
  379. data/test/core/class/test_subclasses.rb +0 -20
  380. data/test/core/class/test_to_proc.rb +0 -16
  381. data/test/core/comparable/test_bound.rb +0 -32
  382. data/test/core/comparable/test_cap.rb +0 -36
  383. data/test/core/comparable/test_clip.rb +0 -31
  384. data/test/core/comparable/test_cmp.rb +0 -16
  385. data/test/core/comparable/test_op_get.rb +0 -61
  386. data/test/core/denumerable_tc.rb +0 -194
  387. data/test/core/dir/test_ascend.rb +0 -40
  388. data/test/core/dir/test_descend.rb +0 -24
  389. data/test/core/dir/test_each_child.rb +0 -22
  390. data/test/core/dir/test_multiglob.rb +0 -25
  391. data/test/core/dir/test_parent.rb +0 -14
  392. data/test/core/dir/test_recurse.rb +0 -26
  393. data/test/core/enumerable/test_accumulate.rb +0 -44
  394. data/test/core/enumerable/test_cluster.rb +0 -36
  395. data/test/core/enumerable/test_compact_map.rb +0 -32
  396. data/test/core/enumerable/test_defer.rb +0 -27
  397. data/test/core/enumerable/test_each_by.rb +0 -49
  398. data/test/core/enumerable/test_every.rb +0 -33
  399. data/test/core/enumerable/test_ewise.rb +0 -30
  400. data/test/core/enumerable/test_exclude.rb +0 -15
  401. data/test/core/enumerable/test_expand.rb +0 -15
  402. data/test/core/enumerable/test_filter.rb +0 -19
  403. data/test/core/enumerable/test_find_yield.rb +0 -96
  404. data/test/core/enumerable/test_frequency.rb +0 -15
  405. data/test/core/enumerable/test_graph.rb +0 -42
  406. data/test/core/enumerable/test_hashify.rb +0 -113
  407. data/test/core/enumerable/test_key_by.rb +0 -22
  408. data/test/core/enumerable/test_map_by.rb +0 -27
  409. data/test/core/enumerable/test_map_send.rb +0 -26
  410. data/test/core/enumerable/test_map_with_index.rb +0 -23
  411. data/test/core/enumerable/test_mash.rb +0 -17
  412. data/test/core/enumerable/test_modulate.rb +0 -17
  413. data/test/core/enumerable/test_occur.rb +0 -40
  414. data/test/core/enumerable/test_only.rb +0 -40
  415. data/test/core/enumerable/test_per.rb +0 -19
  416. data/test/core/enumerable/test_purge.rb +0 -22
  417. data/test/core/enumerable/test_recursively.rb +0 -33
  418. data/test/core/enumerable/test_squeeze.rb +0 -35
  419. data/test/core/enumerable/test_sum.rb +0 -40
  420. data/test/core/enumerable/test_uniq_by.rb +0 -25
  421. data/test/core/enumerable/test_visit.rb +0 -14
  422. data/test/core/enumerator/lazy/test_squeeze.rb +0 -33
  423. data/test/core/enumerator/test_fx.rb +0 -16
  424. data/test/core/enumerator/test_new.rb +0 -21
  425. data/test/core/enumerator_tc.rb +0 -40
  426. data/test/core/exception/test_detail.rb +0 -15
  427. data/test/core/exception/test_raised.rb +0 -15
  428. data/test/core/exception/test_suppress.rb +0 -16
  429. data/test/core/file/test_append.rb +0 -22
  430. data/test/core/file/test_create.rb +0 -17
  431. data/test/core/file/test_ext.rb +0 -31
  432. data/test/core/file/test_null.rb +0 -14
  433. data/test/core/file/test_read_binary.rb +0 -19
  434. data/test/core/file/test_read_list.rb +0 -16
  435. data/test/core/file/test_rewrite.rb +0 -35
  436. data/test/core/file/test_rootname.rb +0 -13
  437. data/test/core/file/test_sanitize.rb +0 -32
  438. data/test/core/file/test_split_all.rb +0 -14
  439. data/test/core/file/test_write.rb +0 -22
  440. data/test/core/file/test_writelines.rb +0 -21
  441. data/test/core/filetest/test_root.rb +0 -14
  442. data/test/core/functor_tc.rb +0 -41
  443. data/test/core/hash/test_alias.rb +0 -25
  444. data/test/core/hash/test_argumentize.rb +0 -23
  445. data/test/core/hash/test_at.rb +0 -16
  446. data/test/core/hash/test_autonew.rb +0 -22
  447. data/test/core/hash/test_collate.rb +0 -61
  448. data/test/core/hash/test_count.rb +0 -23
  449. data/test/core/hash/test_data.rb +0 -35
  450. data/test/core/hash/test_dearray_values.rb +0 -26
  451. data/test/core/hash/test_deep_merge.rb +0 -31
  452. data/test/core/hash/test_deep_rekey.rb +0 -131
  453. data/test/core/hash/test_delete_at.rb +0 -18
  454. data/test/core/hash/test_delete_unless.rb +0 -18
  455. data/test/core/hash/test_delete_values.rb +0 -30
  456. data/test/core/hash/test_diff.rb +0 -16
  457. data/test/core/hash/test_each_with_key.rb +0 -16
  458. data/test/core/hash/test_expect.rb +0 -34
  459. data/test/core/hash/test_fetch_nested.rb +0 -24
  460. data/test/core/hash/test_graph.rb +0 -40
  461. data/test/core/hash/test_insert.rb +0 -20
  462. data/test/core/hash/test_inverse.rb +0 -20
  463. data/test/core/hash/test_join.rb +0 -32
  464. data/test/core/hash/test_keys.rb +0 -41
  465. data/test/core/hash/test_new_with.rb +0 -17
  466. data/test/core/hash/test_op_add.rb +0 -17
  467. data/test/core/hash/test_op_and.rb +0 -31
  468. data/test/core/hash/test_op_mul.rb +0 -17
  469. data/test/core/hash/test_op_or.rb +0 -17
  470. data/test/core/hash/test_op_push.rb +0 -34
  471. data/test/core/hash/test_op_sub.rb +0 -28
  472. data/test/core/hash/test_recurse.rb +0 -39
  473. data/test/core/hash/test_recursively.rb +0 -71
  474. data/test/core/hash/test_rekey.rb +0 -119
  475. data/test/core/hash/test_replace_each.rb +0 -17
  476. data/test/core/hash/test_revalue.rb +0 -98
  477. data/test/core/hash/test_reverse_merge.rb +0 -39
  478. data/test/core/hash/test_slice.rb +0 -36
  479. data/test/core/hash/test_stringify_keys.rb +0 -26
  480. data/test/core/hash/test_swap.rb +0 -15
  481. data/test/core/hash/test_symbolize_keys.rb +0 -26
  482. data/test/core/hash/test_to_mod.rb +0 -24
  483. data/test/core/hash/test_to_proc.rb +0 -23
  484. data/test/core/hash/test_to_struct.rb +0 -22
  485. data/test/core/hash/test_traverse.rb +0 -29
  486. data/test/core/hash/test_update_each.rb +0 -16
  487. data/test/core/hash/test_update_keys.rb +0 -21
  488. data/test/core/hash/test_update_values.rb +0 -15
  489. data/test/core/hash/test_weave.rb +0 -18
  490. data/test/core/hash/test_zip.rb +0 -16
  491. data/test/core/indexable_tc.rb +0 -226
  492. data/test/core/integer/test_bitmask.rb +0 -73
  493. data/test/core/integer/test_factorial.rb +0 -30
  494. data/test/core/integer/test_multiple.rb +0 -16
  495. data/test/core/integer/test_of.rb +0 -36
  496. data/test/core/integer/test_ordinal.rb +0 -27
  497. data/test/core/kernel/test_as.rb +0 -74
  498. data/test/core/kernel/test_ask.rb +0 -9
  499. data/test/core/kernel/test_assign.rb +0 -61
  500. data/test/core/kernel/test_assign_from.rb +0 -48
  501. data/test/core/kernel/test_attr_singleton.rb +0 -51
  502. data/test/core/kernel/test_blank.rb +0 -103
  503. data/test/core/kernel/test_callstack.rb +0 -21
  504. data/test/core/kernel/test_class.rb +0 -14
  505. data/test/core/kernel/test_complete.rb +0 -19
  506. data/test/core/kernel/test_constant.rb +0 -18
  507. data/test/core/kernel/test_d.rb +0 -10
  508. data/test/core/kernel/test_deep_clone.rb +0 -31
  509. data/test/core/kernel/test_deep_copy.rb +0 -15
  510. data/test/core/kernel/test_dir.rb +0 -24
  511. data/test/core/kernel/test_disable_warnings.rb +0 -38
  512. data/test/core/kernel/test_ergo.rb +0 -34
  513. data/test/core/kernel/test_extension.rb +0 -18
  514. data/test/core/kernel/test_get.rb +0 -54
  515. data/test/core/kernel/test_here.rb +0 -13
  516. data/test/core/kernel/test_hierarchical_send.rb +0 -48
  517. data/test/core/kernel/test_in.rb +0 -14
  518. data/test/core/kernel/test_instance_assign.rb +0 -19
  519. data/test/core/kernel/test_instance_class.rb +0 -15
  520. data/test/core/kernel/test_instance_extract.rb +0 -28
  521. data/test/core/kernel/test_instance_replace.rb +0 -47
  522. data/test/core/kernel/test_instance_send.rb +0 -26
  523. data/test/core/kernel/test_maybe.rb +0 -13
  524. data/test/core/kernel/test_meta_alias.rb +0 -18
  525. data/test/core/kernel/test_meta_class.rb +0 -33
  526. data/test/core/kernel/test_meta_def.rb +0 -15
  527. data/test/core/kernel/test_meta_eval.rb +0 -18
  528. data/test/core/kernel/test_method.rb +0 -20
  529. data/test/core/kernel/test_not.rb +0 -51
  530. data/test/core/kernel/test_not_nil.rb +0 -25
  531. data/test/core/kernel/test_object_class.rb +0 -22
  532. data/test/core/kernel/test_object_hexid.rb +0 -20
  533. data/test/core/kernel/test_object_send.rb +0 -25
  534. data/test/core/kernel/test_presence.rb +0 -37
  535. data/test/core/kernel/test_qua_class.rb +0 -25
  536. data/test/core/kernel/test_require_all.rb +0 -11
  537. data/test/core/kernel/test_respond.rb +0 -38
  538. data/test/core/kernel/test_returning.rb +0 -17
  539. data/test/core/kernel/test_silence.rb +0 -24
  540. data/test/core/kernel/test_singleton_class.rb +0 -15
  541. data/test/core/kernel/test_super_method.rb +0 -23
  542. data/test/core/kernel/test_tap.rb +0 -38
  543. data/test/core/kernel/test_temporarily.rb +0 -25
  544. data/test/core/kernel/test_true.rb +0 -31
  545. data/test/core/kernel/test_try.rb +0 -35
  546. data/test/core/kernel/test_val.rb +0 -30
  547. data/test/core/kernel/test_with.rb +0 -18
  548. data/test/core/kernel/test_writers.rb +0 -53
  549. data/test/core/matchdata/test_match.rb +0 -14
  550. data/test/core/matchdata/test_matchset.rb +0 -29
  551. data/test/core/method/test_composition.rb +0 -42
  552. data/test/core/module/test_abstract.rb +0 -24
  553. data/test/core/module/test_alias_accessor.rb +0 -27
  554. data/test/core/module/test_alias_method_chain.rb +0 -34
  555. data/test/core/module/test_alias_module_function.rb +0 -24
  556. data/test/core/module/test_all_instance_methods.rb +0 -27
  557. data/test/core/module/test_ancestor.rb +0 -16
  558. data/test/core/module/test_anonymous.rb +0 -18
  559. data/test/core/module/test_attr_setter.rb +0 -28
  560. data/test/core/module/test_basename.rb +0 -14
  561. data/test/core/module/test_can.rb +0 -22
  562. data/test/core/module/test_class.rb +0 -22
  563. data/test/core/module/test_class_def.rb +0 -22
  564. data/test/core/module/test_class_extend.rb +0 -73
  565. data/test/core/module/test_class_inheritor.rb +0 -135
  566. data/test/core/module/test_copy_inheritor.rb +0 -35
  567. data/test/core/module/test_enclosure.rb +0 -24
  568. data/test/core/module/test_instance_function.rb +0 -30
  569. data/test/core/module/test_instance_method.rb +0 -20
  570. data/test/core/module/test_instance_method_defined.rb +0 -38
  571. data/test/core/module/test_integrate.rb +0 -28
  572. data/test/core/module/test_is.rb +0 -50
  573. data/test/core/module/test_memoize.rb +0 -33
  574. data/test/core/module/test_method_clash.rb +0 -59
  575. data/test/core/module/test_method_space.rb +0 -72
  576. data/test/core/module/test_methodize.rb +0 -26
  577. data/test/core/module/test_modname.rb +0 -13
  578. data/test/core/module/test_module_def.rb +0 -22
  579. data/test/core/module/test_module_load.rb +0 -23
  580. data/test/core/module/test_nodef.rb +0 -19
  581. data/test/core/module/test_op.rb +0 -56
  582. data/test/core/module/test_pathize.rb +0 -25
  583. data/test/core/module/test_preextend.rb +0 -26
  584. data/test/core/module/test_redefine_method.rb +0 -30
  585. data/test/core/module/test_redirect_method.rb +0 -32
  586. data/test/core/module/test_remove.rb +0 -18
  587. data/test/core/module/test_rename_method.rb +0 -34
  588. data/test/core/module/test_revise.rb +0 -61
  589. data/test/core/module/test_set.rb +0 -30
  590. data/test/core/module/test_spacename.rb +0 -15
  591. data/test/core/module/test_to_obj.rb +0 -20
  592. data/test/core/module/test_wrap_method.rb +0 -32
  593. data/test/core/numeric/test_approx.rb +0 -26
  594. data/test/core/numeric/test_delimit.rb +0 -68
  595. data/test/core/numeric/test_distance.rb +0 -16
  596. data/test/core/numeric/test_length.rb +0 -16
  597. data/test/core/numeric/test_round_to.rb +0 -76
  598. data/test/core/numeric/test_spacing.rb +0 -17
  599. data/test/core/object/test_dup.rb +0 -115
  600. data/test/core/object/test_object_state.rb +0 -75
  601. data/test/core/object/test_try_dup.rb +0 -59
  602. data/test/core/proc/test_bind.rb +0 -29
  603. data/test/core/proc/test_bind_to.rb +0 -17
  604. data/test/core/proc/test_compose.rb +0 -27
  605. data/test/core/proc/test_partial.rb +0 -27
  606. data/test/core/proc/test_to_method.rb +0 -43
  607. data/test/core/proc/test_update.rb +0 -15
  608. data/test/core/range/test_combine.rb +0 -32
  609. data/test/core/range/test_nudge.rb +0 -32
  610. data/test/core/range/test_op_add.rb +0 -24
  611. data/test/core/range/test_op_sub.rb +0 -34
  612. data/test/core/range/test_overlap.rb +0 -15
  613. data/test/core/range/test_to_rng.rb +0 -20
  614. data/test/core/range/test_umbrella.rb +0 -32
  615. data/test/core/range/test_within.rb +0 -25
  616. data/test/core/regexp/test_arity.rb +0 -30
  617. data/test/core/regexp/test_multiline.rb +0 -19
  618. data/test/core/regexp/test_op_add.rb +0 -15
  619. data/test/core/regexp/test_op_or.rb +0 -16
  620. data/test/core/regexp/test_to_re.rb +0 -24
  621. data/test/core/string/test_acronym.rb +0 -14
  622. data/test/core/string/test_align.rb +0 -32
  623. data/test/core/string/test_ascii_only.rb +0 -51
  624. data/test/core/string/test_bracket.rb +0 -37
  625. data/test/core/string/test_camelcase.rb +0 -59
  626. data/test/core/string/test_capitalized.rb +0 -36
  627. data/test/core/string/test_characters.rb +0 -13
  628. data/test/core/string/test_cleanlines.rb +0 -12
  629. data/test/core/string/test_cleave.rb +0 -27
  630. data/test/core/string/test_cmp.rb +0 -18
  631. data/test/core/string/test_compress_lines.rb +0 -27
  632. data/test/core/string/test_crypt.rb +0 -17
  633. data/test/core/string/test_divide.rb +0 -17
  634. data/test/core/string/test_each_word.rb +0 -17
  635. data/test/core/string/test_edit_distance.rb +0 -20
  636. data/test/core/string/test_exclude.rb +0 -23
  637. data/test/core/string/test_expand_tabs.rb +0 -83
  638. data/test/core/string/test_file.rb +0 -15
  639. data/test/core/string/test_fold.rb +0 -21
  640. data/test/core/string/test_indent.rb +0 -90
  641. data/test/core/string/test_index_all.rb +0 -22
  642. data/test/core/string/test_interpolate.rb +0 -16
  643. data/test/core/string/test_lchomp.rb +0 -25
  644. data/test/core/string/test_line_wrap.rb +0 -15
  645. data/test/core/string/test_lowercase.rb +0 -18
  646. data/test/core/string/test_margin.rb +0 -16
  647. data/test/core/string/test_methodize.rb +0 -28
  648. data/test/core/string/test_modulize.rb +0 -28
  649. data/test/core/string/test_mscan.rb +0 -18
  650. data/test/core/string/test_natcmp.rb +0 -17
  651. data/test/core/string/test_nchar.rb +0 -17
  652. data/test/core/string/test_newlines.rb +0 -14
  653. data/test/core/string/test_number.rb +0 -44
  654. data/test/core/string/test_op_div.rb +0 -15
  655. data/test/core/string/test_op_sub.rb +0 -15
  656. data/test/core/string/test_pathize.rb +0 -31
  657. data/test/core/string/test_quote.rb +0 -41
  658. data/test/core/string/test_random.rb +0 -25
  659. data/test/core/string/test_range.rb +0 -35
  660. data/test/core/string/test_remove.rb +0 -50
  661. data/test/core/string/test_rewrite.rb +0 -17
  662. data/test/core/string/test_rotate.rb +0 -31
  663. data/test/core/string/test_shatter.rb +0 -17
  664. data/test/core/string/test_similarity.rb +0 -22
  665. data/test/core/string/test_snakecase.rb +0 -22
  666. data/test/core/string/test_splice.rb +0 -37
  667. data/test/core/string/test_squish.rb +0 -31
  668. data/test/core/string/test_store.rb +0 -16
  669. data/test/core/string/test_subtract.rb +0 -16
  670. data/test/core/string/test_titlecase.rb +0 -16
  671. data/test/core/string/test_to_re.rb +0 -35
  672. data/test/core/string/test_trim.rb +0 -116
  673. data/test/core/string/test_unbracket.rb +0 -38
  674. data/test/core/string/test_underscore.rb +0 -21
  675. data/test/core/string/test_unfold.rb +0 -17
  676. data/test/core/string/test_unindent.rb +0 -105
  677. data/test/core/string/test_unquote.rb +0 -13
  678. data/test/core/string/test_uppercase.rb +0 -22
  679. data/test/core/string/test_variablize.rb +0 -15
  680. data/test/core/string/test_word_wrap.rb +0 -80
  681. data/test/core/string/test_words.rb +0 -24
  682. data/test/core/string/test_xor.rb +0 -16
  683. data/test/core/struct/test_replace.rb +0 -18
  684. data/test/core/symbol/test_as_s.rb +0 -15
  685. data/test/core/symbol/test_bang.rb +0 -15
  686. data/test/core/symbol/test_chomp.rb +0 -22
  687. data/test/core/symbol/test_generate.rb +0 -20
  688. data/test/core/symbol/test_not.rb +0 -19
  689. data/test/core/symbol/test_op_div.rb +0 -15
  690. data/test/core/symbol/test_plain.rb +0 -19
  691. data/test/core/symbol/test_query.rb +0 -19
  692. data/test/core/symbol/test_setter.rb +0 -17
  693. data/test/core/symbol/test_succ.rb +0 -16
  694. data/test/core/symbol/test_thrown.rb +0 -22
  695. data/test/core/symbol/test_variablize.rb +0 -14
  696. data/test/core/time/test_ago.rb +0 -18
  697. data/test/core/time/test_change.rb +0 -17
  698. data/test/core/time/test_dst_adjustment.rb +0 -19
  699. data/test/core/time/test_elapse.rb +0 -15
  700. data/test/core/time/test_future.rb +0 -32
  701. data/test/core/time/test_hence.rb +0 -18
  702. data/test/core/time/test_in.rb +0 -18
  703. data/test/core/time/test_less.rb +0 -139
  704. data/test/core/time/test_past.rb +0 -32
  705. data/test/core/time/test_round_to.rb +0 -34
  706. data/test/core/time/test_set.rb +0 -43
  707. data/test/core/time/test_shift.rb +0 -135
  708. data/test/core/time/test_stamp.rb +0 -42
  709. data/test/core/time/test_to_time.rb +0 -15
  710. data/test/core/time/test_trunc.rb +0 -34
  711. data/test/core/unboundmethod/test_arguments.rb +0 -25
  712. data/test/standard/binding/test_block_exec.rb +0 -21
  713. data/test/standard/math/test_abs.rb +0 -13
  714. data/test/standard/math/test_acot.rb +0 -23
  715. data/test/standard/math/test_acoth.rb +0 -22
  716. data/test/standard/math/test_beta.rb +0 -19
  717. data/test/standard/math/test_ceil.rb +0 -22
  718. data/test/standard/math/test_cosec.rb +0 -19
  719. data/test/standard/math/test_cosech.rb +0 -19
  720. data/test/standard/math/test_cot.rb +0 -13
  721. data/test/standard/math/test_coth.rb +0 -13
  722. data/test/standard/math/test_distance.rb +0 -16
  723. data/test/standard/math/test_exp10.rb +0 -14
  724. data/test/standard/math/test_exp2.rb +0 -14
  725. data/test/standard/math/test_factorial.rb +0 -13
  726. data/test/standard/math/test_floor.rb +0 -23
  727. data/test/standard/math/test_gcd.rb +0 -18
  728. data/test/standard/math/test_lcm.rb +0 -13
  729. data/test/standard/math/test_median.rb +0 -17
  730. data/test/standard/math/test_percentile.rb +0 -13
  731. data/test/standard/math/test_pow.rb +0 -30
  732. data/test/standard/math/test_root.rb +0 -15
  733. data/test/standard/math/test_sec.rb +0 -19
  734. data/test/standard/math/test_sech.rb +0 -19
  735. data/test/standard/math/test_sign.rb +0 -20
  736. data/test/standard/math/test_sinc.rb +0 -15
  737. data/test/standard/math/test_srq.rb +0 -20
  738. data/test/standard/pathname/test_chdir.rb +0 -16
  739. data/test/standard/pathname/test_readline.rb +0 -23
  740. data/test/standard/test_argvector.rb +0 -64
  741. data/test/standard/test_cloneable.rb +0 -60
  742. data/test/standard/test_date.rb +0 -82
  743. data/test/standard/test_enumargs.rb +0 -105
  744. data/test/standard/test_equitable.rb +0 -46
  745. data/test/standard/test_instantiable.rb +0 -40
  746. data/test/standard/test_math.rb +0 -3
  747. data/test/standard/test_memoizable.rb +0 -42
  748. data/test/standard/test_multipliers.rb +0 -141
  749. data/test/standard/test_ostruct.rb +0 -191
  750. data/test/standard/test_random.rb +0 -241
  751. data/test/standard/test_shellwords.rb +0 -74
  752. data/test/standard/test_thread.rb +0 -24
  753. data/test/standard/test_timer.rb +0 -62
  754. data/test/standard/test_tuple.rb +0 -68
  755. data/test/standard/test_uri.rb +0 -50
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 6968b01e3ed3e46be3265a381de7443ec38bb966
4
- data.tar.gz: 4668e23ad2f1e44a65cf8ba895f0daccbf65c175
2
+ SHA256:
3
+ metadata.gz: cc5a3121c6c373b29fdc3e515820f8e547d8b8a2fbfd0dde05cec51640960fa5
4
+ data.tar.gz: 2440d6fd114506decc8993153077c4bf98c5e6f372cbc2922ee253103d9c1c0e
5
5
  SHA512:
6
- metadata.gz: 6deb1971ac97f93bb75d4c144fabb91d6e9f6424867e4be70a2b99623d35080a49cf774c18e36236877c3f35d3549ca5563eb6a6c18912beccd3e67b1a414ec0
7
- data.tar.gz: 4fefcae7db154ac8b054aa4d5fc293653ea2376a1a36a59968bbad9a70763a06ca8bde410c1c3bb1c89d10e455420feee977264bfd8d1f4e49494bf90a16b9cf
6
+ metadata.gz: 67499b78df8f8b5b1a005d10b029d7f0278d7b6d9db5207c458df59433cf3d9362bcd8b4a60dbb5b31eb003b1b814fe1509800224746e5b71bbc5c1796349dbe
7
+ data.tar.gz: 8270894f6568a4d5b9b654a293e5c385230dc48032e0c711d24aa544ba0b48b379856874b4805cd476256e570272ebad0ebe76a71b4f519be8e6fa7470f81590
data/HISTORY.md CHANGED
@@ -1,5 +1,146 @@
1
1
  # Facets Release History
2
2
 
3
+ ## 3.2.0 / 2026-04-01
4
+
5
+ Modernization release targeting Ruby 3.1+. Cleans up long-standing
6
+ compatibility issues and incorporates community contributions.
7
+
8
+ Changes:
9
+
10
+ * New Features
11
+
12
+ * Add `Crypt3` module — pure Ruby crypt(3) implementation (from rubyworks/crypt3).
13
+ Supports md5, sha1, sha256, sha384, sha512, rmd160.
14
+ * Add `Array#to_ranges` to convert arrays to ranges. (PR#265)
15
+ * Add `Array#remove` and `Array#remove!` for count-respecting subtraction. (PR#293)
16
+ * Add `Array#indexes` / `Array#index_all` to find all matching indexes. (PR#294)
17
+ * Add `String#dashcase` for kebab-case conversion. (PR#297)
18
+ * Add `Binding#caller_locations`.
19
+ * Add `Range.intersection` and `Range#intersection` for finding the shared
20
+ region of multiple ranges. Works with any comparable type.
21
+ * Add `Kernel#functor` — block-less method chaining via Functor, replaces `tap` override.
22
+ * Rename `Hash#to_proc` to `Hash#setter` (avoids clash with Ruby 2.3's `Hash#to_proc`
23
+ which does key lookup; Facets' version does attribute assignment).
24
+ * Consolidate `Array#arrange` and `Array#to_ranges`; `to_ranges` is now primary,
25
+ `arrange` and `rangify` are aliases. Now handles mixed ranges and values.
26
+ * Fix `Array#step` to start at index 0 (was n-1); add optional offset parameter.
27
+
28
+ * Improved Features
29
+
30
+ * Adapt `Module#attr_setter` to frozen-string-literal. (PR#287)
31
+ * Update `Binding#__LINE__` and `__FILE__` to use `source_location`.
32
+ * Replace `URI.escape`/`URI.unescape` with `CGI.escape`/`CGI.unescape`.
33
+ * Rewrite `Kernel#callstack`, `#require_all`, `#load_all` to use `caller_locations`
34
+ instead of parsing caller strings with regex.
35
+ * Switch CI from Travis to GitHub Actions.
36
+ * Make `String#underscore` ActiveSupport-compatible (converts `::` to `/`).
37
+ Use `String#snakecase` for pure case conversion without namespace handling.
38
+ * Make `Kernel#try` ActiveSupport-compatible (supports block form and `try!`).
39
+ Facets' Tee/Functor form retained as extra feature.
40
+
41
+ * Bug Fixes
42
+
43
+ * Fix `Math.gini_coefficient` referencing `self` instead of `array` parameter. (PR#302)
44
+ * Fix typo in `Array#after` doc. (PR#283)
45
+ * Fix typo in `String#to_b` doc. (PR#306)
46
+
47
+ * Removals
48
+
49
+ * Remove `Array#**` (`op_pow`) alias for `product` (use `Array#product` directly).
50
+ * Deprecate `Array#occurrence` (use `Enumerable#tally` instead, adopted by Ruby in 2.7).
51
+ * Deprecate `Array#uniq_by!` (use `Array#uniq!(&block)` instead, adopted by Ruby in 1.9.2).
52
+ * Deprecate `Array#nonuniq` / `nonuniq!` (use `Array#duplicates` / `duplicates!` instead).
53
+ * Add `Array#duplicates!` (in-place version of `duplicates`).
54
+ * Remove `Kernel#tap` override. Use `Kernel#tee` for the block-less Functor form.
55
+ * Remove `Enumerable#filter` (conflicts with Ruby's built-in `filter` since 2.6).
56
+ Use `each_with_object` instead, with block arguments reversed:
57
+ `collection.each_with_object([]) { |el, out| out << el if cond }`.
58
+ * Remove Ruby 1.8 compatibility code from `enumerator.rb`.
59
+ * Remove `taint`/`tainted?` references (removed from Ruby in 3.2).
60
+ * Remove `Enumerable#sum` (adopted by Ruby in 2.4).
61
+ For non-numeric cases (e.g. `[[1],[2],[3]]`), use `reduce(:+)` instead.
62
+ * Remove `String#crypt` override (Ruby deprecated `crypt` in 3.2; use `bcrypt` gem instead).
63
+ * Remove `MatchData#match` (adopted by Ruby in 3.1).
64
+ * Remove `Range#overlap?` (adopted by Ruby in 3.3).
65
+ * Remove `Kernel#__DIR__` (adopted by Ruby as `__dir__` in 2.0).
66
+ * Remove `Kernel#instance_exec` (adopted by Ruby in 1.9).
67
+ * Remove `Kernel#singleton_class` (adopted by Ruby in 1.9).
68
+ * Remove `Kernel#p` override (Ruby's `p` returns its arguments since 1.9).
69
+ * Remove `Method#curry` (adopted by Ruby in 2.2).
70
+ * Remove `Array#to_h` (adopted by Ruby in 2.1).
71
+ * Remove `Array#intersection` (clashes with Ruby 2.7's `Array#intersection`).
72
+ Consider `Range.intersection` class method as future replacement.
73
+ * Remove `Hash#except` (adopted by Ruby in 3.0); `except!` and `remove!` retained.
74
+ * Remove `Hash#slice` (adopted by Ruby in 2.5); `slice!` retained.
75
+ Block form removed from both; use `slice(...).select { ... }` instead.
76
+ * Remove `Class#singleton_class?` (adopted by Ruby in 3.2).
77
+ * Remove `Class#subclasses` (adopted by Ruby in 3.1).
78
+ * Remove `Symbol#succ` (adopted by Ruby in 1.9).
79
+ * Remove `File.write` (adopted by Ruby in 1.9).
80
+ * Remove `Process.daemon` (adopted by Ruby in 1.9).
81
+ * Remove `Dir#each_child` (adopted by Ruby in 2.6).
82
+ Note: Ruby's version does not support the custom ignore argument.
83
+ Use `Dir.each_child('/path').reject { |f| ignore.include?(f) }` instead.
84
+ * Remove `Numeric#positive?` and `Numeric#negative?` (adopted by Ruby in 2.3).
85
+ * Remove `Object#itself` (adopted by Ruby in 2.6).
86
+ * Deprecate `Array#standard_deviation` (use `Array#stddev` or `Array#sd`).
87
+ * Deprecate `Struct#attributes` (use `Struct#to_h`, adopted by Ruby in 2.0).
88
+ * Deprecate `UnboundMethod#arguments` (use `UnboundMethod#parameters`, adopted by Ruby in 2.0).
89
+ * Remove `Object#dup!` and `Object#try_dup` (plain `dup` works on all objects since Ruby 2.4).
90
+ * Remove `Exception#set_message` (broken — did not actually change the message).
91
+ * Deprecate `Exception#error_print` (use `Exception#full_message`, adopted by Ruby in 2.5).
92
+ * Deprecate `Comparable#clip` (use `Comparable#clamp`, adopted by Ruby in 2.4).
93
+ * Redefine `Comparable#bound` as alias for `clamp`.
94
+ * Add `Dir.find` as convenience wrapper around Ruby's `Find.find`.
95
+ * Deprecate `Dir.recurse` / `Dir.ls_r` (use `Dir.find` or `Find.find` instead).
96
+ * Deprecate `Proc#compose` and `Proc#*` (use `Proc#<<` for right-to-left composition, Ruby 2.6+).
97
+ * Deprecate `Hash#update_keys` (use `Hash#transform_keys!` or `Hash#rekey!`).
98
+ * Deprecate `Hash#update_values` (use `Hash#transform_values!` or `Hash#revalue!`).
99
+ * Deprecate `Hash#fetch_nested` (use `Hash#dig`, adopted by Ruby in 2.3).
100
+ * Deprecate `Enumerable#compact_map` (use `Enumerable#filter_map`, adopted by Ruby in 2.7).
101
+ * Deprecate `Enumerable#defer` (use `Enumerable#lazy`, adopted by Ruby in 2.0).
102
+ * Deprecate `Enumerable#frequency` (use `Enumerable#tally`, adopted by Ruby in 2.7).
103
+ * Deprecate `Enumerable#hinge` (use `Enumerable#each_with_object`, note: block args reversed).
104
+ * Deprecate `Enumerable#map_with_index` (use `Enumerable#map.with_index`).
105
+ * Deprecate `Enumerable#mash` (use `Enumerable#graph` instead).
106
+ * Deprecate `Enumerable#uniq_by` (use `Enumerable#uniq(&block)`, Ruby 1.9.2+).
107
+ * Redefine `String#lchomp` / `#lchomp!` as aliases for `delete_prefix` / `delete_prefix!`.
108
+ * Rename `Time#trunc` to `Time#floor_to` (parallels `Time#round_to`; avoids confusion
109
+ with Ruby's `Time#floor` which takes sub-second digit precision). `trunc` deprecated.
110
+ * Fix `Binding#[]` and `#[]=` to use `local_variable_get`/`local_variable_set`
111
+ (broken since Ruby 1.9; now works again).
112
+ * Deprecate `Binding#self` (use `Binding#receiver`, adopted by Ruby in 2.6).
113
+ * Deprecate `Module#alias_method_chain` (use `Module#prepend`, Ruby 2.0+).
114
+ * Deprecate `Module#can` (use `Module#extend`).
115
+ * Deprecate `File.null` (use `File::NULL` constant, Ruby 1.9.3+).
116
+ * Deprecate `File.read_binary` (use `File.binread`, Ruby 1.9.3+).
117
+ * Deprecate `Kernel#eigenclass` (use `singleton_class` or `meta_class`; kept in tribute to _why).
118
+ * Deprecate `Kernel#extension`, `#instance_class`, `#qua_class`, `#object_class`
119
+ (use `singleton_class` or `meta_class`).
120
+ * Deprecate `Kernel#object_send` (use `public_send`), `#instance_send` (use `__send__`).
121
+ * Deprecate `Kernel#load_relative` (use `require_relative`).
122
+ * Deprecate `Kernel#returning` (use `Kernel#tap`).
123
+ * Deprecate `Kernel#memo` (use `Module#memoize`; global `$MEMO` is problematic).
124
+ * Update `Kernel#meta_class` to delegate to `singleton_class` internally.
125
+ * Fix dead requires for removed `kernel/singleton_class` in Proc and Kernel.
126
+ * Remove misplaced `applique/file_helpers` from core (test infrastructure).
127
+ * Remove OpenStruct extensions now built into Ruby (`to_h`, `each`, `[]`, `[]=`).
128
+ * Fix OpenStruct#initialize to not use removed `new_ostruct_member`.
129
+ * Add OpenStruct#merge (non-destructive version).
130
+ * Remove deprecated OpenStruct methods (`instance_delegate`, `ostruct_update`, etc.).
131
+ * Deprecate `cloneable.rb` (use `deep_dup`/`deep_clone` instead).
132
+ * Deprecate `continuation.rb` (callcc is obsolete; use Fiber).
133
+ * Deprecate `getoptlong.rb` (bundled gem heading for removal; use OptionParser).
134
+ * Deprecate `load_monitor.rb` (monkey-patches require/load globally).
135
+ * Clean up `random.rb`: remove Array#shuffle/shuffle! (Ruby built-in),
136
+ add Array#sample! (destructive sample), deprecate at_rand/pick (use sample).
137
+ * Fix Pathname#glob to wrap Ruby's built-in, adding symbol flag support.
138
+ * Remove Pathname#empty? (built into Ruby).
139
+ * Deprecate Pathname.null (use Pathname.new(File::NULL)).
140
+ * Fix `Math.kldivergence` (was broken — referenced `self` instead of array parameter).
141
+ * Drop unused `test_files` directive from gemspec. (PR#301)
142
+
143
+
3
144
  ## 3.1.0 / 2016-05-10
4
145
 
5
146
  More or less a minor release, but there are some backward incompatabilites
data/LICENSE.txt CHANGED
@@ -1,349 +1,27 @@
1
+ Ruby Facets
2
+ Copyright (c) 2005, Thomas Sawyer
3
+ All rights reserved.
1
4
 
2
- Ruby Facets
5
+ (BSD-2 LICENSE)
3
6
 
4
- Copyright (c) 2005,2010 Thomas Sawyer
7
+ Redistribution and use in source and binary forms, with or without modification,
8
+ are permitted provided that the following conditions are met:
5
9
 
10
+ 1. Redistributions of source code must retain the above copyright notice,
11
+ this list of conditions and the following disclaimer.
6
12
 
7
- THE RUBY LICENSE
8
- (http://www.ruby-lang.org/en/LICENSE.txt)
13
+ 2. Redistributions in binary form must reproduce the above copyright notice,
14
+ this list of conditions and the following disclaimer in the documentation
15
+ and/or other materials provided with the distribution.
9
16
 
10
- You may redistribute this software and/or modify it under either the terms of
11
- the GPL (see below), or the conditions below:
17
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
18
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20
+ IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
21
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
22
+ BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
24
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
25
+ OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
26
+ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
12
27
 
13
- 1. You may make and give away verbatim copies of the source form of the
14
- software without restriction, provided that you duplicate all of the
15
- original copyright notices and associated disclaimers.
16
-
17
- 2. You may modify your copy of the software in any way, provided that
18
- you do at least ONE of the following:
19
-
20
- a) place your modifications in the Public Domain or otherwise
21
- make them Freely Available, such as by posting said
22
- modifications to Usenet or an equivalent medium, or by allowing
23
- the author to include your modifications in the software.
24
-
25
- b) use the modified software only within your corporation or
26
- organization.
27
-
28
- c) rename any non-standard executables so the names do not conflict
29
- with standard executables, which must also be provided.
30
-
31
- d) make other distribution arrangements with the author.
32
-
33
- 3. You may distribute the software in object code or executable
34
- form, provided that you do at least ONE of the following:
35
-
36
- a) distribute the executables and library files of the software,
37
- together with instructions (in the manual page or equivalent)
38
- on where to get the original distribution.
39
-
40
- b) accompany the distribution with the machine-readable source of
41
- the software.
42
-
43
- c) give non-standard executables non-standard names, with
44
- instructions on where to get the original software distribution.
45
-
46
- d) make other distribution arrangements with the author.
47
-
48
- 4. You may modify and include the part of the software into any other
49
- software (possibly commercial). But some files in the distribution
50
- are not written by the author, so that they are not under these terms.
51
-
52
- For the list of those files and their copying conditions, see the
53
- file LEGAL.
54
-
55
- 5. The scripts and library files supplied as input to or produced as
56
- output from the software do not automatically fall under the
57
- copyright of the software, but belong to whomever generated them,
58
- and may be sold commercially, and may be aggregated with this
59
- software.
60
-
61
- 6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
62
- IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
63
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
64
- PURPOSE.
65
-
66
- ----------------------------------------------------------------------------
67
-
68
-
69
- GNU GENERAL PUBLIC LICENSE
70
- Version 2, June 1991
71
-
72
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
73
- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
74
- Everyone is permitted to copy and distribute verbatim copies
75
- of this license document, but changing it is not allowed.
76
-
77
- Preamble
78
-
79
- The licenses for most software are designed to take away your
80
- freedom to share and change it. By contrast, the GNU General Public
81
- License is intended to guarantee your freedom to share and change free
82
- software--to make sure the software is free for all its users. This
83
- General Public License applies to most of the Free Software
84
- Foundation's software and to any other program whose authors commit to
85
- using it. (Some other Free Software Foundation software is covered by
86
- the GNU Library General Public License instead.) You can apply it to
87
- your programs, too.
88
-
89
- When we speak of free software, we are referring to freedom, not
90
- price. Our General Public Licenses are designed to make sure that you
91
- have the freedom to distribute copies of free software (and charge for
92
- this service if you wish), that you receive source code or can get it
93
- if you want it, that you can change the software or use pieces of it
94
- in new free programs; and that you know you can do these things.
95
-
96
- To protect your rights, we need to make restrictions that forbid
97
- anyone to deny you these rights or to ask you to surrender the rights.
98
- These restrictions translate to certain responsibilities for you if you
99
- distribute copies of the software, or if you modify it.
100
-
101
- For example, if you distribute copies of such a program, whether
102
- gratis or for a fee, you must give the recipients all the rights that
103
- you have. You must make sure that they, too, receive or can get the
104
- source code. And you must show them these terms so they know their
105
- rights.
106
-
107
- We protect your rights with two steps: (1) copyright the software, and
108
- (2) offer you this license which gives you legal permission to copy,
109
- distribute and/or modify the software.
110
-
111
- Also, for each author's protection and ours, we want to make certain
112
- that everyone understands that there is no warranty for this free
113
- software. If the software is modified by someone else and passed on, we
114
- want its recipients to know that what they have is not the original, so
115
- that any problems introduced by others will not reflect on the original
116
- authors' reputations.
117
-
118
- Finally, any free program is threatened constantly by software
119
- patents. We wish to avoid the danger that redistributors of a free
120
- program will individually obtain patent licenses, in effect making the
121
- program proprietary. To prevent this, we have made it clear that any
122
- patent must be licensed for everyone's free use or not licensed at all.
123
-
124
- The precise terms and conditions for copying, distribution and
125
- modification follow.
126
-
127
- GNU GENERAL PUBLIC LICENSE
128
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
129
-
130
- 0. This License applies to any program or other work which contains
131
- a notice placed by the copyright holder saying it may be distributed
132
- under the terms of this General Public License. The "Program", below,
133
- refers to any such program or work, and a "work based on the Program"
134
- means either the Program or any derivative work under copyright law:
135
- that is to say, a work containing the Program or a portion of it,
136
- either verbatim or with modifications and/or translated into another
137
- language. (Hereinafter, translation is included without limitation in
138
- the term "modification".) Each licensee is addressed as "you".
139
-
140
- Activities other than copying, distribution and modification are not
141
- covered by this License; they are outside its scope. The act of
142
- running the Program is not restricted, and the output from the Program
143
- is covered only if its contents constitute a work based on the
144
- Program (independent of having been made by running the Program).
145
- Whether that is true depends on what the Program does.
146
-
147
- 1. You may copy and distribute verbatim copies of the Program's
148
- source code as you receive it, in any medium, provided that you
149
- conspicuously and appropriately publish on each copy an appropriate
150
- copyright notice and disclaimer of warranty; keep intact all the
151
- notices that refer to this License and to the absence of any warranty;
152
- and give any other recipients of the Program a copy of this License
153
- along with the Program.
154
-
155
- You may charge a fee for the physical act of transferring a copy, and
156
- you may at your option offer warranty protection in exchange for a fee.
157
-
158
- 2. You may modify your copy or copies of the Program or any portion
159
- of it, thus forming a work based on the Program, and copy and
160
- distribute such modifications or work under the terms of Section 1
161
- above, provided that you also meet all of these conditions:
162
-
163
- a) You must cause the modified files to carry prominent notices
164
- stating that you changed the files and the date of any change.
165
-
166
- b) You must cause any work that you distribute or publish, that in
167
- whole or in part contains or is derived from the Program or any
168
- part thereof, to be licensed as a whole at no charge to all third
169
- parties under the terms of this License.
170
-
171
- c) If the modified program normally reads commands interactively
172
- when run, you must cause it, when started running for such
173
- interactive use in the most ordinary way, to print or display an
174
- announcement including an appropriate copyright notice and a
175
- notice that there is no warranty (or else, saying that you provide
176
- a warranty) and that users may redistribute the program under
177
- these conditions, and telling the user how to view a copy of this
178
- License. (Exception: if the Program itself is interactive but
179
- does not normally print such an announcement, your work based on
180
- the Program is not required to print an announcement.)
181
-
182
- These requirements apply to the modified work as a whole. If
183
- identifiable sections of that work are not derived from the Program,
184
- and can be reasonably considered independent and separate works in
185
- themselves, then this License, and its terms, do not apply to those
186
- sections when you distribute them as separate works. But when you
187
- distribute the same sections as part of a whole which is a work based
188
- on the Program, the distribution of the whole must be on the terms of
189
- this License, whose permissions for other licensees extend to the
190
- entire whole, and thus to each and every part regardless of who wrote it.
191
-
192
- Thus, it is not the intent of this section to claim rights or contest
193
- your rights to work written entirely by you; rather, the intent is to
194
- exercise the right to control the distribution of derivative or
195
- collective works based on the Program.
196
-
197
- In addition, mere aggregation of another work not based on the Program
198
- with the Program (or with a work based on the Program) on a volume of
199
- a storage or distribution medium does not bring the other work under
200
- the scope of this License.
201
-
202
- 3. You may copy and distribute the Program (or a work based on it,
203
- under Section 2) in object code or executable form under the terms of
204
- Sections 1 and 2 above provided that you also do one of the following:
205
-
206
- a) Accompany it with the complete corresponding machine-readable
207
- source code, which must be distributed under the terms of Sections
208
- 1 and 2 above on a medium customarily used for software interchange; or,
209
-
210
- b) Accompany it with a written offer, valid for at least three
211
- years, to give any third party, for a charge no more than your
212
- cost of physically performing source distribution, a complete
213
- machine-readable copy of the corresponding source code, to be
214
- distributed under the terms of Sections 1 and 2 above on a medium
215
- customarily used for software interchange; or,
216
-
217
- c) Accompany it with the information you received as to the offer
218
- to distribute corresponding source code. (This alternative is
219
- allowed only for noncommercial distribution and only if you
220
- received the program in object code or executable form with such
221
- an offer, in accord with Subsection b above.)
222
-
223
- The source code for a work means the preferred form of the work for
224
- making modifications to it. For an executable work, complete source
225
- code means all the source code for all modules it contains, plus any
226
- associated interface definition files, plus the scripts used to
227
- control compilation and installation of the executable. However, as a
228
- special exception, the source code distributed need not include
229
- anything that is normally distributed (in either source or binary
230
- form) with the major components (compiler, kernel, and so on) of the
231
- operating system on which the executable runs, unless that component
232
- itself accompanies the executable.
233
-
234
- If distribution of executable or object code is made by offering
235
- access to copy from a designated place, then offering equivalent
236
- access to copy the source code from the same place counts as
237
- distribution of the source code, even though third parties are not
238
- compelled to copy the source along with the object code.
239
-
240
- 4. You may not copy, modify, sublicense, or distribute the Program
241
- except as expressly provided under this License. Any attempt
242
- otherwise to copy, modify, sublicense or distribute the Program is
243
- void, and will automatically terminate your rights under this License.
244
- However, parties who have received copies, or rights, from you under
245
- this License will not have their licenses terminated so long as such
246
- parties remain in full compliance.
247
-
248
- 5. You are not required to accept this License, since you have not
249
- signed it. However, nothing else grants you permission to modify or
250
- distribute the Program or its derivative works. These actions are
251
- prohibited by law if you do not accept this License. Therefore, by
252
- modifying or distributing the Program (or any work based on the
253
- Program), you indicate your acceptance of this License to do so, and
254
- all its terms and conditions for copying, distributing or modifying
255
- the Program or works based on it.
256
-
257
- 6. Each time you redistribute the Program (or any work based on the
258
- Program), the recipient automatically receives a license from the
259
- original licensor to copy, distribute or modify the Program subject to
260
- these terms and conditions. You may not impose any further
261
- restrictions on the recipients' exercise of the rights granted herein.
262
- You are not responsible for enforcing compliance by third parties to
263
- this License.
264
-
265
- 7. If, as a consequence of a court judgment or allegation of patent
266
- infringement or for any other reason (not limited to patent issues),
267
- conditions are imposed on you (whether by court order, agreement or
268
- otherwise) that contradict the conditions of this License, they do not
269
- excuse you from the conditions of this License. If you cannot
270
- distribute so as to satisfy simultaneously your obligations under this
271
- License and any other pertinent obligations, then as a consequence you
272
- may not distribute the Program at all. For example, if a patent
273
- license would not permit royalty-free redistribution of the Program by
274
- all those who receive copies directly or indirectly through you, then
275
- the only way you could satisfy both it and this License would be to
276
- refrain entirely from distribution of the Program.
277
-
278
- If any portion of this section is held invalid or unenforceable under
279
- any particular circumstance, the balance of the section is intended to
280
- apply and the section as a whole is intended to apply in other
281
- circumstances.
282
-
283
- It is not the purpose of this section to induce you to infringe any
284
- patents or other property right claims or to contest validity of any
285
- such claims; this section has the sole purpose of protecting the
286
- integrity of the free software distribution system, which is
287
- implemented by public license practices. Many people have made
288
- generous contributions to the wide range of software distributed
289
- through that system in reliance on consistent application of that
290
- system; it is up to the author/donor to decide if he or she is willing
291
- to distribute software through any other system and a licensee cannot
292
- impose that choice.
293
-
294
- This section is intended to make thoroughly clear what is believed to
295
- be a consequence of the rest of this License.
296
-
297
- 8. If the distribution and/or use of the Program is restricted in
298
- certain countries either by patents or by copyrighted interfaces, the
299
- original copyright holder who places the Program under this License
300
- may add an explicit geographical distribution limitation excluding
301
- those countries, so that distribution is permitted only in or among
302
- countries not thus excluded. In such case, this License incorporates
303
- the limitation as if written in the body of this License.
304
-
305
- 9. The Free Software Foundation may publish revised and/or new versions
306
- of the General Public License from time to time. Such new versions will
307
- be similar in spirit to the present version, but may differ in detail to
308
- address new problems or concerns.
309
-
310
- Each version is given a distinguishing version number. If the Program
311
- specifies a version number of this License which applies to it and "any
312
- later version", you have the option of following the terms and conditions
313
- either of that version or of any later version published by the Free
314
- Software Foundation. If the Program does not specify a version number of
315
- this License, you may choose any version ever published by the Free Software
316
- Foundation.
317
-
318
- 10. If you wish to incorporate parts of the Program into other free
319
- programs whose distribution conditions are different, write to the author
320
- to ask for permission. For software which is copyrighted by the Free
321
- Software Foundation, write to the Free Software Foundation; we sometimes
322
- make exceptions for this. Our decision will be guided by the two goals
323
- of preserving the free status of all derivatives of our free software and
324
- of promoting the sharing and reuse of software generally.
325
-
326
- NO WARRANTY
327
-
328
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
329
- FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
330
- OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
331
- PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
332
- OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
333
- MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
334
- TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
335
- PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
336
- REPAIR OR CORRECTION.
337
-
338
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
339
- WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
340
- REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
341
- INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
342
- OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
343
- TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
344
- YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
345
- PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
346
- POSSIBILITY OF SUCH DAMAGES.
347
-
348
- END OF TERMS AND CONDITIONS
349
-
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # Ruby Facets
2
2
 
3
- [![Gem Version](https://badge.fury.io/rb/facets.png)](http://badge.fury.io/rb/facets)
4
- [![Build Status](https://secure.travis-ci.org/rubyworks/facets.png)](http://travis-ci.org/rubyworks/facets) &nbsp; &nbsp;
3
+ [![Gem Version](https://badge.fury.io/rb/facets.svg)](http://badge.fury.io/rb/facets)
4
+ [![Build Status](https://secure.travis-ci.org/rubyworks/facets.svg)](http://travis-ci.org/rubyworks/facets) &nbsp; &nbsp;
5
5
  [![Flattr Me](http://api.flattr.com/button/flattr-badge-large.png)](http://flattr.com/thing/324911/Rubyworks-Ruby-Development-Fund)
6
6
 
7
7
 
@@ -197,7 +197,7 @@ This project thrives on contribution!
197
197
 
198
198
  If you have any extension methods, classes or modules that you think have
199
199
  very general applicability and would like to see them included in
200
- this project, don't hesitiate to submit. Also, if you have better versions
200
+ this project, don't hesitate to submit. Also, if you have better versions
201
201
  of any thing already included or simply have a patch, they are more than
202
202
  welcome. We want Ruby Facets to be of the highest quality.
203
203
 
@@ -209,9 +209,13 @@ to handle unit testing, while [QED](http://rubyworks.github.com/qed) specificati
209
209
  provide tested documentation.
210
210
 
211
211
  Facets uses [Detroit](http://detroit.github.com) and [Rulebow](http://rubyworks.github.com/rulebow)
212
- build tools. Detroit is a life-cycle tool and Rulebow is continuous integrations tool. The build
213
- scripts (`Assembly` and `Rulebook` respectively), sometimes use other tools such as
214
- [Mast](http://rubyworks.github.com/mast) and [Indexer](http://rubyworks.github.com/indexer).
212
+ build tools. Detroit is a life-cycle tool and Rulebow is a continuous integration tool. These
213
+ tools, via the `Assembly` and `Rulebook` scripts respectively, sometimes use other tools such
214
+ as [Mast](http://rubyworks.github.com/mast) and [Indexer](http://rubyworks.github.com/indexer).
215
+ In addition we support [Rake](https://ruby.github.io/rake/) and [Guard](http://guardgem.org/)
216
+ build tools, which most developers are familiar with.
217
+ Note, that while these build tools can be easy circumvented, the Mast and Indexer tools are
218
+ necessary to prepare Facets for release.
215
219
 
216
220
 
217
221
  ## Authors
@@ -220,15 +224,18 @@ Much of this collection was written and/or inspired by a variety of great Ruby
220
224
  developers. Fortunately nearly all utilized works were copyrighted under the same
221
225
  open licenses, the Ruby License or the more liberal BSD and MIT licenses. In the
222
226
  one or two exceptions the copyright notice has been included with the source code.
223
- Any code file not specifically labeled othewise shall fall under the current Ruby
224
- License (which is BSD 2-clause).
227
+ We have since received permission from the various authors to normalize the licensing
228
+ to a single license. For this purpose we have chosen the BSD 2 Clause License.
229
+ This is the license Ruby itself now uses, so it seemed the most appropriate choice.
230
+ It is also almost identical to the MIT license. Any code file not specifically labeled
231
+ otherwise shall fall under the this license (which is BSD 2-clause).
225
232
 
226
233
  In all cases, every effort has been made to give credit where credit is due.
227
234
  You will find these acknowledgments embedded in the source code. You can see
228
235
  them in "CREDIT:" and/or "@author" lines.
229
- Also see the [Contibutors page](https://github.com/rubyworks/facets/wiki/Contributors)
236
+ Also see the [Contributors page](https://github.com/rubyworks/facets/wiki/Contributors)
230
237
  on the Wiki for a list of all contributing Rubyists. If anyone is missing from
231
- the list, please let us know so we can correct right away. Thanks.
238
+ the list, please let us know so we can correct. Thanks.
232
239
 
233
240
  This collection was put together by, and much of it written by [trans](https://github.com/trans).
234
241
  If need be, he can be reached via email at transfire at gmail.com.
@@ -239,22 +246,22 @@ If need be, he can be reached via email at transfire at gmail.com.
239
246
  The collection PER COLLECTION is licensed as follows:
240
247
 
241
248
  Ruby Facets
242
- Copyright (c) 2004,2010 Rubyworks
249
+ Copyright (c) 2005 Rubyworks
243
250
 
244
- Distributed under the terms of the Ruby license.
251
+ Distributed under the terms of the BSD-2 License (same as Ruby license).
245
252
 
246
- The Ruby license is a dual license that also provides for use of the GPL.
247
- Complete texts of both licenses accompany this document (see LICENSE).
253
+ The BSD 2 Clause License is a simple open source license. The complete text of the
254
+ license accompany this document (see the enclosed LICENSE file).
248
255
 
249
256
  Acknowledgments and Copyrights for particular snippets of borrowed code
250
- are given in their respective source. All licenses are either compatible
251
- with the Ruby license or the original author has given permission for
252
- inclusion of their code under such license.
257
+ are given in their respective source. At this point, all licensing has been normalized
258
+ for all included code. Original authors have given permission for inclusion of their
259
+ code under such license, with appropriate credit citations.
253
260
 
254
261
 
255
- "ALL YOUR BASE ARE BELONG TO RUBY!"
262
+ ## "ALL YOUR BASE ARE BELONG TO RUBY!"
256
263
 
257
- Ruby Facets, Copyright (c)2005,2011 Rubyworks
264
+ Ruby Facets, Copyright (c) 2005 Rubyworks
258
265
 
259
266
  Do you Ruby? (http://ruby-lang.org)
260
267
 
@@ -1,42 +1 @@
1
- class Array
2
-
3
- # The `arrange` method produces appropriate ranges from the objects in the array.
4
- #
5
- # Examples
6
- #
7
- # [1,2,3,6,7,8].arrange #=> [1..3, 6..8]
8
- #
9
- # [10..15, 16..20, 21, 22].arrange #=> [10..22]
10
- #
11
- # Assumes inclusive ranges (ie. 1..4) and range.first <= range.last.
12
- #
13
- # Works with integers, dates and strings. However, all the objects in the array must
14
- # be of the same class.
15
- #
16
- # CREDIT: monocle
17
-
18
- def arrange
19
- array = uniq.sort_by { |e| Range === e ? e.first : e }
20
- array.inject([]) do |c, value|
21
- unless c.empty?
22
- last = c.last
23
- last_value = (Range === last ? last.last : last)
24
- current_value = (Range === value ? value.first : value)
25
- if (last_value.succ <=> current_value) == -1
26
- c << value
27
- else
28
- first = (Range === last ? last.first : last)
29
- second = [Range === last ? last.last : last, Range === value ? value.last : value].max
30
- c[-1] = [first..second]
31
- c.flatten!
32
- end
33
- else
34
- c << value
35
- end
36
- end
37
- end
38
-
39
- alias rangify arrange
40
-
41
- end
42
-
1
+ require 'facets/array/to_ranges'