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,90 @@
|
|
1
|
+
module ActiveSupport #:nodoc:
|
2
|
+
module CoreExtensions #:nodoc:
|
3
|
+
module Time #:nodoc:
|
4
|
+
# Converting times to formatted strings, dates, and datetimes.
|
5
|
+
module Conversions
|
6
|
+
DATE_FORMATS = {
|
7
|
+
:db => "%Y-%m-%d %H:%M:%S",
|
8
|
+
:number => "%Y%m%d%H%M%S",
|
9
|
+
:time => "%H:%M",
|
10
|
+
:short => "%d %b %H:%M",
|
11
|
+
:long => "%B %d, %Y %H:%M",
|
12
|
+
:long_ordinal => lambda { |time| time.strftime("%B #{time.day.ordinalize}, %Y %H:%M") },
|
13
|
+
:rfc822 => "%a, %d %b %Y %H:%M:%S %z"
|
14
|
+
}
|
15
|
+
|
16
|
+
def self.included(base) #:nodoc:
|
17
|
+
base.class_eval do
|
18
|
+
alias_method :to_default_s, :to_s
|
19
|
+
alias_method :to_s, :to_formatted_s
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
# Converts to a formatted string. See DATE_FORMATS for builtin formats.
|
24
|
+
#
|
25
|
+
# This method is aliased to <tt>to_s</tt>.
|
26
|
+
#
|
27
|
+
# time = Time.now # => Thu Jan 18 06:10:17 CST 2007
|
28
|
+
#
|
29
|
+
# time.to_formatted_s(:time) # => "06:10:17"
|
30
|
+
# time.to_s(:time) # => "06:10:17"
|
31
|
+
#
|
32
|
+
# time.to_formatted_s(:db) # => "2007-01-18 06:10:17"
|
33
|
+
# time.to_formatted_s(:number) # => "20070118061017"
|
34
|
+
# time.to_formatted_s(:short) # => "18 Jan 06:10"
|
35
|
+
# time.to_formatted_s(:long) # => "January 18, 2007 06:10"
|
36
|
+
# time.to_formatted_s(:long_ordinal) # => "January 18th, 2007 06:10"
|
37
|
+
# time.to_formatted_s(:rfc822) # => "Thu, 18 Jan 2007 06:10:17 -0600"
|
38
|
+
#
|
39
|
+
# == Adding your own time formats to +to_formatted_s+
|
40
|
+
# You can add your own formats to the Time::DATE_FORMATS hash.
|
41
|
+
# Use the format name as the hash key and either a strftime string
|
42
|
+
# or Proc instance that takes a time argument as the value.
|
43
|
+
#
|
44
|
+
# # config/initializers/time_formats.rb
|
45
|
+
# Time::DATE_FORMATS[:month_and_year] = "%B %Y"
|
46
|
+
# Time::DATE_FORMATS[:short_ordinal] = lambda { |time| time.strftime("%B #{time.day.ordinalize}") }
|
47
|
+
def to_formatted_s(format = :default)
|
48
|
+
return to_default_s unless formatter = DATE_FORMATS[format]
|
49
|
+
formatter.respond_to?(:call) ? formatter.call(self).to_s : strftime(formatter)
|
50
|
+
end
|
51
|
+
|
52
|
+
# Returns the UTC offset as an +HH:MM formatted string.
|
53
|
+
#
|
54
|
+
# Time.local(2000).formatted_offset # => "-06:00"
|
55
|
+
# Time.local(2000).formatted_offset(false) # => "-0600"
|
56
|
+
def formatted_offset(colon = true, alternate_utc_string = nil)
|
57
|
+
utc? && alternate_utc_string || utc_offset.to_utc_offset_s(colon)
|
58
|
+
end
|
59
|
+
|
60
|
+
# Converts a Time object to a Date, dropping hour, minute, and second precision.
|
61
|
+
#
|
62
|
+
# my_time = Time.now # => Mon Nov 12 22:59:51 -0500 2007
|
63
|
+
# my_time.to_date # => Mon, 12 Nov 2007
|
64
|
+
#
|
65
|
+
# your_time = Time.parse("1/13/2009 1:13:03 P.M.") # => Tue Jan 13 13:13:03 -0500 2009
|
66
|
+
# your_time.to_date # => Tue, 13 Jan 2009
|
67
|
+
def to_date
|
68
|
+
::Date.new(year, month, day)
|
69
|
+
end
|
70
|
+
|
71
|
+
# A method to keep Time, Date and DateTime instances interchangeable on conversions.
|
72
|
+
# In this case, it simply returns +self+.
|
73
|
+
def to_time
|
74
|
+
self
|
75
|
+
end
|
76
|
+
|
77
|
+
# Converts a Time instance to a Ruby DateTime instance, preserving UTC offset.
|
78
|
+
#
|
79
|
+
# my_time = Time.now # => Mon Nov 12 23:04:21 -0500 2007
|
80
|
+
# my_time.to_datetime # => Mon, 12 Nov 2007 23:04:21 -0500
|
81
|
+
#
|
82
|
+
# your_time = Time.parse("1/13/2009 1:13:03 P.M.") # => Tue Jan 13 13:13:03 -0500 2009
|
83
|
+
# your_time.to_datetime # => Tue, 13 Jan 2009 13:13:03 -0500
|
84
|
+
def to_datetime
|
85
|
+
::DateTime.civil(year, month, day, hour, min, sec, Rational(utc_offset, 86400))
|
86
|
+
end
|
87
|
+
end
|
88
|
+
end
|
89
|
+
end
|
90
|
+
end
|
@@ -0,0 +1,86 @@
|
|
1
|
+
module ActiveSupport #:nodoc:
|
2
|
+
module CoreExtensions #:nodoc:
|
3
|
+
module Time #:nodoc:
|
4
|
+
module Zones
|
5
|
+
def self.included(base) #:nodoc:
|
6
|
+
base.extend(ClassMethods) if base == ::Time # i.e., don't include class methods in DateTime
|
7
|
+
end
|
8
|
+
|
9
|
+
module ClassMethods
|
10
|
+
attr_accessor :zone_default
|
11
|
+
|
12
|
+
# Returns the TimeZone for the current request, if this has been set (via Time.zone=).
|
13
|
+
# If <tt>Time.zone</tt> has not been set for the current request, returns the TimeZone specified in <tt>config.time_zone</tt>.
|
14
|
+
def zone
|
15
|
+
Thread.current[:time_zone] || zone_default
|
16
|
+
end
|
17
|
+
|
18
|
+
# Sets <tt>Time.zone</tt> to a TimeZone object for the current request/thread.
|
19
|
+
#
|
20
|
+
# This method accepts any of the following:
|
21
|
+
#
|
22
|
+
# * A Rails TimeZone object.
|
23
|
+
# * An identifier for a Rails TimeZone object (e.g., "Eastern Time (US & Canada)", <tt>-5.hours</tt>).
|
24
|
+
# * A TZInfo::Timezone object.
|
25
|
+
# * An identifier for a TZInfo::Timezone object (e.g., "America/New_York").
|
26
|
+
#
|
27
|
+
# Here's an example of how you might set <tt>Time.zone</tt> on a per request basis -- <tt>current_user.time_zone</tt>
|
28
|
+
# just needs to return a string identifying the user's preferred TimeZone:
|
29
|
+
#
|
30
|
+
# class ApplicationController < ActionController::Base
|
31
|
+
# before_filter :set_time_zone
|
32
|
+
#
|
33
|
+
# def set_time_zone
|
34
|
+
# Time.zone = current_user.time_zone
|
35
|
+
# end
|
36
|
+
# end
|
37
|
+
def zone=(time_zone)
|
38
|
+
Thread.current[:time_zone] = get_zone(time_zone)
|
39
|
+
end
|
40
|
+
|
41
|
+
# Allows override of <tt>Time.zone</tt> locally inside supplied block; resets <tt>Time.zone</tt> to existing value when done.
|
42
|
+
def use_zone(time_zone)
|
43
|
+
old_zone, ::Time.zone = ::Time.zone, get_zone(time_zone)
|
44
|
+
yield
|
45
|
+
ensure
|
46
|
+
::Time.zone = old_zone
|
47
|
+
end
|
48
|
+
|
49
|
+
# Returns <tt>Time.zone.now</tt> when <tt>config.time_zone</tt> is set, otherwise just returns <tt>Time.now</tt>.
|
50
|
+
def current
|
51
|
+
::Time.zone_default ? ::Time.zone.now : ::Time.now
|
52
|
+
end
|
53
|
+
|
54
|
+
private
|
55
|
+
def get_zone(time_zone)
|
56
|
+
return time_zone if time_zone.nil? || time_zone.is_a?(TimeZone)
|
57
|
+
# lookup timezone based on identifier (unless we've been passed a TZInfo::Timezone)
|
58
|
+
unless time_zone.respond_to?(:period_for_local)
|
59
|
+
time_zone = TimeZone[time_zone] || TZInfo::Timezone.get(time_zone) rescue nil
|
60
|
+
end
|
61
|
+
# Return if a TimeZone instance, or wrap in a TimeZone instance if a TZInfo::Timezone
|
62
|
+
if time_zone
|
63
|
+
time_zone.is_a?(TimeZone) ? time_zone : TimeZone.create(time_zone.name, nil, time_zone)
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
68
|
+
# Returns the simultaneous time in <tt>Time.zone</tt>.
|
69
|
+
#
|
70
|
+
# Time.zone = 'Hawaii' # => 'Hawaii'
|
71
|
+
# Time.utc(2000).in_time_zone # => Fri, 31 Dec 1999 14:00:00 HST -10:00
|
72
|
+
#
|
73
|
+
# This method is similar to Time#localtime, except that it uses <tt>Time.zone</tt> as the local zone
|
74
|
+
# instead of the operating system's time zone.
|
75
|
+
#
|
76
|
+
# You can also pass in a TimeZone instance or string that identifies a TimeZone as an argument,
|
77
|
+
# and the conversion will be based on that zone instead of <tt>Time.zone</tt>.
|
78
|
+
#
|
79
|
+
# Time.utc(2000).in_time_zone('Alaska') # => Fri, 31 Dec 1999 15:00:00 AKST -09:00
|
80
|
+
def in_time_zone(zone = ::Time.zone)
|
81
|
+
ActiveSupport::TimeWithZone.new(utc? ? self : getutc, ::Time.__send__(:get_zone, zone))
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
@@ -0,0 +1,621 @@
|
|
1
|
+
module ActiveSupport #:nodoc:
|
2
|
+
module Dependencies #:nodoc:
|
3
|
+
extend self
|
4
|
+
|
5
|
+
# Should we turn on Ruby warnings on the first load of dependent files?
|
6
|
+
mattr_accessor :warnings_on_first_load
|
7
|
+
self.warnings_on_first_load = false
|
8
|
+
|
9
|
+
# All files ever loaded.
|
10
|
+
mattr_accessor :history
|
11
|
+
self.history = Set.new
|
12
|
+
|
13
|
+
# All files currently loaded.
|
14
|
+
mattr_accessor :loaded
|
15
|
+
self.loaded = Set.new
|
16
|
+
|
17
|
+
# Should we load files or require them?
|
18
|
+
mattr_accessor :mechanism
|
19
|
+
self.mechanism = :load
|
20
|
+
|
21
|
+
# The set of directories from which we may automatically load files. Files
|
22
|
+
# under these directories will be reloaded on each request in development mode,
|
23
|
+
# unless the directory also appears in load_once_paths.
|
24
|
+
mattr_accessor :load_paths
|
25
|
+
self.load_paths = []
|
26
|
+
|
27
|
+
# The set of directories from which automatically loaded constants are loaded
|
28
|
+
# only once. All directories in this set must also be present in +load_paths+.
|
29
|
+
mattr_accessor :load_once_paths
|
30
|
+
self.load_once_paths = []
|
31
|
+
|
32
|
+
# An array of qualified constant names that have been loaded. Adding a name to
|
33
|
+
# this array will cause it to be unloaded the next time Dependencies are cleared.
|
34
|
+
mattr_accessor :autoloaded_constants
|
35
|
+
self.autoloaded_constants = []
|
36
|
+
|
37
|
+
# An array of constant names that need to be unloaded on every request. Used
|
38
|
+
# to allow arbitrary constants to be marked for unloading.
|
39
|
+
mattr_accessor :explicitly_unloadable_constants
|
40
|
+
self.explicitly_unloadable_constants = []
|
41
|
+
|
42
|
+
# The logger is used for generating information on the action run-time (including benchmarking) if available.
|
43
|
+
# Can be set to nil for no logging. Compatible with both Ruby's own Logger and Log4r loggers.
|
44
|
+
mattr_accessor :logger
|
45
|
+
|
46
|
+
# Set to true to enable logging of const_missing and file loads
|
47
|
+
mattr_accessor :log_activity
|
48
|
+
self.log_activity = false
|
49
|
+
|
50
|
+
# An internal stack used to record which constants are loaded by any block.
|
51
|
+
mattr_accessor :constant_watch_stack
|
52
|
+
self.constant_watch_stack = []
|
53
|
+
|
54
|
+
# Module includes this module
|
55
|
+
module ModuleConstMissing #:nodoc:
|
56
|
+
def self.included(base) #:nodoc:
|
57
|
+
base.class_eval do
|
58
|
+
unless defined? const_missing_without_dependencies
|
59
|
+
alias_method_chain :const_missing, :dependencies
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
def self.excluded(base) #:nodoc:
|
65
|
+
base.class_eval do
|
66
|
+
if defined? const_missing_without_dependencies
|
67
|
+
undef_method :const_missing
|
68
|
+
alias_method :const_missing, :const_missing_without_dependencies
|
69
|
+
undef_method :const_missing_without_dependencies
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
# Use const_missing to autoload associations so we don't have to
|
75
|
+
# require_association when using single-table inheritance.
|
76
|
+
def const_missing_with_dependencies(class_id)
|
77
|
+
ActiveSupport::Dependencies.load_missing_constant self, class_id
|
78
|
+
end
|
79
|
+
|
80
|
+
def unloadable(const_desc = self)
|
81
|
+
super(const_desc)
|
82
|
+
end
|
83
|
+
end
|
84
|
+
|
85
|
+
# Class includes this module
|
86
|
+
module ClassConstMissing #:nodoc:
|
87
|
+
def const_missing(const_name)
|
88
|
+
if [Object, Kernel].include?(self) || parent == self
|
89
|
+
super
|
90
|
+
else
|
91
|
+
begin
|
92
|
+
begin
|
93
|
+
Dependencies.load_missing_constant self, const_name
|
94
|
+
rescue NameError
|
95
|
+
parent.send :const_missing, const_name
|
96
|
+
end
|
97
|
+
rescue NameError => e
|
98
|
+
# Make sure that the name we are missing is the one that caused the error
|
99
|
+
parent_qualified_name = Dependencies.qualified_name_for parent, const_name
|
100
|
+
raise unless e.missing_name? parent_qualified_name
|
101
|
+
qualified_name = Dependencies.qualified_name_for self, const_name
|
102
|
+
raise NameError.new("uninitialized constant #{qualified_name}").copy_blame!(e)
|
103
|
+
end
|
104
|
+
end
|
105
|
+
end
|
106
|
+
end
|
107
|
+
|
108
|
+
# Object includes this module
|
109
|
+
module Loadable #:nodoc:
|
110
|
+
def self.included(base) #:nodoc:
|
111
|
+
base.class_eval do
|
112
|
+
unless defined? load_without_new_constant_marking
|
113
|
+
alias_method_chain :load, :new_constant_marking
|
114
|
+
end
|
115
|
+
end
|
116
|
+
end
|
117
|
+
|
118
|
+
def self.excluded(base) #:nodoc:
|
119
|
+
base.class_eval do
|
120
|
+
if defined? load_without_new_constant_marking
|
121
|
+
undef_method :load
|
122
|
+
alias_method :load, :load_without_new_constant_marking
|
123
|
+
undef_method :load_without_new_constant_marking
|
124
|
+
end
|
125
|
+
end
|
126
|
+
end
|
127
|
+
|
128
|
+
def require_or_load(file_name)
|
129
|
+
Dependencies.require_or_load(file_name)
|
130
|
+
end
|
131
|
+
|
132
|
+
def require_dependency(file_name)
|
133
|
+
Dependencies.depend_on(file_name)
|
134
|
+
end
|
135
|
+
|
136
|
+
def require_association(file_name)
|
137
|
+
Dependencies.associate_with(file_name)
|
138
|
+
end
|
139
|
+
|
140
|
+
def load_with_new_constant_marking(file, *extras) #:nodoc:
|
141
|
+
if Dependencies.load?
|
142
|
+
Dependencies.new_constants_in(Object) { load_without_new_constant_marking(file, *extras) }
|
143
|
+
else
|
144
|
+
load_without_new_constant_marking(file, *extras)
|
145
|
+
end
|
146
|
+
rescue Exception => exception # errors from loading file
|
147
|
+
exception.blame_file! file
|
148
|
+
raise
|
149
|
+
end
|
150
|
+
|
151
|
+
def require(file, *extras) #:nodoc:
|
152
|
+
if Dependencies.load?
|
153
|
+
Dependencies.new_constants_in(Object) { super }
|
154
|
+
else
|
155
|
+
super
|
156
|
+
end
|
157
|
+
rescue Exception => exception # errors from required file
|
158
|
+
exception.blame_file! file
|
159
|
+
raise
|
160
|
+
end
|
161
|
+
|
162
|
+
# Mark the given constant as unloadable. Unloadable constants are removed each
|
163
|
+
# time dependencies are cleared.
|
164
|
+
#
|
165
|
+
# Note that marking a constant for unloading need only be done once. Setup
|
166
|
+
# or init scripts may list each unloadable constant that may need unloading;
|
167
|
+
# each constant will be removed for every subsequent clear, as opposed to for
|
168
|
+
# the first clear.
|
169
|
+
#
|
170
|
+
# The provided constant descriptor may be a (non-anonymous) module or class,
|
171
|
+
# or a qualified constant name as a string or symbol.
|
172
|
+
#
|
173
|
+
# Returns true if the constant was not previously marked for unloading, false
|
174
|
+
# otherwise.
|
175
|
+
def unloadable(const_desc)
|
176
|
+
Dependencies.mark_for_unload const_desc
|
177
|
+
end
|
178
|
+
end
|
179
|
+
|
180
|
+
# Exception file-blaming
|
181
|
+
module Blamable #:nodoc:
|
182
|
+
def blame_file!(file)
|
183
|
+
(@blamed_files ||= []).unshift file
|
184
|
+
end
|
185
|
+
|
186
|
+
def blamed_files
|
187
|
+
@blamed_files ||= []
|
188
|
+
end
|
189
|
+
|
190
|
+
def describe_blame
|
191
|
+
return nil if blamed_files.empty?
|
192
|
+
"This error occurred while loading the following files:\n #{blamed_files.join "\n "}"
|
193
|
+
end
|
194
|
+
|
195
|
+
def copy_blame!(exc)
|
196
|
+
@blamed_files = exc.blamed_files.clone
|
197
|
+
self
|
198
|
+
end
|
199
|
+
end
|
200
|
+
|
201
|
+
def hook!
|
202
|
+
Object.instance_eval { include Loadable }
|
203
|
+
Module.instance_eval { include ModuleConstMissing }
|
204
|
+
Class.instance_eval { include ClassConstMissing }
|
205
|
+
Exception.instance_eval { include Blamable }
|
206
|
+
true
|
207
|
+
end
|
208
|
+
|
209
|
+
def unhook!
|
210
|
+
ModuleConstMissing.excluded(Module)
|
211
|
+
Loadable.excluded(Object)
|
212
|
+
true
|
213
|
+
end
|
214
|
+
|
215
|
+
def load?
|
216
|
+
mechanism == :load
|
217
|
+
end
|
218
|
+
|
219
|
+
def depend_on(file_name, swallow_load_errors = false)
|
220
|
+
path = search_for_file(file_name)
|
221
|
+
require_or_load(path || file_name)
|
222
|
+
rescue LoadError
|
223
|
+
raise unless swallow_load_errors
|
224
|
+
end
|
225
|
+
|
226
|
+
def associate_with(file_name)
|
227
|
+
depend_on(file_name, true)
|
228
|
+
end
|
229
|
+
|
230
|
+
def clear
|
231
|
+
log_call
|
232
|
+
loaded.clear
|
233
|
+
remove_unloadable_constants!
|
234
|
+
end
|
235
|
+
|
236
|
+
def require_or_load(file_name, const_path = nil)
|
237
|
+
log_call file_name, const_path
|
238
|
+
file_name = $1 if file_name =~ /^(.*)\.rb$/
|
239
|
+
expanded = File.expand_path(file_name)
|
240
|
+
return if loaded.include?(expanded)
|
241
|
+
|
242
|
+
# Record that we've seen this file *before* loading it to avoid an
|
243
|
+
# infinite loop with mutual dependencies.
|
244
|
+
loaded << expanded
|
245
|
+
|
246
|
+
begin
|
247
|
+
if load?
|
248
|
+
log "loading #{file_name}"
|
249
|
+
|
250
|
+
# Enable warnings iff this file has not been loaded before and
|
251
|
+
# warnings_on_first_load is set.
|
252
|
+
load_args = ["#{file_name}.rb"]
|
253
|
+
load_args << const_path unless const_path.nil?
|
254
|
+
|
255
|
+
if !warnings_on_first_load or history.include?(expanded)
|
256
|
+
result = load_file(*load_args)
|
257
|
+
else
|
258
|
+
enable_warnings { result = load_file(*load_args) }
|
259
|
+
end
|
260
|
+
else
|
261
|
+
log "requiring #{file_name}"
|
262
|
+
result = require file_name
|
263
|
+
end
|
264
|
+
rescue Exception
|
265
|
+
loaded.delete expanded
|
266
|
+
raise
|
267
|
+
end
|
268
|
+
|
269
|
+
# Record history *after* loading so first load gets warnings.
|
270
|
+
history << expanded
|
271
|
+
return result
|
272
|
+
end
|
273
|
+
|
274
|
+
# Is the provided constant path defined?
|
275
|
+
def qualified_const_defined?(path)
|
276
|
+
raise NameError, "#{path.inspect} is not a valid constant name!" unless
|
277
|
+
/^(::)?([A-Z]\w*)(::[A-Z]\w*)*$/ =~ path
|
278
|
+
|
279
|
+
names = path.to_s.split('::')
|
280
|
+
names.shift if names.first.empty?
|
281
|
+
|
282
|
+
# We can't use defined? because it will invoke const_missing for the parent
|
283
|
+
# of the name we are checking.
|
284
|
+
names.inject(Object) do |mod, name|
|
285
|
+
return false unless uninherited_const_defined?(mod, name)
|
286
|
+
mod.const_get name
|
287
|
+
end
|
288
|
+
return true
|
289
|
+
end
|
290
|
+
|
291
|
+
if Module.method(:const_defined?).arity == 1
|
292
|
+
# Does this module define this constant?
|
293
|
+
# Wrapper to accomodate changing Module#const_defined? in Ruby 1.9
|
294
|
+
def uninherited_const_defined?(mod, const)
|
295
|
+
mod.const_defined?(const)
|
296
|
+
end
|
297
|
+
else
|
298
|
+
def uninherited_const_defined?(mod, const) #:nodoc:
|
299
|
+
mod.const_defined?(const, false)
|
300
|
+
end
|
301
|
+
end
|
302
|
+
|
303
|
+
# Given +path+, a filesystem path to a ruby file, return an array of constant
|
304
|
+
# paths which would cause Dependencies to attempt to load this file.
|
305
|
+
def loadable_constants_for_path(path, bases = load_paths)
|
306
|
+
path = $1 if path =~ /\A(.*)\.rb\Z/
|
307
|
+
expanded_path = File.expand_path(path)
|
308
|
+
|
309
|
+
bases.collect do |root|
|
310
|
+
expanded_root = File.expand_path(root)
|
311
|
+
next unless %r{\A#{Regexp.escape(expanded_root)}(/|\\)} =~ expanded_path
|
312
|
+
|
313
|
+
nesting = expanded_path[(expanded_root.size)..-1]
|
314
|
+
nesting = nesting[1..-1] if nesting && nesting[0] == ?/
|
315
|
+
next if nesting.blank?
|
316
|
+
nesting_camel = nesting.camelize
|
317
|
+
begin
|
318
|
+
qualified_const_defined?(nesting_camel)
|
319
|
+
rescue NameError
|
320
|
+
next
|
321
|
+
end
|
322
|
+
|
323
|
+
[
|
324
|
+
nesting.camelize,
|
325
|
+
# Special case: application.rb might define ApplicationControlller.
|
326
|
+
('ApplicationController' if nesting == 'application')
|
327
|
+
]
|
328
|
+
end.flatten.compact.uniq
|
329
|
+
end
|
330
|
+
|
331
|
+
# Search for a file in load_paths matching the provided suffix.
|
332
|
+
def search_for_file(path_suffix)
|
333
|
+
path_suffix = path_suffix + '.rb' unless path_suffix.ends_with? '.rb'
|
334
|
+
load_paths.each do |root|
|
335
|
+
path = File.join(root, path_suffix)
|
336
|
+
return path if File.file? path
|
337
|
+
end
|
338
|
+
nil # Gee, I sure wish we had first_match ;-)
|
339
|
+
end
|
340
|
+
|
341
|
+
# Does the provided path_suffix correspond to an autoloadable module?
|
342
|
+
# Instead of returning a boolean, the autoload base for this module is returned.
|
343
|
+
def autoloadable_module?(path_suffix)
|
344
|
+
load_paths.each do |load_path|
|
345
|
+
return load_path if File.directory? File.join(load_path, path_suffix)
|
346
|
+
end
|
347
|
+
nil
|
348
|
+
end
|
349
|
+
|
350
|
+
def load_once_path?(path)
|
351
|
+
load_once_paths.any? { |base| path.starts_with? base }
|
352
|
+
end
|
353
|
+
|
354
|
+
# Attempt to autoload the provided module name by searching for a directory
|
355
|
+
# matching the expect path suffix. If found, the module is created and assigned
|
356
|
+
# to +into+'s constants with the name +const_name+. Provided that the directory
|
357
|
+
# was loaded from a reloadable base path, it is added to the set of constants
|
358
|
+
# that are to be unloaded.
|
359
|
+
def autoload_module!(into, const_name, qualified_name, path_suffix)
|
360
|
+
return nil unless base_path = autoloadable_module?(path_suffix)
|
361
|
+
mod = Module.new
|
362
|
+
into.const_set const_name, mod
|
363
|
+
autoloaded_constants << qualified_name unless load_once_paths.include?(base_path)
|
364
|
+
return mod
|
365
|
+
end
|
366
|
+
|
367
|
+
# Load the file at the provided path. +const_paths+ is a set of qualified
|
368
|
+
# constant names. When loading the file, Dependencies will watch for the
|
369
|
+
# addition of these constants. Each that is defined will be marked as
|
370
|
+
# autoloaded, and will be removed when Dependencies.clear is next called.
|
371
|
+
#
|
372
|
+
# If the second parameter is left off, then Dependencies will construct a set
|
373
|
+
# of names that the file at +path+ may define. See
|
374
|
+
# +loadable_constants_for_path+ for more details.
|
375
|
+
def load_file(path, const_paths = loadable_constants_for_path(path))
|
376
|
+
log_call path, const_paths
|
377
|
+
const_paths = [const_paths].compact unless const_paths.is_a? Array
|
378
|
+
parent_paths = const_paths.collect { |const_path| /(.*)::[^:]+\Z/ =~ const_path ? $1 : :Object }
|
379
|
+
|
380
|
+
result = nil
|
381
|
+
newly_defined_paths = new_constants_in(*parent_paths) do
|
382
|
+
result = load_without_new_constant_marking path
|
383
|
+
end
|
384
|
+
|
385
|
+
autoloaded_constants.concat newly_defined_paths unless load_once_path?(path)
|
386
|
+
autoloaded_constants.uniq!
|
387
|
+
log "loading #{path} defined #{newly_defined_paths * ', '}" unless newly_defined_paths.empty?
|
388
|
+
return result
|
389
|
+
end
|
390
|
+
|
391
|
+
# Return the constant path for the provided parent and constant name.
|
392
|
+
def qualified_name_for(mod, name)
|
393
|
+
mod_name = to_constant_name mod
|
394
|
+
(%w(Object Kernel).include? mod_name) ? name.to_s : "#{mod_name}::#{name}"
|
395
|
+
end
|
396
|
+
|
397
|
+
# Load the constant named +const_name+ which is missing from +from_mod+. If
|
398
|
+
# it is not possible to load the constant into from_mod, try its parent module
|
399
|
+
# using const_missing.
|
400
|
+
def load_missing_constant(from_mod, const_name)
|
401
|
+
log_call from_mod, const_name
|
402
|
+
if from_mod == Kernel
|
403
|
+
if ::Object.const_defined?(const_name)
|
404
|
+
log "Returning Object::#{const_name} for Kernel::#{const_name}"
|
405
|
+
return ::Object.const_get(const_name)
|
406
|
+
else
|
407
|
+
log "Substituting Object for Kernel"
|
408
|
+
from_mod = Object
|
409
|
+
end
|
410
|
+
end
|
411
|
+
|
412
|
+
# If we have an anonymous module, all we can do is attempt to load from Object.
|
413
|
+
from_mod = Object if from_mod.name.blank?
|
414
|
+
|
415
|
+
unless qualified_const_defined?(from_mod.name) && from_mod.name.constantize.object_id == from_mod.object_id
|
416
|
+
raise ArgumentError, "A copy of #{from_mod} has been removed from the module tree but is still active!"
|
417
|
+
end
|
418
|
+
|
419
|
+
raise ArgumentError, "#{from_mod} is not missing constant #{const_name}!" if uninherited_const_defined?(from_mod, const_name)
|
420
|
+
|
421
|
+
qualified_name = qualified_name_for from_mod, const_name
|
422
|
+
path_suffix = qualified_name.underscore
|
423
|
+
name_error = NameError.new("uninitialized constant #{qualified_name}")
|
424
|
+
|
425
|
+
file_path = search_for_file(path_suffix)
|
426
|
+
if file_path && ! loaded.include?(File.expand_path(file_path)) # We found a matching file to load
|
427
|
+
require_or_load file_path
|
428
|
+
raise LoadError, "Expected #{file_path} to define #{qualified_name}" unless uninherited_const_defined?(from_mod, const_name)
|
429
|
+
return from_mod.const_get(const_name)
|
430
|
+
elsif mod = autoload_module!(from_mod, const_name, qualified_name, path_suffix)
|
431
|
+
return mod
|
432
|
+
elsif (parent = from_mod.parent) && parent != from_mod &&
|
433
|
+
! from_mod.parents.any? { |p| uninherited_const_defined?(p, const_name) }
|
434
|
+
# If our parents do not have a constant named +const_name+ then we are free
|
435
|
+
# to attempt to load upwards. If they do have such a constant, then this
|
436
|
+
# const_missing must be due to from_mod::const_name, which should not
|
437
|
+
# return constants from from_mod's parents.
|
438
|
+
begin
|
439
|
+
return parent.const_missing(const_name)
|
440
|
+
rescue NameError => e
|
441
|
+
raise unless e.missing_name? qualified_name_for(parent, const_name)
|
442
|
+
raise name_error
|
443
|
+
end
|
444
|
+
else
|
445
|
+
raise name_error
|
446
|
+
end
|
447
|
+
end
|
448
|
+
|
449
|
+
# Remove the constants that have been autoloaded, and those that have been
|
450
|
+
# marked for unloading.
|
451
|
+
def remove_unloadable_constants!
|
452
|
+
autoloaded_constants.each { |const| remove_constant const }
|
453
|
+
autoloaded_constants.clear
|
454
|
+
explicitly_unloadable_constants.each { |const| remove_constant const }
|
455
|
+
end
|
456
|
+
|
457
|
+
# Determine if the given constant has been automatically loaded.
|
458
|
+
def autoloaded?(desc)
|
459
|
+
# No name => anonymous module.
|
460
|
+
return false if desc.is_a?(Module) && desc.name.blank?
|
461
|
+
name = to_constant_name desc
|
462
|
+
return false unless qualified_const_defined? name
|
463
|
+
return autoloaded_constants.include?(name)
|
464
|
+
end
|
465
|
+
|
466
|
+
# Will the provided constant descriptor be unloaded?
|
467
|
+
def will_unload?(const_desc)
|
468
|
+
autoloaded?(const_desc) ||
|
469
|
+
explicitly_unloadable_constants.include?(to_constant_name(const_desc))
|
470
|
+
end
|
471
|
+
|
472
|
+
# Mark the provided constant name for unloading. This constant will be
|
473
|
+
# unloaded on each request, not just the next one.
|
474
|
+
def mark_for_unload(const_desc)
|
475
|
+
name = to_constant_name const_desc
|
476
|
+
if explicitly_unloadable_constants.include? name
|
477
|
+
return false
|
478
|
+
else
|
479
|
+
explicitly_unloadable_constants << name
|
480
|
+
return true
|
481
|
+
end
|
482
|
+
end
|
483
|
+
|
484
|
+
# Run the provided block and detect the new constants that were loaded during
|
485
|
+
# its execution. Constants may only be regarded as 'new' once -- so if the
|
486
|
+
# block calls +new_constants_in+ again, then the constants defined within the
|
487
|
+
# inner call will not be reported in this one.
|
488
|
+
#
|
489
|
+
# If the provided block does not run to completion, and instead raises an
|
490
|
+
# exception, any new constants are regarded as being only partially defined
|
491
|
+
# and will be removed immediately.
|
492
|
+
def new_constants_in(*descs)
|
493
|
+
log_call(*descs)
|
494
|
+
|
495
|
+
# Build the watch frames. Each frame is a tuple of
|
496
|
+
# [module_name_as_string, constants_defined_elsewhere]
|
497
|
+
watch_frames = descs.collect do |desc|
|
498
|
+
if desc.is_a? Module
|
499
|
+
mod_name = desc.name
|
500
|
+
initial_constants = desc.local_constant_names
|
501
|
+
elsif desc.is_a?(String) || desc.is_a?(Symbol)
|
502
|
+
mod_name = desc.to_s
|
503
|
+
|
504
|
+
# Handle the case where the module has yet to be defined.
|
505
|
+
initial_constants = if qualified_const_defined?(mod_name)
|
506
|
+
mod_name.constantize.local_constant_names
|
507
|
+
else
|
508
|
+
[]
|
509
|
+
end
|
510
|
+
else
|
511
|
+
raise Argument, "#{desc.inspect} does not describe a module!"
|
512
|
+
end
|
513
|
+
|
514
|
+
[mod_name, initial_constants]
|
515
|
+
end
|
516
|
+
|
517
|
+
constant_watch_stack.concat watch_frames
|
518
|
+
|
519
|
+
aborting = true
|
520
|
+
begin
|
521
|
+
yield # Now yield to the code that is to define new constants.
|
522
|
+
aborting = false
|
523
|
+
ensure
|
524
|
+
# Find the new constants.
|
525
|
+
new_constants = watch_frames.collect do |mod_name, prior_constants|
|
526
|
+
# Module still doesn't exist? Treat it as if it has no constants.
|
527
|
+
next [] unless qualified_const_defined?(mod_name)
|
528
|
+
|
529
|
+
mod = mod_name.constantize
|
530
|
+
next [] unless mod.is_a? Module
|
531
|
+
new_constants = mod.local_constant_names - prior_constants
|
532
|
+
|
533
|
+
# Make sure no other frames takes credit for these constants.
|
534
|
+
constant_watch_stack.each do |frame_name, constants|
|
535
|
+
constants.concat new_constants if frame_name == mod_name
|
536
|
+
end
|
537
|
+
|
538
|
+
new_constants.collect do |suffix|
|
539
|
+
mod_name == "Object" ? suffix : "#{mod_name}::#{suffix}"
|
540
|
+
end
|
541
|
+
end.flatten
|
542
|
+
|
543
|
+
log "New constants: #{new_constants * ', '}"
|
544
|
+
|
545
|
+
if aborting
|
546
|
+
log "Error during loading, removing partially loaded constants "
|
547
|
+
new_constants.each { |name| remove_constant name }
|
548
|
+
new_constants.clear
|
549
|
+
end
|
550
|
+
end
|
551
|
+
|
552
|
+
return new_constants
|
553
|
+
ensure
|
554
|
+
# Remove the stack frames that we added.
|
555
|
+
if defined?(watch_frames) && ! watch_frames.blank?
|
556
|
+
frame_ids = watch_frames.collect { |frame| frame.object_id }
|
557
|
+
constant_watch_stack.delete_if do |watch_frame|
|
558
|
+
frame_ids.include? watch_frame.object_id
|
559
|
+
end
|
560
|
+
end
|
561
|
+
end
|
562
|
+
|
563
|
+
class LoadingModule #:nodoc:
|
564
|
+
# Old style environment.rb referenced this method directly. Please note, it doesn't
|
565
|
+
# actually *do* anything any more.
|
566
|
+
def self.root(*args)
|
567
|
+
if defined?(RAILS_DEFAULT_LOGGER)
|
568
|
+
RAILS_DEFAULT_LOGGER.warn "Your environment.rb uses the old syntax, it may not continue to work in future releases."
|
569
|
+
RAILS_DEFAULT_LOGGER.warn "For upgrade instructions please see: http://manuals.rubyonrails.com/read/book/19"
|
570
|
+
end
|
571
|
+
end
|
572
|
+
end
|
573
|
+
|
574
|
+
# Convert the provided const desc to a qualified constant name (as a string).
|
575
|
+
# A module, class, symbol, or string may be provided.
|
576
|
+
def to_constant_name(desc) #:nodoc:
|
577
|
+
name = case desc
|
578
|
+
when String then desc.starts_with?('::') ? desc[2..-1] : desc
|
579
|
+
when Symbol then desc.to_s
|
580
|
+
when Module
|
581
|
+
raise ArgumentError, "Anonymous modules have no name to be referenced by" if desc.name.blank?
|
582
|
+
desc.name
|
583
|
+
else raise TypeError, "Not a valid constant descriptor: #{desc.inspect}"
|
584
|
+
end
|
585
|
+
end
|
586
|
+
|
587
|
+
def remove_constant(const) #:nodoc:
|
588
|
+
return false unless qualified_const_defined? const
|
589
|
+
|
590
|
+
const = $1 if /\A::(.*)\Z/ =~ const.to_s
|
591
|
+
names = const.to_s.split('::')
|
592
|
+
if names.size == 1 # It's under Object
|
593
|
+
parent = Object
|
594
|
+
else
|
595
|
+
parent = (names[0..-2] * '::').constantize
|
596
|
+
end
|
597
|
+
|
598
|
+
log "removing constant #{const}"
|
599
|
+
parent.instance_eval { remove_const names.last }
|
600
|
+
return true
|
601
|
+
end
|
602
|
+
|
603
|
+
protected
|
604
|
+
def log_call(*args)
|
605
|
+
if logger && log_activity
|
606
|
+
arg_str = args.collect { |arg| arg.inspect } * ', '
|
607
|
+
/in `([a-z_\?\!]+)'/ =~ caller(1).first
|
608
|
+
selector = $1 || '<unknown>'
|
609
|
+
log "called #{selector}(#{arg_str})"
|
610
|
+
end
|
611
|
+
end
|
612
|
+
|
613
|
+
def log(msg)
|
614
|
+
if logger && log_activity
|
615
|
+
logger.debug "Dependencies: #{msg}"
|
616
|
+
end
|
617
|
+
end
|
618
|
+
end
|
619
|
+
end
|
620
|
+
|
621
|
+
ActiveSupport::Dependencies.hook!
|