mack-active_record 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/mack-active_record/test_extensions.rb +0 -3
- metadata +3 -374
- data/lib/gems/activesupport-2.2.2/lib/active_support/base64.rb +0 -33
- data/lib/gems/activesupport-2.2.2/lib/active_support/basic_object.rb +0 -24
- data/lib/gems/activesupport-2.2.2/lib/active_support/buffered_logger.rb +0 -122
- data/lib/gems/activesupport-2.2.2/lib/active_support/cache/compressed_mem_cache_store.rb +0 -20
- data/lib/gems/activesupport-2.2.2/lib/active_support/cache/drb_store.rb +0 -15
- data/lib/gems/activesupport-2.2.2/lib/active_support/cache/file_store.rb +0 -72
- data/lib/gems/activesupport-2.2.2/lib/active_support/cache/mem_cache_store.rb +0 -127
- data/lib/gems/activesupport-2.2.2/lib/active_support/cache/memory_store.rb +0 -52
- data/lib/gems/activesupport-2.2.2/lib/active_support/cache/synchronized_memory_store.rb +0 -47
- data/lib/gems/activesupport-2.2.2/lib/active_support/cache.rb +0 -223
- data/lib/gems/activesupport-2.2.2/lib/active_support/callbacks.rb +0 -280
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/array/access.rb +0 -53
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/array/conversions.rb +0 -183
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/array/extract_options.rb +0 -20
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/array/grouping.rb +0 -106
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/array/random_access.rb +0 -12
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/array.rb +0 -13
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/base64/encoding.rb +0 -16
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/base64.rb +0 -4
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/benchmark.rb +0 -12
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/bigdecimal/conversions.rb +0 -37
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/bigdecimal.rb +0 -6
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/blank.rb +0 -58
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/cgi/escape_skipping_slashes.rb +0 -14
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/cgi.rb +0 -5
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/class/attribute_accessors.rb +0 -54
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/class/delegating_attributes.rb +0 -46
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/class/inheritable_attributes.rb +0 -140
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/class/removal.rb +0 -50
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/class.rb +0 -4
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/date/behavior.rb +0 -42
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/date/calculations.rb +0 -230
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/date/conversions.rb +0 -107
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/date.rb +0 -10
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/date_time/calculations.rb +0 -126
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/date_time/conversions.rb +0 -96
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/date_time.rb +0 -12
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/duplicable.rb +0 -43
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/enumerable.rb +0 -107
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/exception.rb +0 -41
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/file/atomic.rb +0 -46
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/file.rb +0 -5
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/float/rounding.rb +0 -24
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/float/time.rb +0 -27
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/float.rb +0 -7
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/hash/conversions.rb +0 -259
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/hash/deep_merge.rb +0 -23
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/hash/diff.rb +0 -19
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/hash/except.rb +0 -25
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/hash/indifferent_access.rb +0 -137
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/hash/keys.rb +0 -52
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/hash/reverse_merge.rb +0 -35
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/hash/slice.rb +0 -33
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/hash.rb +0 -14
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/integer/even_odd.rb +0 -29
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/integer/inflections.rb +0 -20
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/integer/time.rb +0 -45
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/integer.rb +0 -9
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/kernel/agnostics.rb +0 -11
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/kernel/daemonizing.rb +0 -7
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/kernel/debugger.rb +0 -13
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/kernel/reporting.rb +0 -59
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/kernel/requires.rb +0 -24
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/kernel.rb +0 -5
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/load_error.rb +0 -38
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/logger.rb +0 -143
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/module/aliasing.rb +0 -74
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/module/attr_accessor_with_default.rb +0 -31
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/module/attr_internal.rb +0 -32
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/module/attribute_accessors.rb +0 -58
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/module/delegation.rb +0 -95
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/module/inclusion.rb +0 -30
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/module/introspection.rb +0 -90
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/module/loading.rb +0 -23
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/module/model_naming.rb +0 -23
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/module/synchronization.rb +0 -39
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/module.rb +0 -23
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/name_error.rb +0 -17
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/numeric/bytes.rb +0 -44
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/numeric/conversions.rb +0 -19
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/numeric/time.rb +0 -81
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/numeric.rb +0 -9
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/object/conversions.rb +0 -14
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/object/extending.rb +0 -80
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/object/instance_variables.rb +0 -74
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/object/metaclass.rb +0 -13
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/object/misc.rb +0 -74
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/object.rb +0 -5
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/pathname/clean_within.rb +0 -14
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/pathname.rb +0 -7
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/proc.rb +0 -12
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/process/daemon.rb +0 -25
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/process.rb +0 -1
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/range/blockless_step.rb +0 -32
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/range/conversions.rb +0 -27
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/range/include_range.rb +0 -30
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/range/overlaps.rb +0 -15
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/range.rb +0 -11
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/rexml.rb +0 -36
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/string/access.rb +0 -82
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/string/behavior.rb +0 -13
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/string/conversions.rb +0 -28
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/string/filters.rb +0 -26
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/string/inflections.rb +0 -167
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/string/iterators.rb +0 -21
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/string/multibyte.rb +0 -81
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/string/starts_ends_with.rb +0 -35
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/string/xchar.rb +0 -11
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/string.rb +0 -22
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/symbol.rb +0 -14
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/time/behavior.rb +0 -13
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/time/calculations.rb +0 -303
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/time/conversions.rb +0 -90
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/time/zones.rb +0 -86
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext/time.rb +0 -42
- data/lib/gems/activesupport-2.2.2/lib/active_support/core_ext.rb +0 -4
- data/lib/gems/activesupport-2.2.2/lib/active_support/dependencies.rb +0 -621
- data/lib/gems/activesupport-2.2.2/lib/active_support/deprecation.rb +0 -243
- data/lib/gems/activesupport-2.2.2/lib/active_support/duration.rb +0 -96
- data/lib/gems/activesupport-2.2.2/lib/active_support/gzip.rb +0 -25
- data/lib/gems/activesupport-2.2.2/lib/active_support/inflections.rb +0 -55
- data/lib/gems/activesupport-2.2.2/lib/active_support/inflector.rb +0 -397
- data/lib/gems/activesupport-2.2.2/lib/active_support/json/decoding.rb +0 -63
- data/lib/gems/activesupport-2.2.2/lib/active_support/json/encoders/date.rb +0 -21
- data/lib/gems/activesupport-2.2.2/lib/active_support/json/encoders/date_time.rb +0 -21
- data/lib/gems/activesupport-2.2.2/lib/active_support/json/encoders/enumerable.rb +0 -12
- data/lib/gems/activesupport-2.2.2/lib/active_support/json/encoders/false_class.rb +0 -5
- data/lib/gems/activesupport-2.2.2/lib/active_support/json/encoders/hash.rb +0 -47
- data/lib/gems/activesupport-2.2.2/lib/active_support/json/encoders/nil_class.rb +0 -5
- data/lib/gems/activesupport-2.2.2/lib/active_support/json/encoders/numeric.rb +0 -5
- data/lib/gems/activesupport-2.2.2/lib/active_support/json/encoders/object.rb +0 -6
- data/lib/gems/activesupport-2.2.2/lib/active_support/json/encoders/regexp.rb +0 -5
- data/lib/gems/activesupport-2.2.2/lib/active_support/json/encoders/string.rb +0 -36
- data/lib/gems/activesupport-2.2.2/lib/active_support/json/encoders/symbol.rb +0 -5
- data/lib/gems/activesupport-2.2.2/lib/active_support/json/encoders/time.rb +0 -21
- data/lib/gems/activesupport-2.2.2/lib/active_support/json/encoders/true_class.rb +0 -5
- data/lib/gems/activesupport-2.2.2/lib/active_support/json/encoding.rb +0 -37
- data/lib/gems/activesupport-2.2.2/lib/active_support/json/variable.rb +0 -10
- data/lib/gems/activesupport-2.2.2/lib/active_support/json.rb +0 -23
- data/lib/gems/activesupport-2.2.2/lib/active_support/locale/en.yml +0 -32
- data/lib/gems/activesupport-2.2.2/lib/active_support/memoizable.rb +0 -82
- data/lib/gems/activesupport-2.2.2/lib/active_support/multibyte/chars.rb +0 -679
- data/lib/gems/activesupport-2.2.2/lib/active_support/multibyte/exceptions.rb +0 -8
- data/lib/gems/activesupport-2.2.2/lib/active_support/multibyte/unicode_database.rb +0 -71
- data/lib/gems/activesupport-2.2.2/lib/active_support/multibyte.rb +0 -33
- data/lib/gems/activesupport-2.2.2/lib/active_support/option_merger.rb +0 -17
- data/lib/gems/activesupport-2.2.2/lib/active_support/ordered_hash.rb +0 -58
- data/lib/gems/activesupport-2.2.2/lib/active_support/ordered_options.rb +0 -19
- data/lib/gems/activesupport-2.2.2/lib/active_support/rescuable.rb +0 -108
- data/lib/gems/activesupport-2.2.2/lib/active_support/secure_random.rb +0 -197
- data/lib/gems/activesupport-2.2.2/lib/active_support/string_inquirer.rb +0 -21
- data/lib/gems/activesupport-2.2.2/lib/active_support/test_case.rb +0 -24
- data/lib/gems/activesupport-2.2.2/lib/active_support/testing/core_ext/test/unit/assertions.rb +0 -72
- data/lib/gems/activesupport-2.2.2/lib/active_support/testing/core_ext/test.rb +0 -6
- data/lib/gems/activesupport-2.2.2/lib/active_support/testing/default.rb +0 -9
- data/lib/gems/activesupport-2.2.2/lib/active_support/testing/performance.rb +0 -452
- data/lib/gems/activesupport-2.2.2/lib/active_support/testing/setup_and_teardown.rb +0 -120
- data/lib/gems/activesupport-2.2.2/lib/active_support/time_with_zone.rb +0 -328
- data/lib/gems/activesupport-2.2.2/lib/active_support/values/time_zone.rb +0 -403
- 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/builder-2.1.2/blankslate.rb +0 -113
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/builder-2.1.2/builder/blankslate.rb +0 -20
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/builder-2.1.2/builder/css.rb +0 -250
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/builder-2.1.2/builder/xchar.rb +0 -115
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/builder-2.1.2/builder/xmlbase.rb +0 -139
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/builder-2.1.2/builder/xmlevents.rb +0 -63
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/builder-2.1.2/builder/xmlmarkup.rb +0 -328
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/builder-2.1.2/builder.rb +0 -13
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/i18n-0.0.1/i18n/backend/simple.rb +0 -216
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/i18n-0.0.1/i18n/exceptions.rb +0 -53
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/i18n-0.0.1/i18n.rb +0 -194
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/memcache-client-1.5.1/memcache.rb +0 -849
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/data_timezone.rb +0 -47
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/data_timezone_info.rb +0 -228
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Algiers.rb +0 -55
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Cairo.rb +0 -219
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Casablanca.rb +0 -40
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Harare.rb +0 -18
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Johannesburg.rb +0 -25
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Monrovia.rb +0 -22
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Nairobi.rb +0 -23
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Argentina/Buenos_Aires.rb +0 -166
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Argentina/San_Juan.rb +0 -86
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Bogota.rb +0 -23
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Caracas.rb +0 -23
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Chicago.rb +0 -283
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Chihuahua.rb +0 -136
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Denver.rb +0 -204
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Godthab.rb +0 -161
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Guatemala.rb +0 -27
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Halifax.rb +0 -274
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Indiana/Indianapolis.rb +0 -149
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Juneau.rb +0 -194
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/La_Paz.rb +0 -22
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Lima.rb +0 -35
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Los_Angeles.rb +0 -232
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Mazatlan.rb +0 -139
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Mexico_City.rb +0 -144
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Monterrey.rb +0 -131
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/New_York.rb +0 -282
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Phoenix.rb +0 -30
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Regina.rb +0 -74
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Santiago.rb +0 -205
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Sao_Paulo.rb +0 -171
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/St_Johns.rb +0 -288
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Tijuana.rb +0 -196
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Almaty.rb +0 -67
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Baghdad.rb +0 -73
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Baku.rb +0 -161
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Bangkok.rb +0 -20
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Chongqing.rb +0 -33
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Colombo.rb +0 -30
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Dhaka.rb +0 -27
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Hong_Kong.rb +0 -87
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Irkutsk.rb +0 -165
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Jakarta.rb +0 -30
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Jerusalem.rb +0 -163
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Kabul.rb +0 -20
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Kamchatka.rb +0 -163
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Karachi.rb +0 -30
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Katmandu.rb +0 -20
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Kolkata.rb +0 -25
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Krasnoyarsk.rb +0 -163
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Kuala_Lumpur.rb +0 -31
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Kuwait.rb +0 -18
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Magadan.rb +0 -163
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Muscat.rb +0 -18
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Novosibirsk.rb +0 -164
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Rangoon.rb +0 -24
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Riyadh.rb +0 -18
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Seoul.rb +0 -34
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Shanghai.rb +0 -35
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Singapore.rb +0 -33
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Taipei.rb +0 -59
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Tashkent.rb +0 -47
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Tbilisi.rb +0 -78
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Tehran.rb +0 -121
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Tokyo.rb +0 -30
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Ulaanbaatar.rb +0 -65
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Urumqi.rb +0 -33
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Vladivostok.rb +0 -164
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Yakutsk.rb +0 -163
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Yekaterinburg.rb +0 -165
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Yerevan.rb +0 -165
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Atlantic/Azores.rb +0 -270
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Atlantic/Cape_Verde.rb +0 -23
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Atlantic/South_Georgia.rb +0 -18
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Adelaide.rb +0 -187
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Brisbane.rb +0 -35
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Darwin.rb +0 -29
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Hobart.rb +0 -193
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Melbourne.rb +0 -185
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Perth.rb +0 -37
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Sydney.rb +0 -185
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Etc/UTC.rb +0 -16
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Amsterdam.rb +0 -228
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Athens.rb +0 -185
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Belgrade.rb +0 -163
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Berlin.rb +0 -188
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Bratislava.rb +0 -13
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Brussels.rb +0 -232
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Bucharest.rb +0 -181
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Budapest.rb +0 -197
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Copenhagen.rb +0 -179
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Dublin.rb +0 -276
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Helsinki.rb +0 -163
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Istanbul.rb +0 -218
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Kiev.rb +0 -168
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Lisbon.rb +0 -268
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Ljubljana.rb +0 -13
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/London.rb +0 -288
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Madrid.rb +0 -211
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Minsk.rb +0 -170
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Moscow.rb +0 -181
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Paris.rb +0 -232
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Prague.rb +0 -187
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Riga.rb +0 -176
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Rome.rb +0 -215
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Sarajevo.rb +0 -13
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Skopje.rb +0 -13
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Sofia.rb +0 -173
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Stockholm.rb +0 -165
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Tallinn.rb +0 -172
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Vienna.rb +0 -183
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Vilnius.rb +0 -170
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Warsaw.rb +0 -212
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Zagreb.rb +0 -13
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Auckland.rb +0 -202
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Fiji.rb +0 -23
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Guam.rb +0 -22
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Honolulu.rb +0 -28
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Majuro.rb +0 -20
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Midway.rb +0 -25
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Noumea.rb +0 -25
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Pago_Pago.rb +0 -26
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Port_Moresby.rb +0 -20
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Tongatapu.rb +0 -27
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/info_timezone.rb +0 -52
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/linked_timezone.rb +0 -51
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/linked_timezone_info.rb +0 -44
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/offset_rationals.rb +0 -98
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/ruby_core_support.rb +0 -56
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/time_or_datetime.rb +0 -292
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone.rb +0 -508
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone_definition.rb +0 -56
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone_info.rb +0 -40
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone_offset_info.rb +0 -94
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone_period.rb +0 -198
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone_transition_info.rb +0 -129
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo.rb +0 -33
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor/xml-simple-1.0.11/xmlsimple.rb +0 -1021
- data/lib/gems/activesupport-2.2.2/lib/active_support/vendor.rb +0 -34
- data/lib/gems/activesupport-2.2.2/lib/active_support/version.rb +0 -9
- data/lib/gems/activesupport-2.2.2/lib/active_support/whiny_nil.rb +0 -58
- data/lib/gems/activesupport-2.2.2/lib/active_support.rb +0 -61
- data/lib/gems/activesupport-2.2.2/lib/activesupport.rb +0 -1
@@ -1,71 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
module ActiveSupport #:nodoc:
|
4
|
-
module Multibyte #:nodoc:
|
5
|
-
# Holds data about a codepoint in the Unicode database
|
6
|
-
class Codepoint
|
7
|
-
attr_accessor :code, :combining_class, :decomp_type, :decomp_mapping, :uppercase_mapping, :lowercase_mapping
|
8
|
-
end
|
9
|
-
|
10
|
-
# Holds static data from the Unicode database
|
11
|
-
class UnicodeDatabase
|
12
|
-
ATTRIBUTES = :codepoints, :composition_exclusion, :composition_map, :boundary, :cp1252
|
13
|
-
|
14
|
-
attr_writer(*ATTRIBUTES)
|
15
|
-
|
16
|
-
def initialize
|
17
|
-
@codepoints = Hash.new(Codepoint.new)
|
18
|
-
@composition_exclusion = []
|
19
|
-
@composition_map = {}
|
20
|
-
@boundary = {}
|
21
|
-
@cp1252 = {}
|
22
|
-
end
|
23
|
-
|
24
|
-
# Lazy load the Unicode database so it's only loaded when it's actually used
|
25
|
-
ATTRIBUTES.each do |attr_name|
|
26
|
-
class_eval(<<-EOS, __FILE__, __LINE__)
|
27
|
-
def #{attr_name}
|
28
|
-
load
|
29
|
-
@#{attr_name}
|
30
|
-
end
|
31
|
-
EOS
|
32
|
-
end
|
33
|
-
|
34
|
-
# Loads the Unicode database and returns all the internal objects of UnicodeDatabase.
|
35
|
-
def load
|
36
|
-
begin
|
37
|
-
@codepoints, @composition_exclusion, @composition_map, @boundary, @cp1252 = File.open(self.class.filename, 'rb') { |f| Marshal.load f.read }
|
38
|
-
rescue Exception => e
|
39
|
-
raise IOError.new("Couldn't load the Unicode tables for UTF8Handler (#{e.message}), ActiveSupport::Multibyte is unusable")
|
40
|
-
end
|
41
|
-
|
42
|
-
# Redefine the === method so we can write shorter rules for grapheme cluster breaks
|
43
|
-
@boundary.each do |k,_|
|
44
|
-
@boundary[k].instance_eval do
|
45
|
-
def ===(other)
|
46
|
-
detect { |i| i === other } ? true : false
|
47
|
-
end
|
48
|
-
end if @boundary[k].kind_of?(Array)
|
49
|
-
end
|
50
|
-
|
51
|
-
# define attr_reader methods for the instance variables
|
52
|
-
class << self
|
53
|
-
attr_reader(*ATTRIBUTES)
|
54
|
-
end
|
55
|
-
end
|
56
|
-
|
57
|
-
# Returns the directory in which the data files are stored
|
58
|
-
def self.dirname
|
59
|
-
File.dirname(__FILE__) + '/../values/'
|
60
|
-
end
|
61
|
-
|
62
|
-
# Returns the filename for the data file for this version
|
63
|
-
def self.filename
|
64
|
-
File.expand_path File.join(dirname, "unicode_tables.dat")
|
65
|
-
end
|
66
|
-
end
|
67
|
-
|
68
|
-
# UniCode Database
|
69
|
-
UCD = UnicodeDatabase.new
|
70
|
-
end
|
71
|
-
end
|
@@ -1,33 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
require 'active_support/multibyte/chars'
|
4
|
-
require 'active_support/multibyte/exceptions'
|
5
|
-
require 'active_support/multibyte/unicode_database'
|
6
|
-
|
7
|
-
module ActiveSupport #:nodoc:
|
8
|
-
module Multibyte
|
9
|
-
# A list of all available normalization forms. See http://www.unicode.org/reports/tr15/tr15-29.html for more
|
10
|
-
# information about normalization.
|
11
|
-
NORMALIZATION_FORMS = [:c, :kc, :d, :kd]
|
12
|
-
|
13
|
-
# The Unicode version that is supported by the implementation
|
14
|
-
UNICODE_VERSION = '5.1.0'
|
15
|
-
|
16
|
-
# The default normalization used for operations that require normalization. It can be set to any of the
|
17
|
-
# normalizations in NORMALIZATION_FORMS.
|
18
|
-
#
|
19
|
-
# Example:
|
20
|
-
# ActiveSupport::Multibyte.default_normalization_form = :c
|
21
|
-
mattr_accessor :default_normalization_form
|
22
|
-
self.default_normalization_form = :kc
|
23
|
-
|
24
|
-
# The proxy class returned when calling mb_chars. You can use this accessor to configure your own proxy
|
25
|
-
# class so you can support other encodings. See the ActiveSupport::Multibyte::Chars implementation for
|
26
|
-
# an example how to do this.
|
27
|
-
#
|
28
|
-
# Example:
|
29
|
-
# ActiveSupport::Multibyte.proxy_class = CharsForUTF32
|
30
|
-
mattr_accessor :proxy_class
|
31
|
-
self.proxy_class = ActiveSupport::Multibyte::Chars
|
32
|
-
end
|
33
|
-
end
|
@@ -1,17 +0,0 @@
|
|
1
|
-
module ActiveSupport
|
2
|
-
class OptionMerger #:nodoc:
|
3
|
-
instance_methods.each do |method|
|
4
|
-
undef_method(method) if method !~ /^(__|instance_eval|class|object_id)/
|
5
|
-
end
|
6
|
-
|
7
|
-
def initialize(context, options)
|
8
|
-
@context, @options = context, options
|
9
|
-
end
|
10
|
-
|
11
|
-
private
|
12
|
-
def method_missing(method, *arguments, &block)
|
13
|
-
arguments << (arguments.last.respond_to?(:to_hash) ? @options.deep_merge(arguments.pop) : @options.dup)
|
14
|
-
@context.__send__(method, *arguments, &block)
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
@@ -1,58 +0,0 @@
|
|
1
|
-
# OrderedHash is namespaced to prevent conflicts with other implementations
|
2
|
-
module ActiveSupport
|
3
|
-
# Hash is ordered in Ruby 1.9!
|
4
|
-
if RUBY_VERSION >= '1.9'
|
5
|
-
OrderedHash = ::Hash
|
6
|
-
else
|
7
|
-
class OrderedHash < Array #:nodoc:
|
8
|
-
def []=(key, value)
|
9
|
-
if pair = assoc(key)
|
10
|
-
pair.pop
|
11
|
-
pair << value
|
12
|
-
else
|
13
|
-
self << [key, value]
|
14
|
-
end
|
15
|
-
value
|
16
|
-
end
|
17
|
-
|
18
|
-
def [](key)
|
19
|
-
pair = assoc(key)
|
20
|
-
pair ? pair.last : nil
|
21
|
-
end
|
22
|
-
|
23
|
-
def delete(key)
|
24
|
-
pair = assoc(key)
|
25
|
-
pair ? array_index = index(pair) : nil
|
26
|
-
array_index ? delete_at(array_index).last : nil
|
27
|
-
end
|
28
|
-
|
29
|
-
def keys
|
30
|
-
collect { |key, value| key }
|
31
|
-
end
|
32
|
-
|
33
|
-
def values
|
34
|
-
collect { |key, value| value }
|
35
|
-
end
|
36
|
-
|
37
|
-
def to_hash
|
38
|
-
returning({}) do |hash|
|
39
|
-
each { |array| hash[array[0]] = array[1] }
|
40
|
-
end
|
41
|
-
end
|
42
|
-
|
43
|
-
def has_key?(k)
|
44
|
-
!assoc(k).nil?
|
45
|
-
end
|
46
|
-
|
47
|
-
alias_method :key?, :has_key?
|
48
|
-
alias_method :include?, :has_key?
|
49
|
-
alias_method :member?, :has_key?
|
50
|
-
|
51
|
-
def has_value?(v)
|
52
|
-
any? { |key, value| value == v }
|
53
|
-
end
|
54
|
-
|
55
|
-
alias_method :value?, :has_value?
|
56
|
-
end
|
57
|
-
end
|
58
|
-
end
|
@@ -1,19 +0,0 @@
|
|
1
|
-
module ActiveSupport #:nodoc:
|
2
|
-
class OrderedOptions < OrderedHash #:nodoc:
|
3
|
-
def []=(key, value)
|
4
|
-
super(key.to_sym, value)
|
5
|
-
end
|
6
|
-
|
7
|
-
def [](key)
|
8
|
-
super(key.to_sym)
|
9
|
-
end
|
10
|
-
|
11
|
-
def method_missing(name, *args)
|
12
|
-
if name.to_s =~ /(.*)=$/
|
13
|
-
self[$1.to_sym] = args.first
|
14
|
-
else
|
15
|
-
self[name]
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
@@ -1,108 +0,0 @@
|
|
1
|
-
module ActiveSupport
|
2
|
-
# Rescuable module adds support for easier exception handling.
|
3
|
-
module Rescuable
|
4
|
-
def self.included(base) # :nodoc:
|
5
|
-
base.class_inheritable_accessor :rescue_handlers
|
6
|
-
base.rescue_handlers = []
|
7
|
-
|
8
|
-
base.extend(ClassMethods)
|
9
|
-
end
|
10
|
-
|
11
|
-
module ClassMethods
|
12
|
-
# Rescue exceptions raised in controller actions.
|
13
|
-
#
|
14
|
-
# <tt>rescue_from</tt> receives a series of exception classes or class
|
15
|
-
# names, and a trailing <tt>:with</tt> option with the name of a method
|
16
|
-
# or a Proc object to be called to handle them. Alternatively a block can
|
17
|
-
# be given.
|
18
|
-
#
|
19
|
-
# Handlers that take one argument will be called with the exception, so
|
20
|
-
# that the exception can be inspected when dealing with it.
|
21
|
-
#
|
22
|
-
# Handlers are inherited. They are searched from right to left, from
|
23
|
-
# bottom to top, and up the hierarchy. The handler of the first class for
|
24
|
-
# which <tt>exception.is_a?(klass)</tt> holds true is the one invoked, if
|
25
|
-
# any.
|
26
|
-
#
|
27
|
-
# class ApplicationController < ActionController::Base
|
28
|
-
# rescue_from User::NotAuthorized, :with => :deny_access # self defined exception
|
29
|
-
# rescue_from ActiveRecord::RecordInvalid, :with => :show_errors
|
30
|
-
#
|
31
|
-
# rescue_from 'MyAppError::Base' do |exception|
|
32
|
-
# render :xml => exception, :status => 500
|
33
|
-
# end
|
34
|
-
#
|
35
|
-
# protected
|
36
|
-
# def deny_access
|
37
|
-
# ...
|
38
|
-
# end
|
39
|
-
#
|
40
|
-
# def show_errors(exception)
|
41
|
-
# exception.record.new_record? ? ...
|
42
|
-
# end
|
43
|
-
# end
|
44
|
-
def rescue_from(*klasses, &block)
|
45
|
-
options = klasses.extract_options!
|
46
|
-
|
47
|
-
unless options.has_key?(:with)
|
48
|
-
if block_given?
|
49
|
-
options[:with] = block
|
50
|
-
else
|
51
|
-
raise ArgumentError, "Need a handler. Supply an options hash that has a :with key as the last argument."
|
52
|
-
end
|
53
|
-
end
|
54
|
-
|
55
|
-
klasses.each do |klass|
|
56
|
-
key = if klass.is_a?(Class) && klass <= Exception
|
57
|
-
klass.name
|
58
|
-
elsif klass.is_a?(String)
|
59
|
-
klass
|
60
|
-
else
|
61
|
-
raise ArgumentError, "#{klass} is neither an Exception nor a String"
|
62
|
-
end
|
63
|
-
|
64
|
-
# put the new handler at the end because the list is read in reverse
|
65
|
-
rescue_handlers << [key, options[:with]]
|
66
|
-
end
|
67
|
-
end
|
68
|
-
end
|
69
|
-
|
70
|
-
# Tries to rescue the exception by looking up and calling a registered handler.
|
71
|
-
def rescue_with_handler(exception)
|
72
|
-
if handler = handler_for_rescue(exception)
|
73
|
-
handler.arity != 0 ? handler.call(exception) : handler.call
|
74
|
-
true # don't rely on the return value of the handler
|
75
|
-
end
|
76
|
-
end
|
77
|
-
|
78
|
-
def handler_for_rescue(exception)
|
79
|
-
# We go from right to left because pairs are pushed onto rescue_handlers
|
80
|
-
# as rescue_from declarations are found.
|
81
|
-
_, rescuer = Array(rescue_handlers).reverse.detect do |klass_name, handler|
|
82
|
-
# The purpose of allowing strings in rescue_from is to support the
|
83
|
-
# declaration of handler associations for exception classes whose
|
84
|
-
# definition is yet unknown.
|
85
|
-
#
|
86
|
-
# Since this loop needs the constants it would be inconsistent to
|
87
|
-
# assume they should exist at this point. An early raised exception
|
88
|
-
# could trigger some other handler and the array could include
|
89
|
-
# precisely a string whose corresponding constant has not yet been
|
90
|
-
# seen. This is why we are tolerant to unknown constants.
|
91
|
-
#
|
92
|
-
# Note that this tolerance only matters if the exception was given as
|
93
|
-
# a string, otherwise a NameError will be raised by the interpreter
|
94
|
-
# itself when rescue_from CONSTANT is executed.
|
95
|
-
klass = self.class.const_get(klass_name) rescue nil
|
96
|
-
klass ||= klass_name.constantize rescue nil
|
97
|
-
exception.is_a?(klass) if klass
|
98
|
-
end
|
99
|
-
|
100
|
-
case rescuer
|
101
|
-
when Symbol
|
102
|
-
method(rescuer)
|
103
|
-
when Proc
|
104
|
-
rescuer.bind(self)
|
105
|
-
end
|
106
|
-
end
|
107
|
-
end
|
108
|
-
end
|
@@ -1,197 +0,0 @@
|
|
1
|
-
begin
|
2
|
-
require 'openssl'
|
3
|
-
rescue LoadError
|
4
|
-
end
|
5
|
-
|
6
|
-
begin
|
7
|
-
require 'securerandom'
|
8
|
-
rescue LoadError
|
9
|
-
end
|
10
|
-
|
11
|
-
module ActiveSupport
|
12
|
-
if defined?(::SecureRandom)
|
13
|
-
# Use Ruby 1.9's SecureRandom library whenever possible.
|
14
|
-
SecureRandom = ::SecureRandom # :nodoc:
|
15
|
-
else
|
16
|
-
# = Secure random number generator interface.
|
17
|
-
#
|
18
|
-
# This library is an interface for secure random number generator which is
|
19
|
-
# suitable for generating session key in HTTP cookies, etc.
|
20
|
-
#
|
21
|
-
# It supports following secure random number generators.
|
22
|
-
#
|
23
|
-
# * openssl
|
24
|
-
# * /dev/urandom
|
25
|
-
# * Win32
|
26
|
-
#
|
27
|
-
# *Note*: This module is based on the SecureRandom library from Ruby 1.9,
|
28
|
-
# revision 18786, August 23 2008. It's 100% interface-compatible with Ruby 1.9's
|
29
|
-
# SecureRandom library.
|
30
|
-
#
|
31
|
-
# == Example
|
32
|
-
#
|
33
|
-
# # random hexadecimal string.
|
34
|
-
# p SecureRandom.hex(10) #=> "52750b30ffbc7de3b362"
|
35
|
-
# p SecureRandom.hex(10) #=> "92b15d6c8dc4beb5f559"
|
36
|
-
# p SecureRandom.hex(11) #=> "6aca1b5c58e4863e6b81b8"
|
37
|
-
# p SecureRandom.hex(12) #=> "94b2fff3e7fd9b9c391a2306"
|
38
|
-
# p SecureRandom.hex(13) #=> "39b290146bea6ce975c37cfc23"
|
39
|
-
# ...
|
40
|
-
#
|
41
|
-
# # random base64 string.
|
42
|
-
# p SecureRandom.base64(10) #=> "EcmTPZwWRAozdA=="
|
43
|
-
# p SecureRandom.base64(10) #=> "9b0nsevdwNuM/w=="
|
44
|
-
# p SecureRandom.base64(10) #=> "KO1nIU+p9DKxGg=="
|
45
|
-
# p SecureRandom.base64(11) #=> "l7XEiFja+8EKEtY="
|
46
|
-
# p SecureRandom.base64(12) #=> "7kJSM/MzBJI+75j8"
|
47
|
-
# p SecureRandom.base64(13) #=> "vKLJ0tXBHqQOuIcSIg=="
|
48
|
-
# ...
|
49
|
-
#
|
50
|
-
# # random binary string.
|
51
|
-
# p SecureRandom.random_bytes(10) #=> "\016\t{\370g\310pbr\301"
|
52
|
-
# p SecureRandom.random_bytes(10) #=> "\323U\030TO\234\357\020\a\337"
|
53
|
-
# ...
|
54
|
-
module SecureRandom
|
55
|
-
# SecureRandom.random_bytes generates a random binary string.
|
56
|
-
#
|
57
|
-
# The argument n specifies the length of the result string.
|
58
|
-
#
|
59
|
-
# If n is not specified, 16 is assumed.
|
60
|
-
# It may be larger in future.
|
61
|
-
#
|
62
|
-
# If secure random number generator is not available,
|
63
|
-
# NotImplementedError is raised.
|
64
|
-
def self.random_bytes(n=nil)
|
65
|
-
n ||= 16
|
66
|
-
|
67
|
-
if defined? OpenSSL::Random
|
68
|
-
return OpenSSL::Random.random_bytes(n)
|
69
|
-
end
|
70
|
-
|
71
|
-
if !defined?(@has_urandom) || @has_urandom
|
72
|
-
flags = File::RDONLY
|
73
|
-
flags |= File::NONBLOCK if defined? File::NONBLOCK
|
74
|
-
flags |= File::NOCTTY if defined? File::NOCTTY
|
75
|
-
flags |= File::NOFOLLOW if defined? File::NOFOLLOW
|
76
|
-
begin
|
77
|
-
File.open("/dev/urandom", flags) {|f|
|
78
|
-
unless f.stat.chardev?
|
79
|
-
raise Errno::ENOENT
|
80
|
-
end
|
81
|
-
@has_urandom = true
|
82
|
-
ret = f.readpartial(n)
|
83
|
-
if ret.length != n
|
84
|
-
raise NotImplementedError, "Unexpected partial read from random device"
|
85
|
-
end
|
86
|
-
return ret
|
87
|
-
}
|
88
|
-
rescue Errno::ENOENT
|
89
|
-
@has_urandom = false
|
90
|
-
end
|
91
|
-
end
|
92
|
-
|
93
|
-
if !defined?(@has_win32)
|
94
|
-
begin
|
95
|
-
require 'Win32API'
|
96
|
-
|
97
|
-
crypt_acquire_context = Win32API.new("advapi32", "CryptAcquireContext", 'PPPII', 'L')
|
98
|
-
@crypt_gen_random = Win32API.new("advapi32", "CryptGenRandom", 'LIP', 'L')
|
99
|
-
|
100
|
-
hProvStr = " " * 4
|
101
|
-
prov_rsa_full = 1
|
102
|
-
crypt_verifycontext = 0xF0000000
|
103
|
-
|
104
|
-
if crypt_acquire_context.call(hProvStr, nil, nil, prov_rsa_full, crypt_verifycontext) == 0
|
105
|
-
raise SystemCallError, "CryptAcquireContext failed: #{lastWin32ErrorMessage}"
|
106
|
-
end
|
107
|
-
@hProv, = hProvStr.unpack('L')
|
108
|
-
|
109
|
-
@has_win32 = true
|
110
|
-
rescue LoadError
|
111
|
-
@has_win32 = false
|
112
|
-
end
|
113
|
-
end
|
114
|
-
if @has_win32
|
115
|
-
bytes = " " * n
|
116
|
-
if @crypt_gen_random.call(@hProv, bytes.size, bytes) == 0
|
117
|
-
raise SystemCallError, "CryptGenRandom failed: #{lastWin32ErrorMessage}"
|
118
|
-
end
|
119
|
-
return bytes
|
120
|
-
end
|
121
|
-
|
122
|
-
raise NotImplementedError, "No random device"
|
123
|
-
end
|
124
|
-
|
125
|
-
# SecureRandom.hex generates a random hex string.
|
126
|
-
#
|
127
|
-
# The argument n specifies the length of the random length.
|
128
|
-
# The length of the result string is twice of n.
|
129
|
-
#
|
130
|
-
# If n is not specified, 16 is assumed.
|
131
|
-
# It may be larger in future.
|
132
|
-
#
|
133
|
-
# If secure random number generator is not available,
|
134
|
-
# NotImplementedError is raised.
|
135
|
-
def self.hex(n=nil)
|
136
|
-
random_bytes(n).unpack("H*")[0]
|
137
|
-
end
|
138
|
-
|
139
|
-
# SecureRandom.base64 generates a random base64 string.
|
140
|
-
#
|
141
|
-
# The argument n specifies the length of the random length.
|
142
|
-
# The length of the result string is about 4/3 of n.
|
143
|
-
#
|
144
|
-
# If n is not specified, 16 is assumed.
|
145
|
-
# It may be larger in future.
|
146
|
-
#
|
147
|
-
# If secure random number generator is not available,
|
148
|
-
# NotImplementedError is raised.
|
149
|
-
def self.base64(n=nil)
|
150
|
-
[random_bytes(n)].pack("m*").delete("\n")
|
151
|
-
end
|
152
|
-
|
153
|
-
# SecureRandom.random_number generates a random number.
|
154
|
-
#
|
155
|
-
# If an positive integer is given as n,
|
156
|
-
# SecureRandom.random_number returns an integer:
|
157
|
-
# 0 <= SecureRandom.random_number(n) < n.
|
158
|
-
#
|
159
|
-
# If 0 is given or an argument is not given,
|
160
|
-
# SecureRandom.random_number returns an float:
|
161
|
-
# 0.0 <= SecureRandom.random_number() < 1.0.
|
162
|
-
def self.random_number(n=0)
|
163
|
-
if 0 < n
|
164
|
-
hex = n.to_s(16)
|
165
|
-
hex = '0' + hex if (hex.length & 1) == 1
|
166
|
-
bin = [hex].pack("H*")
|
167
|
-
mask = bin[0]
|
168
|
-
mask |= mask >> 1
|
169
|
-
mask |= mask >> 2
|
170
|
-
mask |= mask >> 4
|
171
|
-
begin
|
172
|
-
rnd = SecureRandom.random_bytes(bin.length)
|
173
|
-
rnd[0] = rnd[0] & mask
|
174
|
-
end until rnd < bin
|
175
|
-
rnd.unpack("H*")[0].hex
|
176
|
-
else
|
177
|
-
# assumption: Float::MANT_DIG <= 64
|
178
|
-
i64 = SecureRandom.random_bytes(8).unpack("Q")[0]
|
179
|
-
Math.ldexp(i64 >> (64-Float::MANT_DIG), -Float::MANT_DIG)
|
180
|
-
end
|
181
|
-
end
|
182
|
-
|
183
|
-
# Following code is based on David Garamond's GUID library for Ruby.
|
184
|
-
def self.lastWin32ErrorMessage # :nodoc:
|
185
|
-
get_last_error = Win32API.new("kernel32", "GetLastError", '', 'L')
|
186
|
-
format_message = Win32API.new("kernel32", "FormatMessageA", 'LPLLPLPPPPPPPP', 'L')
|
187
|
-
format_message_ignore_inserts = 0x00000200
|
188
|
-
format_message_from_system = 0x00001000
|
189
|
-
|
190
|
-
code = get_last_error.call
|
191
|
-
msg = "\0" * 1024
|
192
|
-
len = format_message.call(format_message_ignore_inserts + format_message_from_system, 0, code, 0, msg, 1024, nil, nil, nil, nil, nil, nil, nil, nil)
|
193
|
-
msg[0, len].tr("\r", '').chomp
|
194
|
-
end
|
195
|
-
end
|
196
|
-
end
|
197
|
-
end
|
@@ -1,21 +0,0 @@
|
|
1
|
-
module ActiveSupport
|
2
|
-
# Wrapping a string in this class gives you a prettier way to test
|
3
|
-
# for equality. The value returned by <tt>Rails.env</tt> is wrapped
|
4
|
-
# in a StringInquirer object so instead of calling this:
|
5
|
-
#
|
6
|
-
# Rails.env == "production"
|
7
|
-
#
|
8
|
-
# you can call this:
|
9
|
-
#
|
10
|
-
# Rails.env.production?
|
11
|
-
#
|
12
|
-
class StringInquirer < String
|
13
|
-
def method_missing(method_name, *arguments)
|
14
|
-
if method_name.to_s[-1,1] == "?"
|
15
|
-
self == method_name.to_s[0..-2]
|
16
|
-
else
|
17
|
-
super
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
@@ -1,24 +0,0 @@
|
|
1
|
-
require 'test/unit/testcase'
|
2
|
-
require 'active_support/testing/default'
|
3
|
-
require 'active_support/testing/core_ext/test'
|
4
|
-
|
5
|
-
|
6
|
-
module ActiveSupport
|
7
|
-
class TestCase < Test::Unit::TestCase
|
8
|
-
# test "verify something" do
|
9
|
-
# ...
|
10
|
-
# end
|
11
|
-
def self.test(name, &block)
|
12
|
-
test_name = "test_#{name.gsub(/\s+/,'_')}".to_sym
|
13
|
-
defined = instance_method(test_name) rescue false
|
14
|
-
raise "#{test_name} is already defined in #{self}" if defined
|
15
|
-
if block_given?
|
16
|
-
define_method(test_name, &block)
|
17
|
-
else
|
18
|
-
define_method(test_name) do
|
19
|
-
flunk "No implementation provided for #{name}"
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
data/lib/gems/activesupport-2.2.2/lib/active_support/testing/core_ext/test/unit/assertions.rb
DELETED
@@ -1,72 +0,0 @@
|
|
1
|
-
require 'test/unit/assertions'
|
2
|
-
module Test
|
3
|
-
module Unit
|
4
|
-
#--
|
5
|
-
# FIXME: no Proc#binding in Ruby 2, must change this API
|
6
|
-
#++
|
7
|
-
module Assertions
|
8
|
-
# Test numeric difference between the return value of an expression as a result of what is evaluated
|
9
|
-
# in the yielded block.
|
10
|
-
#
|
11
|
-
# assert_difference 'Article.count' do
|
12
|
-
# post :create, :article => {...}
|
13
|
-
# end
|
14
|
-
#
|
15
|
-
# An arbitrary expression is passed in and evaluated.
|
16
|
-
#
|
17
|
-
# assert_difference 'assigns(:article).comments(:reload).size' do
|
18
|
-
# post :create, :comment => {...}
|
19
|
-
# end
|
20
|
-
#
|
21
|
-
# An arbitrary positive or negative difference can be specified. The default is +1.
|
22
|
-
#
|
23
|
-
# assert_difference 'Article.count', -1 do
|
24
|
-
# post :delete, :id => ...
|
25
|
-
# end
|
26
|
-
#
|
27
|
-
# An array of expressions can also be passed in and evaluated.
|
28
|
-
#
|
29
|
-
# assert_difference [ 'Article.count', 'Post.count' ], +2 do
|
30
|
-
# post :create, :article => {...}
|
31
|
-
# end
|
32
|
-
#
|
33
|
-
# A error message can be specified.
|
34
|
-
#
|
35
|
-
# assert_difference 'Article.count', -1, "An Article should be destroyed" do
|
36
|
-
# post :delete, :id => ...
|
37
|
-
# end
|
38
|
-
def assert_difference(expressions, difference = 1, message = nil, &block)
|
39
|
-
expression_evaluations = Array(expressions).map do |expression|
|
40
|
-
[expression, lambda do
|
41
|
-
eval(expression, block.__send__(:binding))
|
42
|
-
end]
|
43
|
-
end
|
44
|
-
|
45
|
-
original_values = expression_evaluations.inject([]) { |memo, expression| memo << expression[1].call }
|
46
|
-
yield
|
47
|
-
expression_evaluations.each_with_index do |expression, i|
|
48
|
-
full_message = ""
|
49
|
-
full_message << "#{message}.\n" if message
|
50
|
-
full_message << "<#{expression[0]}> was the expression that failed"
|
51
|
-
assert_equal original_values[i] + difference, expression[1].call, full_message
|
52
|
-
end
|
53
|
-
end
|
54
|
-
|
55
|
-
# Assertion that the numeric result of evaluating an expression is not changed before and after
|
56
|
-
# invoking the passed in block.
|
57
|
-
#
|
58
|
-
# assert_no_difference 'Article.count' do
|
59
|
-
# post :create, :article => invalid_attributes
|
60
|
-
# end
|
61
|
-
#
|
62
|
-
# A error message can be specified.
|
63
|
-
#
|
64
|
-
# assert_no_difference 'Article.count', "An Article should not be destroyed" do
|
65
|
-
# post :create, :article => invalid_attributes
|
66
|
-
# end
|
67
|
-
def assert_no_difference(expressions, message = nil, &block)
|
68
|
-
assert_difference expressions, 0, message, &block
|
69
|
-
end
|
70
|
-
end
|
71
|
-
end
|
72
|
-
end
|