activesupport_csi 2.3.5.p6
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +1330 -0
- data/README +43 -0
- data/lib/active_support/all.rb +8 -0
- data/lib/active_support/backtrace_cleaner.rb +72 -0
- data/lib/active_support/base64.rb +33 -0
- data/lib/active_support/basic_object.rb +24 -0
- data/lib/active_support/buffered_logger.rb +127 -0
- data/lib/active_support/cache/compressed_mem_cache_store.rb +20 -0
- data/lib/active_support/cache/drb_store.rb +14 -0
- data/lib/active_support/cache/file_store.rb +72 -0
- data/lib/active_support/cache/mem_cache_store.rb +143 -0
- data/lib/active_support/cache/memory_store.rb +52 -0
- data/lib/active_support/cache/strategy/local_cache.rb +104 -0
- data/lib/active_support/cache/synchronized_memory_store.rb +47 -0
- data/lib/active_support/cache.rb +248 -0
- data/lib/active_support/callbacks.rb +279 -0
- data/lib/active_support/core_ext/array/access.rb +53 -0
- data/lib/active_support/core_ext/array/conversions.rb +197 -0
- data/lib/active_support/core_ext/array/extract_options.rb +20 -0
- data/lib/active_support/core_ext/array/grouping.rb +106 -0
- data/lib/active_support/core_ext/array/random_access.rb +12 -0
- data/lib/active_support/core_ext/array/wrapper.rb +24 -0
- data/lib/active_support/core_ext/array.rb +15 -0
- data/lib/active_support/core_ext/base64/encoding.rb +16 -0
- data/lib/active_support/core_ext/base64.rb +4 -0
- data/lib/active_support/core_ext/benchmark.rb +19 -0
- data/lib/active_support/core_ext/bigdecimal/conversions.rb +37 -0
- data/lib/active_support/core_ext/bigdecimal.rb +6 -0
- data/lib/active_support/core_ext/blank.rb +2 -0
- data/lib/active_support/core_ext/cgi/escape_skipping_slashes.rb +23 -0
- data/lib/active_support/core_ext/cgi.rb +5 -0
- data/lib/active_support/core_ext/class/attribute_accessors.rb +54 -0
- data/lib/active_support/core_ext/class/delegating_attributes.rb +47 -0
- data/lib/active_support/core_ext/class/inheritable_attributes.rb +140 -0
- data/lib/active_support/core_ext/class/removal.rb +50 -0
- data/lib/active_support/core_ext/class.rb +4 -0
- data/lib/active_support/core_ext/date/behavior.rb +42 -0
- data/lib/active_support/core_ext/date/calculations.rb +231 -0
- data/lib/active_support/core_ext/date/conversions.rb +107 -0
- data/lib/active_support/core_ext/date.rb +10 -0
- data/lib/active_support/core_ext/date_time/calculations.rb +126 -0
- data/lib/active_support/core_ext/date_time/conversions.rb +96 -0
- data/lib/active_support/core_ext/date_time.rb +12 -0
- data/lib/active_support/core_ext/duplicable.rb +43 -0
- data/lib/active_support/core_ext/enumerable.rb +114 -0
- data/lib/active_support/core_ext/exception.rb +45 -0
- data/lib/active_support/core_ext/file/atomic.rb +46 -0
- data/lib/active_support/core_ext/file.rb +5 -0
- data/lib/active_support/core_ext/float/rounding.rb +24 -0
- data/lib/active_support/core_ext/float/time.rb +27 -0
- data/lib/active_support/core_ext/float.rb +7 -0
- data/lib/active_support/core_ext/hash/conversions.rb +264 -0
- data/lib/active_support/core_ext/hash/deep_merge.rb +23 -0
- data/lib/active_support/core_ext/hash/diff.rb +19 -0
- data/lib/active_support/core_ext/hash/except.rb +25 -0
- data/lib/active_support/core_ext/hash/indifferent_access.rb +143 -0
- data/lib/active_support/core_ext/hash/keys.rb +52 -0
- data/lib/active_support/core_ext/hash/reverse_merge.rb +35 -0
- data/lib/active_support/core_ext/hash/slice.rb +40 -0
- data/lib/active_support/core_ext/hash.rb +14 -0
- data/lib/active_support/core_ext/integer/even_odd.rb +29 -0
- data/lib/active_support/core_ext/integer/inflections.rb +20 -0
- data/lib/active_support/core_ext/integer/time.rb +45 -0
- data/lib/active_support/core_ext/integer.rb +9 -0
- data/lib/active_support/core_ext/kernel/agnostics.rb +11 -0
- data/lib/active_support/core_ext/kernel/daemonizing.rb +7 -0
- data/lib/active_support/core_ext/kernel/debugger.rb +16 -0
- data/lib/active_support/core_ext/kernel/reporting.rb +59 -0
- data/lib/active_support/core_ext/kernel/requires.rb +24 -0
- data/lib/active_support/core_ext/kernel.rb +5 -0
- data/lib/active_support/core_ext/load_error.rb +38 -0
- data/lib/active_support/core_ext/logger.rb +145 -0
- data/lib/active_support/core_ext/module/aliasing.rb +74 -0
- data/lib/active_support/core_ext/module/attr_accessor_with_default.rb +31 -0
- data/lib/active_support/core_ext/module/attr_internal.rb +32 -0
- data/lib/active_support/core_ext/module/attribute_accessors.rb +60 -0
- data/lib/active_support/core_ext/module/delegation.rb +135 -0
- data/lib/active_support/core_ext/module/inclusion.rb +30 -0
- data/lib/active_support/core_ext/module/introspection.rb +90 -0
- data/lib/active_support/core_ext/module/loading.rb +23 -0
- data/lib/active_support/core_ext/module/model_naming.rb +25 -0
- data/lib/active_support/core_ext/module/synchronization.rb +39 -0
- data/lib/active_support/core_ext/module.rb +23 -0
- data/lib/active_support/core_ext/name_error.rb +19 -0
- data/lib/active_support/core_ext/numeric/bytes.rb +50 -0
- data/lib/active_support/core_ext/numeric/conversions.rb +19 -0
- data/lib/active_support/core_ext/numeric/time.rb +81 -0
- data/lib/active_support/core_ext/numeric.rb +9 -0
- data/lib/active_support/core_ext/object/blank.rb +58 -0
- data/lib/active_support/core_ext/object/conversions.rb +15 -0
- data/lib/active_support/core_ext/object/extending.rb +80 -0
- data/lib/active_support/core_ext/object/instance_variables.rb +74 -0
- data/lib/active_support/core_ext/object/metaclass.rb +13 -0
- data/lib/active_support/core_ext/object/misc.rb +90 -0
- data/lib/active_support/core_ext/object.rb +6 -0
- data/lib/active_support/core_ext/pathname/clean_within.rb +14 -0
- data/lib/active_support/core_ext/pathname.rb +7 -0
- data/lib/active_support/core_ext/proc.rb +12 -0
- data/lib/active_support/core_ext/process/daemon.rb +25 -0
- data/lib/active_support/core_ext/process.rb +1 -0
- data/lib/active_support/core_ext/range/blockless_step.rb +32 -0
- data/lib/active_support/core_ext/range/conversions.rb +27 -0
- data/lib/active_support/core_ext/range/include_range.rb +30 -0
- data/lib/active_support/core_ext/range/overlaps.rb +15 -0
- data/lib/active_support/core_ext/range.rb +11 -0
- data/lib/active_support/core_ext/rexml.rb +41 -0
- data/lib/active_support/core_ext/string/access.rb +106 -0
- data/lib/active_support/core_ext/string/behavior.rb +13 -0
- data/lib/active_support/core_ext/string/bytesize.rb +5 -0
- data/lib/active_support/core_ext/string/conversions.rb +28 -0
- data/lib/active_support/core_ext/string/filters.rb +26 -0
- data/lib/active_support/core_ext/string/inflections.rb +167 -0
- data/lib/active_support/core_ext/string/iterators.rb +23 -0
- data/lib/active_support/core_ext/string/multibyte.rb +81 -0
- data/lib/active_support/core_ext/string/output_safety.rb +48 -0
- data/lib/active_support/core_ext/string/starts_ends_with.rb +35 -0
- data/lib/active_support/core_ext/string/xchar.rb +11 -0
- data/lib/active_support/core_ext/string.rb +25 -0
- data/lib/active_support/core_ext/symbol.rb +14 -0
- data/lib/active_support/core_ext/time/behavior.rb +13 -0
- data/lib/active_support/core_ext/time/calculations.rb +304 -0
- data/lib/active_support/core_ext/time/conversions.rb +90 -0
- data/lib/active_support/core_ext/time/zones.rb +86 -0
- data/lib/active_support/core_ext/time.rb +42 -0
- data/lib/active_support/core_ext/try.rb +36 -0
- data/lib/active_support/core_ext/uri.rb +16 -0
- data/lib/active_support/core_ext.rb +8 -0
- data/lib/active_support/dependencies.rb +625 -0
- data/lib/active_support/deprecation.rb +196 -0
- data/lib/active_support/duration.rb +100 -0
- data/lib/active_support/gzip.rb +25 -0
- data/lib/active_support/inflections.rb +56 -0
- data/lib/active_support/inflector.rb +406 -0
- data/lib/active_support/json/backends/jsongem.rb +37 -0
- data/lib/active_support/json/backends/okjson.rb +644 -0
- data/lib/active_support/json/backends/yaml.rb +20 -0
- data/lib/active_support/json/decoding.rb +50 -0
- data/lib/active_support/json/encoders/date.rb +22 -0
- data/lib/active_support/json/encoders/date_time.rb +22 -0
- data/lib/active_support/json/encoders/enumerable.rb +17 -0
- data/lib/active_support/json/encoders/false_class.rb +7 -0
- data/lib/active_support/json/encoders/hash.rb +56 -0
- data/lib/active_support/json/encoders/nil_class.rb +7 -0
- data/lib/active_support/json/encoders/numeric.rb +21 -0
- data/lib/active_support/json/encoders/object.rb +10 -0
- data/lib/active_support/json/encoders/regexp.rb +9 -0
- data/lib/active_support/json/encoders/string.rb +9 -0
- data/lib/active_support/json/encoders/symbol.rb +5 -0
- data/lib/active_support/json/encoders/time.rb +22 -0
- data/lib/active_support/json/encoders/true_class.rb +7 -0
- data/lib/active_support/json/encoding.rb +102 -0
- data/lib/active_support/json/variable.rb +10 -0
- data/lib/active_support/json.rb +2 -0
- data/lib/active_support/locale/en.yml +33 -0
- data/lib/active_support/memoizable.rb +100 -0
- data/lib/active_support/message_encryptor.rb +70 -0
- data/lib/active_support/message_verifier.rb +79 -0
- data/lib/active_support/multibyte/chars.rb +707 -0
- data/lib/active_support/multibyte/exceptions.rb +8 -0
- data/lib/active_support/multibyte/unicode_database.rb +71 -0
- data/lib/active_support/multibyte/utils.rb +61 -0
- data/lib/active_support/multibyte.rb +57 -0
- data/lib/active_support/option_merger.rb +23 -0
- data/lib/active_support/ordered_hash.rb +141 -0
- data/lib/active_support/ordered_options.rb +19 -0
- data/lib/active_support/rescuable.rb +108 -0
- data/lib/active_support/secure_random.rb +199 -0
- data/lib/active_support/string_inquirer.rb +21 -0
- data/lib/active_support/test_case.rb +40 -0
- data/lib/active_support/testing/assertions.rb +65 -0
- data/lib/active_support/testing/declarative.rb +21 -0
- data/lib/active_support/testing/default.rb +9 -0
- data/lib/active_support/testing/deprecation.rb +57 -0
- data/lib/active_support/testing/performance.rb +452 -0
- data/lib/active_support/testing/setup_and_teardown.rb +91 -0
- data/lib/active_support/time_with_zone.rb +335 -0
- data/lib/active_support/values/time_zone.rb +404 -0
- data/lib/active_support/values/unicode_tables.dat +0 -0
- data/lib/active_support/vendor/builder-2.1.2/blankslate.rb +113 -0
- data/lib/active_support/vendor/builder-2.1.2/builder/blankslate.rb +20 -0
- data/lib/active_support/vendor/builder-2.1.2/builder/css.rb +250 -0
- data/lib/active_support/vendor/builder-2.1.2/builder/xchar.rb +115 -0
- data/lib/active_support/vendor/builder-2.1.2/builder/xmlbase.rb +139 -0
- data/lib/active_support/vendor/builder-2.1.2/builder/xmlevents.rb +63 -0
- data/lib/active_support/vendor/builder-2.1.2/builder/xmlmarkup.rb +328 -0
- data/lib/active_support/vendor/builder-2.1.2/builder.rb +13 -0
- data/lib/active_support/vendor/i18n-0.1.3/MIT-LICENSE +20 -0
- data/lib/active_support/vendor/i18n-0.1.3/README.textile +20 -0
- data/lib/active_support/vendor/i18n-0.1.3/Rakefile +5 -0
- data/lib/active_support/vendor/i18n-0.1.3/i18n.gemspec +27 -0
- data/lib/active_support/vendor/i18n-0.1.3/lib/i18n/backend/simple.rb +214 -0
- data/lib/active_support/vendor/i18n-0.1.3/lib/i18n/exceptions.rb +53 -0
- data/lib/active_support/vendor/i18n-0.1.3/lib/i18n.rb +199 -0
- data/lib/active_support/vendor/i18n-0.1.3/test/all.rb +5 -0
- data/lib/active_support/vendor/i18n-0.1.3/test/i18n_exceptions_test.rb +99 -0
- data/lib/active_support/vendor/i18n-0.1.3/test/i18n_test.rb +124 -0
- data/lib/active_support/vendor/i18n-0.1.3/test/locale/en.rb +1 -0
- data/lib/active_support/vendor/i18n-0.1.3/test/locale/en.yml +3 -0
- data/lib/active_support/vendor/i18n-0.1.3/test/simple_backend_test.rb +567 -0
- data/lib/active_support/vendor/memcache-client-1.7.4/memcache.rb +1107 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/data_timezone.rb +47 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/data_timezone_info.rb +228 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Algiers.rb +55 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Cairo.rb +219 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Casablanca.rb +40 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Harare.rb +18 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Johannesburg.rb +25 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Monrovia.rb +22 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Nairobi.rb +23 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Argentina/Buenos_Aires.rb +166 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Argentina/San_Juan.rb +86 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Bogota.rb +23 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Caracas.rb +23 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Chicago.rb +283 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Chihuahua.rb +136 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Denver.rb +204 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Godthab.rb +161 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Guatemala.rb +27 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Halifax.rb +274 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Indiana/Indianapolis.rb +149 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Juneau.rb +194 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/La_Paz.rb +22 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Lima.rb +35 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Los_Angeles.rb +232 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Mazatlan.rb +139 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Mexico_City.rb +144 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Monterrey.rb +131 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/New_York.rb +282 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Phoenix.rb +30 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Regina.rb +74 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Santiago.rb +205 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Sao_Paulo.rb +171 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/St_Johns.rb +288 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Tijuana.rb +196 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Almaty.rb +67 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Baghdad.rb +73 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Baku.rb +161 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Bangkok.rb +20 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Chongqing.rb +33 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Colombo.rb +30 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Dhaka.rb +27 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Hong_Kong.rb +87 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Irkutsk.rb +165 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Jakarta.rb +30 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Jerusalem.rb +163 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Kabul.rb +20 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Kamchatka.rb +163 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Karachi.rb +30 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Katmandu.rb +20 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Kolkata.rb +25 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Krasnoyarsk.rb +163 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Kuala_Lumpur.rb +31 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Kuwait.rb +18 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Magadan.rb +163 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Muscat.rb +18 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Novosibirsk.rb +164 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Rangoon.rb +24 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Riyadh.rb +18 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Seoul.rb +34 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Shanghai.rb +35 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Singapore.rb +33 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Taipei.rb +59 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Tashkent.rb +47 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Tbilisi.rb +78 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Tehran.rb +121 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Tokyo.rb +30 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Ulaanbaatar.rb +65 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Urumqi.rb +33 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Vladivostok.rb +164 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Yakutsk.rb +163 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Yekaterinburg.rb +165 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Yerevan.rb +165 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Atlantic/Azores.rb +270 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Atlantic/Cape_Verde.rb +23 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Atlantic/South_Georgia.rb +18 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Adelaide.rb +187 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Brisbane.rb +35 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Darwin.rb +29 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Hobart.rb +193 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Melbourne.rb +185 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Perth.rb +37 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Sydney.rb +185 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Etc/UTC.rb +16 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Amsterdam.rb +228 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Athens.rb +185 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Belgrade.rb +163 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Berlin.rb +188 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Bratislava.rb +13 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Brussels.rb +232 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Bucharest.rb +181 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Budapest.rb +197 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Copenhagen.rb +179 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Dublin.rb +276 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Helsinki.rb +163 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Istanbul.rb +218 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Kiev.rb +168 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Lisbon.rb +268 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Ljubljana.rb +13 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/London.rb +288 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Madrid.rb +211 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Minsk.rb +170 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Moscow.rb +181 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Paris.rb +232 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Prague.rb +187 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Riga.rb +176 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Rome.rb +215 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Sarajevo.rb +13 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Skopje.rb +13 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Sofia.rb +173 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Stockholm.rb +165 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Tallinn.rb +172 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Vienna.rb +183 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Vilnius.rb +170 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Warsaw.rb +212 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Zagreb.rb +13 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Auckland.rb +202 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Fiji.rb +23 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Guam.rb +22 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Honolulu.rb +28 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Majuro.rb +20 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Midway.rb +25 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Noumea.rb +25 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Pago_Pago.rb +26 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Port_Moresby.rb +20 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Tongatapu.rb +27 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/info_timezone.rb +52 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/linked_timezone.rb +51 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/linked_timezone_info.rb +44 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/offset_rationals.rb +98 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/ruby_core_support.rb +56 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/time_or_datetime.rb +292 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone.rb +508 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone_definition.rb +56 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone_info.rb +40 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone_offset_info.rb +94 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone_period.rb +198 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone_transition_info.rb +129 -0
- data/lib/active_support/vendor/tzinfo-0.3.12/tzinfo.rb +33 -0
- data/lib/active_support/vendor.rb +28 -0
- data/lib/active_support/version.rb +9 -0
- data/lib/active_support/whiny_nil.rb +64 -0
- data/lib/active_support/xml_mini/jdom.rb +162 -0
- data/lib/active_support/xml_mini/libxml.rb +133 -0
- data/lib/active_support/xml_mini/nokogiri.rb +69 -0
- data/lib/active_support/xml_mini/rexml.rb +108 -0
- data/lib/active_support/xml_mini.rb +31 -0
- data/lib/active_support.rb +59 -0
- data/lib/activesupport.rb +2 -0
- metadata +418 -0
@@ -0,0 +1,196 @@
|
|
1
|
+
require 'yaml'
|
2
|
+
|
3
|
+
module ActiveSupport
|
4
|
+
module Deprecation #:nodoc:
|
5
|
+
mattr_accessor :debug
|
6
|
+
self.debug = false
|
7
|
+
|
8
|
+
# Choose the default warn behavior according to RAILS_ENV.
|
9
|
+
# Ignore deprecation warnings in production.
|
10
|
+
DEFAULT_BEHAVIORS = {
|
11
|
+
'test' => Proc.new { |message, callstack|
|
12
|
+
$stderr.puts(message)
|
13
|
+
$stderr.puts callstack.join("\n ") if debug
|
14
|
+
},
|
15
|
+
'development' => Proc.new { |message, callstack|
|
16
|
+
logger = (defined?(Rails) && Rails.logger) ? Rails.logger : Logger.new($stderr)
|
17
|
+
logger.warn message
|
18
|
+
logger.debug callstack.join("\n ") if debug
|
19
|
+
}
|
20
|
+
}
|
21
|
+
|
22
|
+
class << self
|
23
|
+
def warn(message = nil, callstack = caller)
|
24
|
+
behavior.call(deprecation_message(callstack, message), callstack) if behavior && !silenced?
|
25
|
+
end
|
26
|
+
|
27
|
+
def default_behavior
|
28
|
+
if defined?(RAILS_ENV)
|
29
|
+
DEFAULT_BEHAVIORS[RAILS_ENV.to_s]
|
30
|
+
else
|
31
|
+
DEFAULT_BEHAVIORS['test']
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
# Have deprecations been silenced?
|
36
|
+
def silenced?
|
37
|
+
@silenced = false unless defined?(@silenced)
|
38
|
+
@silenced
|
39
|
+
end
|
40
|
+
|
41
|
+
# Silence deprecation warnings within the block.
|
42
|
+
def silence
|
43
|
+
old_silenced, @silenced = @silenced, true
|
44
|
+
yield
|
45
|
+
ensure
|
46
|
+
@silenced = old_silenced
|
47
|
+
end
|
48
|
+
|
49
|
+
attr_writer :silenced
|
50
|
+
|
51
|
+
|
52
|
+
private
|
53
|
+
def deprecation_message(callstack, message = nil)
|
54
|
+
message ||= "You are using deprecated behavior which will be removed from the next major or minor release."
|
55
|
+
"DEPRECATION WARNING: #{message}. #{deprecation_caller_message(callstack)}"
|
56
|
+
end
|
57
|
+
|
58
|
+
def deprecation_caller_message(callstack)
|
59
|
+
file, line, method = extract_callstack(callstack)
|
60
|
+
if file
|
61
|
+
if line && method
|
62
|
+
"(called from #{method} at #{file}:#{line})"
|
63
|
+
else
|
64
|
+
"(called from #{file}:#{line})"
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
def extract_callstack(callstack)
|
70
|
+
if md = callstack.first.match(/^(.+?):(\d+)(?::in `(.*?)')?/)
|
71
|
+
md.captures
|
72
|
+
else
|
73
|
+
callstack.first
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
# Behavior is a block that takes a message argument.
|
79
|
+
mattr_accessor :behavior
|
80
|
+
self.behavior = default_behavior
|
81
|
+
|
82
|
+
# Warnings are not silenced by default.
|
83
|
+
self.silenced = false
|
84
|
+
|
85
|
+
module ClassMethods #:nodoc:
|
86
|
+
# Declare that a method has been deprecated.
|
87
|
+
def deprecate(*method_names)
|
88
|
+
options = method_names.extract_options!
|
89
|
+
method_names = method_names + options.keys
|
90
|
+
method_names.each do |method_name|
|
91
|
+
alias_method_chain(method_name, :deprecation) do |target, punctuation|
|
92
|
+
class_eval(<<-EOS, __FILE__, __LINE__)
|
93
|
+
def #{target}_with_deprecation#{punctuation}(*args, &block) # def generate_secret_with_deprecation(*args, &block)
|
94
|
+
::ActiveSupport::Deprecation.warn( # ::ActiveSupport::Deprecation.warn(
|
95
|
+
self.class.deprecated_method_warning( # self.class.deprecated_method_warning(
|
96
|
+
:#{method_name}, # :generate_secret,
|
97
|
+
#{options[method_name].inspect}), # "You should use ActiveSupport::SecureRandom.hex(64)"),
|
98
|
+
caller # caller
|
99
|
+
) # )
|
100
|
+
send(:#{target}_without_deprecation#{punctuation}, *args, &block) # send(:generate_secret_without_deprecation, *args, &block)
|
101
|
+
end # end
|
102
|
+
EOS
|
103
|
+
end
|
104
|
+
end
|
105
|
+
end
|
106
|
+
|
107
|
+
def deprecated_method_warning(method_name, message=nil)
|
108
|
+
warning = "#{method_name} is deprecated and will be removed from Rails #{deprecation_horizon}"
|
109
|
+
case message
|
110
|
+
when Symbol then "#{warning} (use #{message} instead)"
|
111
|
+
when String then "#{warning} (#{message})"
|
112
|
+
else warning
|
113
|
+
end
|
114
|
+
end
|
115
|
+
|
116
|
+
def deprecation_horizon
|
117
|
+
'2.3'
|
118
|
+
end
|
119
|
+
end
|
120
|
+
|
121
|
+
class DeprecationProxy #:nodoc:
|
122
|
+
silence_warnings do
|
123
|
+
instance_methods.each { |m| undef_method m unless m =~ /^__/ }
|
124
|
+
end
|
125
|
+
|
126
|
+
# Don't give a deprecation warning on inspect since test/unit and error
|
127
|
+
# logs rely on it for diagnostics.
|
128
|
+
def inspect
|
129
|
+
target.inspect
|
130
|
+
end
|
131
|
+
|
132
|
+
private
|
133
|
+
def method_missing(called, *args, &block)
|
134
|
+
warn caller, called, args
|
135
|
+
target.__send__(called, *args, &block)
|
136
|
+
end
|
137
|
+
end
|
138
|
+
|
139
|
+
class DeprecatedObjectProxy < DeprecationProxy
|
140
|
+
def initialize(object, message)
|
141
|
+
@object = object
|
142
|
+
@message = message
|
143
|
+
end
|
144
|
+
|
145
|
+
private
|
146
|
+
def target
|
147
|
+
@object
|
148
|
+
end
|
149
|
+
|
150
|
+
def warn(callstack, called, args)
|
151
|
+
ActiveSupport::Deprecation.warn(@message, callstack)
|
152
|
+
end
|
153
|
+
end
|
154
|
+
|
155
|
+
# Stand-in for <tt>@request</tt>, <tt>@attributes</tt>, <tt>@params</tt>, etc.
|
156
|
+
# which emits deprecation warnings on any method call (except +inspect+).
|
157
|
+
class DeprecatedInstanceVariableProxy < DeprecationProxy #:nodoc:
|
158
|
+
def initialize(instance, method, var = "@#{method}")
|
159
|
+
@instance, @method, @var = instance, method, var
|
160
|
+
end
|
161
|
+
|
162
|
+
private
|
163
|
+
def target
|
164
|
+
@instance.__send__(@method)
|
165
|
+
end
|
166
|
+
|
167
|
+
def warn(callstack, called, args)
|
168
|
+
ActiveSupport::Deprecation.warn("#{@var} is deprecated! Call #{@method}.#{called} instead of #{@var}.#{called}. Args: #{args.inspect}", callstack)
|
169
|
+
end
|
170
|
+
end
|
171
|
+
|
172
|
+
class DeprecatedConstantProxy < DeprecationProxy #:nodoc:
|
173
|
+
def initialize(old_const, new_const)
|
174
|
+
@old_const = old_const
|
175
|
+
@new_const = new_const
|
176
|
+
end
|
177
|
+
|
178
|
+
def class
|
179
|
+
target.class
|
180
|
+
end
|
181
|
+
|
182
|
+
private
|
183
|
+
def target
|
184
|
+
@new_const.to_s.constantize
|
185
|
+
end
|
186
|
+
|
187
|
+
def warn(callstack, called, args)
|
188
|
+
ActiveSupport::Deprecation.warn("#{@old_const} is deprecated! Use #{@new_const} instead.", callstack)
|
189
|
+
end
|
190
|
+
end
|
191
|
+
end
|
192
|
+
end
|
193
|
+
|
194
|
+
class Module
|
195
|
+
include ActiveSupport::Deprecation::ClassMethods
|
196
|
+
end
|
@@ -0,0 +1,100 @@
|
|
1
|
+
require 'active_support/basic_object'
|
2
|
+
|
3
|
+
module ActiveSupport
|
4
|
+
# Provides accurate date and time measurements using Date#advance and
|
5
|
+
# Time#advance, respectively. It mainly supports the methods on Numeric,
|
6
|
+
# such as in this example:
|
7
|
+
#
|
8
|
+
# 1.month.ago # equivalent to Time.now.advance(:months => -1)
|
9
|
+
class Duration < BasicObject
|
10
|
+
attr_accessor :value, :parts
|
11
|
+
|
12
|
+
def initialize(value, parts) #:nodoc:
|
13
|
+
@value, @parts = value, parts
|
14
|
+
end
|
15
|
+
|
16
|
+
# Adds another Duration or a Numeric to this Duration. Numeric values
|
17
|
+
# are treated as seconds.
|
18
|
+
def +(other)
|
19
|
+
if Duration === other
|
20
|
+
Duration.new(value + other.value, @parts + other.parts)
|
21
|
+
else
|
22
|
+
Duration.new(value + other, @parts + [[:seconds, other]])
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
# Subtracts another Duration or a Numeric from this Duration. Numeric
|
27
|
+
# values are treated as seconds.
|
28
|
+
def -(other)
|
29
|
+
self + (-other)
|
30
|
+
end
|
31
|
+
|
32
|
+
def -@ #:nodoc:
|
33
|
+
Duration.new(-value, parts.map { |type,number| [type, -number] })
|
34
|
+
end
|
35
|
+
|
36
|
+
def is_a?(klass) #:nodoc:
|
37
|
+
klass == Duration || super
|
38
|
+
end
|
39
|
+
|
40
|
+
# Returns true if <tt>other</tt> is also a Duration instance with the
|
41
|
+
# same <tt>value</tt>, or if <tt>other == value</tt>.
|
42
|
+
def ==(other)
|
43
|
+
if Duration === other
|
44
|
+
other.value == value
|
45
|
+
else
|
46
|
+
other == value
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
def self.===(other) #:nodoc:
|
51
|
+
other.is_a?(Duration) rescue super
|
52
|
+
end
|
53
|
+
|
54
|
+
# Calculates a new Time or Date that is as far in the future
|
55
|
+
# as this Duration represents.
|
56
|
+
def since(time = ::Time.current)
|
57
|
+
sum(1, time)
|
58
|
+
end
|
59
|
+
alias :from_now :since
|
60
|
+
|
61
|
+
# Calculates a new Time or Date that is as far in the past
|
62
|
+
# as this Duration represents.
|
63
|
+
def ago(time = ::Time.current)
|
64
|
+
sum(-1, time)
|
65
|
+
end
|
66
|
+
alias :until :ago
|
67
|
+
|
68
|
+
def inspect #:nodoc:
|
69
|
+
consolidated = parts.inject(::Hash.new(0)) { |h,part| h[part.first] += part.last; h }
|
70
|
+
parts = [:years, :months, :days, :minutes, :seconds].map do |length|
|
71
|
+
n = consolidated[length]
|
72
|
+
"#{n} #{n == 1 ? length.to_s.singularize : length.to_s}" if n.nonzero?
|
73
|
+
end.compact
|
74
|
+
parts = ["0 seconds"] if parts.empty?
|
75
|
+
parts.to_sentence(:locale => :en)
|
76
|
+
end
|
77
|
+
|
78
|
+
protected
|
79
|
+
|
80
|
+
def sum(sign, time = ::Time.current) #:nodoc:
|
81
|
+
parts.inject(time) do |t,(type,number)|
|
82
|
+
if t.acts_like?(:time) || t.acts_like?(:date)
|
83
|
+
if type == :seconds
|
84
|
+
t.since(sign * number)
|
85
|
+
else
|
86
|
+
t.advance(type => sign * number)
|
87
|
+
end
|
88
|
+
else
|
89
|
+
raise ::ArgumentError, "expected a time or date, got #{time.inspect}"
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|
93
|
+
|
94
|
+
private
|
95
|
+
|
96
|
+
def method_missing(method, *args, &block) #:nodoc:
|
97
|
+
value.send(method, *args)
|
98
|
+
end
|
99
|
+
end
|
100
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require 'zlib'
|
2
|
+
require 'stringio'
|
3
|
+
|
4
|
+
module ActiveSupport
|
5
|
+
# A convenient wrapper for the zlib standard library that allows compression/decompression of strings with gzip.
|
6
|
+
module Gzip
|
7
|
+
class Stream < StringIO
|
8
|
+
def close; rewind; end
|
9
|
+
end
|
10
|
+
|
11
|
+
# Decompresses a gzipped string.
|
12
|
+
def self.decompress(source)
|
13
|
+
Zlib::GzipReader.new(StringIO.new(source)).read
|
14
|
+
end
|
15
|
+
|
16
|
+
# Compresses a string using gzip.
|
17
|
+
def self.compress(source)
|
18
|
+
output = Stream.new
|
19
|
+
gz = Zlib::GzipWriter.new(output)
|
20
|
+
gz.write(source)
|
21
|
+
gz.close
|
22
|
+
output.string
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,56 @@
|
|
1
|
+
module ActiveSupport
|
2
|
+
Inflector.inflections do |inflect|
|
3
|
+
inflect.plural(/$/, 's')
|
4
|
+
inflect.plural(/s$/i, 's')
|
5
|
+
inflect.plural(/(ax|test)is$/i, '\1es')
|
6
|
+
inflect.plural(/(octop|vir)us$/i, '\1i')
|
7
|
+
inflect.plural(/(alias|status)$/i, '\1es')
|
8
|
+
inflect.plural(/(bu)s$/i, '\1ses')
|
9
|
+
inflect.plural(/(buffal|tomat)o$/i, '\1oes')
|
10
|
+
inflect.plural(/([ti])um$/i, '\1a')
|
11
|
+
inflect.plural(/sis$/i, 'ses')
|
12
|
+
inflect.plural(/(?:([^f])fe|([lr])f)$/i, '\1\2ves')
|
13
|
+
inflect.plural(/(hive)$/i, '\1s')
|
14
|
+
inflect.plural(/([^aeiouy]|qu)y$/i, '\1ies')
|
15
|
+
inflect.plural(/(x|ch|ss|sh)$/i, '\1es')
|
16
|
+
inflect.plural(/(matr|vert|ind)(?:ix|ex)$/i, '\1ices')
|
17
|
+
inflect.plural(/([m|l])ouse$/i, '\1ice')
|
18
|
+
inflect.plural(/^(ox)$/i, '\1en')
|
19
|
+
inflect.plural(/(quiz)$/i, '\1zes')
|
20
|
+
|
21
|
+
inflect.singular(/s$/i, '')
|
22
|
+
inflect.singular(/(n)ews$/i, '\1ews')
|
23
|
+
inflect.singular(/([ti])a$/i, '\1um')
|
24
|
+
inflect.singular(/((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$/i, '\1\2sis')
|
25
|
+
inflect.singular(/(^analy)ses$/i, '\1sis')
|
26
|
+
inflect.singular(/([^f])ves$/i, '\1fe')
|
27
|
+
inflect.singular(/(hive)s$/i, '\1')
|
28
|
+
inflect.singular(/(tive)s$/i, '\1')
|
29
|
+
inflect.singular(/([lr])ves$/i, '\1f')
|
30
|
+
inflect.singular(/([^aeiouy]|qu)ies$/i, '\1y')
|
31
|
+
inflect.singular(/(s)eries$/i, '\1eries')
|
32
|
+
inflect.singular(/(m)ovies$/i, '\1ovie')
|
33
|
+
inflect.singular(/(x|ch|ss|sh)es$/i, '\1')
|
34
|
+
inflect.singular(/([m|l])ice$/i, '\1ouse')
|
35
|
+
inflect.singular(/(bus)es$/i, '\1')
|
36
|
+
inflect.singular(/(o)es$/i, '\1')
|
37
|
+
inflect.singular(/(shoe)s$/i, '\1')
|
38
|
+
inflect.singular(/(cris|ax|test)es$/i, '\1is')
|
39
|
+
inflect.singular(/(octop|vir)i$/i, '\1us')
|
40
|
+
inflect.singular(/(alias|status)es$/i, '\1')
|
41
|
+
inflect.singular(/^(ox)en/i, '\1')
|
42
|
+
inflect.singular(/(vert|ind)ices$/i, '\1ex')
|
43
|
+
inflect.singular(/(matr)ices$/i, '\1ix')
|
44
|
+
inflect.singular(/(quiz)zes$/i, '\1')
|
45
|
+
inflect.singular(/(database)s$/i, '\1')
|
46
|
+
|
47
|
+
inflect.irregular('person', 'people')
|
48
|
+
inflect.irregular('man', 'men')
|
49
|
+
inflect.irregular('child', 'children')
|
50
|
+
inflect.irregular('sex', 'sexes')
|
51
|
+
inflect.irregular('move', 'moves')
|
52
|
+
inflect.irregular('cow', 'kine')
|
53
|
+
|
54
|
+
inflect.uncountable(%w(equipment information rice money species series fish sheep))
|
55
|
+
end
|
56
|
+
end
|