mack-facets 0.8.2 → 0.8.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/gems.rb +5 -1
- data/lib/gems/activesupport-2.2.2/lib/active_support.rb +61 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/base64.rb +33 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/basic_object.rb +24 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/buffered_logger.rb +122 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/cache.rb +223 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/cache/compressed_mem_cache_store.rb +20 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/cache/drb_store.rb +15 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/cache/file_store.rb +72 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/cache/mem_cache_store.rb +127 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/cache/memory_store.rb +52 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/cache/synchronized_memory_store.rb +47 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/callbacks.rb +280 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext.rb +4 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/array.rb +13 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/array/access.rb +53 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/array/conversions.rb +183 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/array/extract_options.rb +20 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/array/grouping.rb +106 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/array/random_access.rb +12 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/base64.rb +4 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/base64/encoding.rb +16 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/benchmark.rb +12 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/bigdecimal.rb +6 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/bigdecimal/conversions.rb +37 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/blank.rb +58 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/cgi.rb +5 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/cgi/escape_skipping_slashes.rb +14 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/class.rb +4 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/class/attribute_accessors.rb +54 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/class/delegating_attributes.rb +46 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/class/inheritable_attributes.rb +140 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/class/removal.rb +50 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/date.rb +10 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/date/behavior.rb +42 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/date/calculations.rb +230 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/date/conversions.rb +107 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/date_time.rb +12 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/date_time/calculations.rb +126 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/date_time/conversions.rb +96 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/duplicable.rb +43 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/enumerable.rb +107 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/exception.rb +41 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/file.rb +5 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/file/atomic.rb +46 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/float.rb +7 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/float/rounding.rb +24 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/float/time.rb +27 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/hash.rb +14 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/hash/conversions.rb +259 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/hash/deep_merge.rb +23 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/hash/diff.rb +19 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/hash/except.rb +25 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/hash/indifferent_access.rb +137 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/hash/keys.rb +52 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/hash/reverse_merge.rb +35 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/hash/slice.rb +33 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/integer.rb +9 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/integer/even_odd.rb +29 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/integer/inflections.rb +20 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/integer/time.rb +45 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/kernel.rb +5 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/kernel/agnostics.rb +11 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/kernel/daemonizing.rb +7 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/kernel/debugger.rb +13 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/kernel/reporting.rb +59 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/kernel/requires.rb +24 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/load_error.rb +38 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/logger.rb +143 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/module.rb +23 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/module/aliasing.rb +74 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/module/attr_accessor_with_default.rb +31 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/module/attr_internal.rb +32 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/module/attribute_accessors.rb +58 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/module/delegation.rb +95 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/module/inclusion.rb +30 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/module/introspection.rb +90 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/module/loading.rb +23 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/module/model_naming.rb +23 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/module/synchronization.rb +39 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/name_error.rb +17 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/numeric.rb +9 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/numeric/bytes.rb +44 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/numeric/conversions.rb +19 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/numeric/time.rb +81 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/object.rb +5 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/object/conversions.rb +14 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/object/extending.rb +80 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/object/instance_variables.rb +74 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/object/metaclass.rb +13 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/object/misc.rb +74 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/pathname.rb +7 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/pathname/clean_within.rb +14 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/proc.rb +12 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/process.rb +1 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/process/daemon.rb +25 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/range.rb +11 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/range/blockless_step.rb +32 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/range/conversions.rb +27 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/range/include_range.rb +30 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/range/overlaps.rb +15 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/rexml.rb +36 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/string.rb +22 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/string/access.rb +82 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/string/behavior.rb +13 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/string/conversions.rb +28 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/string/filters.rb +26 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/string/inflections.rb +167 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/string/iterators.rb +21 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/string/multibyte.rb +81 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/string/starts_ends_with.rb +35 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/string/xchar.rb +11 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/symbol.rb +14 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/time.rb +42 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/time/behavior.rb +13 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/time/calculations.rb +303 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/time/conversions.rb +90 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/time/zones.rb +86 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/dependencies.rb +621 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/deprecation.rb +243 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/duration.rb +96 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/gzip.rb +25 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/inflections.rb +55 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/inflector.rb +397 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/json.rb +23 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/json/decoding.rb +63 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/json/encoders/date.rb +21 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/json/encoders/date_time.rb +21 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/json/encoders/enumerable.rb +12 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/json/encoders/false_class.rb +5 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/json/encoders/hash.rb +47 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/json/encoders/nil_class.rb +5 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/json/encoders/numeric.rb +5 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/json/encoders/object.rb +6 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/json/encoders/regexp.rb +5 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/json/encoders/string.rb +36 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/json/encoders/symbol.rb +5 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/json/encoders/time.rb +21 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/json/encoders/true_class.rb +5 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/json/encoding.rb +37 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/json/variable.rb +10 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/locale/en.yml +32 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/memoizable.rb +82 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/multibyte.rb +33 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/multibyte/chars.rb +679 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/multibyte/exceptions.rb +8 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/multibyte/unicode_database.rb +71 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/option_merger.rb +17 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/ordered_hash.rb +58 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/ordered_options.rb +19 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/rescuable.rb +108 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/secure_random.rb +197 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/string_inquirer.rb +21 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/test_case.rb +24 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/testing/core_ext/test.rb +6 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/testing/core_ext/test/unit/assertions.rb +72 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/testing/default.rb +9 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/testing/performance.rb +452 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/testing/setup_and_teardown.rb +120 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/time_with_zone.rb +328 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/values/time_zone.rb +403 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/values/unicode_tables.dat +0 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor.rb +34 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/builder-2.1.2/blankslate.rb +113 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/builder-2.1.2/builder.rb +13 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/builder-2.1.2/builder/blankslate.rb +20 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/builder-2.1.2/builder/css.rb +250 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/builder-2.1.2/builder/xchar.rb +115 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/builder-2.1.2/builder/xmlbase.rb +139 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/builder-2.1.2/builder/xmlevents.rb +63 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/builder-2.1.2/builder/xmlmarkup.rb +328 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/i18n-0.0.1/i18n.rb +194 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/i18n-0.0.1/i18n/backend/simple.rb +216 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/i18n-0.0.1/i18n/exceptions.rb +53 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/memcache-client-1.5.1/memcache.rb +849 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo.rb +33 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/data_timezone.rb +47 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/data_timezone_info.rb +228 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Algiers.rb +55 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Cairo.rb +219 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Casablanca.rb +40 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Harare.rb +18 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Johannesburg.rb +25 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Monrovia.rb +22 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Nairobi.rb +23 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Argentina/Buenos_Aires.rb +166 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Argentina/San_Juan.rb +86 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Bogota.rb +23 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Caracas.rb +23 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Chicago.rb +283 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Chihuahua.rb +136 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Denver.rb +204 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Godthab.rb +161 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Guatemala.rb +27 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Halifax.rb +274 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Indiana/Indianapolis.rb +149 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Juneau.rb +194 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/La_Paz.rb +22 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Lima.rb +35 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Los_Angeles.rb +232 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Mazatlan.rb +139 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Mexico_City.rb +144 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Monterrey.rb +131 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/New_York.rb +282 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Phoenix.rb +30 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Regina.rb +74 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Santiago.rb +205 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Sao_Paulo.rb +171 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/St_Johns.rb +288 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Tijuana.rb +196 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Almaty.rb +67 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Baghdad.rb +73 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Baku.rb +161 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Bangkok.rb +20 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Chongqing.rb +33 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Colombo.rb +30 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Dhaka.rb +27 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Hong_Kong.rb +87 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Irkutsk.rb +165 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Jakarta.rb +30 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Jerusalem.rb +163 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Kabul.rb +20 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Kamchatka.rb +163 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Karachi.rb +30 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Katmandu.rb +20 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Kolkata.rb +25 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Krasnoyarsk.rb +163 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Kuala_Lumpur.rb +31 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Kuwait.rb +18 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Magadan.rb +163 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Muscat.rb +18 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Novosibirsk.rb +164 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Rangoon.rb +24 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Riyadh.rb +18 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Seoul.rb +34 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Shanghai.rb +35 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Singapore.rb +33 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Taipei.rb +59 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Tashkent.rb +47 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Tbilisi.rb +78 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Tehran.rb +121 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Tokyo.rb +30 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Ulaanbaatar.rb +65 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Urumqi.rb +33 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Vladivostok.rb +164 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Yakutsk.rb +163 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Yekaterinburg.rb +165 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Yerevan.rb +165 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Atlantic/Azores.rb +270 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Atlantic/Cape_Verde.rb +23 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Atlantic/South_Georgia.rb +18 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Adelaide.rb +187 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Brisbane.rb +35 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Darwin.rb +29 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Hobart.rb +193 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Melbourne.rb +185 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Perth.rb +37 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Sydney.rb +185 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Etc/UTC.rb +16 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Amsterdam.rb +228 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Athens.rb +185 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Belgrade.rb +163 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Berlin.rb +188 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Bratislava.rb +13 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Brussels.rb +232 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Bucharest.rb +181 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Budapest.rb +197 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Copenhagen.rb +179 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Dublin.rb +276 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Helsinki.rb +163 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Istanbul.rb +218 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Kiev.rb +168 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Lisbon.rb +268 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Ljubljana.rb +13 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/London.rb +288 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Madrid.rb +211 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Minsk.rb +170 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Moscow.rb +181 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Paris.rb +232 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Prague.rb +187 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Riga.rb +176 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Rome.rb +215 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Sarajevo.rb +13 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Skopje.rb +13 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Sofia.rb +173 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Stockholm.rb +165 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Tallinn.rb +172 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Vienna.rb +183 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Vilnius.rb +170 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Warsaw.rb +212 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Zagreb.rb +13 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Auckland.rb +202 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Fiji.rb +23 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Guam.rb +22 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Honolulu.rb +28 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Majuro.rb +20 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Midway.rb +25 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Noumea.rb +25 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Pago_Pago.rb +26 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Port_Moresby.rb +20 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Tongatapu.rb +27 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/info_timezone.rb +52 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/linked_timezone.rb +51 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/linked_timezone_info.rb +44 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/offset_rationals.rb +98 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/ruby_core_support.rb +56 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/time_or_datetime.rb +292 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone.rb +508 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone_definition.rb +56 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone_info.rb +40 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone_offset_info.rb +94 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone_period.rb +198 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone_transition_info.rb +129 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/xml-simple-1.0.11/xmlsimple.rb +1021 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/version.rb +9 -0
- data/lib/gems/activesupport-2.2.2/lib/active_support/whiny_nil.rb +58 -0
- data/lib/gems/activesupport-2.2.2/lib/activesupport.rb +1 -0
- data/lib/gems/extlib-0.9.9/Rakefile +182 -0
- data/lib/gems/extlib-0.9.9/lib/extlib.rb +56 -0
- data/lib/gems/{extlib-0.9.8 → extlib-0.9.9}/lib/extlib/assertions.rb +0 -0
- data/lib/gems/extlib-0.9.9/lib/extlib/blank.rb +89 -0
- data/lib/gems/extlib-0.9.9/lib/extlib/boolean.rb +11 -0
- data/lib/gems/extlib-0.9.9/lib/extlib/class.rb +175 -0
- data/lib/gems/extlib-0.9.9/lib/extlib/datetime.rb +27 -0
- data/lib/gems/extlib-0.9.9/lib/extlib/dictionary.rb +433 -0
- data/lib/gems/extlib-0.9.9/lib/extlib/hash.rb +442 -0
- data/lib/gems/{extlib-0.9.8 → extlib-0.9.9}/lib/extlib/hook.rb +0 -0
- data/lib/gems/extlib-0.9.9/lib/extlib/inflection.rb +434 -0
- data/lib/gems/extlib-0.9.9/lib/extlib/lazy_array.rb +397 -0
- data/lib/gems/extlib-0.9.9/lib/extlib/logger.rb +202 -0
- data/lib/gems/extlib-0.9.9/lib/extlib/mash.rb +148 -0
- data/lib/gems/extlib-0.9.9/lib/extlib/module.rb +41 -0
- data/lib/gems/extlib-0.9.9/lib/extlib/nil.rb +5 -0
- data/lib/gems/extlib-0.9.9/lib/extlib/numeric.rb +5 -0
- data/lib/gems/extlib-0.9.9/lib/extlib/object.rb +162 -0
- data/lib/gems/extlib-0.9.9/lib/extlib/object_space.rb +13 -0
- data/lib/gems/extlib-0.9.9/lib/extlib/pathname.rb +15 -0
- data/lib/gems/extlib-0.9.9/lib/extlib/pooling.rb +231 -0
- data/lib/gems/extlib-0.9.9/lib/extlib/rubygems.rb +38 -0
- data/lib/gems/extlib-0.9.9/lib/extlib/simple_set.rb +66 -0
- data/lib/gems/extlib-0.9.9/lib/extlib/string.rb +175 -0
- data/lib/gems/extlib-0.9.9/lib/extlib/struct.rb +17 -0
- data/lib/gems/extlib-0.9.9/lib/extlib/symbol.rb +21 -0
- data/lib/gems/{extlib-0.9.8 → extlib-0.9.9}/lib/extlib/tasks/release.rb +0 -0
- data/lib/gems/extlib-0.9.9/lib/extlib/time.rb +41 -0
- data/lib/gems/extlib-0.9.9/lib/extlib/version.rb +3 -0
- data/lib/gems/extlib-0.9.9/lib/extlib/virtual_file.rb +10 -0
- data/lib/mack-facets.rb +11 -15
- data/lib/mack-facets/1_9/test/unit/error.rb +15 -0
- data/lib/mack-facets/extensions/array.rb +0 -5
- data/lib/mack-facets/extensions/date_time.rb +5 -2
- data/lib/mack-facets/extensions/duration.rb +85 -0
- data/lib/mack-facets/extensions/kernel.rb +8 -0
- data/lib/mack-facets/extensions/string.rb +7 -86
- data/lib/mack-facets/utils/method_list.rb +49 -0
- metadata +413 -511
- data/lib/gems/extlib-0.9.8/lib/extlib.rb +0 -56
- data/lib/gems/extlib-0.9.8/lib/extlib/blank.rb +0 -59
- data/lib/gems/extlib-0.9.8/lib/extlib/boolean.rb +0 -11
- data/lib/gems/extlib-0.9.8/lib/extlib/class.rb +0 -175
- data/lib/gems/extlib-0.9.8/lib/extlib/datetime.rb +0 -9
- data/lib/gems/extlib-0.9.8/lib/extlib/dictionary.rb +0 -433
- data/lib/gems/extlib-0.9.8/lib/extlib/hash.rb +0 -419
- data/lib/gems/extlib-0.9.8/lib/extlib/inflection.rb +0 -435
- data/lib/gems/extlib-0.9.8/lib/extlib/lazy_array.rb +0 -106
- data/lib/gems/extlib-0.9.8/lib/extlib/logger.rb +0 -202
- data/lib/gems/extlib-0.9.8/lib/extlib/mash.rb +0 -148
- data/lib/gems/extlib-0.9.8/lib/extlib/module.rb +0 -41
- data/lib/gems/extlib-0.9.8/lib/extlib/nil.rb +0 -5
- data/lib/gems/extlib-0.9.8/lib/extlib/numeric.rb +0 -5
- data/lib/gems/extlib-0.9.8/lib/extlib/object.rb +0 -175
- data/lib/gems/extlib-0.9.8/lib/extlib/object_space.rb +0 -13
- data/lib/gems/extlib-0.9.8/lib/extlib/pathname.rb +0 -5
- data/lib/gems/extlib-0.9.8/lib/extlib/pooling.rb +0 -239
- data/lib/gems/extlib-0.9.8/lib/extlib/rubygems.rb +0 -38
- data/lib/gems/extlib-0.9.8/lib/extlib/simple_set.rb +0 -39
- data/lib/gems/extlib-0.9.8/lib/extlib/string.rb +0 -132
- data/lib/gems/extlib-0.9.8/lib/extlib/struct.rb +0 -8
- data/lib/gems/extlib-0.9.8/lib/extlib/symbol.rb +0 -17
- data/lib/gems/extlib-0.9.8/lib/extlib/time.rb +0 -19
- data/lib/gems/extlib-0.9.8/lib/extlib/version.rb +0 -3
- data/lib/gems/extlib-0.9.8/lib/extlib/virtual_file.rb +0 -10
- data/lib/gems/facets-2.4.5/VERSION +0 -1
- data/lib/gems/facets-2.4.5/lib/core/facets-live.rb +0 -17
- data/lib/gems/facets-2.4.5/lib/core/facets-load.rb +0 -12
- data/lib/gems/facets-2.4.5/lib/core/facets.rb +0 -11
- data/lib/gems/facets-2.4.5/lib/core/facets/array.rb +0 -6
- data/lib/gems/facets-2.4.5/lib/core/facets/array/combination.rb +0 -59
- data/lib/gems/facets-2.4.5/lib/core/facets/array/conjoin.rb +0 -58
- data/lib/gems/facets-2.4.5/lib/core/facets/array/delete.rb +0 -61
- data/lib/gems/facets-2.4.5/lib/core/facets/array/index.rb +0 -48
- data/lib/gems/facets-2.4.5/lib/core/facets/array/indexable.rb +0 -73
- data/lib/gems/facets-2.4.5/lib/core/facets/array/merge.rb +0 -21
- data/lib/gems/facets-2.4.5/lib/core/facets/array/not_empty.rb +0 -13
- data/lib/gems/facets-2.4.5/lib/core/facets/array/only.rb +0 -21
- data/lib/gems/facets-2.4.5/lib/core/facets/array/pad.rb +0 -41
- data/lib/gems/facets-2.4.5/lib/core/facets/array/permutation.rb +0 -30
- data/lib/gems/facets-2.4.5/lib/core/facets/array/product.rb +0 -57
- data/lib/gems/facets-2.4.5/lib/core/facets/array/recursively.rb +0 -30
- data/lib/gems/facets-2.4.5/lib/core/facets/array/rotate.rb +0 -42
- data/lib/gems/facets-2.4.5/lib/core/facets/array/select.rb +0 -16
- data/lib/gems/facets-2.4.5/lib/core/facets/array/splice.rb +0 -30
- data/lib/gems/facets-2.4.5/lib/core/facets/array/stackable.rb +0 -33
- data/lib/gems/facets-2.4.5/lib/core/facets/array/traverse.rb +0 -22
- data/lib/gems/facets-2.4.5/lib/core/facets/binding.rb +0 -6
- data/lib/gems/facets-2.4.5/lib/core/facets/binding/caller.rb +0 -54
- data/lib/gems/facets-2.4.5/lib/core/facets/binding/defined.rb +0 -13
- data/lib/gems/facets-2.4.5/lib/core/facets/binding/eval.rb +0 -18
- data/lib/gems/facets-2.4.5/lib/core/facets/binding/local_variables.rb +0 -15
- data/lib/gems/facets-2.4.5/lib/core/facets/binding/self.rb +0 -12
- data/lib/gems/facets-2.4.5/lib/core/facets/bitmask.rb +0 -104
- data/lib/gems/facets-2.4.5/lib/core/facets/blank.rb +0 -60
- data/lib/gems/facets-2.4.5/lib/core/facets/boolean.rb +0 -156
- data/lib/gems/facets-2.4.5/lib/core/facets/callstack.rb +0 -52
- data/lib/gems/facets-2.4.5/lib/core/facets/cattr.rb +0 -2
- data/lib/gems/facets-2.4.5/lib/core/facets/class.rb +0 -6
- data/lib/gems/facets-2.4.5/lib/core/facets/class/cattr.rb +0 -115
- data/lib/gems/facets-2.4.5/lib/core/facets/class/cattr_accessor.rb +0 -1
- data/lib/gems/facets-2.4.5/lib/core/facets/class/cattr_reader.rb +0 -1
- data/lib/gems/facets-2.4.5/lib/core/facets/class/cattr_writer.rb +0 -1
- data/lib/gems/facets-2.4.5/lib/core/facets/class/descendents.rb +0 -36
- data/lib/gems/facets-2.4.5/lib/core/facets/class/methodize.rb +0 -14
- data/lib/gems/facets-2.4.5/lib/core/facets/class/pathize.rb +0 -14
- data/lib/gems/facets-2.4.5/lib/core/facets/class/prepend.rb +0 -50
- data/lib/gems/facets-2.4.5/lib/core/facets/class/subclasses.rb +0 -2
- data/lib/gems/facets-2.4.5/lib/core/facets/class/to_proc.rb +0 -42
- data/lib/gems/facets-2.4.5/lib/core/facets/comparable.rb +0 -6
- data/lib/gems/facets-2.4.5/lib/core/facets/comparable/bound.rb +0 -65
- data/lib/gems/facets-2.4.5/lib/core/facets/comparable/cmp.rb +0 -38
- data/lib/gems/facets-2.4.5/lib/core/facets/comparable/comparable.rb +0 -42
- data/lib/gems/facets-2.4.5/lib/core/facets/dir.rb +0 -6
- data/lib/gems/facets-2.4.5/lib/core/facets/dir/ascend.rb +0 -59
- data/lib/gems/facets-2.4.5/lib/core/facets/dir/descend.rb +0 -1
- data/lib/gems/facets-2.4.5/lib/core/facets/dir/multiglob.rb +0 -92
- data/lib/gems/facets-2.4.5/lib/core/facets/dir/parent.rb +0 -13
- data/lib/gems/facets-2.4.5/lib/core/facets/dir/recurse.rb +0 -29
- data/lib/gems/facets-2.4.5/lib/core/facets/enumerable.rb +0 -6
- data/lib/gems/facets-2.4.5/lib/core/facets/enumerable/accumulate.rb +0 -21
- data/lib/gems/facets-2.4.5/lib/core/facets/enumerable/cluster_by.rb +0 -21
- data/lib/gems/facets-2.4.5/lib/core/facets/enumerable/collect.rb +0 -54
- data/lib/gems/facets-2.4.5/lib/core/facets/enumerable/commonality.rb +0 -33
- data/lib/gems/facets-2.4.5/lib/core/facets/enumerable/count.rb +0 -26
- data/lib/gems/facets-2.4.5/lib/core/facets/enumerable/divide.rb +0 -33
- data/lib/gems/facets-2.4.5/lib/core/facets/enumerable/duplicates.rb +0 -38
- data/lib/gems/facets-2.4.5/lib/core/facets/enumerable/each_by.rb +0 -33
- data/lib/gems/facets-2.4.5/lib/core/facets/enumerable/entropy.rb +0 -37
- data/lib/gems/facets-2.4.5/lib/core/facets/enumerable/frequency.rb +0 -18
- data/lib/gems/facets-2.4.5/lib/core/facets/enumerable/group_by.rb +0 -27
- data/lib/gems/facets-2.4.5/lib/core/facets/enumerable/inject.rb +0 -31
- data/lib/gems/facets-2.4.5/lib/core/facets/enumerable/map_send.rb +0 -12
- data/lib/gems/facets-2.4.5/lib/core/facets/enumerable/mash.rb +0 -32
- data/lib/gems/facets-2.4.5/lib/core/facets/enumerable/mode.rb +0 -16
- data/lib/gems/facets-2.4.5/lib/core/facets/enumerable/modulate.rb +0 -22
- data/lib/gems/facets-2.4.5/lib/core/facets/enumerable/none.rb +0 -31
- data/lib/gems/facets-2.4.5/lib/core/facets/enumerable/occur.rb +0 -38
- data/lib/gems/facets-2.4.5/lib/core/facets/enumerable/one.rb +0 -38
- data/lib/gems/facets-2.4.5/lib/core/facets/enumerable/probability.rb +0 -36
- data/lib/gems/facets-2.4.5/lib/core/facets/enumerable/split.rb +0 -27
- data/lib/gems/facets-2.4.5/lib/core/facets/enumerable/sum.rb +0 -16
- data/lib/gems/facets-2.4.5/lib/core/facets/enumerable/uniq_by.rb +0 -18
- data/lib/gems/facets-2.4.5/lib/core/facets/exception.rb +0 -6
- data/lib/gems/facets-2.4.5/lib/core/facets/exception/detail.rb +0 -19
- data/lib/gems/facets-2.4.5/lib/core/facets/exception/suppress.rb +0 -21
- data/lib/gems/facets-2.4.5/lib/core/facets/file.rb +0 -6
- data/lib/gems/facets-2.4.5/lib/core/facets/file/append.rb +0 -14
- data/lib/gems/facets-2.4.5/lib/core/facets/file/create.rb +0 -21
- data/lib/gems/facets-2.4.5/lib/core/facets/file/null.rb +0 -21
- data/lib/gems/facets-2.4.5/lib/core/facets/file/read.rb +0 -41
- data/lib/gems/facets-2.4.5/lib/core/facets/file/rewrite.rb +0 -88
- data/lib/gems/facets-2.4.5/lib/core/facets/file/rootname.rb +0 -33
- data/lib/gems/facets-2.4.5/lib/core/facets/file/split_root.rb +0 -10
- data/lib/gems/facets-2.4.5/lib/core/facets/file/write.rb +0 -22
- data/lib/gems/facets-2.4.5/lib/core/facets/file/writelines.rb +0 -24
- data/lib/gems/facets-2.4.5/lib/core/facets/filetest.rb +0 -6
- data/lib/gems/facets-2.4.5/lib/core/facets/filetest/root.rb +0 -17
- data/lib/gems/facets-2.4.5/lib/core/facets/float.rb +0 -6
- data/lib/gems/facets-2.4.5/lib/core/facets/float/round.rb +0 -2
- data/lib/gems/facets-2.4.5/lib/core/facets/functor.rb +0 -77
- data/lib/gems/facets-2.4.5/lib/core/facets/hash.rb +0 -6
- data/lib/gems/facets-2.4.5/lib/core/facets/hash/alias.rb +0 -31
- data/lib/gems/facets-2.4.5/lib/core/facets/hash/argumentize.rb +0 -22
- data/lib/gems/facets-2.4.5/lib/core/facets/hash/at.rb +0 -8
- data/lib/gems/facets-2.4.5/lib/core/facets/hash/autonew.rb +0 -42
- data/lib/gems/facets-2.4.5/lib/core/facets/hash/collate.rb +0 -45
- data/lib/gems/facets-2.4.5/lib/core/facets/hash/delete.rb +0 -47
- data/lib/gems/facets-2.4.5/lib/core/facets/hash/diff.rb +0 -11
- data/lib/gems/facets-2.4.5/lib/core/facets/hash/except.rb +0 -27
- data/lib/gems/facets-2.4.5/lib/core/facets/hash/insert.rb +0 -19
- data/lib/gems/facets-2.4.5/lib/core/facets/hash/inverse.rb +0 -27
- data/lib/gems/facets-2.4.5/lib/core/facets/hash/join.rb +0 -14
- data/lib/gems/facets-2.4.5/lib/core/facets/hash/keys.rb +0 -45
- data/lib/gems/facets-2.4.5/lib/core/facets/hash/mash.rb +0 -18
- data/lib/gems/facets-2.4.5/lib/core/facets/hash/merge.rb +0 -30
- data/lib/gems/facets-2.4.5/lib/core/facets/hash/op.rb +0 -7
- data/lib/gems/facets-2.4.5/lib/core/facets/hash/op_add.rb +0 -12
- data/lib/gems/facets-2.4.5/lib/core/facets/hash/op_and.rb +0 -33
- data/lib/gems/facets-2.4.5/lib/core/facets/hash/op_mul.rb +0 -18
- data/lib/gems/facets-2.4.5/lib/core/facets/hash/op_or.rb +0 -12
- data/lib/gems/facets-2.4.5/lib/core/facets/hash/op_push.rb +0 -17
- data/lib/gems/facets-2.4.5/lib/core/facets/hash/op_sub.rb +0 -26
- data/lib/gems/facets-2.4.5/lib/core/facets/hash/recursive_merge.rb +0 -33
- data/lib/gems/facets-2.4.5/lib/core/facets/hash/recursively.rb +0 -29
- data/lib/gems/facets-2.4.5/lib/core/facets/hash/rekey.rb +0 -59
- data/lib/gems/facets-2.4.5/lib/core/facets/hash/select.rb +0 -14
- data/lib/gems/facets-2.4.5/lib/core/facets/hash/slice.rb +0 -33
- data/lib/gems/facets-2.4.5/lib/core/facets/hash/swap.rb +0 -17
- data/lib/gems/facets-2.4.5/lib/core/facets/hash/to_h.rb +0 -1
- data/lib/gems/facets-2.4.5/lib/core/facets/hash/to_proc.rb +0 -41
- data/lib/gems/facets-2.4.5/lib/core/facets/hash/to_struct.rb +0 -17
- data/lib/gems/facets-2.4.5/lib/core/facets/hash/traverse.rb +0 -41
- data/lib/gems/facets-2.4.5/lib/core/facets/hash/update.rb +0 -81
- data/lib/gems/facets-2.4.5/lib/core/facets/hash/weave.rb +0 -81
- data/lib/gems/facets-2.4.5/lib/core/facets/hash/zipnew.rb +0 -2
- data/lib/gems/facets-2.4.5/lib/core/facets/indexable.rb +0 -251
- data/lib/gems/facets-2.4.5/lib/core/facets/integer.rb +0 -6
- data/lib/gems/facets-2.4.5/lib/core/facets/integer/even.rb +0 -1
- data/lib/gems/facets-2.4.5/lib/core/facets/integer/factorial.rb +0 -30
- data/lib/gems/facets-2.4.5/lib/core/facets/integer/multiple.rb +0 -15
- data/lib/gems/facets-2.4.5/lib/core/facets/integer/odd.rb +0 -35
- data/lib/gems/facets-2.4.5/lib/core/facets/integer/of.rb +0 -18
- data/lib/gems/facets-2.4.5/lib/core/facets/integer/ordinal.rb +0 -24
- data/lib/gems/facets-2.4.5/lib/core/facets/kernel.rb +0 -6
- data/lib/gems/facets-2.4.5/lib/core/facets/kernel/__callee__.rb +0 -1
- data/lib/gems/facets-2.4.5/lib/core/facets/kernel/__class__.rb +0 -9
- data/lib/gems/facets-2.4.5/lib/core/facets/kernel/__dir__.rb +0 -12
- data/lib/gems/facets-2.4.5/lib/core/facets/kernel/__get__.rb +0 -10
- data/lib/gems/facets-2.4.5/lib/core/facets/kernel/__method__.rb +0 -36
- data/lib/gems/facets-2.4.5/lib/core/facets/kernel/__set__.rb +0 -1
- data/lib/gems/facets-2.4.5/lib/core/facets/kernel/as.rb +0 -100
- data/lib/gems/facets-2.4.5/lib/core/facets/kernel/ask.rb +0 -27
- data/lib/gems/facets-2.4.5/lib/core/facets/kernel/attr_singleton.rb +0 -62
- data/lib/gems/facets-2.4.5/lib/core/facets/kernel/complete.rb +0 -18
- data/lib/gems/facets-2.4.5/lib/core/facets/kernel/constant.rb +0 -24
- data/lib/gems/facets-2.4.5/lib/core/facets/kernel/d.rb +0 -26
- data/lib/gems/facets-2.4.5/lib/core/facets/kernel/deep_copy.rb +0 -13
- data/lib/gems/facets-2.4.5/lib/core/facets/kernel/demo.rb +0 -23
- data/lib/gems/facets-2.4.5/lib/core/facets/kernel/ergo.rb +0 -42
- data/lib/gems/facets-2.4.5/lib/core/facets/kernel/here.rb +0 -12
- data/lib/gems/facets-2.4.5/lib/core/facets/kernel/in.rb +0 -13
- data/lib/gems/facets-2.4.5/lib/core/facets/kernel/instance.rb +0 -19
- data/lib/gems/facets-2.4.5/lib/core/facets/kernel/instance_assign.rb +0 -41
- data/lib/gems/facets-2.4.5/lib/core/facets/kernel/instance_class.rb +0 -24
- data/lib/gems/facets-2.4.5/lib/core/facets/kernel/instance_exec.rb +0 -40
- data/lib/gems/facets-2.4.5/lib/core/facets/kernel/instance_send.rb +0 -7
- data/lib/gems/facets-2.4.5/lib/core/facets/kernel/instance_variables.rb +0 -99
- data/lib/gems/facets-2.4.5/lib/core/facets/kernel/maybe.rb +0 -18
- data/lib/gems/facets-2.4.5/lib/core/facets/kernel/not_nil.rb +0 -17
- data/lib/gems/facets-2.4.5/lib/core/facets/kernel/object_class.rb +0 -10
- data/lib/gems/facets-2.4.5/lib/core/facets/kernel/object_hexid.rb +0 -12
- data/lib/gems/facets-2.4.5/lib/core/facets/kernel/object_send.rb +0 -32
- data/lib/gems/facets-2.4.5/lib/core/facets/kernel/p.rb +0 -24
- data/lib/gems/facets-2.4.5/lib/core/facets/kernel/populate.rb +0 -73
- data/lib/gems/facets-2.4.5/lib/core/facets/kernel/qua_class.rb +0 -19
- data/lib/gems/facets-2.4.5/lib/core/facets/kernel/require_all.rb +0 -21
- data/lib/gems/facets-2.4.5/lib/core/facets/kernel/require_local.rb +0 -24
- data/lib/gems/facets-2.4.5/lib/core/facets/kernel/resc.rb +0 -16
- data/lib/gems/facets-2.4.5/lib/core/facets/kernel/respond.rb +0 -23
- data/lib/gems/facets-2.4.5/lib/core/facets/kernel/returning.rb +0 -23
- data/lib/gems/facets-2.4.5/lib/core/facets/kernel/silence.rb +0 -75
- data/lib/gems/facets-2.4.5/lib/core/facets/kernel/singleton_class.rb +0 -19
- data/lib/gems/facets-2.4.5/lib/core/facets/kernel/tap.rb +0 -32
- data/lib/gems/facets-2.4.5/lib/core/facets/kernel/try.rb +0 -23
- data/lib/gems/facets-2.4.5/lib/core/facets/kernel/val.rb +0 -19
- data/lib/gems/facets-2.4.5/lib/core/facets/kernel/with.rb +0 -20
- data/lib/gems/facets-2.4.5/lib/core/facets/lazy.rb +0 -238
- data/lib/gems/facets-2.4.5/lib/core/facets/matchdata.rb +0 -6
- data/lib/gems/facets-2.4.5/lib/core/facets/matchdata/match.rb +0 -15
- data/lib/gems/facets-2.4.5/lib/core/facets/matchdata/matchset.rb +0 -44
- data/lib/gems/facets-2.4.5/lib/core/facets/metaid.rb +0 -94
- data/lib/gems/facets-2.4.5/lib/core/facets/module.rb +0 -6
- data/lib/gems/facets-2.4.5/lib/core/facets/module/abstract.rb +0 -21
- data/lib/gems/facets-2.4.5/lib/core/facets/module/alias_accessor.rb +0 -45
- data/lib/gems/facets-2.4.5/lib/core/facets/module/alias_method_chain.rb +0 -50
- data/lib/gems/facets-2.4.5/lib/core/facets/module/alias_module_function.rb +0 -30
- data/lib/gems/facets-2.4.5/lib/core/facets/module/ancestor.rb +0 -16
- data/lib/gems/facets-2.4.5/lib/core/facets/module/basename.rb +0 -31
- data/lib/gems/facets-2.4.5/lib/core/facets/module/can.rb +0 -14
- data/lib/gems/facets-2.4.5/lib/core/facets/module/class.rb +0 -12
- data/lib/gems/facets-2.4.5/lib/core/facets/module/conflict.rb +0 -63
- data/lib/gems/facets-2.4.5/lib/core/facets/module/include_function_module.rb +0 -25
- data/lib/gems/facets-2.4.5/lib/core/facets/module/instance_methods.rb +0 -40
- data/lib/gems/facets-2.4.5/lib/core/facets/module/integrate.rb +0 -2
- data/lib/gems/facets-2.4.5/lib/core/facets/module/is.rb +0 -57
- data/lib/gems/facets-2.4.5/lib/core/facets/module/methodize.rb +0 -14
- data/lib/gems/facets-2.4.5/lib/core/facets/module/modspace.rb +0 -22
- data/lib/gems/facets-2.4.5/lib/core/facets/module/module_load.rb +0 -56
- data/lib/gems/facets-2.4.5/lib/core/facets/module/nesting.rb +0 -18
- data/lib/gems/facets-2.4.5/lib/core/facets/module/op.rb +0 -95
- data/lib/gems/facets-2.4.5/lib/core/facets/module/pathize.rb +0 -22
- data/lib/gems/facets-2.4.5/lib/core/facets/module/prepend.rb +0 -26
- data/lib/gems/facets-2.4.5/lib/core/facets/module/redefine_method.rb +0 -35
- data/lib/gems/facets-2.4.5/lib/core/facets/module/redirect_method.rb +0 -45
- data/lib/gems/facets-2.4.5/lib/core/facets/module/rename_method.rb +0 -20
- data/lib/gems/facets-2.4.5/lib/core/facets/module/revise.rb +0 -62
- data/lib/gems/facets-2.4.5/lib/core/facets/module/spacename.rb +0 -25
- data/lib/gems/facets-2.4.5/lib/core/facets/module/wrap_method.rb +0 -28
- data/lib/gems/facets-2.4.5/lib/core/facets/nilclass.rb +0 -6
- data/lib/gems/facets-2.4.5/lib/core/facets/nilclass/ergo.rb +0 -1
- data/lib/gems/facets-2.4.5/lib/core/facets/nilclass/to_f.rb +0 -17
- data/lib/gems/facets-2.4.5/lib/core/facets/numeric.rb +0 -6
- data/lib/gems/facets-2.4.5/lib/core/facets/numeric/approx.rb +0 -15
- data/lib/gems/facets-2.4.5/lib/core/facets/numeric/distance.rb +0 -14
- data/lib/gems/facets-2.4.5/lib/core/facets/numeric/round.rb +0 -72
- data/lib/gems/facets-2.4.5/lib/core/facets/proc.rb +0 -6
- data/lib/gems/facets-2.4.5/lib/core/facets/proc/bind.rb +0 -22
- data/lib/gems/facets-2.4.5/lib/core/facets/proc/compose.rb +0 -42
- data/lib/gems/facets-2.4.5/lib/core/facets/proc/curry.rb +0 -31
- data/lib/gems/facets-2.4.5/lib/core/facets/proc/to_method.rb +0 -33
- data/lib/gems/facets-2.4.5/lib/core/facets/proc/update.rb +0 -9
- data/lib/gems/facets-2.4.5/lib/core/facets/range.rb +0 -6
- data/lib/gems/facets-2.4.5/lib/core/facets/range/combine.rb +0 -47
- data/lib/gems/facets-2.4.5/lib/core/facets/range/overlap.rb +0 -13
- data/lib/gems/facets-2.4.5/lib/core/facets/range/to_r.rb +0 -26
- data/lib/gems/facets-2.4.5/lib/core/facets/range/umbrella.rb +0 -1
- data/lib/gems/facets-2.4.5/lib/core/facets/range/within.rb +0 -66
- data/lib/gems/facets-2.4.5/lib/core/facets/regexp.rb +0 -6
- data/lib/gems/facets-2.4.5/lib/core/facets/regexp/arity.rb +0 -17
- data/lib/gems/facets-2.4.5/lib/core/facets/regexp/to_re.rb +0 -28
- data/lib/gems/facets-2.4.5/lib/core/facets/stackable.rb +0 -86
- data/lib/gems/facets-2.4.5/lib/core/facets/string.rb +0 -6
- data/lib/gems/facets-2.4.5/lib/core/facets/string/align.rb +0 -106
- data/lib/gems/facets-2.4.5/lib/core/facets/string/bracket.rb +0 -105
- data/lib/gems/facets-2.4.5/lib/core/facets/string/bytes.rb +0 -15
- data/lib/gems/facets-2.4.5/lib/core/facets/string/camelcase.rb +0 -26
- data/lib/gems/facets-2.4.5/lib/core/facets/string/capitalized.rb +0 -46
- data/lib/gems/facets-2.4.5/lib/core/facets/string/chars.rb +0 -16
- data/lib/gems/facets-2.4.5/lib/core/facets/string/chomp.rb +0 -33
- data/lib/gems/facets-2.4.5/lib/core/facets/string/cleave.rb +0 -36
- data/lib/gems/facets-2.4.5/lib/core/facets/string/divide.rb +0 -21
- data/lib/gems/facets-2.4.5/lib/core/facets/string/each_char.rb +0 -29
- data/lib/gems/facets-2.4.5/lib/core/facets/string/each_word.rb +0 -13
- data/lib/gems/facets-2.4.5/lib/core/facets/string/end_with.rb +0 -1
- data/lib/gems/facets-2.4.5/lib/core/facets/string/fold.rb +0 -39
- data/lib/gems/facets-2.4.5/lib/core/facets/string/interpolate.rb +0 -20
- data/lib/gems/facets-2.4.5/lib/core/facets/string/line_wrap.rb +0 -21
- data/lib/gems/facets-2.4.5/lib/core/facets/string/lines.rb +0 -16
- data/lib/gems/facets-2.4.5/lib/core/facets/string/methodize.rb +0 -17
- data/lib/gems/facets-2.4.5/lib/core/facets/string/modulize.rb +0 -21
- data/lib/gems/facets-2.4.5/lib/core/facets/string/mscan.rb +0 -19
- data/lib/gems/facets-2.4.5/lib/core/facets/string/natcmp.rb +0 -88
- data/lib/gems/facets-2.4.5/lib/core/facets/string/nchar.rb +0 -28
- data/lib/gems/facets-2.4.5/lib/core/facets/string/op_sub.rb +0 -14
- data/lib/gems/facets-2.4.5/lib/core/facets/string/pathize.rb +0 -16
- data/lib/gems/facets-2.4.5/lib/core/facets/string/range.rb +0 -77
- data/lib/gems/facets-2.4.5/lib/core/facets/string/rewrite.rb +0 -28
- data/lib/gems/facets-2.4.5/lib/core/facets/string/shatter.rb +0 -22
- data/lib/gems/facets-2.4.5/lib/core/facets/string/snakecase.rb +0 -21
- data/lib/gems/facets-2.4.5/lib/core/facets/string/splice.rb +0 -37
- data/lib/gems/facets-2.4.5/lib/core/facets/string/start_with.rb +0 -32
- data/lib/gems/facets-2.4.5/lib/core/facets/string/subtract.rb +0 -4
- data/lib/gems/facets-2.4.5/lib/core/facets/string/tab.rb +0 -103
- data/lib/gems/facets-2.4.5/lib/core/facets/string/titlecase.rb +0 -15
- data/lib/gems/facets-2.4.5/lib/core/facets/string/to_re.rb +0 -26
- data/lib/gems/facets-2.4.5/lib/core/facets/string/variablize.rb +0 -13
- data/lib/gems/facets-2.4.5/lib/core/facets/string/word_wrap.rb +0 -34
- data/lib/gems/facets-2.4.5/lib/core/facets/string/words.rb +0 -12
- data/lib/gems/facets-2.4.5/lib/core/facets/string/xor.rb +0 -22
- data/lib/gems/facets-2.4.5/lib/core/facets/symbol.rb +0 -6
- data/lib/gems/facets-2.4.5/lib/core/facets/symbol/chomp.rb +0 -24
- data/lib/gems/facets-2.4.5/lib/core/facets/symbol/generate.rb +0 -24
- data/lib/gems/facets-2.4.5/lib/core/facets/symbol/not.rb +0 -29
- data/lib/gems/facets-2.4.5/lib/core/facets/symbol/plain.rb +0 -17
- data/lib/gems/facets-2.4.5/lib/core/facets/symbol/query.rb +0 -1
- data/lib/gems/facets-2.4.5/lib/core/facets/symbol/re_s.rb +0 -18
- data/lib/gems/facets-2.4.5/lib/core/facets/symbol/setter.rb +0 -1
- data/lib/gems/facets-2.4.5/lib/core/facets/symbol/succ.rb +0 -19
- data/lib/gems/facets-2.4.5/lib/core/facets/symbol/to_proc.rb +0 -38
- data/lib/gems/facets-2.4.5/lib/core/facets/symbol/variablize.rb +0 -12
- data/lib/gems/facets-2.4.5/lib/core/facets/time.rb +0 -6
- data/lib/gems/facets-2.4.5/lib/core/facets/time/advance.rb +0 -17
- data/lib/gems/facets-2.4.5/lib/core/facets/time/ago.rb +0 -1
- data/lib/gems/facets-2.4.5/lib/core/facets/time/change.rb +0 -41
- data/lib/gems/facets-2.4.5/lib/core/facets/time/elapse.rb +0 -16
- data/lib/gems/facets-2.4.5/lib/core/facets/time/hence.rb +0 -94
- data/lib/gems/facets-2.4.5/lib/core/facets/time/round.rb +0 -17
- data/lib/gems/facets-2.4.5/lib/core/facets/time/set.rb +0 -21
- data/lib/gems/facets-2.4.5/lib/core/facets/time/stamp.rb +0 -44
- data/lib/gems/facets-2.4.5/lib/core/facets/time/to_time.rb +0 -21
- data/lib/gems/facets-2.4.5/lib/core/facets/time/trunc.rb +0 -15
- data/lib/gems/facets-2.4.5/lib/core/facets/to_hash.rb +0 -87
- data/lib/gems/facets-2.4.5/lib/core/facets/unboundmethod.rb +0 -6
- data/lib/gems/facets-2.4.5/lib/core/facets/unboundmethod/arguments.rb +0 -44
- data/lib/gems/facets-2.4.5/lib/core/facets/unboundmethod/name.rb +0 -25
- data/lib/gems/facets-2.4.5/lib/lore/facets/basicobject.rb +0 -14
- data/lib/gems/facets-2.4.5/lib/lore/facets/cgi.rb +0 -50
- data/lib/gems/facets-2.4.5/lib/lore/facets/continuation.rb +0 -57
- data/lib/gems/facets-2.4.5/lib/lore/facets/date.rb +0 -396
- data/lib/gems/facets-2.4.5/lib/lore/facets/fileutils.rb +0 -27
- data/lib/gems/facets-2.4.5/lib/lore/facets/fileutils/head.rb +0 -1
- data/lib/gems/facets-2.4.5/lib/lore/facets/fileutils/safe_ln.rb +0 -28
- data/lib/gems/facets-2.4.5/lib/lore/facets/fileutils/slice.rb +0 -141
- data/lib/gems/facets-2.4.5/lib/lore/facets/fileutils/tail.rb +0 -1
- data/lib/gems/facets-2.4.5/lib/lore/facets/fileutils/wc.rb +0 -114
- data/lib/gems/facets-2.4.5/lib/lore/facets/fileutils/whereis.rb +0 -64
- data/lib/gems/facets-2.4.5/lib/lore/facets/fileutils/which.rb +0 -101
- data/lib/gems/facets-2.4.5/lib/lore/facets/getoptlong.rb +0 -71
- data/lib/gems/facets-2.4.5/lib/lore/facets/logger.rb +0 -291
- data/lib/gems/facets-2.4.5/lib/lore/facets/ostruct.rb +0 -238
- data/lib/gems/facets-2.4.5/lib/lore/facets/pathname.rb +0 -172
- data/lib/gems/facets-2.4.5/lib/lore/facets/rbconfig.rb +0 -45
- data/lib/gems/facets-2.4.5/lib/lore/facets/set.rb +0 -27
- data/lib/gems/facets-2.4.5/lib/lore/facets/shellwords.rb +0 -89
- data/lib/gems/facets-2.4.5/lib/lore/facets/uri.rb +0 -249
- data/lib/gems/facets-2.4.5/lib/lore/facets/yaml.rb +0 -75
- data/lib/gems/facets-2.4.5/lib/lore/facets/zlib.rb +0 -38
- data/lib/gems/facets-2.4.5/lib/more/facets/1stclassmethod.rb +0 -140
- data/lib/gems/facets-2.4.5/lib/more/facets/advisable.rb +0 -162
- data/lib/gems/facets-2.4.5/lib/more/facets/annotations.rb +0 -302
- data/lib/gems/facets-2.4.5/lib/more/facets/ansicode.rb +0 -315
- data/lib/gems/facets-2.4.5/lib/more/facets/arguments.rb +0 -365
- data/lib/gems/facets-2.4.5/lib/more/facets/argvector.rb +0 -353
- data/lib/gems/facets-2.4.5/lib/more/facets/association.rb +0 -194
- data/lib/gems/facets-2.4.5/lib/more/facets/attr.rb +0 -208
- data/lib/gems/facets-2.4.5/lib/more/facets/autoarray.rb +0 -62
- data/lib/gems/facets-2.4.5/lib/more/facets/autoreload.rb +0 -150
- data/lib/gems/facets-2.4.5/lib/more/facets/basex.rb +0 -37
- data/lib/gems/facets-2.4.5/lib/more/facets/bbcode.rb +0 -397
- data/lib/gems/facets-2.4.5/lib/more/facets/bicrypt.rb +0 -265
- data/lib/gems/facets-2.4.5/lib/more/facets/binding/opvars.rb +0 -24
- data/lib/gems/facets-2.4.5/lib/more/facets/binreadable.rb +0 -221
- data/lib/gems/facets-2.4.5/lib/more/facets/blankslate.rb +0 -66
- data/lib/gems/facets-2.4.5/lib/more/facets/buildable.rb +0 -344
- data/lib/gems/facets-2.4.5/lib/more/facets/bytes.rb +0 -175
- data/lib/gems/facets-2.4.5/lib/more/facets/cachedecorator.rb +0 -117
- data/lib/gems/facets-2.4.5/lib/more/facets/capsule.rb +0 -258
- data/lib/gems/facets-2.4.5/lib/more/facets/chain.rb +0 -58
- data/lib/gems/facets-2.4.5/lib/more/facets/class_extension.rb +0 -114
- data/lib/gems/facets-2.4.5/lib/more/facets/classmethods.rb +0 -199
- data/lib/gems/facets-2.4.5/lib/more/facets/cloneable.rb +0 -76
- data/lib/gems/facets-2.4.5/lib/more/facets/command.rb +0 -439
- data/lib/gems/facets-2.4.5/lib/more/facets/consoleutils.rb +0 -113
- data/lib/gems/facets-2.4.5/lib/more/facets/coroutine.rb +0 -159
- data/lib/gems/facets-2.4.5/lib/more/facets/crypt.rb +0 -166
- data/lib/gems/facets-2.4.5/lib/more/facets/cssfilter.rb +0 -254
- data/lib/gems/facets-2.4.5/lib/more/facets/daemonize.rb +0 -44
- data/lib/gems/facets-2.4.5/lib/more/facets/dependency.rb +0 -151
- data/lib/gems/facets-2.4.5/lib/more/facets/dictionary.rb +0 -478
- data/lib/gems/facets-2.4.5/lib/more/facets/dictionarymatcher.rb +0 -136
- data/lib/gems/facets-2.4.5/lib/more/facets/downloader.rb +0 -281
- data/lib/gems/facets-2.4.5/lib/more/facets/duplicable.rb +0 -43
- data/lib/gems/facets-2.4.5/lib/more/facets/duration.rb +0 -540
- data/lib/gems/facets-2.4.5/lib/more/facets/elementor.rb +0 -133
- data/lib/gems/facets-2.4.5/lib/more/facets/elementwise.rb +0 -61
- data/lib/gems/facets-2.4.5/lib/more/facets/enumerablepass.rb +0 -217
- data/lib/gems/facets-2.4.5/lib/more/facets/equatable.rb +0 -120
- data/lib/gems/facets-2.4.5/lib/more/facets/eventhook.rb +0 -132
- data/lib/gems/facets-2.4.5/lib/more/facets/expirable.rb +0 -82
- data/lib/gems/facets-2.4.5/lib/more/facets/fileable.rb +0 -162
- data/lib/gems/facets-2.4.5/lib/more/facets/filelist.rb +0 -497
- data/lib/gems/facets-2.4.5/lib/more/facets/fileshell.rb +0 -202
- data/lib/gems/facets-2.4.5/lib/more/facets/hash/stringify_keys.rb +0 -1
- data/lib/gems/facets-2.4.5/lib/more/facets/hash/symbolize_keys.rb +0 -94
- data/lib/gems/facets-2.4.5/lib/more/facets/heap.rb +0 -22
- data/lib/gems/facets-2.4.5/lib/more/facets/htmlfilter.rb +0 -595
- data/lib/gems/facets-2.4.5/lib/more/facets/infinity.rb +0 -193
- data/lib/gems/facets-2.4.5/lib/more/facets/inheritor.rb +0 -130
- data/lib/gems/facets-2.4.5/lib/more/facets/ini.rb +0 -264
- data/lib/gems/facets-2.4.5/lib/more/facets/instantiable.rb +0 -47
- data/lib/gems/facets-2.4.5/lib/more/facets/instantise.rb +0 -1
- data/lib/gems/facets-2.4.5/lib/more/facets/instantize.rb +0 -95
- data/lib/gems/facets-2.4.5/lib/more/facets/interval.rb +0 -282
- data/lib/gems/facets-2.4.5/lib/more/facets/ioredirect.rb +0 -130
- data/lib/gems/facets-2.4.5/lib/more/facets/iteration.rb +0 -65
- data/lib/gems/facets-2.4.5/lib/more/facets/kernel/meta.rb +0 -32
- data/lib/gems/facets-2.4.5/lib/more/facets/linkedlist.rb +0 -222
- data/lib/gems/facets-2.4.5/lib/more/facets/lrucache.rb +0 -157
- data/lib/gems/facets-2.4.5/lib/more/facets/main.rb +0 -70
- data/lib/gems/facets-2.4.5/lib/more/facets/memoize.rb +0 -116
- data/lib/gems/facets-2.4.5/lib/more/facets/methodspace.rb +0 -141
- data/lib/gems/facets-2.4.5/lib/more/facets/minitar.rb +0 -1063
- data/lib/gems/facets-2.4.5/lib/more/facets/multipliers.rb +0 -109
- data/lib/gems/facets-2.4.5/lib/more/facets/multiton.rb +0 -386
- data/lib/gems/facets-2.4.5/lib/more/facets/nackclass.rb +0 -41
- data/lib/gems/facets-2.4.5/lib/more/facets/net/smtp_tls.rb +0 -131
- data/lib/gems/facets-2.4.5/lib/more/facets/nilstatus.rb +0 -47
- data/lib/gems/facets-2.4.5/lib/more/facets/nullclass.rb +0 -74
- data/lib/gems/facets-2.4.5/lib/more/facets/opencascade.rb +0 -94
- data/lib/gems/facets-2.4.5/lib/more/facets/opencollection.rb +0 -43
- data/lib/gems/facets-2.4.5/lib/more/facets/openhash.rb +0 -39
- data/lib/gems/facets-2.4.5/lib/more/facets/openobject.rb +0 -267
- data/lib/gems/facets-2.4.5/lib/more/facets/opesc.rb +0 -60
- data/lib/gems/facets-2.4.5/lib/more/facets/orderedhash.rb +0 -37
- data/lib/gems/facets-2.4.5/lib/more/facets/overload.rb +0 -94
- data/lib/gems/facets-2.4.5/lib/more/facets/paramix.rb +0 -202
- data/lib/gems/facets-2.4.5/lib/more/facets/partial.rb +0 -37
- data/lib/gems/facets-2.4.5/lib/more/facets/pathlist.rb +0 -112
- data/lib/gems/facets-2.4.5/lib/more/facets/platform.rb +0 -192
- data/lib/gems/facets-2.4.5/lib/more/facets/pool.rb +0 -91
- data/lib/gems/facets-2.4.5/lib/more/facets/pqueue.rb +0 -449
- data/lib/gems/facets-2.4.5/lib/more/facets/progressbar.rb +0 -253
- data/lib/gems/facets-2.4.5/lib/more/facets/prototype.rb +0 -88
- data/lib/gems/facets-2.4.5/lib/more/facets/random.rb +0 -451
- data/lib/gems/facets-2.4.5/lib/more/facets/rbsystem.rb +0 -222
- data/lib/gems/facets-2.4.5/lib/more/facets/recorder.rb +0 -109
- data/lib/gems/facets-2.4.5/lib/more/facets/reference.rb +0 -99
- data/lib/gems/facets-2.4.5/lib/more/facets/reflection.rb +0 -145
- data/lib/gems/facets-2.4.5/lib/more/facets/registerable.rb +0 -35
- data/lib/gems/facets-2.4.5/lib/more/facets/rwdelegator.rb +0 -74
- data/lib/gems/facets-2.4.5/lib/more/facets/semaphore.rb +0 -92
- data/lib/gems/facets-2.4.5/lib/more/facets/settings.rb +0 -248
- data/lib/gems/facets-2.4.5/lib/more/facets/snapshot.rb +0 -209
- data/lib/gems/facets-2.4.5/lib/more/facets/string/mask.rb +0 -278
- data/lib/gems/facets-2.4.5/lib/more/facets/string/words.rb +0 -173
- data/lib/gems/facets-2.4.5/lib/more/facets/succ.rb +0 -44
- data/lib/gems/facets-2.4.5/lib/more/facets/syncarray.rb +0 -114
- data/lib/gems/facets-2.4.5/lib/more/facets/synchash.rb +0 -157
- data/lib/gems/facets-2.4.5/lib/more/facets/tagiter.rb +0 -366
- data/lib/gems/facets-2.4.5/lib/more/facets/thread.rb +0 -51
- data/lib/gems/facets-2.4.5/lib/more/facets/timer.rb +0 -274
- data/lib/gems/facets-2.4.5/lib/more/facets/times.rb +0 -431
- data/lib/gems/facets-2.4.5/lib/more/facets/tracepoint.rb +0 -209
- data/lib/gems/facets-2.4.5/lib/more/facets/tuple.rb +0 -325
- data/lib/gems/facets-2.4.5/lib/more/facets/typecast.rb +0 -261
- data/lib/gems/facets-2.4.5/lib/more/facets/uninheritable.rb +0 -50
- data/lib/gems/facets-2.4.5/lib/more/facets/uploadutils.rb +0 -464
- data/lib/gems/facets-2.4.5/lib/more/facets/version.rb +0 -136
- data/lib/gems/facets-2.4.5/lib/more/facets/xmlhash.rb +0 -112
- data/lib/gems/facets-2.4.5/lib/more/facets/xoxo.rb +0 -259
- data/lib/gems/facets-2.4.5/lib/more/facets/ziputils.rb +0 -349
- data/lib/mack-facets/utils/blank_slate.rb +0 -3
@@ -0,0 +1,442 @@
|
|
1
|
+
class Hash
|
2
|
+
class << self
|
3
|
+
# Converts valid XML into a Ruby Hash structure.
|
4
|
+
#
|
5
|
+
# Mixed content is treated as text and any tags in it are left unparsed
|
6
|
+
#
|
7
|
+
# Any attributes other than type on a node containing a text node will be
|
8
|
+
# discarded
|
9
|
+
#
|
10
|
+
# [Typecasting is performed on elements that have a +type+ attribute:]
|
11
|
+
# integer:: Returns an Integer
|
12
|
+
# boolean:: Anything other than "true" evaluates to false.
|
13
|
+
# datetime::
|
14
|
+
# Returns a Time object. See Time documentation for valid Time strings.
|
15
|
+
# date::
|
16
|
+
# Returns a Date object. See Date documentation for valid Date strings.
|
17
|
+
#
|
18
|
+
# Keys are automatically converted to +snake_case+
|
19
|
+
#
|
20
|
+
# [Simple]
|
21
|
+
#
|
22
|
+
# <user gender='m'>
|
23
|
+
# <age type='integer'>35</age>
|
24
|
+
# <name>Home Simpson</name>
|
25
|
+
# <dob type='date'>1988-01-01</dob>
|
26
|
+
# <joined-at type='datetime'>2000-04-28 23:01</joined-at>
|
27
|
+
# <is-cool type='boolean'>true</is-cool>
|
28
|
+
# </user>
|
29
|
+
#
|
30
|
+
# Becomes:
|
31
|
+
#
|
32
|
+
# { "user" => {
|
33
|
+
# "gender" => "m",
|
34
|
+
# "age" => 35,
|
35
|
+
# "name" => "Home Simpson",
|
36
|
+
# "dob" => DateObject( 1998-01-01 ),
|
37
|
+
# "joined_at" => TimeObject( 2000-04-28 23:01),
|
38
|
+
# "is_cool" => true
|
39
|
+
# }
|
40
|
+
# }
|
41
|
+
#
|
42
|
+
# [Mixed Content]
|
43
|
+
#
|
44
|
+
# <story>
|
45
|
+
# A Quick <em>brown</em> Fox
|
46
|
+
# </story>
|
47
|
+
#
|
48
|
+
# Evaluates to:
|
49
|
+
#
|
50
|
+
# { "story" => "A Quick <em>brown</em> Fox" }
|
51
|
+
#
|
52
|
+
# [Attributes other than type on a node containing text]
|
53
|
+
#
|
54
|
+
# <story is-good='false'>
|
55
|
+
# A Quick <em>brown</em> Fox
|
56
|
+
# </story>
|
57
|
+
#
|
58
|
+
# Are ignored:
|
59
|
+
#
|
60
|
+
# { "story" => "A Quick <em>brown</em> Fox" }
|
61
|
+
#
|
62
|
+
# [Other attributes in addition to +type+]
|
63
|
+
#
|
64
|
+
# <bicep unit='inches' type='integer'>60</bicep>
|
65
|
+
#
|
66
|
+
# Evaluates with a typecast to an integer. But unit attribute is ignored:
|
67
|
+
#
|
68
|
+
# { "bicep" => 60 }
|
69
|
+
#
|
70
|
+
# @param [String] xml A string representation of valid XML.
|
71
|
+
#
|
72
|
+
# @return [Hash] A hash created by parsing +xml+
|
73
|
+
def from_xml( xml )
|
74
|
+
ToHashParser.from_xml(xml)
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
# Convert to Mash. This class has semantics of ActiveSupport's
|
79
|
+
# HashWithIndifferentAccess and we only have it so that people can write
|
80
|
+
# params[:key] instead of params['key'].
|
81
|
+
#
|
82
|
+
# @return [Mash] This hash as a Mash for string or symbol key access.
|
83
|
+
def to_mash
|
84
|
+
hash = Mash.new(self)
|
85
|
+
hash.default = default
|
86
|
+
hash
|
87
|
+
end
|
88
|
+
|
89
|
+
##
|
90
|
+
# Convert to URL query param string
|
91
|
+
#
|
92
|
+
# { :name => "Bob",
|
93
|
+
# :address => {
|
94
|
+
# :street => '111 Ruby Ave.',
|
95
|
+
# :city => 'Ruby Central',
|
96
|
+
# :phones => ['111-111-1111', '222-222-2222']
|
97
|
+
# }
|
98
|
+
# }.to_params
|
99
|
+
# #=> "name=Bob&address[city]=Ruby Central&address[phones][]=111-111-1111&address[phones][]=222-222-2222&address[street]=111 Ruby Ave."
|
100
|
+
#
|
101
|
+
# @return [String] This hash as a query string
|
102
|
+
#
|
103
|
+
# @api public
|
104
|
+
def to_params
|
105
|
+
params = self.map { |k,v| normalize_param(k,v) }.join
|
106
|
+
params.chop! # trailing &
|
107
|
+
params
|
108
|
+
end
|
109
|
+
|
110
|
+
##
|
111
|
+
# Convert a key, value pair into a URL query param string
|
112
|
+
#
|
113
|
+
# normalize_param(:name, "Bob") #=> "name=Bob&"
|
114
|
+
#
|
115
|
+
# @param [Object] key The key for the param.
|
116
|
+
# @param [Object] value The value for the param.
|
117
|
+
#
|
118
|
+
# @return <String> This key value pair as a param
|
119
|
+
#
|
120
|
+
# @api public
|
121
|
+
def normalize_param(key, value)
|
122
|
+
param = ''
|
123
|
+
stack = []
|
124
|
+
|
125
|
+
if value.is_a?(Array)
|
126
|
+
param << value.map { |element| normalize_param("#{key}[]", element) }.join
|
127
|
+
elsif value.is_a?(Hash)
|
128
|
+
stack << [key,value]
|
129
|
+
else
|
130
|
+
param << "#{key}=#{value}&"
|
131
|
+
end
|
132
|
+
|
133
|
+
stack.each do |parent, hash|
|
134
|
+
hash.each do |key, value|
|
135
|
+
if value.is_a?(Hash)
|
136
|
+
stack << ["#{parent}[#{key}]", value]
|
137
|
+
else
|
138
|
+
param << normalize_param("#{parent}[#{key}]", value)
|
139
|
+
end
|
140
|
+
end
|
141
|
+
end
|
142
|
+
|
143
|
+
param
|
144
|
+
end
|
145
|
+
|
146
|
+
##
|
147
|
+
# Create a hash with *only* key/value pairs in receiver and +allowed+
|
148
|
+
#
|
149
|
+
# { :one => 1, :two => 2, :three => 3 }.only(:one) #=> { :one => 1 }
|
150
|
+
#
|
151
|
+
# @param [Array[String, Symbol]] *allowed The hash keys to include.
|
152
|
+
#
|
153
|
+
# @return [Hash] A new hash with only the selected keys.
|
154
|
+
#
|
155
|
+
# @api public
|
156
|
+
def only(*allowed)
|
157
|
+
hash = {}
|
158
|
+
allowed.each {|k| hash[k] = self[k] if self.has_key?(k) }
|
159
|
+
hash
|
160
|
+
end
|
161
|
+
|
162
|
+
##
|
163
|
+
# Create a hash with all key/value pairs in receiver *except* +rejected+
|
164
|
+
#
|
165
|
+
# { :one => 1, :two => 2, :three => 3 }.except(:one)
|
166
|
+
# #=> { :two => 2, :three => 3 }
|
167
|
+
#
|
168
|
+
# @param [Array[String, Symbol]] *rejected The hash keys to exclude.
|
169
|
+
#
|
170
|
+
# @return [Hash] A new hash without the selected keys.
|
171
|
+
#
|
172
|
+
# @api public
|
173
|
+
def except(*rejected)
|
174
|
+
hash = self.dup
|
175
|
+
rejected.each {|k| hash.delete(k) }
|
176
|
+
hash
|
177
|
+
end
|
178
|
+
|
179
|
+
# @return <String> The hash as attributes for an XML tag.
|
180
|
+
#
|
181
|
+
# @example
|
182
|
+
# { :one => 1, "two"=>"TWO" }.to_xml_attributes
|
183
|
+
# #=> 'one="1" two="TWO"'
|
184
|
+
def to_xml_attributes
|
185
|
+
map do |k,v|
|
186
|
+
%{#{k.to_s.snake_case.sub(/^(.{1,1})/) { |m| m.downcase }}="#{v}"}
|
187
|
+
end.join(' ')
|
188
|
+
end
|
189
|
+
|
190
|
+
alias_method :to_html_attributes, :to_xml_attributes
|
191
|
+
|
192
|
+
# @param html_class<#to_s>
|
193
|
+
# The HTML class to add to the :class key. The html_class will be
|
194
|
+
# concatenated to any existing classes.
|
195
|
+
#
|
196
|
+
# @example hash[:class] #=> nil
|
197
|
+
# @example hash.add_html_class!(:selected)
|
198
|
+
# @example hash[:class] #=> "selected"
|
199
|
+
# @example hash.add_html_class!("class1 class2")
|
200
|
+
# @example hash[:class] #=> "selected class1 class2"
|
201
|
+
def add_html_class!(html_class)
|
202
|
+
if self[:class]
|
203
|
+
self[:class] = "#{self[:class]} #{html_class}"
|
204
|
+
else
|
205
|
+
self[:class] = html_class.to_s
|
206
|
+
end
|
207
|
+
end
|
208
|
+
|
209
|
+
# Converts all keys into string values. This is used during reloading to
|
210
|
+
# prevent problems when classes are no longer declared.
|
211
|
+
#
|
212
|
+
# @return <Array> An array of they hash's keys
|
213
|
+
#
|
214
|
+
# @example
|
215
|
+
# hash = { One => 1, Two => 2 }.proctect_keys!
|
216
|
+
# hash # => { "One" => 1, "Two" => 2 }
|
217
|
+
def protect_keys!
|
218
|
+
keys.each {|key| self[key.to_s] = delete(key) }
|
219
|
+
end
|
220
|
+
|
221
|
+
# Attempts to convert all string keys into Class keys. We run this after
|
222
|
+
# reloading to convert protected hashes back into usable hashes.
|
223
|
+
#
|
224
|
+
# @example
|
225
|
+
# # Provided that classes One and Two are declared in this scope:
|
226
|
+
# hash = { "One" => 1, "Two" => 2 }.unproctect_keys!
|
227
|
+
# hash # => { One => 1, Two => 2 }
|
228
|
+
def unprotect_keys!
|
229
|
+
keys.each do |key|
|
230
|
+
(self[Object.full_const_get(key)] = delete(key)) rescue nil
|
231
|
+
end
|
232
|
+
end
|
233
|
+
|
234
|
+
# Destructively and non-recursively convert each key to an uppercase string,
|
235
|
+
# deleting nil values along the way.
|
236
|
+
#
|
237
|
+
# @return <Hash> The newly environmentized hash.
|
238
|
+
#
|
239
|
+
# @example
|
240
|
+
# { :name => "Bob", :contact => { :email => "bob@bob.com" } }.environmentize_keys!
|
241
|
+
# #=> { "NAME" => "Bob", "CONTACT" => { :email => "bob@bob.com" } }
|
242
|
+
def environmentize_keys!
|
243
|
+
keys.each do |key|
|
244
|
+
val = delete(key)
|
245
|
+
next if val.nil?
|
246
|
+
self[key.to_s.upcase] = val
|
247
|
+
end
|
248
|
+
self
|
249
|
+
end
|
250
|
+
end
|
251
|
+
|
252
|
+
require 'rexml/parsers/streamparser'
|
253
|
+
require 'rexml/parsers/baseparser'
|
254
|
+
require 'rexml/light/node'
|
255
|
+
|
256
|
+
# This is a slighly modified version of the XMLUtilityNode from
|
257
|
+
# http://merb.devjavu.com/projects/merb/ticket/95 (has.sox@gmail.com)
|
258
|
+
# It's mainly just adding vowels, as I ht cd wth n vwls :)
|
259
|
+
# This represents the hard part of the work, all I did was change the
|
260
|
+
# underlying parser.
|
261
|
+
class REXMLUtilityNode
|
262
|
+
attr_accessor :name, :attributes, :children, :type
|
263
|
+
cattr_accessor :typecasts, :available_typecasts
|
264
|
+
|
265
|
+
self.typecasts = {}
|
266
|
+
self.typecasts["integer"] = lambda{|v| v.nil? ? nil : v.to_i}
|
267
|
+
self.typecasts["boolean"] = lambda{|v| v.nil? ? nil : (v.strip != "false")}
|
268
|
+
self.typecasts["datetime"] = lambda{|v| v.nil? ? nil : Time.parse(v).utc}
|
269
|
+
self.typecasts["date"] = lambda{|v| v.nil? ? nil : Date.parse(v)}
|
270
|
+
self.typecasts["dateTime"] = lambda{|v| v.nil? ? nil : Time.parse(v).utc}
|
271
|
+
self.typecasts["decimal"] = lambda{|v| BigDecimal(v)}
|
272
|
+
self.typecasts["double"] = lambda{|v| v.nil? ? nil : v.to_f}
|
273
|
+
self.typecasts["float"] = lambda{|v| v.nil? ? nil : v.to_f}
|
274
|
+
self.typecasts["symbol"] = lambda{|v| v.to_sym}
|
275
|
+
self.typecasts["string"] = lambda{|v| v.to_s}
|
276
|
+
self.typecasts["yaml"] = lambda{|v| v.nil? ? nil : YAML.load(v)}
|
277
|
+
self.typecasts["base64Binary"] = lambda{|v| v.unpack('m').first }
|
278
|
+
|
279
|
+
self.available_typecasts = self.typecasts.keys
|
280
|
+
|
281
|
+
def initialize(name, attributes = {})
|
282
|
+
@name = name.tr("-", "_")
|
283
|
+
# leave the type alone if we don't know what it is
|
284
|
+
@type = self.class.available_typecasts.include?(attributes["type"]) ? attributes.delete("type") : attributes["type"]
|
285
|
+
|
286
|
+
@nil_element = attributes.delete("nil") == "true"
|
287
|
+
@attributes = undasherize_keys(attributes)
|
288
|
+
@children = []
|
289
|
+
@text = false
|
290
|
+
end
|
291
|
+
|
292
|
+
def add_node(node)
|
293
|
+
@text = true if node.is_a? String
|
294
|
+
@children << node
|
295
|
+
end
|
296
|
+
|
297
|
+
def to_hash
|
298
|
+
if @type == "file"
|
299
|
+
f = StringIO.new((@children.first || '').unpack('m').first)
|
300
|
+
class << f
|
301
|
+
attr_accessor :original_filename, :content_type
|
302
|
+
end
|
303
|
+
f.original_filename = attributes['name'] || 'untitled'
|
304
|
+
f.content_type = attributes['content_type'] || 'application/octet-stream'
|
305
|
+
return {name => f}
|
306
|
+
end
|
307
|
+
|
308
|
+
if @text
|
309
|
+
return { name => typecast_value( translate_xml_entities( inner_html ) ) }
|
310
|
+
else
|
311
|
+
#change repeating groups into an array
|
312
|
+
groups = @children.inject({}) { |s,e| (s[e.name] ||= []) << e; s }
|
313
|
+
|
314
|
+
out = nil
|
315
|
+
if @type == "array"
|
316
|
+
out = []
|
317
|
+
groups.each do |k, v|
|
318
|
+
if v.size == 1
|
319
|
+
out << v.first.to_hash.entries.first.last
|
320
|
+
else
|
321
|
+
out << v.map{|e| e.to_hash[k]}
|
322
|
+
end
|
323
|
+
end
|
324
|
+
out = out.flatten
|
325
|
+
|
326
|
+
else # If Hash
|
327
|
+
out = {}
|
328
|
+
groups.each do |k,v|
|
329
|
+
if v.size == 1
|
330
|
+
out.merge!(v.first)
|
331
|
+
else
|
332
|
+
out.merge!( k => v.map{|e| e.to_hash[k]})
|
333
|
+
end
|
334
|
+
end
|
335
|
+
out.merge! attributes unless attributes.empty?
|
336
|
+
out = out.empty? ? nil : out
|
337
|
+
end
|
338
|
+
|
339
|
+
if @type && out.nil?
|
340
|
+
{ name => typecast_value(out) }
|
341
|
+
else
|
342
|
+
{ name => out }
|
343
|
+
end
|
344
|
+
end
|
345
|
+
end
|
346
|
+
|
347
|
+
# Typecasts a value based upon its type. For instance, if
|
348
|
+
# +node+ has #type == "integer",
|
349
|
+
# {{[node.typecast_value("12") #=> 12]}}
|
350
|
+
#
|
351
|
+
# @param value<String> The value that is being typecast.
|
352
|
+
#
|
353
|
+
# @details [:type options]
|
354
|
+
# "integer"::
|
355
|
+
# converts +value+ to an integer with #to_i
|
356
|
+
# "boolean"::
|
357
|
+
# checks whether +value+, after removing spaces, is the literal
|
358
|
+
# "true"
|
359
|
+
# "datetime"::
|
360
|
+
# Parses +value+ using Time.parse, and returns a UTC Time
|
361
|
+
# "date"::
|
362
|
+
# Parses +value+ using Date.parse
|
363
|
+
#
|
364
|
+
# @return <Integer, TrueClass, FalseClass, Time, Date, Object>
|
365
|
+
# The result of typecasting +value+.
|
366
|
+
#
|
367
|
+
# @note
|
368
|
+
# If +self+ does not have a "type" key, or if it's not one of the
|
369
|
+
# options specified above, the raw +value+ will be returned.
|
370
|
+
def typecast_value(value)
|
371
|
+
return value unless @type
|
372
|
+
proc = self.class.typecasts[@type]
|
373
|
+
proc.nil? ? value : proc.call(value)
|
374
|
+
end
|
375
|
+
|
376
|
+
# Convert basic XML entities into their literal values.
|
377
|
+
#
|
378
|
+
# @param value<#gsub> An XML fragment.
|
379
|
+
#
|
380
|
+
# @return <#gsub> The XML fragment after converting entities.
|
381
|
+
def translate_xml_entities(value)
|
382
|
+
value.gsub(/</, "<").
|
383
|
+
gsub(/>/, ">").
|
384
|
+
gsub(/"/, '"').
|
385
|
+
gsub(/'/, "'").
|
386
|
+
gsub(/&/, "&")
|
387
|
+
end
|
388
|
+
|
389
|
+
# Take keys of the form foo-bar and convert them to foo_bar
|
390
|
+
def undasherize_keys(params)
|
391
|
+
params.keys.each do |key, value|
|
392
|
+
params[key.tr("-", "_")] = params.delete(key)
|
393
|
+
end
|
394
|
+
params
|
395
|
+
end
|
396
|
+
|
397
|
+
# Get the inner_html of the REXML node.
|
398
|
+
def inner_html
|
399
|
+
@children.join
|
400
|
+
end
|
401
|
+
|
402
|
+
# Converts the node into a readable HTML node.
|
403
|
+
#
|
404
|
+
# @return <String> The HTML node in text form.
|
405
|
+
def to_html
|
406
|
+
attributes.merge!(:type => @type ) if @type
|
407
|
+
"<#{name}#{attributes.to_xml_attributes}>#{@nil_element ? '' : inner_html}</#{name}>"
|
408
|
+
end
|
409
|
+
|
410
|
+
# @alias #to_html #to_s
|
411
|
+
def to_s
|
412
|
+
to_html
|
413
|
+
end
|
414
|
+
end
|
415
|
+
|
416
|
+
class ToHashParser
|
417
|
+
|
418
|
+
def self.from_xml(xml)
|
419
|
+
stack = []
|
420
|
+
parser = REXML::Parsers::BaseParser.new(xml)
|
421
|
+
|
422
|
+
while true
|
423
|
+
event = parser.pull
|
424
|
+
case event[0]
|
425
|
+
when :end_document
|
426
|
+
break
|
427
|
+
when :end_doctype, :start_doctype
|
428
|
+
# do nothing
|
429
|
+
when :start_element
|
430
|
+
stack.push REXMLUtilityNode.new(event[1], event[2])
|
431
|
+
when :end_element
|
432
|
+
if stack.size > 1
|
433
|
+
temp = stack.pop
|
434
|
+
stack.last.add_node(temp)
|
435
|
+
end
|
436
|
+
when :text, :cdata
|
437
|
+
stack.last.add_node(event[1]) unless event[1].strip.length == 0
|
438
|
+
end
|
439
|
+
end
|
440
|
+
stack.pop.to_hash
|
441
|
+
end
|
442
|
+
end
|
File without changes
|
@@ -0,0 +1,434 @@
|
|
1
|
+
module Extlib
|
2
|
+
|
3
|
+
# = English Nouns Number Inflection.
|
4
|
+
#
|
5
|
+
# This module provides english singular <-> plural noun inflections.
|
6
|
+
module Inflection
|
7
|
+
|
8
|
+
class << self
|
9
|
+
# Take an underscored name and make it into a camelized name
|
10
|
+
#
|
11
|
+
# @example
|
12
|
+
# "egg_and_hams".classify #=> "EggAndHam"
|
13
|
+
# "post".classify #=> "Post"
|
14
|
+
#
|
15
|
+
def classify(name)
|
16
|
+
camelize(singularize(name.to_s.sub(/.*\./, '')))
|
17
|
+
end
|
18
|
+
|
19
|
+
# By default, camelize converts strings to UpperCamelCase.
|
20
|
+
#
|
21
|
+
# camelize will also convert '/' to '::' which is useful for converting paths to namespaces
|
22
|
+
#
|
23
|
+
# @example
|
24
|
+
# "active_record".camelize #=> "ActiveRecord"
|
25
|
+
# "active_record/errors".camelize #=> "ActiveRecord::Errors"
|
26
|
+
#
|
27
|
+
def camelize(lower_case_and_underscored_word, *args)
|
28
|
+
lower_case_and_underscored_word.to_s.gsub(/\/(.?)/) { "::" + $1.upcase }.gsub(/(^|_)(.)/) { $2.upcase }
|
29
|
+
end
|
30
|
+
|
31
|
+
|
32
|
+
# The reverse of +camelize+. Makes an underscored form from the expression in the string.
|
33
|
+
#
|
34
|
+
# Changes '::' to '/' to convert namespaces to paths.
|
35
|
+
#
|
36
|
+
# @example
|
37
|
+
# "ActiveRecord".underscore #=> "active_record"
|
38
|
+
# "ActiveRecord::Errors".underscore #=> active_record/errors
|
39
|
+
#
|
40
|
+
def underscore(camel_cased_word)
|
41
|
+
camel_cased_word.to_const_path
|
42
|
+
end
|
43
|
+
|
44
|
+
# Capitalizes the first word and turns underscores into spaces and strips _id.
|
45
|
+
# Like titleize, this is meant for creating pretty output.
|
46
|
+
#
|
47
|
+
# @example
|
48
|
+
# "employee_salary" #=> "Employee salary"
|
49
|
+
# "author_id" #=> "Author"
|
50
|
+
def humanize(lower_case_and_underscored_word)
|
51
|
+
lower_case_and_underscored_word.to_s.gsub(/_id$/, "").gsub(/_/, " ").capitalize
|
52
|
+
end
|
53
|
+
|
54
|
+
# Removes the module part from the expression in the string
|
55
|
+
#
|
56
|
+
# @example
|
57
|
+
# "ActiveRecord::CoreExtensions::String::Inflections".demodulize #=> "Inflections"
|
58
|
+
# "Inflections".demodulize #=> "Inflections"
|
59
|
+
def demodulize(class_name_in_module)
|
60
|
+
class_name_in_module.to_s.gsub(/^.*::/, '')
|
61
|
+
end
|
62
|
+
|
63
|
+
# Create the name of a table like Rails does for models to table names. This method
|
64
|
+
# uses the pluralize method on the last word in the string.
|
65
|
+
#
|
66
|
+
# @example
|
67
|
+
# "RawScaledScorer".tableize #=> "raw_scaled_scorers"
|
68
|
+
# "egg_and_ham".tableize #=> "egg_and_hams"
|
69
|
+
# "fancyCategory".tableize #=> "fancy_categories"
|
70
|
+
def tableize(class_name)
|
71
|
+
pluralize(class_name.to_const_path.gsub(/\//, '_'))
|
72
|
+
end
|
73
|
+
|
74
|
+
# Creates a foreign key name from a class name.
|
75
|
+
#
|
76
|
+
# @example
|
77
|
+
# "Message".foreign_key #=> "message_id"
|
78
|
+
# "Admin::Post".foreign_key #=> "post_id"
|
79
|
+
def foreign_key(class_name, key = "id")
|
80
|
+
underscore(demodulize(class_name.to_s)) << "_" << key.to_s
|
81
|
+
end
|
82
|
+
|
83
|
+
# Constantize tries to find a declared constant with the name specified
|
84
|
+
# in the string. It raises a NameError when the name is not in CamelCase
|
85
|
+
# or is not initialized.
|
86
|
+
#
|
87
|
+
# @example
|
88
|
+
# "Module".constantize #=> Module
|
89
|
+
# "Class".constantize #=> Class
|
90
|
+
def constantize(camel_cased_word)
|
91
|
+
unless /\A(?:::)?([A-Z]\w*(?:::[A-Z]\w*)*)\z/ =~ camel_cased_word
|
92
|
+
raise NameError, "#{camel_cased_word.inspect} is not a valid constant name!"
|
93
|
+
end
|
94
|
+
|
95
|
+
Object.module_eval("::#{$1}", __FILE__, __LINE__)
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
99
|
+
@singular_of = {}
|
100
|
+
@plural_of = {}
|
101
|
+
|
102
|
+
@singular_rules = []
|
103
|
+
@plural_rules = []
|
104
|
+
|
105
|
+
class << self
|
106
|
+
# Defines a general inflection exception case.
|
107
|
+
#
|
108
|
+
# ==== Parameters
|
109
|
+
# singular<String>::
|
110
|
+
# singular form of the word
|
111
|
+
# plural<String>::
|
112
|
+
# plural form of the word
|
113
|
+
#
|
114
|
+
# ==== Examples
|
115
|
+
#
|
116
|
+
# Here we define erratum/errata exception case:
|
117
|
+
#
|
118
|
+
# English::Inflect.word "erratum", "errata"
|
119
|
+
#
|
120
|
+
# In case singular and plural forms are the same omit
|
121
|
+
# second argument on call:
|
122
|
+
#
|
123
|
+
# English::Inflect.word 'information'
|
124
|
+
def word(singular, plural=nil)
|
125
|
+
plural = singular unless plural
|
126
|
+
singular_word(singular, plural)
|
127
|
+
plural_word(singular, plural)
|
128
|
+
end
|
129
|
+
|
130
|
+
def clear(type = :all)
|
131
|
+
if type == :singular || type == :all
|
132
|
+
@singular_of = {}
|
133
|
+
@singular_rules = []
|
134
|
+
@singularization_rules, @singularization_regex = nil, nil
|
135
|
+
end
|
136
|
+
if type == :plural || type == :all
|
137
|
+
@singular_of = {}
|
138
|
+
@singular_rules = []
|
139
|
+
@singularization_rules, @singularization_regex = nil, nil
|
140
|
+
end
|
141
|
+
end
|
142
|
+
|
143
|
+
|
144
|
+
# Define a singularization exception.
|
145
|
+
#
|
146
|
+
# ==== Parameters
|
147
|
+
# singular<String>::
|
148
|
+
# singular form of the word
|
149
|
+
# plural<String>::
|
150
|
+
# plural form of the word
|
151
|
+
def singular_word(singular, plural)
|
152
|
+
@singular_of[plural] = singular
|
153
|
+
@singular_of[plural.capitalize] = singular.capitalize
|
154
|
+
end
|
155
|
+
|
156
|
+
# Define a pluralization exception.
|
157
|
+
#
|
158
|
+
# ==== Parameters
|
159
|
+
# singular<String>::
|
160
|
+
# singular form of the word
|
161
|
+
# plural<String>::
|
162
|
+
# plural form of the word
|
163
|
+
def plural_word(singular, plural)
|
164
|
+
@plural_of[singular] = plural
|
165
|
+
@plural_of[singular.capitalize] = plural.capitalize
|
166
|
+
end
|
167
|
+
|
168
|
+
# Define a general rule.
|
169
|
+
#
|
170
|
+
# ==== Parameters
|
171
|
+
# singular<String>::
|
172
|
+
# ending of the word in singular form
|
173
|
+
# plural<String>::
|
174
|
+
# ending of the word in plural form
|
175
|
+
# whole_word<Boolean>::
|
176
|
+
# for capitalization, since words can be
|
177
|
+
# capitalized (Man => Men) #
|
178
|
+
# ==== Examples
|
179
|
+
# Once the following rule is defined:
|
180
|
+
# English::Inflect.rule 'y', 'ies'
|
181
|
+
#
|
182
|
+
# You can see the following results:
|
183
|
+
# irb> "fly".plural
|
184
|
+
# => flies
|
185
|
+
# irb> "cry".plural
|
186
|
+
# => cries
|
187
|
+
# Define a general rule.
|
188
|
+
|
189
|
+
def rule(singular, plural, whole_word = false)
|
190
|
+
singular_rule(singular, plural)
|
191
|
+
plural_rule(singular, plural)
|
192
|
+
word(singular, plural) if whole_word
|
193
|
+
end
|
194
|
+
|
195
|
+
# Define a singularization rule.
|
196
|
+
#
|
197
|
+
# ==== Parameters
|
198
|
+
# singular<String>::
|
199
|
+
# ending of the word in singular form
|
200
|
+
# plural<String>::
|
201
|
+
# ending of the word in plural form
|
202
|
+
#
|
203
|
+
# ==== Examples
|
204
|
+
# Once the following rule is defined:
|
205
|
+
# English::Inflect.singular_rule 'o', 'oes'
|
206
|
+
#
|
207
|
+
# You can see the following results:
|
208
|
+
# irb> "heroes".singular
|
209
|
+
# => hero
|
210
|
+
def singular_rule(singular, plural)
|
211
|
+
@singular_rules << [singular, plural]
|
212
|
+
end
|
213
|
+
|
214
|
+
# Define a plurualization rule.
|
215
|
+
#
|
216
|
+
# ==== Parameters
|
217
|
+
# singular<String>::
|
218
|
+
# ending of the word in singular form
|
219
|
+
# plural<String>::
|
220
|
+
# ending of the word in plural form
|
221
|
+
#
|
222
|
+
# ==== Examples
|
223
|
+
# Once the following rule is defined:
|
224
|
+
# English::Inflect.singular_rule 'fe', 'ves'
|
225
|
+
#
|
226
|
+
# You can see the following results:
|
227
|
+
# irb> "wife".plural
|
228
|
+
# => wives
|
229
|
+
def plural_rule(singular, plural)
|
230
|
+
@plural_rules << [singular, plural]
|
231
|
+
end
|
232
|
+
|
233
|
+
# Read prepared singularization rules.
|
234
|
+
def singularization_rules
|
235
|
+
if defined?(@singularization_regex) && @singularization_regex
|
236
|
+
return [@singularization_regex, @singularization_hash]
|
237
|
+
end
|
238
|
+
# No sorting needed: Regexen match on longest string
|
239
|
+
@singularization_regex = Regexp.new("(" + @singular_rules.map {|s,p| p}.join("|") + ")$", "i")
|
240
|
+
@singularization_hash = Hash[*@singular_rules.flatten].invert
|
241
|
+
[@singularization_regex, @singularization_hash]
|
242
|
+
end
|
243
|
+
|
244
|
+
# Read prepared pluralization rules.
|
245
|
+
def pluralization_rules
|
246
|
+
if defined?(@pluralization_regex) && @pluralization_regex
|
247
|
+
return [@pluralization_regex, @pluralization_hash]
|
248
|
+
end
|
249
|
+
@pluralization_regex = Regexp.new("(" + @plural_rules.map {|s,p| s}.join("|") + ")$", "i")
|
250
|
+
@pluralization_hash = Hash[*@plural_rules.flatten]
|
251
|
+
[@pluralization_regex, @pluralization_hash]
|
252
|
+
end
|
253
|
+
|
254
|
+
attr_reader :singular_of, :plural_of
|
255
|
+
|
256
|
+
# Convert an English word from plurel to singular.
|
257
|
+
#
|
258
|
+
# "boys".singular #=> boy
|
259
|
+
# "tomatoes".singular #=> tomato
|
260
|
+
#
|
261
|
+
# ==== Parameters
|
262
|
+
# word<String>:: word to singularize
|
263
|
+
#
|
264
|
+
# ==== Returns
|
265
|
+
# <String>:: singularized form of word
|
266
|
+
#
|
267
|
+
# ==== Notes
|
268
|
+
# Aliased as singularize (a Railism)
|
269
|
+
def singular(word)
|
270
|
+
if result = singular_of[word]
|
271
|
+
return result.dup
|
272
|
+
end
|
273
|
+
result = word.dup
|
274
|
+
regex, hash = singularization_rules
|
275
|
+
result.sub!(regex) {|m| hash[m]}
|
276
|
+
singular_of[word] = result
|
277
|
+
return result
|
278
|
+
end
|
279
|
+
|
280
|
+
# Alias for #singular (a Railism).
|
281
|
+
#
|
282
|
+
alias_method(:singularize, :singular)
|
283
|
+
|
284
|
+
# Convert an English word from singular to plurel.
|
285
|
+
#
|
286
|
+
# "boy".plural #=> boys
|
287
|
+
# "tomato".plural #=> tomatoes
|
288
|
+
#
|
289
|
+
# ==== Parameters
|
290
|
+
# word<String>:: word to pluralize
|
291
|
+
#
|
292
|
+
# ==== Returns
|
293
|
+
# <String>:: pluralized form of word
|
294
|
+
#
|
295
|
+
# ==== Notes
|
296
|
+
# Aliased as pluralize (a Railism)
|
297
|
+
def plural(word)
|
298
|
+
# special exceptions
|
299
|
+
return "" if word == ""
|
300
|
+
if result = plural_of[word]
|
301
|
+
return result.dup
|
302
|
+
end
|
303
|
+
result = word.dup
|
304
|
+
regex, hash = pluralization_rules
|
305
|
+
result.sub!(regex) {|m| hash[m]}
|
306
|
+
plural_of[word] = result
|
307
|
+
return result
|
308
|
+
end
|
309
|
+
|
310
|
+
# Alias for #plural (a Railism).
|
311
|
+
alias_method(:pluralize, :plural)
|
312
|
+
end
|
313
|
+
|
314
|
+
# One argument means singular and plural are the same.
|
315
|
+
|
316
|
+
word 'equipment'
|
317
|
+
word 'information'
|
318
|
+
word 'money'
|
319
|
+
word 'species'
|
320
|
+
word 'series'
|
321
|
+
word 'fish'
|
322
|
+
word 'sheep'
|
323
|
+
word 'moose'
|
324
|
+
word 'hovercraft'
|
325
|
+
word 'grass'
|
326
|
+
word 'rain'
|
327
|
+
word 'milk'
|
328
|
+
word 'rice'
|
329
|
+
word 'plurals'
|
330
|
+
word 'postgres'
|
331
|
+
word 'status'
|
332
|
+
|
333
|
+
# Two arguments defines a singular and plural exception.
|
334
|
+
word 'status' , 'status'
|
335
|
+
word 'Swiss' , 'Swiss'
|
336
|
+
word 'life' , 'lives'
|
337
|
+
word 'wife' , 'wives'
|
338
|
+
word 'goose' , 'geese'
|
339
|
+
word 'criterion' , 'criteria'
|
340
|
+
word 'alias' , 'aliases'
|
341
|
+
word 'status' , 'statuses'
|
342
|
+
word 'axis' , 'axes'
|
343
|
+
word 'crisis' , 'crises'
|
344
|
+
word 'testis' , 'testes'
|
345
|
+
word 'potato' , 'potatoes'
|
346
|
+
word 'tomato' , 'tomatoes'
|
347
|
+
word 'buffalo' , 'buffaloes'
|
348
|
+
word 'torpedo' , 'torpedoes'
|
349
|
+
word 'quiz' , 'quizzes'
|
350
|
+
word 'matrix' , 'matrices'
|
351
|
+
word 'vertex' , 'vertices'
|
352
|
+
word 'index' , 'indices'
|
353
|
+
word 'ox' , 'oxen'
|
354
|
+
word 'mouse' , 'mice'
|
355
|
+
word 'louse' , 'lice'
|
356
|
+
word 'thesis' , 'theses'
|
357
|
+
word 'thief' , 'thieves'
|
358
|
+
word 'analysis' , 'analyses'
|
359
|
+
word 'erratum' , 'errata'
|
360
|
+
word 'phenomenon', 'phenomena'
|
361
|
+
word 'octopus' , 'octopi'
|
362
|
+
word 'thesaurus' , 'thesauri'
|
363
|
+
word 'movie' , 'movies'
|
364
|
+
word 'cactus' , 'cacti'
|
365
|
+
word 'plus' , 'plusses'
|
366
|
+
word 'cross' , 'crosses'
|
367
|
+
word 'medium' , 'media'
|
368
|
+
word 'datum' , 'data'
|
369
|
+
word 'basis' , 'bases'
|
370
|
+
word 'diagnosis' , 'diagnoses'
|
371
|
+
|
372
|
+
# One-way singularization exception (convert plural to singular).
|
373
|
+
|
374
|
+
# General rules.
|
375
|
+
rule 'person' , 'people', true
|
376
|
+
rule 'shoe' , 'shoes', true
|
377
|
+
rule 'hive' , 'hives', true
|
378
|
+
rule 'man' , 'men', true
|
379
|
+
rule 'child' , 'children', true
|
380
|
+
rule 'news' , 'news', true
|
381
|
+
rule 'rf' , 'rves'
|
382
|
+
rule 'af' , 'aves'
|
383
|
+
rule 'ero' , 'eroes'
|
384
|
+
rule 'man' , 'men'
|
385
|
+
rule 'ch' , 'ches'
|
386
|
+
rule 'sh' , 'shes'
|
387
|
+
rule 'ss' , 'sses'
|
388
|
+
rule 'ta' , 'tum'
|
389
|
+
rule 'ia' , 'ium'
|
390
|
+
rule 'ra' , 'rum'
|
391
|
+
rule 'ay' , 'ays'
|
392
|
+
rule 'ey' , 'eys'
|
393
|
+
rule 'oy' , 'oys'
|
394
|
+
rule 'uy' , 'uys'
|
395
|
+
rule 'y' , 'ies'
|
396
|
+
rule 'x' , 'xes'
|
397
|
+
rule 'lf' , 'lves'
|
398
|
+
rule 'ffe' , 'ffes'
|
399
|
+
rule 'afe' , 'aves'
|
400
|
+
rule 'ouse' , 'ouses'
|
401
|
+
# more cases of words ending in -oses not being singularized properly
|
402
|
+
# than cases of words ending in -osis
|
403
|
+
# rule 'osis' , 'oses'
|
404
|
+
rule 'ox' , 'oxes'
|
405
|
+
rule 'us' , 'uses'
|
406
|
+
rule '' , 's'
|
407
|
+
|
408
|
+
# One-way singular rules.
|
409
|
+
|
410
|
+
singular_rule 'of' , 'ofs' # proof
|
411
|
+
singular_rule 'o' , 'oes' # hero, heroes
|
412
|
+
singular_rule 'f' , 'ves'
|
413
|
+
|
414
|
+
# One-way plural rules.
|
415
|
+
|
416
|
+
#plural_rule 'fe' , 'ves' # safe, wife
|
417
|
+
plural_rule 's' , 'ses'
|
418
|
+
plural_rule 'ive' , 'ives' # don't want to snag wife
|
419
|
+
plural_rule 'fe' , 'ves' # don't want to snag perspectives
|
420
|
+
|
421
|
+
|
422
|
+
end
|
423
|
+
end
|
424
|
+
|
425
|
+
class String
|
426
|
+
def singular
|
427
|
+
Extlib::Inflection.singular(self)
|
428
|
+
end
|
429
|
+
alias_method(:singularize, :singular)
|
430
|
+
def plural
|
431
|
+
Extlib::Inflection.plural(self)
|
432
|
+
end
|
433
|
+
alias_method(:pluralize, :plural)
|
434
|
+
end
|