backbone-deep-rails 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/lib/backbone/deep/rails/version.rb +1 -1
- metadata +18 -245
- data/vendor/bundle/cache/activemodel-3.2.11.gem +0 -0
- data/vendor/bundle/cache/activesupport-3.2.11.gem +0 -0
- data/vendor/bundle/gems/activesupport-3.2.11/CHANGELOG.md +0 -157
- data/vendor/bundle/gems/activesupport-3.2.11/MIT-LICENSE +0 -20
- data/vendor/bundle/gems/activesupport-3.2.11/README.rdoc +0 -33
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support.rb +0 -82
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/all.rb +0 -3
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/backtrace_cleaner.rb +0 -99
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/base64.rb +0 -54
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/basic_object.rb +0 -21
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/benchmarkable.rb +0 -55
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/buffered_logger.rb +0 -125
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/builder.rb +0 -6
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/cache.rb +0 -638
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/cache/file_store.rb +0 -178
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/cache/mem_cache_store.rb +0 -206
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/cache/memory_store.rb +0 -159
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/cache/null_store.rb +0 -44
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/cache/strategy/local_cache.rb +0 -169
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/callbacks.rb +0 -626
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/concern.rb +0 -131
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/configurable.rb +0 -90
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext.rb +0 -3
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/array.rb +0 -8
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/array/access.rb +0 -46
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/array/conversions.rb +0 -164
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/array/extract_options.rb +0 -29
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/array/grouping.rb +0 -100
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/array/prepend_and_append.rb +0 -7
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/array/random_access.rb +0 -30
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/array/uniq_by.rb +0 -16
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/array/wrap.rb +0 -48
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/benchmark.rb +0 -7
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/big_decimal.rb +0 -1
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/big_decimal/conversions.rb +0 -45
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/class.rb +0 -4
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/class/attribute.rb +0 -115
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/class/attribute_accessors.rb +0 -168
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/class/delegating_attributes.rb +0 -44
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/class/subclasses.rb +0 -36
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/date/acts_like.rb +0 -8
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/date/calculations.rb +0 -276
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/date/conversions.rb +0 -106
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/date/freeze.rb +0 -33
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/date/zones.rb +0 -14
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/date_time/acts_like.rb +0 -13
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/date_time/calculations.rb +0 -143
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/date_time/conversions.rb +0 -103
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/date_time/zones.rb +0 -21
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/enumerable.rb +0 -127
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/exception.rb +0 -3
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/file.rb +0 -2
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/file/atomic.rb +0 -42
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/file/path.rb +0 -5
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/float.rb +0 -1
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/float/rounding.rb +0 -19
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/hash.rb +0 -9
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/hash/conversions.rb +0 -175
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/hash/deep_dup.rb +0 -18
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/hash/deep_merge.rb +0 -21
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/hash/diff.rb +0 -13
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/hash/except.rb +0 -23
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/hash/indifferent_access.rb +0 -24
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/hash/keys.rb +0 -54
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/hash/reverse_merge.rb +0 -23
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/hash/slice.rb +0 -40
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/integer.rb +0 -3
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/integer/inflections.rb +0 -17
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/integer/multiple.rb +0 -10
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/integer/time.rb +0 -39
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/io.rb +0 -15
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/kernel.rb +0 -4
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/kernel/agnostics.rb +0 -11
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/kernel/debugger.rb +0 -10
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/kernel/reporting.rb +0 -93
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/kernel/singleton_class.rb +0 -13
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/load_error.rb +0 -23
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/logger.rb +0 -83
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/module.rb +0 -12
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/module/aliasing.rb +0 -70
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/module/anonymous.rb +0 -24
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/module/attr_internal.rb +0 -39
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/module/attribute_accessors.rb +0 -64
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/module/delegation.rb +0 -153
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/module/deprecation.rb +0 -9
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/module/introspection.rb +0 -88
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/module/method_names.rb +0 -14
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/module/qualified_const.rb +0 -64
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/module/reachable.rb +0 -8
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/module/remove_method.rb +0 -16
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/module/synchronization.rb +0 -45
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/name_error.rb +0 -18
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/numeric.rb +0 -2
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/numeric/bytes.rb +0 -44
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/numeric/time.rb +0 -79
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/object.rb +0 -13
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/object/acts_like.rb +0 -10
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/object/blank.rb +0 -121
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/object/conversions.rb +0 -4
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/object/duplicable.rb +0 -119
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/object/inclusion.rb +0 -25
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/object/instance_variables.rb +0 -33
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/object/to_json.rb +0 -19
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/object/to_param.rb +0 -55
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/object/to_query.rb +0 -27
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/object/try.rb +0 -57
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/object/with_options.rb +0 -43
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/proc.rb +0 -14
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/process.rb +0 -1
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/process/daemon.rb +0 -23
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/range.rb +0 -5
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/range/blockless_step.rb +0 -29
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/range/conversions.rb +0 -21
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/range/cover.rb +0 -3
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/range/include_range.rb +0 -21
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/range/overlaps.rb +0 -8
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/regexp.rb +0 -5
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/rexml.rb +0 -46
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/string.rb +0 -14
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/string/access.rb +0 -99
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/string/behavior.rb +0 -6
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/string/conversions.rb +0 -66
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/string/encoding.rb +0 -11
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/string/exclude.rb +0 -11
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/string/filters.rb +0 -49
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/string/inflections.rb +0 -202
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/string/inquiry.rb +0 -13
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/string/interpolation.rb +0 -2
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/string/multibyte.rb +0 -72
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/string/output_safety.rb +0 -186
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/string/starts_ends_with.rb +0 -4
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/string/strip.rb +0 -26
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/string/xchar.rb +0 -18
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/time/acts_like.rb +0 -8
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/time/calculations.rb +0 -360
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/time/conversions.rb +0 -85
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/time/marshal.rb +0 -57
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/time/publicize_conversion_methods.rb +0 -10
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/time/zones.rb +0 -86
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/core_ext/uri.rb +0 -30
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/dependencies.rb +0 -703
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/dependencies/autoload.rb +0 -50
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/deprecation.rb +0 -18
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/deprecation/behaviors.rb +0 -49
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/deprecation/method_wrappers.rb +0 -29
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/deprecation/proxy_wrappers.rb +0 -81
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/deprecation/reporting.rb +0 -65
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/descendants_tracker.rb +0 -45
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/duration.rb +0 -110
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/file_update_checker.rb +0 -121
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/file_watcher.rb +0 -36
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/gzip.rb +0 -30
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/hash_with_indifferent_access.rb +0 -178
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/i18n.rb +0 -9
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/i18n_railtie.rb +0 -102
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/inflections.rb +0 -63
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/inflector.rb +0 -7
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/inflector/inflections.rb +0 -174
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/inflector/methods.rb +0 -321
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/inflector/transliterate.rb +0 -98
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/json.rb +0 -2
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/json/decoding.rb +0 -79
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/json/encoding.rb +0 -284
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/json/variable.rb +0 -9
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/lazy_load_hooks.rb +0 -46
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/locale/en.yml +0 -36
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/log_subscriber.rb +0 -122
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/log_subscriber/test_helper.rb +0 -101
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/memoizable.rb +0 -116
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/message_encryptor.rb +0 -103
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/message_verifier.rb +0 -74
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/multibyte.rb +0 -44
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/multibyte/chars.rb +0 -476
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/multibyte/exceptions.rb +0 -8
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/multibyte/unicode.rb +0 -393
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/multibyte/utils.rb +0 -60
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/notifications.rb +0 -154
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/notifications/fanout.rb +0 -61
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/notifications/instrumenter.rb +0 -53
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/option_merger.rb +0 -25
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/ordered_hash.rb +0 -222
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/ordered_options.rb +0 -61
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/railtie.rb +0 -59
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/rescuable.rb +0 -115
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/ruby/shim.rb +0 -22
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/string_inquirer.rb +0 -21
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/tagged_logging.rb +0 -80
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/test_case.rb +0 -34
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/testing/assertions.rb +0 -97
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/testing/declarative.rb +0 -40
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/testing/deprecation.rb +0 -55
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/testing/isolation.rb +0 -157
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/testing/mochaing.rb +0 -7
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/testing/pending.rb +0 -52
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/testing/performance.rb +0 -317
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/testing/performance/jruby.rb +0 -115
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/testing/performance/rubinius.rb +0 -113
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/testing/performance/ruby.rb +0 -152
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/testing/performance/ruby/mri.rb +0 -57
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/testing/performance/ruby/yarv.rb +0 -57
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/testing/setup_and_teardown.rb +0 -118
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/time.rb +0 -35
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/time/autoload.rb +0 -5
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/time_with_zone.rb +0 -358
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/values/time_zone.rb +0 -397
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/values/unicode_tables.dat +0 -0
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/version.rb +0 -10
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/whiny_nil.rb +0 -24
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/xml_mini.rb +0 -168
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/xml_mini/jdom.rb +0 -175
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/xml_mini/libxml.rb +0 -80
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/xml_mini/libxmlsax.rb +0 -86
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/xml_mini/nokogiri.rb +0 -84
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/xml_mini/nokogirisax.rb +0 -88
- data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/xml_mini/rexml.rb +0 -130
- data/vendor/bundle/specifications/activesupport-3.2.11.gemspec +0 -33
data/vendor/bundle/gems/activesupport-3.2.11/lib/active_support/testing/setup_and_teardown.rb
DELETED
@@ -1,118 +0,0 @@
|
|
1
|
-
require 'active_support/concern'
|
2
|
-
require 'active_support/callbacks'
|
3
|
-
|
4
|
-
module ActiveSupport
|
5
|
-
module Testing
|
6
|
-
module SetupAndTeardown
|
7
|
-
extend ActiveSupport::Concern
|
8
|
-
|
9
|
-
included do
|
10
|
-
include ActiveSupport::Callbacks
|
11
|
-
define_callbacks :setup, :teardown
|
12
|
-
|
13
|
-
if defined?(MiniTest::Assertions) && TestCase < MiniTest::Assertions
|
14
|
-
include ForMiniTest
|
15
|
-
else
|
16
|
-
include ForClassicTestUnit
|
17
|
-
end
|
18
|
-
end
|
19
|
-
|
20
|
-
module ClassMethods
|
21
|
-
def setup(*args, &block)
|
22
|
-
set_callback(:setup, :before, *args, &block)
|
23
|
-
end
|
24
|
-
|
25
|
-
def teardown(*args, &block)
|
26
|
-
set_callback(:teardown, :after, *args, &block)
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
|
-
module ForMiniTest
|
31
|
-
PASSTHROUGH_EXCEPTIONS = MiniTest::Unit::TestCase::PASSTHROUGH_EXCEPTIONS rescue [NoMemoryError, SignalException, Interrupt, SystemExit]
|
32
|
-
def run(runner)
|
33
|
-
result = '.'
|
34
|
-
begin
|
35
|
-
run_callbacks :setup do
|
36
|
-
result = super
|
37
|
-
end
|
38
|
-
rescue *PASSTHROUGH_EXCEPTIONS => e
|
39
|
-
raise e
|
40
|
-
rescue Exception => e
|
41
|
-
result = runner.puke(self.class, method_name, e)
|
42
|
-
ensure
|
43
|
-
begin
|
44
|
-
run_callbacks :teardown
|
45
|
-
rescue *PASSTHROUGH_EXCEPTIONS => e
|
46
|
-
raise e
|
47
|
-
rescue Exception => e
|
48
|
-
result = runner.puke(self.class, method_name, e)
|
49
|
-
end
|
50
|
-
end
|
51
|
-
result
|
52
|
-
end
|
53
|
-
end
|
54
|
-
|
55
|
-
module ForClassicTestUnit
|
56
|
-
# For compatibility with Ruby < 1.8.6
|
57
|
-
PASSTHROUGH_EXCEPTIONS = Test::Unit::TestCase::PASSTHROUGH_EXCEPTIONS rescue [NoMemoryError, SignalException, Interrupt, SystemExit]
|
58
|
-
|
59
|
-
# This redefinition is unfortunate but test/unit shows us no alternative.
|
60
|
-
# Doubly unfortunate: hax to support Mocha's hax.
|
61
|
-
def run(result)
|
62
|
-
return if @method_name.to_s == "default_test"
|
63
|
-
|
64
|
-
mocha_counter = retrieve_mocha_counter(result)
|
65
|
-
yield(Test::Unit::TestCase::STARTED, name)
|
66
|
-
@_result = result
|
67
|
-
|
68
|
-
begin
|
69
|
-
begin
|
70
|
-
run_callbacks :setup do
|
71
|
-
setup
|
72
|
-
__send__(@method_name)
|
73
|
-
mocha_verify(mocha_counter) if mocha_counter
|
74
|
-
end
|
75
|
-
rescue Mocha::ExpectationError => e
|
76
|
-
add_failure(e.message, e.backtrace)
|
77
|
-
rescue Test::Unit::AssertionFailedError => e
|
78
|
-
add_failure(e.message, e.backtrace)
|
79
|
-
rescue Exception => e
|
80
|
-
raise if PASSTHROUGH_EXCEPTIONS.include?(e.class)
|
81
|
-
add_error(e)
|
82
|
-
ensure
|
83
|
-
begin
|
84
|
-
teardown
|
85
|
-
run_callbacks :teardown
|
86
|
-
rescue Test::Unit::AssertionFailedError => e
|
87
|
-
add_failure(e.message, e.backtrace)
|
88
|
-
rescue Exception => e
|
89
|
-
raise if PASSTHROUGH_EXCEPTIONS.include?(e.class)
|
90
|
-
add_error(e)
|
91
|
-
end
|
92
|
-
end
|
93
|
-
ensure
|
94
|
-
mocha_teardown if mocha_counter
|
95
|
-
end
|
96
|
-
|
97
|
-
result.add_run
|
98
|
-
yield(Test::Unit::TestCase::FINISHED, name)
|
99
|
-
end
|
100
|
-
|
101
|
-
protected
|
102
|
-
|
103
|
-
def retrieve_mocha_counter(result) #:nodoc:
|
104
|
-
if respond_to?(:mocha_verify) # using mocha
|
105
|
-
if defined?(Mocha::TestCaseAdapter::AssertionCounter)
|
106
|
-
Mocha::TestCaseAdapter::AssertionCounter.new(result)
|
107
|
-
elsif defined?(Mocha::Integration::TestUnit::AssertionCounter)
|
108
|
-
Mocha::Integration::TestUnit::AssertionCounter.new(result)
|
109
|
-
else
|
110
|
-
Mocha::MonkeyPatching::TestUnit::AssertionCounter.new(result)
|
111
|
-
end
|
112
|
-
end
|
113
|
-
end
|
114
|
-
end
|
115
|
-
|
116
|
-
end
|
117
|
-
end
|
118
|
-
end
|
@@ -1,35 +0,0 @@
|
|
1
|
-
require 'active_support'
|
2
|
-
|
3
|
-
module ActiveSupport
|
4
|
-
autoload :Duration, 'active_support/duration'
|
5
|
-
autoload :TimeWithZone, 'active_support/time_with_zone'
|
6
|
-
autoload :TimeZone, 'active_support/values/time_zone'
|
7
|
-
|
8
|
-
on_load_all do
|
9
|
-
[Duration, TimeWithZone, TimeZone]
|
10
|
-
end
|
11
|
-
end
|
12
|
-
|
13
|
-
require 'date'
|
14
|
-
require 'time'
|
15
|
-
|
16
|
-
require 'active_support/core_ext/time/publicize_conversion_methods'
|
17
|
-
require 'active_support/core_ext/time/marshal'
|
18
|
-
require 'active_support/core_ext/time/acts_like'
|
19
|
-
require 'active_support/core_ext/time/calculations'
|
20
|
-
require 'active_support/core_ext/time/conversions'
|
21
|
-
require 'active_support/core_ext/time/zones'
|
22
|
-
|
23
|
-
require 'active_support/core_ext/date/acts_like'
|
24
|
-
require 'active_support/core_ext/date/freeze'
|
25
|
-
require 'active_support/core_ext/date/calculations'
|
26
|
-
require 'active_support/core_ext/date/conversions'
|
27
|
-
require 'active_support/core_ext/date/zones'
|
28
|
-
|
29
|
-
require 'active_support/core_ext/date_time/acts_like'
|
30
|
-
require 'active_support/core_ext/date_time/calculations'
|
31
|
-
require 'active_support/core_ext/date_time/conversions'
|
32
|
-
require 'active_support/core_ext/date_time/zones'
|
33
|
-
|
34
|
-
require 'active_support/core_ext/integer/time'
|
35
|
-
require 'active_support/core_ext/numeric/time'
|
@@ -1,358 +0,0 @@
|
|
1
|
-
require "active_support/values/time_zone"
|
2
|
-
require 'active_support/core_ext/object/acts_like'
|
3
|
-
require 'active_support/core_ext/object/inclusion'
|
4
|
-
|
5
|
-
module ActiveSupport
|
6
|
-
# A Time-like class that can represent a time in any time zone. Necessary because standard Ruby Time instances are
|
7
|
-
# limited to UTC and the system's <tt>ENV['TZ']</tt> zone.
|
8
|
-
#
|
9
|
-
# You shouldn't ever need to create a TimeWithZone instance directly via <tt>new</tt> . Instead use methods
|
10
|
-
# +local+, +parse+, +at+ and +now+ on TimeZone instances, and +in_time_zone+ on Time and DateTime instances.
|
11
|
-
# Examples:
|
12
|
-
#
|
13
|
-
# Time.zone = 'Eastern Time (US & Canada)' # => 'Eastern Time (US & Canada)'
|
14
|
-
# Time.zone.local(2007, 2, 10, 15, 30, 45) # => Sat, 10 Feb 2007 15:30:45 EST -05:00
|
15
|
-
# Time.zone.parse('2007-02-10 15:30:45') # => Sat, 10 Feb 2007 15:30:45 EST -05:00
|
16
|
-
# Time.zone.at(1170361845) # => Sat, 10 Feb 2007 15:30:45 EST -05:00
|
17
|
-
# Time.zone.now # => Sun, 18 May 2008 13:07:55 EDT -04:00
|
18
|
-
# Time.utc(2007, 2, 10, 20, 30, 45).in_time_zone # => Sat, 10 Feb 2007 15:30:45 EST -05:00
|
19
|
-
#
|
20
|
-
# See Time and TimeZone for further documentation of these methods.
|
21
|
-
#
|
22
|
-
# TimeWithZone instances implement the same API as Ruby Time instances, so that Time and TimeWithZone instances are interchangeable.
|
23
|
-
# Examples:
|
24
|
-
#
|
25
|
-
# t = Time.zone.now # => Sun, 18 May 2008 13:27:25 EDT -04:00
|
26
|
-
# t.hour # => 13
|
27
|
-
# t.dst? # => true
|
28
|
-
# t.utc_offset # => -14400
|
29
|
-
# t.zone # => "EDT"
|
30
|
-
# t.to_s(:rfc822) # => "Sun, 18 May 2008 13:27:25 -0400"
|
31
|
-
# t + 1.day # => Mon, 19 May 2008 13:27:25 EDT -04:00
|
32
|
-
# t.beginning_of_year # => Tue, 01 Jan 2008 00:00:00 EST -05:00
|
33
|
-
# t > Time.utc(1999) # => true
|
34
|
-
# t.is_a?(Time) # => true
|
35
|
-
# t.is_a?(ActiveSupport::TimeWithZone) # => true
|
36
|
-
#
|
37
|
-
class TimeWithZone
|
38
|
-
def self.name
|
39
|
-
'Time' # Report class name as 'Time' to thwart type checking
|
40
|
-
end
|
41
|
-
|
42
|
-
include Comparable
|
43
|
-
attr_reader :time_zone
|
44
|
-
|
45
|
-
def initialize(utc_time, time_zone, local_time = nil, period = nil)
|
46
|
-
@utc, @time_zone, @time = utc_time, time_zone, local_time
|
47
|
-
@period = @utc ? period : get_period_and_ensure_valid_local_time
|
48
|
-
end
|
49
|
-
|
50
|
-
# Returns a Time or DateTime instance that represents the time in +time_zone+.
|
51
|
-
def time
|
52
|
-
@time ||= period.to_local(@utc)
|
53
|
-
end
|
54
|
-
|
55
|
-
# Returns a Time or DateTime instance that represents the time in UTC.
|
56
|
-
def utc
|
57
|
-
@utc ||= period.to_utc(@time)
|
58
|
-
end
|
59
|
-
alias_method :comparable_time, :utc
|
60
|
-
alias_method :getgm, :utc
|
61
|
-
alias_method :getutc, :utc
|
62
|
-
alias_method :gmtime, :utc
|
63
|
-
|
64
|
-
# Returns the underlying TZInfo::TimezonePeriod.
|
65
|
-
def period
|
66
|
-
@period ||= time_zone.period_for_utc(@utc)
|
67
|
-
end
|
68
|
-
|
69
|
-
# Returns the simultaneous time in <tt>Time.zone</tt>, or the specified zone.
|
70
|
-
def in_time_zone(new_zone = ::Time.zone)
|
71
|
-
return self if time_zone == new_zone
|
72
|
-
utc.in_time_zone(new_zone)
|
73
|
-
end
|
74
|
-
|
75
|
-
# Returns a <tt>Time.local()</tt> instance of the simultaneous time in your system's <tt>ENV['TZ']</tt> zone
|
76
|
-
def localtime
|
77
|
-
utc.respond_to?(:getlocal) ? utc.getlocal : utc.to_time.getlocal
|
78
|
-
end
|
79
|
-
alias_method :getlocal, :localtime
|
80
|
-
|
81
|
-
def dst?
|
82
|
-
period.dst?
|
83
|
-
end
|
84
|
-
alias_method :isdst, :dst?
|
85
|
-
|
86
|
-
def utc?
|
87
|
-
time_zone.name == 'UTC'
|
88
|
-
end
|
89
|
-
alias_method :gmt?, :utc?
|
90
|
-
|
91
|
-
def utc_offset
|
92
|
-
period.utc_total_offset
|
93
|
-
end
|
94
|
-
alias_method :gmt_offset, :utc_offset
|
95
|
-
alias_method :gmtoff, :utc_offset
|
96
|
-
|
97
|
-
def formatted_offset(colon = true, alternate_utc_string = nil)
|
98
|
-
utc? && alternate_utc_string || TimeZone.seconds_to_utc_offset(utc_offset, colon)
|
99
|
-
end
|
100
|
-
|
101
|
-
# Time uses +zone+ to display the time zone abbreviation, so we're duck-typing it.
|
102
|
-
def zone
|
103
|
-
period.zone_identifier.to_s
|
104
|
-
end
|
105
|
-
|
106
|
-
def inspect
|
107
|
-
"#{time.strftime('%a, %d %b %Y %H:%M:%S')} #{zone} #{formatted_offset}"
|
108
|
-
end
|
109
|
-
|
110
|
-
def xmlschema(fraction_digits = 0)
|
111
|
-
fraction = if fraction_digits > 0
|
112
|
-
(".%06i" % time.usec)[0, fraction_digits + 1]
|
113
|
-
end
|
114
|
-
|
115
|
-
"#{time.strftime("%Y-%m-%dT%H:%M:%S")}#{fraction}#{formatted_offset(true, 'Z')}"
|
116
|
-
end
|
117
|
-
alias_method :iso8601, :xmlschema
|
118
|
-
|
119
|
-
# Coerces time to a string for JSON encoding. The default format is ISO 8601. You can get
|
120
|
-
# %Y/%m/%d %H:%M:%S +offset style by setting <tt>ActiveSupport::JSON::Encoding.use_standard_json_time_format</tt>
|
121
|
-
# to false.
|
122
|
-
#
|
123
|
-
# ==== Examples
|
124
|
-
#
|
125
|
-
# # With ActiveSupport::JSON::Encoding.use_standard_json_time_format = true
|
126
|
-
# Time.utc(2005,2,1,15,15,10).in_time_zone.to_json
|
127
|
-
# # => "2005-02-01T15:15:10Z"
|
128
|
-
#
|
129
|
-
# # With ActiveSupport::JSON::Encoding.use_standard_json_time_format = false
|
130
|
-
# Time.utc(2005,2,1,15,15,10).in_time_zone.to_json
|
131
|
-
# # => "2005/02/01 15:15:10 +0000"
|
132
|
-
#
|
133
|
-
def as_json(options = nil)
|
134
|
-
if ActiveSupport::JSON::Encoding.use_standard_json_time_format
|
135
|
-
xmlschema
|
136
|
-
else
|
137
|
-
%(#{time.strftime("%Y/%m/%d %H:%M:%S")} #{formatted_offset(false)})
|
138
|
-
end
|
139
|
-
end
|
140
|
-
|
141
|
-
def encode_with(coder)
|
142
|
-
if coder.respond_to?(:represent_object)
|
143
|
-
coder.represent_object(nil, utc)
|
144
|
-
else
|
145
|
-
coder.represent_scalar(nil, utc.strftime("%Y-%m-%d %H:%M:%S.%9NZ"))
|
146
|
-
end
|
147
|
-
end
|
148
|
-
|
149
|
-
def to_yaml(options = {})
|
150
|
-
return super if defined?(YAML::ENGINE) && !YAML::ENGINE.syck?
|
151
|
-
|
152
|
-
utc.to_yaml(options)
|
153
|
-
end
|
154
|
-
|
155
|
-
def httpdate
|
156
|
-
utc.httpdate
|
157
|
-
end
|
158
|
-
|
159
|
-
def rfc2822
|
160
|
-
to_s(:rfc822)
|
161
|
-
end
|
162
|
-
alias_method :rfc822, :rfc2822
|
163
|
-
|
164
|
-
# <tt>:db</tt> format outputs time in UTC; all others output time in local.
|
165
|
-
# Uses TimeWithZone's +strftime+, so <tt>%Z</tt> and <tt>%z</tt> work correctly.
|
166
|
-
def to_s(format = :default)
|
167
|
-
if format == :db
|
168
|
-
utc.to_s(format)
|
169
|
-
elsif formatter = ::Time::DATE_FORMATS[format]
|
170
|
-
formatter.respond_to?(:call) ? formatter.call(self).to_s : strftime(formatter)
|
171
|
-
else
|
172
|
-
"#{time.strftime("%Y-%m-%d %H:%M:%S")} #{formatted_offset(false, 'UTC')}" # mimicking Ruby 1.9 Time#to_s format
|
173
|
-
end
|
174
|
-
end
|
175
|
-
alias_method :to_formatted_s, :to_s
|
176
|
-
|
177
|
-
# Replaces <tt>%Z</tt> and <tt>%z</tt> directives with +zone+ and +formatted_offset+, respectively, before passing to
|
178
|
-
# Time#strftime, so that zone information is correct
|
179
|
-
def strftime(format)
|
180
|
-
format = format.gsub('%Z', zone).
|
181
|
-
gsub('%z', formatted_offset(false)).
|
182
|
-
gsub('%:z', formatted_offset(true)).
|
183
|
-
gsub('%::z', formatted_offset(true) + ":00")
|
184
|
-
|
185
|
-
time.strftime(format)
|
186
|
-
end
|
187
|
-
|
188
|
-
# Use the time in UTC for comparisons.
|
189
|
-
def <=>(other)
|
190
|
-
utc <=> other
|
191
|
-
end
|
192
|
-
|
193
|
-
def between?(min, max)
|
194
|
-
utc.between?(min, max)
|
195
|
-
end
|
196
|
-
|
197
|
-
def past?
|
198
|
-
utc.past?
|
199
|
-
end
|
200
|
-
|
201
|
-
def today?
|
202
|
-
time.today?
|
203
|
-
end
|
204
|
-
|
205
|
-
def future?
|
206
|
-
utc.future?
|
207
|
-
end
|
208
|
-
|
209
|
-
def eql?(other)
|
210
|
-
utc.eql?(other)
|
211
|
-
end
|
212
|
-
|
213
|
-
def hash
|
214
|
-
utc.hash
|
215
|
-
end
|
216
|
-
|
217
|
-
def +(other)
|
218
|
-
# If we're adding a Duration of variable length (i.e., years, months, days), move forward from #time,
|
219
|
-
# otherwise move forward from #utc, for accuracy when moving across DST boundaries
|
220
|
-
if duration_of_variable_length?(other)
|
221
|
-
method_missing(:+, other)
|
222
|
-
else
|
223
|
-
result = utc.acts_like?(:date) ? utc.since(other) : utc + other rescue utc.since(other)
|
224
|
-
result.in_time_zone(time_zone)
|
225
|
-
end
|
226
|
-
end
|
227
|
-
|
228
|
-
def -(other)
|
229
|
-
# If we're subtracting a Duration of variable length (i.e., years, months, days), move backwards from #time,
|
230
|
-
# otherwise move backwards #utc, for accuracy when moving across DST boundaries
|
231
|
-
if other.acts_like?(:time)
|
232
|
-
utc.to_f - other.to_f
|
233
|
-
elsif duration_of_variable_length?(other)
|
234
|
-
method_missing(:-, other)
|
235
|
-
else
|
236
|
-
result = utc.acts_like?(:date) ? utc.ago(other) : utc - other rescue utc.ago(other)
|
237
|
-
result.in_time_zone(time_zone)
|
238
|
-
end
|
239
|
-
end
|
240
|
-
|
241
|
-
def since(other)
|
242
|
-
# If we're adding a Duration of variable length (i.e., years, months, days), move forward from #time,
|
243
|
-
# otherwise move forward from #utc, for accuracy when moving across DST boundaries
|
244
|
-
if duration_of_variable_length?(other)
|
245
|
-
method_missing(:since, other)
|
246
|
-
else
|
247
|
-
utc.since(other).in_time_zone(time_zone)
|
248
|
-
end
|
249
|
-
end
|
250
|
-
|
251
|
-
def ago(other)
|
252
|
-
since(-other)
|
253
|
-
end
|
254
|
-
|
255
|
-
def advance(options)
|
256
|
-
# If we're advancing a value of variable length (i.e., years, weeks, months, days), advance from #time,
|
257
|
-
# otherwise advance from #utc, for accuracy when moving across DST boundaries
|
258
|
-
if options.values_at(:years, :weeks, :months, :days).any?
|
259
|
-
method_missing(:advance, options)
|
260
|
-
else
|
261
|
-
utc.advance(options).in_time_zone(time_zone)
|
262
|
-
end
|
263
|
-
end
|
264
|
-
|
265
|
-
%w(year mon month day mday wday yday hour min sec to_date).each do |method_name|
|
266
|
-
class_eval <<-EOV, __FILE__, __LINE__ + 1
|
267
|
-
def #{method_name} # def month
|
268
|
-
time.#{method_name} # time.month
|
269
|
-
end # end
|
270
|
-
EOV
|
271
|
-
end
|
272
|
-
|
273
|
-
def usec
|
274
|
-
time.respond_to?(:usec) ? time.usec : 0
|
275
|
-
end
|
276
|
-
|
277
|
-
def to_a
|
278
|
-
[time.sec, time.min, time.hour, time.day, time.mon, time.year, time.wday, time.yday, dst?, zone]
|
279
|
-
end
|
280
|
-
|
281
|
-
def to_f
|
282
|
-
utc.to_f
|
283
|
-
end
|
284
|
-
|
285
|
-
def to_i
|
286
|
-
utc.to_i
|
287
|
-
end
|
288
|
-
alias_method :tv_sec, :to_i
|
289
|
-
|
290
|
-
# A TimeWithZone acts like a Time, so just return +self+.
|
291
|
-
def to_time
|
292
|
-
utc
|
293
|
-
end
|
294
|
-
|
295
|
-
def to_datetime
|
296
|
-
utc.to_datetime.new_offset(Rational(utc_offset, 86_400))
|
297
|
-
end
|
298
|
-
|
299
|
-
# So that +self+ <tt>acts_like?(:time)</tt>.
|
300
|
-
def acts_like_time?
|
301
|
-
true
|
302
|
-
end
|
303
|
-
|
304
|
-
# Say we're a Time to thwart type checking.
|
305
|
-
def is_a?(klass)
|
306
|
-
klass == ::Time || super
|
307
|
-
end
|
308
|
-
alias_method :kind_of?, :is_a?
|
309
|
-
|
310
|
-
def freeze
|
311
|
-
period; utc; time # preload instance variables before freezing
|
312
|
-
super
|
313
|
-
end
|
314
|
-
|
315
|
-
def marshal_dump
|
316
|
-
[utc, time_zone.name, time]
|
317
|
-
end
|
318
|
-
|
319
|
-
def marshal_load(variables)
|
320
|
-
initialize(variables[0].utc, ::Time.find_zone(variables[1]), variables[2].utc)
|
321
|
-
end
|
322
|
-
|
323
|
-
# Ensure proxy class responds to all methods that underlying time instance responds to.
|
324
|
-
def respond_to?(sym, include_priv = false)
|
325
|
-
# consistently respond false to acts_like?(:date), regardless of whether #time is a Time or DateTime
|
326
|
-
return false if sym.to_s == 'acts_like_date?'
|
327
|
-
super || time.respond_to?(sym, include_priv)
|
328
|
-
end
|
329
|
-
|
330
|
-
# Send the missing method to +time+ instance, and wrap result in a new TimeWithZone with the existing +time_zone+.
|
331
|
-
def method_missing(sym, *args, &block)
|
332
|
-
result = time.__send__(sym, *args, &block)
|
333
|
-
result.acts_like?(:time) ? self.class.new(nil, time_zone, result) : result
|
334
|
-
end
|
335
|
-
|
336
|
-
private
|
337
|
-
def get_period_and_ensure_valid_local_time
|
338
|
-
# we don't want a Time.local instance enforcing its own DST rules as well,
|
339
|
-
# so transfer time values to a utc constructor if necessary
|
340
|
-
@time = transfer_time_values_to_utc_constructor(@time) unless @time.utc?
|
341
|
-
begin
|
342
|
-
@time_zone.period_for_local(@time)
|
343
|
-
rescue ::TZInfo::PeriodNotFound
|
344
|
-
# time is in the "spring forward" hour gap, so we're moving the time forward one hour and trying again
|
345
|
-
@time += 1.hour
|
346
|
-
retry
|
347
|
-
end
|
348
|
-
end
|
349
|
-
|
350
|
-
def transfer_time_values_to_utc_constructor(time)
|
351
|
-
::Time.utc_time(time.year, time.month, time.day, time.hour, time.min, time.sec, time.respond_to?(:usec) ? time.usec : 0)
|
352
|
-
end
|
353
|
-
|
354
|
-
def duration_of_variable_length?(obj)
|
355
|
-
ActiveSupport::Duration === obj && obj.parts.any? {|p| p[0].in?([:years, :months, :days]) }
|
356
|
-
end
|
357
|
-
end
|
358
|
-
end
|