facets 1.7.0 → 1.7.30
Sign up to get free protection for your applications and to get access to all the features.
- data/{meta/projectinfo → PROJECT} +1 -3
- data/README +114 -47
- data/VERSION +1 -0
- data/doc/{ChangeLog → CHANGELOG} +30 -0
- data/doc/{ChangeLog.pre1.5 → CHANGELOG.1} +0 -0
- data/{COPYING → doc/COPYING} +0 -0
- data/lib/facet/cache.rb +1 -0
- data/lib/facet/doublemetaphone.rb +1 -0
- data/lib/facet/enumerable/eachn.rb +1 -0
- data/lib/facet/file/self/null.rb +1 -0
- data/lib/facet/filesystem.rb +1 -0
- data/lib/facet/filetest/self/root.rb +1 -0
- data/lib/facet/hash/delete_at.rb +1 -0
- data/lib/facet/hash/delete_values.rb +1 -0
- data/lib/facet/hash/delete_values_at.rb +1 -0
- data/lib/facet/kernel/load_local.rb +1 -0
- data/lib/facet/main_as_module.rb +1 -0
- data/lib/facet/nilclass/to_path.rb +1 -0
- data/lib/facet/symbol/to_s.rb +1 -0
- data/lib/facets.rb +1 -0
- data/lib/facets/core/array/delete_values_at.rb +2 -0
- data/lib/facets/core/array/op_fetch.rb +27 -0
- data/lib/facets/core/array/op_store.rb +2 -47
- data/lib/facets/core/enumerable/each_by.rb +91 -2
- data/lib/facets/core/enumerable/eachn.rb +41 -0
- data/lib/facets/core/file/self/null.rb +17 -0
- data/lib/facets/core/filetest/self/root.rb +13 -0
- data/lib/facets/core/hash/delete_at.rb +10 -0
- data/lib/facets/core/hash/delete_values.rb +20 -0
- data/lib/facets/core/hash/delete_values_at.rb +24 -0
- data/lib/facets/core/hash/each.rb +26 -11
- data/lib/facets/core/kernel/load_local.rb +26 -0
- data/lib/facets/core/nilclass/to_path.rb +18 -0
- data/lib/facets/core/symbol/to_s.rb +10 -0
- data/lib/facets/more/association.rb +1 -1
- data/lib/facets/more/cache.rb +81 -0
- data/lib/facets/more/command.rb +11 -1
- data/lib/facets/more/doublemetaphone.rb +371 -0
- data/lib/facets/more/filesystem.rb +43 -0
- data/lib/facets/more/main_as_module.rb +42 -0
- data/lib/facets/more/taskable.rb +89 -212
- data/setup.rb +204 -181
- data/test/lib/facets/core/array/test_at_rand.rb +1 -1
- data/test/lib/facets/core/array/test_delete_unless.rb +1 -1
- data/test/lib/facets/core/array/test_delete_values.rb +1 -1
- data/test/lib/facets/core/array/test_delete_values_at.rb +1 -1
- data/test/lib/facets/core/array/test_first.rb +1 -1
- data/test/lib/facets/core/array/test_head.rb +1 -1
- data/test/lib/facets/core/array/test_last_index.rb +1 -1
- data/test/lib/facets/core/array/test_merge.rb +1 -1
- data/test/lib/facets/core/array/test_mid.rb +1 -1
- data/test/lib/facets/core/array/test_middle.rb +1 -1
- data/test/lib/facets/core/array/test_op_fetch.rb +9 -1
- data/test/lib/facets/core/array/test_op_store.rb +1 -1
- data/test/lib/facets/core/array/test_pick.rb +1 -1
- data/test/lib/facets/core/array/test_pos.rb +1 -1
- data/test/lib/facets/core/array/test_pot.rb +1 -1
- data/test/lib/facets/core/array/test_pull.rb +1 -1
- data/test/lib/facets/core/array/test_rand_index.rb +1 -1
- data/test/lib/facets/core/array/test_rand_subset.rb +1 -1
- data/test/lib/facets/core/array/test_range.rb +1 -1
- data/test/lib/facets/core/array/test_rotate.rb +1 -1
- data/test/lib/facets/core/array/test_select.rb +1 -1
- data/test/lib/facets/core/array/test_shuffle.rb +1 -1
- data/test/lib/facets/core/array/test_thru.rb +1 -1
- data/test/lib/facets/core/array/test_to_b.rb +1 -1
- data/test/lib/facets/core/array/test_to_h.rb +1 -1
- data/test/lib/facets/core/array/test_to_hash.rb +1 -1
- data/test/lib/facets/core/binding/self/test_of_caller.rb +1 -1
- data/test/lib/facets/core/binding/test___LINE__.rb +1 -1
- data/test/lib/facets/core/binding/test_call_stack.rb +1 -1
- data/test/lib/facets/core/binding/test_called.rb +1 -1
- data/test/lib/facets/core/binding/test_caller.rb +1 -1
- data/test/lib/facets/core/binding/test_defined.rb +1 -1
- data/test/lib/facets/core/binding/test_eval.rb +1 -1
- data/test/lib/facets/core/binding/test_local_variables.rb +1 -1
- data/test/lib/facets/core/binding/test_method_name.rb +1 -1
- data/test/lib/facets/core/binding/test_op_fetch.rb +1 -1
- data/test/lib/facets/core/binding/test_op_store.rb +1 -1
- data/test/lib/facets/core/binding/test_self.rb +1 -1
- data/test/lib/facets/core/class/test_cattr.rb +1 -1
- data/test/lib/facets/core/class/test_descendents.rb +1 -1
- data/test/lib/facets/core/class/test_method_name.rb +1 -1
- data/test/lib/facets/core/class/test_remove_descendents.rb +1 -1
- data/test/lib/facets/core/class/test_unix_path.rb +1 -1
- data/test/lib/facets/core/comparable/test_at_least.rb +1 -1
- data/test/lib/facets/core/comparable/test_clip.rb +1 -1
- data/test/lib/facets/core/comparable/test_cmp.rb +1 -1
- data/test/lib/facets/core/continuation/self/test_create.rb +1 -1
- data/test/lib/facets/core/date/test_days_in_month.rb +1 -1
- data/test/lib/facets/core/date/test_days_of_month.rb +1 -1
- data/test/lib/facets/core/date/test_stamp.rb +1 -1
- data/test/lib/facets/core/date/test_to_date.rb +1 -1
- data/test/lib/facets/core/date/test_to_s.rb +1 -1
- data/test/lib/facets/core/date/test_to_time.rb +1 -1
- data/test/lib/facets/core/dir/self/test_ancestor.rb +1 -1
- data/test/lib/facets/core/dir/self/test_ascend.rb +1 -1
- data/test/lib/facets/core/enumerable/self/test_combinations.rb +1 -1
- data/test/lib/facets/core/enumerable/self/test_cross.rb +1 -1
- data/test/lib/facets/core/enumerable/test_collect_with_index.rb +1 -1
- data/test/lib/facets/core/enumerable/test_commonality.rb +1 -1
- data/test/lib/facets/core/enumerable/test_compact_collect.rb +1 -1
- data/test/lib/facets/core/enumerable/test_count.rb +1 -1
- data/test/lib/facets/core/enumerable/test_cross.rb +1 -1
- data/test/lib/facets/core/enumerable/test_each_by.rb +71 -0
- data/test/lib/facets/core/enumerable/test_each_combination.rb +1 -1
- data/test/lib/facets/core/enumerable/test_each_pair.rb +1 -1
- data/test/lib/facets/core/enumerable/test_each_unique_pair.rb +1 -1
- data/test/lib/facets/core/enumerable/test_eachn.rb +34 -0
- data/test/lib/facets/core/enumerable/test_entropy.rb +1 -1
- data/test/lib/facets/core/enumerable/test_every.rb +1 -1
- data/test/lib/facets/core/enumerable/test_ew.rb +1 -1
- data/test/lib/facets/core/enumerable/test_filter_collect.rb +1 -1
- data/test/lib/facets/core/enumerable/test_find_collisions.rb +1 -1
- data/test/lib/facets/core/enumerable/test_frequency.rb +1 -1
- data/test/lib/facets/core/enumerable/test_graph.rb +1 -1
- data/test/lib/facets/core/enumerable/test_ideal_entropy.rb +1 -1
- data/test/lib/facets/core/enumerable/test_none.rb +1 -1
- data/test/lib/facets/core/enumerable/test_occur.rb +1 -1
- data/test/lib/facets/core/enumerable/test_one.rb +1 -1
- data/test/lib/facets/core/enumerable/test_op_pow.rb +1 -1
- data/test/lib/facets/core/enumerable/test_partition_by.rb +1 -1
- data/test/lib/facets/core/enumerable/test_permute.rb +1 -1
- data/test/lib/facets/core/enumerable/test_probability.rb +1 -1
- data/test/lib/facets/core/enumerable/test_to_h.rb +1 -1
- data/test/lib/facets/core/enumerable/test_uniq_by.rb +1 -1
- data/test/lib/facets/core/file/self/test_create.rb +1 -1
- data/test/lib/facets/core/file/self/test_open_as_string.rb +1 -1
- data/test/lib/facets/core/file/self/test_read_list.rb +1 -1
- data/test/lib/facets/core/file/self/test_sanitize.rb +1 -1
- data/test/lib/facets/core/file/self/test_split_all.rb +1 -1
- data/test/lib/facets/core/float/test_round_at.rb +1 -1
- data/test/lib/facets/core/float/test_round_to.rb +1 -1
- data/test/lib/facets/core/hash/self/test_zipnew.rb +1 -1
- data/test/lib/facets/core/hash/test_alias.rb +1 -1
- data/test/lib/facets/core/hash/test_assert_has_keys.rb +1 -1
- data/test/lib/facets/core/hash/test_assert_has_only_keys.rb +1 -1
- data/test/lib/facets/core/hash/test_at.rb +1 -1
- data/test/lib/facets/core/hash/test_collate.rb +1 -1
- data/test/lib/facets/core/hash/test_each.rb +1 -1
- data/test/lib/facets/core/hash/test_each_with_index.rb +1 -1
- data/test/lib/facets/core/hash/test_each_with_key.rb +1 -1
- data/test/lib/facets/core/hash/test_graph.rb +1 -1
- data/test/lib/facets/core/hash/test_has_keys.rb +1 -1
- data/test/lib/facets/core/hash/test_has_only_keys.rb +1 -1
- data/test/lib/facets/core/hash/test_inverse.rb +1 -1
- data/test/lib/facets/core/hash/test_normalize_keys.rb +1 -1
- data/test/lib/facets/core/hash/test_op_fetch.rb +1 -1
- data/test/lib/facets/core/hash/test_op_lshift.rb +1 -1
- data/test/lib/facets/core/hash/test_rand_key.rb +1 -1
- data/test/lib/facets/core/hash/test_rand_pair.rb +1 -1
- data/test/lib/facets/core/hash/test_rand_value.rb +1 -1
- data/test/lib/facets/core/hash/test_replace_each.rb +1 -1
- data/test/lib/facets/core/hash/test_shuffle.rb +1 -1
- data/test/lib/facets/core/hash/test_slice.rb +1 -1
- data/test/lib/facets/core/hash/test_stringify_keys.rb +1 -1
- data/test/lib/facets/core/hash/test_swap.rb +1 -1
- data/test/lib/facets/core/hash/test_swapkey.rb +1 -1
- data/test/lib/facets/core/hash/test_symbolize_keys.rb +1 -1
- data/test/lib/facets/core/hash/test_to_h.rb +1 -1
- data/test/lib/facets/core/hash/test_to_ostruct.rb +1 -1
- data/test/lib/facets/core/hash/test_to_ostruct_recurse.rb +1 -1
- data/test/lib/facets/core/hash/test_traverse.rb +1 -1
- data/test/lib/facets/core/hash/test_update_each.rb +1 -1
- data/test/lib/facets/core/hash/test_update_keys.rb +1 -1
- data/test/lib/facets/core/hash/test_update_values.rb +1 -1
- data/test/lib/facets/core/hash/test_weave.rb +1 -1
- data/test/lib/facets/core/integer/test_factorial.rb +1 -1
- data/test/lib/facets/core/integer/test_multiple.rb +1 -1
- data/test/lib/facets/core/integer/test_of.rb +1 -1
- data/test/lib/facets/core/integer/test_ordinal.rb +1 -1
- data/test/lib/facets/core/integer/test_times_collect.rb +1 -1
- data/test/lib/facets/core/kernel/test___class__.rb +1 -1
- data/test/lib/facets/core/kernel/test_as.rb +1 -1
- data/test/lib/facets/core/kernel/test_assign_from.rb +1 -1
- data/test/lib/facets/core/kernel/test_assign_with.rb +1 -1
- data/test/lib/facets/core/kernel/test_bool.rb +1 -1
- data/test/lib/facets/core/kernel/test_bug.rb +1 -1
- data/test/lib/facets/core/kernel/test_call_stack.rb +1 -1
- data/test/lib/facets/core/kernel/test_called.rb +1 -1
- data/test/lib/facets/core/kernel/test_callee.rb +1 -1
- data/test/lib/facets/core/kernel/test_constant.rb +1 -1
- data/test/lib/facets/core/kernel/test_copy.rb +1 -1
- data/test/lib/facets/core/kernel/test_deep_copy.rb +1 -1
- data/test/lib/facets/core/kernel/test_demo.rb +1 -1
- data/test/lib/facets/core/kernel/test_fn.rb +1 -1
- data/test/lib/facets/core/kernel/test_get_by_id.rb +1 -1
- data/test/lib/facets/core/kernel/test_here.rb +1 -1
- data/test/lib/facets/core/kernel/test_in.rb +1 -1
- data/test/lib/facets/core/kernel/test_instance_exec.rb +1 -1
- data/test/lib/facets/core/kernel/test_maybe.rb +1 -1
- data/test/lib/facets/core/kernel/test_metaclass.rb +1 -1
- data/test/lib/facets/core/kernel/test_method.rb +1 -1
- data/test/lib/facets/core/kernel/test_methods.rb +1 -1
- data/test/lib/facets/core/kernel/test_new.rb +1 -1
- data/test/lib/facets/core/kernel/test_object_class.rb +1 -1
- data/test/lib/facets/core/kernel/test_object_hexid.rb +1 -1
- data/test/lib/facets/core/kernel/test_quaclass.rb +1 -1
- data/test/lib/facets/core/kernel/test_require_all.rb +1 -1
- data/test/lib/facets/core/kernel/test_require_esc.rb +1 -1
- data/test/lib/facets/core/kernel/test_require_facet.rb +1 -1
- data/test/lib/facets/core/kernel/test_resc.rb +1 -1
- data/test/lib/facets/core/kernel/test_returning.rb +1 -1
- data/test/lib/facets/core/kernel/test_send_as.rb +1 -1
- data/test/lib/facets/core/kernel/test_set_from.rb +1 -1
- data/test/lib/facets/core/kernel/test_set_with.rb +1 -1
- data/test/lib/facets/core/kernel/test_silently.rb +1 -1
- data/test/lib/facets/core/kernel/test_singleton.rb +1 -1
- data/test/lib/facets/core/kernel/test_singleton_class.rb +1 -1
- data/test/lib/facets/core/kernel/test_superior.rb +1 -1
- data/test/lib/facets/core/kernel/test_supermethod.rb +1 -1
- data/test/lib/facets/core/kernel/test_this.rb +1 -1
- data/test/lib/facets/core/kernel/test_to_b.rb +1 -1
- data/test/lib/facets/core/kernel/test_to_bool.rb +1 -1
- data/test/lib/facets/core/kernel/test_to_data.rb +1 -1
- data/test/lib/facets/core/kernel/test_uri.rb +1 -1
- data/test/lib/facets/core/kernel/test_val.rb +1 -1
- data/test/lib/facets/core/kernel/test_with_accessor.rb +1 -1
- data/test/lib/facets/core/matchdata/test_match.rb +1 -1
- data/test/lib/facets/core/matchdata/test_matchtree.rb +1 -1
- data/test/lib/facets/core/module/test_abstract.rb +1 -1
- data/test/lib/facets/core/module/test_alias_module_function.rb +1 -1
- data/test/lib/facets/core/module/test_ancestor.rb +1 -1
- data/test/lib/facets/core/module/test_basename.rb +1 -1
- data/test/lib/facets/core/module/test_by_name.rb +1 -1
- data/test/lib/facets/core/module/test_class_extension.rb +1 -1
- data/test/lib/facets/core/module/test_clone_using.rb +1 -1
- data/test/lib/facets/core/module/test_dirname.rb +1 -1
- data/test/lib/facets/core/module/test_equate_on.rb +1 -1
- data/test/lib/facets/core/module/test_include_as.rb +1 -1
- data/test/lib/facets/core/module/test_initializer.rb +1 -1
- data/test/lib/facets/core/module/test_instance_methods.rb +1 -1
- data/test/lib/facets/core/module/test_integrate.rb +1 -1
- data/test/lib/facets/core/module/test_memoize.rb +1 -1
- data/test/lib/facets/core/module/test_modspace.rb +1 -1
- data/test/lib/facets/core/module/test_namespace.rb +1 -1
- data/test/lib/facets/core/module/test_nesting.rb +1 -1
- data/test/lib/facets/core/module/test_nodef.rb +1 -1
- data/test/lib/facets/core/module/test_on_included.rb +1 -1
- data/test/lib/facets/core/module/test_redef.rb +1 -1
- data/test/lib/facets/core/module/test_redefine_method.rb +1 -1
- data/test/lib/facets/core/module/test_redirect.rb +1 -1
- data/test/lib/facets/core/module/test_redirect_method.rb +1 -1
- data/test/lib/facets/core/module/test_remove.rb +1 -1
- data/test/lib/facets/core/module/test_rename.rb +1 -1
- data/test/lib/facets/core/module/test_rename_method.rb +1 -1
- data/test/lib/facets/core/module/test_revisal.rb +1 -1
- data/test/lib/facets/core/module/test_shadow_method.rb +1 -1
- data/test/lib/facets/core/module/test_sort_on.rb +1 -1
- data/test/lib/facets/core/module/test_this.rb +1 -1
- data/test/lib/facets/core/module/test_wrap.rb +1 -1
- data/test/lib/facets/core/module/test_wrap_method.rb +1 -1
- data/test/lib/facets/core/nilclass/test_blank.rb +1 -1
- data/test/lib/facets/core/nilclass/test_empty.rb +1 -1
- data/test/lib/facets/core/nilclass/test_include.rb +1 -1
- data/test/lib/facets/core/nilclass/test_op_fetch.rb +1 -1
- data/test/lib/facets/core/nilclass/test_size.rb +1 -1
- data/test/lib/facets/core/nilclass/test_to_h.rb +1 -1
- data/test/lib/facets/core/numeric/test_approx.rb +1 -1
- data/test/lib/facets/core/numeric/test_ceil_multiple.rb +1 -1
- data/test/lib/facets/core/numeric/test_distance.rb +1 -1
- data/test/lib/facets/core/numeric/test_succ.rb +1 -1
- data/test/lib/facets/core/numeric/test_to_b.rb +1 -1
- data/test/lib/facets/core/ostruct/test___merge__.rb +1 -1
- data/test/lib/facets/core/ostruct/test___update__.rb +1 -1
- data/test/lib/facets/core/ostruct/test_op_fetch.rb +1 -1
- data/test/lib/facets/core/ostruct/test_op_store.rb +1 -1
- data/test/lib/facets/core/proc/test_compose.rb +1 -1
- data/test/lib/facets/core/proc/test_op_mul.rb +1 -1
- data/test/lib/facets/core/proc/test_to_method.rb +1 -1
- data/test/lib/facets/core/range/test_to_r.rb +1 -1
- data/test/lib/facets/core/range/test_to_range.rb +1 -1
- data/test/lib/facets/core/range/test_umbrella.rb +1 -1
- data/test/lib/facets/core/range/test_within.rb +1 -1
- data/test/lib/facets/core/regexp/test_arity.rb +1 -1
- data/test/lib/facets/core/regexp/test_to_re.rb +1 -1
- data/test/lib/facets/core/regexp/test_to_regexp.rb +1 -1
- data/test/lib/facets/core/string/self/test_interpolate.rb +1 -1
- data/test/lib/facets/core/string/self/test_patterns.rb +1 -1
- data/test/lib/facets/core/string/self/test_rand_letter.rb +1 -1
- data/test/lib/facets/core/string/test_align_center.rb +1 -1
- data/test/lib/facets/core/string/test_at_rand.rb +1 -1
- data/test/lib/facets/core/string/test_basename.rb +1 -1
- data/test/lib/facets/core/string/test_blank.rb +1 -1
- data/test/lib/facets/core/string/test_bracket.rb +1 -1
- data/test/lib/facets/core/string/test_camelcase.rb +1 -1
- data/test/lib/facets/core/string/test_camelize.rb +1 -1
- data/test/lib/facets/core/string/test_capitalized.rb +1 -1
- data/test/lib/facets/core/string/test_chars.rb +1 -1
- data/test/lib/facets/core/string/test_cmp.rb +1 -1
- data/test/lib/facets/core/string/test_demodulize.rb +1 -1
- data/test/lib/facets/core/string/test_divide.rb +1 -1
- data/test/lib/facets/core/string/test_downcase.rb +1 -1
- data/test/lib/facets/core/string/test_dresner.rb +1 -1
- data/test/lib/facets/core/string/test_each_char.rb +1 -1
- data/test/lib/facets/core/string/test_each_word.rb +1 -1
- data/test/lib/facets/core/string/test_first.rb +1 -1
- data/test/lib/facets/core/string/test_fold.rb +1 -1
- data/test/lib/facets/core/string/test_humanize.rb +1 -1
- data/test/lib/facets/core/string/test_indent.rb +1 -1
- data/test/lib/facets/core/string/test_index_all.rb +1 -1
- data/test/lib/facets/core/string/test_last.rb +1 -1
- data/test/lib/facets/core/string/test_line_wrap.rb +1 -1
- data/test/lib/facets/core/string/test_lines.rb +1 -1
- data/test/lib/facets/core/string/test_lowercase.rb +1 -1
- data/test/lib/facets/core/string/test_margin.rb +1 -1
- data/test/lib/facets/core/string/test_methodize.rb +1 -1
- data/test/lib/facets/core/string/test_modulize.rb +1 -1
- data/test/lib/facets/core/string/test_mscan.rb +1 -1
- data/test/lib/facets/core/string/test_natcmp.rb +1 -1
- data/test/lib/facets/core/string/test_nchar.rb +1 -1
- data/test/lib/facets/core/string/test_pathize.rb +1 -1
- data/test/lib/facets/core/string/test_pop.rb +1 -1
- data/test/lib/facets/core/string/test_pot.rb +1 -1
- data/test/lib/facets/core/string/test_push.rb +1 -1
- data/test/lib/facets/core/string/test_quote.rb +1 -1
- data/test/lib/facets/core/string/test_rand_byte.rb +1 -1
- data/test/lib/facets/core/string/test_rand_index.rb +1 -1
- data/test/lib/facets/core/string/test_range.rb +1 -1
- data/test/lib/facets/core/string/test_range_all.rb +1 -1
- data/test/lib/facets/core/string/test_range_of_line.rb +1 -1
- data/test/lib/facets/core/string/test_regesc.rb +1 -1
- data/test/lib/facets/core/string/test_shatter.rb +1 -1
- data/test/lib/facets/core/string/test_shift.rb +1 -1
- data/test/lib/facets/core/string/test_shuffle.rb +1 -1
- data/test/lib/facets/core/string/test_similarity.rb +1 -1
- data/test/lib/facets/core/string/test_singular.rb +1 -1
- data/test/lib/facets/core/string/test_soundex.rb +1 -1
- data/test/lib/facets/core/string/test_succ.rb +1 -1
- data/test/lib/facets/core/string/test_to_a.rb +1 -1
- data/test/lib/facets/core/string/test_to_b.rb +1 -1
- data/test/lib/facets/core/string/test_to_const.rb +1 -1
- data/test/lib/facets/core/string/test_to_date.rb +1 -1
- data/test/lib/facets/core/string/test_to_proc.rb +1 -1
- data/test/lib/facets/core/string/test_to_re.rb +1 -1
- data/test/lib/facets/core/string/test_to_time.rb +1 -1
- data/test/lib/facets/core/string/test_unix_crypt.rb +1 -1
- data/test/lib/facets/core/string/test_unpack.rb +1 -1
- data/test/lib/facets/core/string/test_unshift.rb +1 -1
- data/test/lib/facets/core/string/test_upcase.rb +1 -1
- data/test/lib/facets/core/string/test_whitespace.rb +1 -1
- data/test/lib/facets/core/string/test_word_filter.rb +1 -1
- data/test/lib/facets/core/string/test_word_wrap.rb +1 -1
- data/test/lib/facets/core/string/test_words.rb +1 -1
- data/test/lib/facets/core/symbol/test_camelcase.rb +1 -1
- data/test/lib/facets/core/symbol/test_camelize.rb +1 -1
- data/test/lib/facets/core/symbol/test_capitalize.rb +1 -1
- data/test/lib/facets/core/symbol/test_capitalized.rb +1 -1
- data/test/lib/facets/core/symbol/test_downcase.rb +1 -1
- data/test/lib/facets/core/symbol/test_not.rb +1 -1
- data/test/lib/facets/core/symbol/test_pad.rb +1 -1
- data/test/lib/facets/core/symbol/test_succ.rb +1 -1
- data/test/lib/facets/core/symbol/test_to_const.rb +1 -1
- data/test/lib/facets/core/symbol/test_to_proc.rb +1 -1
- data/test/lib/facets/core/symbol/test_to_str.rb +1 -1
- data/test/lib/facets/core/symbol/test_underscore.rb +1 -1
- data/test/lib/facets/core/symbol/test_upcase.rb +1 -1
- data/test/lib/facets/core/time/test_change.rb +1 -1
- data/test/lib/facets/core/time/test_elapse.rb +1 -1
- data/test/lib/facets/core/time/test_stamp.rb +1 -1
- data/test/lib/facets/core/time/test_to_date.rb +1 -1
- data/test/lib/facets/core/time/test_to_s.rb +1 -1
- data/test/lib/facets/core/time/test_to_time.rb +1 -1
- data/test/lib/facets/more/test_annattr.rb +1 -1
- data/test/lib/facets/more/test_annotation.rb +1 -1
- data/test/lib/facets/more/test_ansicode.rb +1 -1
- data/test/lib/facets/more/test_association.rb +1 -1
- data/test/lib/facets/more/test_autoarray.rb +1 -1
- data/test/lib/facets/more/test_basicobject.rb +1 -1
- data/test/lib/facets/more/test_bbcode.rb +1 -1
- data/test/lib/facets/more/test_binaryreader.rb +1 -1
- data/test/lib/facets/more/test_bitmask.rb +1 -1
- data/test/lib/facets/more/test_bytes.rb +1 -1
- data/test/lib/facets/more/test_classmethods.rb +1 -1
- data/test/lib/facets/more/test_command.rb +1 -1
- data/test/lib/facets/more/test_coroutine.rb +1 -1
- data/test/lib/facets/more/test_crypt.rb +1 -1
- data/test/lib/facets/more/test_cut.rb +1 -1
- data/test/lib/facets/more/test_dictionary.rb +1 -1
- data/test/lib/facets/more/test_elementor.rb +1 -1
- data/test/lib/facets/more/test_enumerablepass.rb +1 -1
- data/test/lib/facets/more/test_floatstring.rb +1 -1
- data/test/lib/facets/more/test_functor.rb +1 -1
- data/test/lib/facets/more/test_htmlbuilder.rb +1 -1
- data/test/lib/facets/more/test_infinity.rb +1 -1
- data/test/lib/facets/more/test_inheritor.rb +1 -1
- data/test/lib/facets/more/test_instance_intercept.rb +1 -1
- data/test/lib/facets/more/test_interval.rb +1 -1
- data/test/lib/facets/more/test_json.rb +1 -1
- data/test/lib/facets/more/test_lisp.rb +1 -1
- data/test/lib/facets/more/test_lisp_format.rb +1 -1
- data/test/lib/facets/more/test_lrucache.rb +1 -1
- data/test/lib/facets/more/test_mathconstants.rb +1 -1
- data/test/lib/facets/more/test_methodfilter.rb +1 -1
- data/test/lib/facets/more/test_methodprobe.rb +1 -1
- data/test/lib/facets/more/test_multipliers.rb +1 -1
- data/test/lib/facets/more/test_multiton.rb +1 -1
- data/test/lib/facets/more/test_nackclass.rb +1 -1
- data/test/lib/facets/more/test_nilcomparable.rb +1 -1
- data/test/lib/facets/more/test_opencascade.rb +1 -1
- data/test/lib/facets/more/test_openobject.rb +1 -1
- data/test/lib/facets/more/test_overload.rb +1 -1
- data/test/lib/facets/more/test_paramix.rb +1 -1
- data/test/lib/facets/more/test_pqueue.rb +1 -1
- data/test/lib/facets/more/test_predicate.rb +1 -1
- data/test/lib/facets/more/test_preinitialize.rb +1 -1
- data/test/lib/facets/more/test_promoteself.rb +1 -1
- data/test/lib/facets/more/test_recorder.rb +1 -1
- data/test/lib/facets/more/test_snapshot.rb +1 -1
- data/test/lib/facets/more/test_statichash.rb +1 -1
- data/test/lib/facets/more/test_syncarray.rb +1 -1
- data/test/lib/facets/more/test_synchash.rb +1 -1
- data/test/lib/facets/more/test_tagiterator.rb +1 -1
- data/test/lib/facets/more/test_taskable.rb +28 -7
- data/test/lib/facets/more/test_timer.rb +1 -1
- data/test/lib/facets/more/test_times.rb +1 -1
- data/test/lib/facets/more/test_tuple.rb +1 -1
- data/test/lib/facets/more/test_typecast.rb +1 -1
- data/test/lib/facets/more/test_uninheritable.rb +1 -1
- data/test/lib/facets/more/test_units.rb +1 -1
- data/test/lib/facets/more/test_xmlbuilder.rb +1 -1
- data/test/lib/facets/more/test_xmlhelper.rb +1 -1
- data/test/lib/facets/more/test_xoxo.rb +1 -1
- data/test/lib/facets/more/test_yamlstruct.rb +1 -1
- data/util/announce +20 -0
- data/util/changelog +8 -0
- data/util/count +8 -0
- data/util/extest +8 -0
- data/util/list +38 -0
- data/util/package +9 -0
- data/util/prepare +12 -0
- data/util/redirect +34 -0
- data/util/release +13 -0
- data/util/setup +7 -0
- data/util/test +7 -0
- data/util/version +8 -0
- metadata +1514 -1491
- data/doc/CAUTION +0 -55
- data/doc/IMPORTANT +0 -8
- data/doc/LATEST +0 -41
- data/doc/history/ANN-0.6.0 +0 -40
- data/doc/history/ANN-0.6.1 +0 -36
- data/doc/history/ANN-0.6.3 +0 -43
- data/doc/history/ANN-0.7.0 +0 -59
- data/doc/history/ANN-0.8.1 +0 -127
- data/doc/history/INTRO +0 -172
- data/doc/history/README +0 -223
- data/doc/history/README-OLD +0 -180
- data/doc/manifest +0 -1209
- data/doc/scrap/Rakefile.old +0 -181
- data/lib/facet/enumerable/each_slice.rb +0 -1
- data/lib/facets/core/enumerable/each_slice.rb +0 -131
- data/meta/reapfile +0 -184
- data/meta/task +0 -74
- data/meta/tasks/calibre.rb +0 -16
- data/meta/version +0 -1
data/doc/scrap/Rakefile.old
DELETED
@@ -1,181 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
#require 'uri'
|
4
|
-
require 'yaml'
|
5
|
-
require 'fileutils'
|
6
|
-
require './lib/facets/core/file/self/read_list'
|
7
|
-
|
8
|
-
require 'reap/rake'
|
9
|
-
|
10
|
-
DATPATH = "data/facets"
|
11
|
-
ETCPATH = "conf/facets"
|
12
|
-
REQPATH = "facets/core"
|
13
|
-
MTHPATH = "lib/facets/core"
|
14
|
-
GENPATH = "lib/facets/core"
|
15
|
-
|
16
|
-
|
17
|
-
task :default => [ :tasks ]
|
18
|
-
|
19
|
-
task :tasks do
|
20
|
-
Rake.application.options.show_task_pattern = //
|
21
|
-
Rake.application.display_tasks_and_comments
|
22
|
-
end
|
23
|
-
|
24
|
-
#-----------------------------------------------------
|
25
|
-
# Generate facet/
|
26
|
-
#-----------------------------------------------------
|
27
|
-
desc %{Build facet redirect directory}
|
28
|
-
task :redirect do
|
29
|
-
sh %{rm -R 'lib/facet'} if File.directory?('lib/facet')
|
30
|
-
print "Creating redirection facet/ files..."
|
31
|
-
['core','more'].each{ |d|
|
32
|
-
from = "lib/facets"
|
33
|
-
rbs = Dir.glob( File.join( from, d, '**/*.rb' ) )
|
34
|
-
rbs.each { |e|
|
35
|
-
nolib = e.gsub( /^lib\//, '' )
|
36
|
-
re = Regexp.new( Regexp.escape( File.join( from, d ) + '/' ) )
|
37
|
-
link = e.gsub( re, 'lib/facet/')
|
38
|
-
FileUtils.mkdir_p( File.dirname( link ) )
|
39
|
-
File.open( link, "w+" ) { |w|
|
40
|
-
w << "require '#{nolib}'"
|
41
|
-
}
|
42
|
-
}
|
43
|
-
}
|
44
|
-
puts "[done]"
|
45
|
-
end
|
46
|
-
|
47
|
-
#-----------------------------------------------------
|
48
|
-
# Read in the facets directory and sort-out per class
|
49
|
-
#-----------------------------------------------------
|
50
|
-
Methods = {}
|
51
|
-
task :methods do
|
52
|
-
Dir.chdir(MTHPATH) do
|
53
|
-
dg = Dir.glob('*/**/*.rb')
|
54
|
-
dg.each { |f|
|
55
|
-
klass, *meth= f.split('/')
|
56
|
-
Methods[ klass ] ||= []
|
57
|
-
Methods[ klass ] << "#{meth.join('/').chomp('.rb')}"
|
58
|
-
}
|
59
|
-
Methods.keys.each { |k| Methods[k].sort! }
|
60
|
-
end
|
61
|
-
end
|
62
|
-
|
63
|
-
#-----------------------------------------------------
|
64
|
-
# Save method index to file in yaml format
|
65
|
-
#-----------------------------------------------------
|
66
|
-
desc %{Generate method index file}
|
67
|
-
task :index => [ :methods ] do
|
68
|
-
print "Creating method index... "
|
69
|
-
loc = File.join( DATPATH, 'index.yml' )
|
70
|
-
File.open( loc, 'w' ) { |f|
|
71
|
-
f << Methods.to_yaml
|
72
|
-
}
|
73
|
-
puts "[done]"
|
74
|
-
end
|
75
|
-
|
76
|
-
#-----------------------------------------------------
|
77
|
-
# Create per class feature files
|
78
|
-
#-----------------------------------------------------
|
79
|
-
desc %Q{Generate per-class feature files}
|
80
|
-
task :class => [:methods ] do
|
81
|
-
print "Creating per class files... "
|
82
|
-
|
83
|
-
index = Methods
|
84
|
-
noauto = File.read_list( File.join( ETCPATH, 'noauto' ) )
|
85
|
-
allfiles = index.collect{ |k,ms| ms.collect{ |m| "#{k}/#{m}" } }.flatten
|
86
|
-
full = calc_full(allfiles, noauto)
|
87
|
-
|
88
|
-
index.each { |classname, method_files|
|
89
|
-
File.open( "#{GENPATH}/#{classname.downcase}.rb", 'w' ) { |f|
|
90
|
-
method_files.each { |rf|
|
91
|
-
mfn = "#{classname.downcase}/#{rf}"
|
92
|
-
if full.include?(mfn)
|
93
|
-
f << %Q{require '#{REQPATH}/#{mfn}'\n}
|
94
|
-
end
|
95
|
-
}
|
96
|
-
}
|
97
|
-
}
|
98
|
-
puts "[done]"
|
99
|
-
end
|
100
|
-
|
101
|
-
#-----------------------------------------------------
|
102
|
-
# Do all prep tasks (do this to generate data index
|
103
|
-
# file and method group files)
|
104
|
-
#-----------------------------------------------------
|
105
|
-
desc %{Do all preperation (index, class)}
|
106
|
-
task :prep => [ :index, :class, :redirect ] do
|
107
|
-
end
|
108
|
-
|
109
|
-
#-----------------------------------------------------
|
110
|
-
# List Methods
|
111
|
-
#-----------------------------------------------------
|
112
|
-
desc %{Output a list of all methods}
|
113
|
-
task 'list' => [ :methods ] do
|
114
|
-
puts method_list_outline
|
115
|
-
end
|
116
|
-
|
117
|
-
# #-----------------------------------------------------
|
118
|
-
# # HTML List MethodsFile.new(
|
119
|
-
# #-----------------------------------------------------
|
120
|
-
#
|
121
|
-
# HEAD = <<-HERE
|
122
|
-
# <html>
|
123
|
-
# <head>
|
124
|
-
# <style>
|
125
|
-
# pre#methods {
|
126
|
-
# font-size: .8em;
|
127
|
-
# line-height: 1em;
|
128
|
-
# }
|
129
|
-
# </style>
|
130
|
-
# </head>
|
131
|
-
# <body>
|
132
|
-
# <pre id="methods">
|
133
|
-
# HERE
|
134
|
-
#
|
135
|
-
# FOOT=<<-HERE
|
136
|
-
# </pre>
|
137
|
-
# </body>
|
138
|
-
# </html>
|
139
|
-
# HERE
|
140
|
-
#
|
141
|
-
# desc %{generate method list html file}
|
142
|
-
# task 'listHtml' => [ :scrape_methods ] do
|
143
|
-
# s = HEAD + method_list_outline + FOOT
|
144
|
-
# File.open('pub/www/methods.html', 'w') { |f| f << s }
|
145
|
-
# end
|
146
|
-
|
147
|
-
#desc "Check for open comment tests"
|
148
|
-
#task :testchk do
|
149
|
-
# system %q{grep -r ^#=begin\ test ./lib}
|
150
|
-
#end
|
151
|
-
|
152
|
-
|
153
|
-
#-----------------------------------------------------
|
154
|
-
# Supporting Methods
|
155
|
-
#-----------------------------------------------------
|
156
|
-
|
157
|
-
private
|
158
|
-
|
159
|
-
def method_list_outline
|
160
|
-
s = ''
|
161
|
-
Methods.keys.sort.each { |k|
|
162
|
-
ms = Methods[k].collect{|m| m.gsub(%r{^self\/},'::')}.sort
|
163
|
-
s << "#{k}:\n"
|
164
|
-
ms.each { |m| s << " #{m}\n" }
|
165
|
-
}
|
166
|
-
s
|
167
|
-
end
|
168
|
-
|
169
|
-
# Full set of require files (allfiles minus noauto and unsafe)
|
170
|
-
def calc_full( allfiles, noauto )
|
171
|
-
sf = allfiles.dup
|
172
|
-
noauto.each do |f|
|
173
|
-
if f.include?('*')
|
174
|
-
re = %r"#{f.gsub('*','.*')}"
|
175
|
-
sf.reject!{ |x| x =~ re }
|
176
|
-
elsif sf.include?(f)
|
177
|
-
sf.delete f
|
178
|
-
end
|
179
|
-
end
|
180
|
-
sf.sort
|
181
|
-
end
|
@@ -1 +0,0 @@
|
|
1
|
-
require 'facets/core/enumerable/each_slice.rb'
|
@@ -1,131 +0,0 @@
|
|
1
|
-
|
2
|
-
module Enumerable
|
3
|
-
|
4
|
-
# Iterate through slices. If slicing _step_ is not
|
5
|
-
# given, the the arity if the block is used.
|
6
|
-
#
|
7
|
-
# x = []
|
8
|
-
# [1,2,3,4].each_slice(2){ |a,b| x << [a,b] }
|
9
|
-
# x #=> [ [1,2], [3,4] ]
|
10
|
-
#
|
11
|
-
# x = []
|
12
|
-
# [1,2,3,4,5,6].each_slice(3){ |a| x << a }
|
13
|
-
# x #=> [ [1,2,3], [4,5,6] ]
|
14
|
-
#
|
15
|
-
def each_slice(step=nil, &yld)
|
16
|
-
if step
|
17
|
-
cnt = step
|
18
|
-
n = length / cnt
|
19
|
-
n += 1 if length % cnt > 0
|
20
|
-
n.times { |i|
|
21
|
-
yld.call(*self.slice(i*cnt,cnt))
|
22
|
-
}
|
23
|
-
return cnt
|
24
|
-
else
|
25
|
-
cnt = yld.arity.abs
|
26
|
-
n = length / cnt
|
27
|
-
n += 1 if length % cnt > 0
|
28
|
-
n.times { |i|
|
29
|
-
yld.call(*self.slice(i*cnt,cnt))
|
30
|
-
}
|
31
|
-
return cnt
|
32
|
-
end
|
33
|
-
end
|
34
|
-
|
35
|
-
alias_method( :each_by, :each_slice )
|
36
|
-
|
37
|
-
end
|
38
|
-
|
39
|
-
|
40
|
-
class Array
|
41
|
-
|
42
|
-
# Iterates over +n+ elements at a time. If +n+ is
|
43
|
-
# not given then the arity of the block determines the
|
44
|
-
# slicing quantity.
|
45
|
-
#
|
46
|
-
# [1, 2, 3, 4].each_slice(2){ |a,b| ... }
|
47
|
-
#
|
48
|
-
# This is a specialized version Enumerable#each_slice
|
49
|
-
# but optimized specifically for Array.
|
50
|
-
def each_slice(n=nil, &yld)
|
51
|
-
n = yld.arity.abs unless n
|
52
|
-
i=0
|
53
|
-
while i < self.length
|
54
|
-
yld.call(*self.slice(i,n))
|
55
|
-
i+=n
|
56
|
-
end
|
57
|
-
end
|
58
|
-
|
59
|
-
alias_method( :each_by, :each_slice )
|
60
|
-
|
61
|
-
end
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
# _____ _
|
66
|
-
# |_ _|__ ___| |_
|
67
|
-
# | |/ _ \/ __| __|
|
68
|
-
# | | __/\__ \ |_
|
69
|
-
# |_|\___||___/\__|
|
70
|
-
#
|
71
|
-
=begin test
|
72
|
-
|
73
|
-
require 'test/unit'
|
74
|
-
|
75
|
-
class TCEnumerable < Test::Unit::TestCase
|
76
|
-
|
77
|
-
def test_each_slice
|
78
|
-
x = []
|
79
|
-
[1,2,3,4].each_slice{ |a,b| x << [a,b] }
|
80
|
-
o = [[1,2],[3,4]]
|
81
|
-
assert_equal( o, x )
|
82
|
-
|
83
|
-
x = []
|
84
|
-
[1,2,3,4,5].each_by{ |a,b,c| x << [a,b,c] }
|
85
|
-
o = [[1,2,3],[4,5,nil]]
|
86
|
-
assert_equal( o, x )
|
87
|
-
|
88
|
-
x = []
|
89
|
-
[1,2,3,4].each_slice(2){ |a,b| x << [a,b] }
|
90
|
-
o = [[1,2],[3,4]]
|
91
|
-
assert_equal( o, x )
|
92
|
-
|
93
|
-
x = []
|
94
|
-
[1,2,3,4,5,6,7,8].each_slice(4){ |*a| x << a }
|
95
|
-
o = [[1,2,3,4],[5,6,7,8]]
|
96
|
-
assert_equal( o, x )
|
97
|
-
|
98
|
-
x = []
|
99
|
-
[1,2,3,4,5,6].each_slice(3){ |*a| x << a }
|
100
|
-
o = [[1,2,3],[4,5,6]]
|
101
|
-
assert_equal( o, x )
|
102
|
-
|
103
|
-
a = [1,2,3,4,5,6]
|
104
|
-
r = []
|
105
|
-
a.each_slice(2){ |x,y| r << [x,y] }
|
106
|
-
assert_equal( [[1,2],[3,4],[5,6]], r )
|
107
|
-
|
108
|
-
r = []
|
109
|
-
a.each_slice(3){ |*e| r << e }
|
110
|
-
assert_equal( [[1,2,3],[4,5,6]], r )
|
111
|
-
end
|
112
|
-
|
113
|
-
end
|
114
|
-
|
115
|
-
class TC02 < Test::Unit::TestCase
|
116
|
-
|
117
|
-
def test_each_by
|
118
|
-
x = []
|
119
|
-
[1,2,3,4].each_by(2){ |a,b| x << [a,b] }
|
120
|
-
o = [[1,2],[3,4]]
|
121
|
-
assert_equal( o, x )
|
122
|
-
|
123
|
-
x = []
|
124
|
-
[1,2,3,4,5].each_by(3){ |*a| x << a }
|
125
|
-
o = [[1,2,3],[4,5]]
|
126
|
-
assert_equal( o, x )
|
127
|
-
end
|
128
|
-
|
129
|
-
end
|
130
|
-
|
131
|
-
=end
|
data/meta/reapfile
DELETED
@@ -1,184 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require './lib/facets/core/file/self/read_list'
|
4
|
-
|
5
|
-
#DATPATH = "data/facets"
|
6
|
-
#ETCPATH = "conf/facets"
|
7
|
-
#REQPATH = "facets/core"
|
8
|
-
#GENPATH = "lib/facets/core"
|
9
|
-
|
10
|
-
# REAP doesn't accept a default. Should it?
|
11
|
-
#task :default => [ :tasks ] # THIS IS WHAT IT DOES BY DEFAULT.
|
12
|
-
|
13
|
-
#
|
14
|
-
# Three stages to release.
|
15
|
-
#
|
16
|
-
|
17
|
-
desc %{First stage (redirect,extest,test)}
|
18
|
-
task '1stage' => [ :redirect, :extest, :test ]
|
19
|
-
|
20
|
-
desc %{Second stage (rdoc-core,rdoc-more,package)}
|
21
|
-
task '2stage' => [ :'rdoc-core', :'rdoc-more', :package ]
|
22
|
-
|
23
|
-
desc %{Final stage (publish,release)}
|
24
|
-
task '3stage' => [ :publish, :release ]
|
25
|
-
|
26
|
-
#
|
27
|
-
# Generate facet/ redirection folder.
|
28
|
-
#
|
29
|
-
|
30
|
-
LIBDIR = 'lib'
|
31
|
-
REDIR = 'facet'
|
32
|
-
SRCDIR = 'facets'
|
33
|
-
|
34
|
-
desc %{Build facet redirect directory}
|
35
|
-
task :redirect do
|
36
|
-
#puts "Creating redirection folder #{REDIR}/ ..."
|
37
|
-
count = 0
|
38
|
-
dest = File.join( LIBDIR, REDIR )
|
39
|
-
FileUtils.rm_r(dest) if File.directory?(dest)
|
40
|
-
Dir.chdir( LIBDIR ) do
|
41
|
-
['core','more'].each{ |d|
|
42
|
-
from = File.join( SRCDIR, d )
|
43
|
-
files = Dir.glob( File.join( from, '**/*.rb' ) )
|
44
|
-
files.each { |e|
|
45
|
-
re = Regexp.new( Regexp.escape( from + '/' ) )
|
46
|
-
link = e.sub( re, 'facet/')
|
47
|
-
FileUtils.mkdir_p( File.dirname( link ) )
|
48
|
-
File.open( link, "w+" ) { |w| w << "require '#{e}'" }
|
49
|
-
count += 1
|
50
|
-
}
|
51
|
-
}
|
52
|
-
end
|
53
|
-
puts "Created #{count} redirection files in #{REDIR}/ folder."
|
54
|
-
end
|
55
|
-
|
56
|
-
#
|
57
|
-
# Read in the facets directory and sort-out per class
|
58
|
-
#
|
59
|
-
|
60
|
-
Methods = {}
|
61
|
-
MTHPATH = "lib/facets/core"
|
62
|
-
|
63
|
-
task :index_methods do
|
64
|
-
Dir.chdir(MTHPATH) do
|
65
|
-
dg = Dir.glob('*/**/*.rb')
|
66
|
-
dg.each { |f|
|
67
|
-
klass, *meth= f.split('/')
|
68
|
-
Methods[ klass ] ||= []
|
69
|
-
Methods[ klass ] << "#{meth.join('/').chomp('.rb')}"
|
70
|
-
}
|
71
|
-
Methods.keys.each { |k| Methods[k].sort! }
|
72
|
-
end
|
73
|
-
end
|
74
|
-
|
75
|
-
#
|
76
|
-
# List Methods
|
77
|
-
#
|
78
|
-
|
79
|
-
desc %{Output a list of all methods}
|
80
|
-
task :list => [ :index_methods ] do
|
81
|
-
puts method_list_outline
|
82
|
-
end
|
83
|
-
|
84
|
-
#
|
85
|
-
# Make sure there are no remarked test comments.
|
86
|
-
#
|
87
|
-
|
88
|
-
#desc "Check for open comment tests"
|
89
|
-
#task :testchk do
|
90
|
-
# system %q{grep -r ^#=begin\ test ./lib}
|
91
|
-
#end
|
92
|
-
|
93
|
-
# # Save method index to file in yaml format
|
94
|
-
#
|
95
|
-
# desc %{Generate method index file}
|
96
|
-
# task :index => [ :methods ] do
|
97
|
-
# print "Creating method index... "
|
98
|
-
# loc = File.join( DATPATH, 'index.yml' )
|
99
|
-
# File.open( loc, 'w' ) { |f|
|
100
|
-
# f << Methods.to_yaml
|
101
|
-
# }
|
102
|
-
# puts "[done]"
|
103
|
-
# end
|
104
|
-
|
105
|
-
# # Create per class feature files
|
106
|
-
#
|
107
|
-
# desc %Q{Generate per-class feature files}
|
108
|
-
# task :class => [:methods ] do
|
109
|
-
# print "Creating per class files... "
|
110
|
-
#
|
111
|
-
# index = Methods
|
112
|
-
# noauto = File.read_list( File.join( ETCPATH, 'noauto' ) )
|
113
|
-
# allfiles = index.collect{ |k,ms| ms.collect{ |m| "#{k}/#{m}" } }.flatten
|
114
|
-
# full = calc_full(allfiles, noauto)
|
115
|
-
#
|
116
|
-
# index.each { |classname, method_files|
|
117
|
-
# File.open( "#{GENPATH}/#{classname.downcase}.rb", 'w' ) { |f|
|
118
|
-
# method_files.each { |rf|
|
119
|
-
# mfn = "#{classname.downcase}/#{rf}"
|
120
|
-
# if full.include?(mfn)
|
121
|
-
# f << %Q{require '#{REQPATH}/#{mfn}'\n}
|
122
|
-
# end
|
123
|
-
# }
|
124
|
-
# }
|
125
|
-
# }
|
126
|
-
# puts "[done]"
|
127
|
-
# end
|
128
|
-
|
129
|
-
# # HTML List MethodsFile.new(
|
130
|
-
#
|
131
|
-
# HEAD = <<-HERE
|
132
|
-
# <html>
|
133
|
-
# <head>
|
134
|
-
# <style>
|
135
|
-
# pre#methods {
|
136
|
-
# font-size: .8em;
|
137
|
-
# line-height: 1em;
|
138
|
-
# }
|
139
|
-
# </style>
|
140
|
-
# </head>
|
141
|
-
# <body>
|
142
|
-
# <pre id="methods">
|
143
|
-
# HERE
|
144
|
-
#
|
145
|
-
# FOOT=<<-HERE
|
146
|
-
# </pre>
|
147
|
-
# </body>
|
148
|
-
# </html>
|
149
|
-
# HERE
|
150
|
-
#
|
151
|
-
# desc %{generate method list html file}
|
152
|
-
# task 'listHtml' => [ :scrape_methods ] do
|
153
|
-
# s = HEAD + method_list_outline + FOOT
|
154
|
-
# File.open('pub/www/methods.html', 'w') { |f| f << s }
|
155
|
-
# end
|
156
|
-
|
157
|
-
private # Support Methods
|
158
|
-
|
159
|
-
# Create a nice text outline of the core methods.
|
160
|
-
|
161
|
-
def method_list_outline
|
162
|
-
s = ''
|
163
|
-
Methods.keys.sort.each { |k|
|
164
|
-
ms = Methods[k].collect{|m| m.gsub(%r{^self\/},'::')}.sort
|
165
|
-
s << "#{k}:\n"
|
166
|
-
ms.each { |m| s << " #{m}\n" }
|
167
|
-
}
|
168
|
-
s
|
169
|
-
end
|
170
|
-
|
171
|
-
# # Full set of require files (all files minus noauto and unsafe)
|
172
|
-
#
|
173
|
-
# def calc_full( allfiles, noauto )
|
174
|
-
# sf = allfiles.dup
|
175
|
-
# noauto.each do |f|
|
176
|
-
# if f.include?('*')
|
177
|
-
# re = %r"#{f.gsub('*','.*')}"
|
178
|
-
# sf.reject!{ |x| x =~ re }
|
179
|
-
# elsif sf.include?(f)
|
180
|
-
# sf.delete f
|
181
|
-
# end
|
182
|
-
# end
|
183
|
-
# sf.sort
|
184
|
-
# end
|