Permalink
Commits on Jan 19, 2017
  1. update CREATE TABLE statements generated by `sqlite3` command

    From SQLite 3.16.0, `IF NOT EXISTS` set to CREATE TABLE statements.
    Ref: https://www.sqlite.org/src/info/c7021960f5c070fb
    
    Fixes #27635.
    
    (cherry picked from commit bdc8818)
    y-yagi committed with pixeltrix Jan 19, 2017
Commits on Jan 18, 2017
  1. Merge PR #26643

    4-2-backport: activerecord/mysql2: Avoid setting @connection to nil, just close it
    arthurnn committed Jan 18, 2017
Commits on Jan 17, 2017
  1. Merge pull request #27710 from eileencodes/backport-fix-pool_from_any…

    …_process
    
    Fix pool_from_any_process to use most recent spec
    pixeltrix committed on GitHub Jan 17, 2017
  2. Fix pool_from_any_process to use most recent spec

    If a process is forked more than once, the pool was grabbing the oldest
    spec, not the most recent spec. This wasn't noticed before because most
    folks are lilely forking the process only once.
    
    If you're forking the process multiple times however the wrong spec name
    will be returned and an incorrect connection will be used for the
    process.
    
    This fixes the issue by reversing the list of spec names so we can grab
    the most recent spec rather than the oldest spec.
    eileencodes committed Jan 14, 2017
Commits on Jan 10, 2017
  1. Merge pull request #27629 from nikolai-b/4-2-stable

    Fix postgres array date with overridden date format
    rafaelfranca committed on GitHub Jan 10, 2017
  2. Make time travel work with subclasses of Time/Date/Datetime

    Closes #27614
    
    Previously when calling `now` on a subclass of e.g. `Time` it would return an instance of `Time` instead of returning an instance of the subclass. This way, we always return the correct class.
    (cherry picked from commit 3d78949)
    jnicklas committed with pixeltrix Jan 9, 2017
Commits on Jan 9, 2017
  1. activerecord/mysql2: Avoid setting @connection to nil, just close it

    Backport of #26434
    
    Removed the error message check to fix test failures from mysql2 changing
    its error message. This was also done on master.
    dylanahsmith committed Sep 12, 2016
Commits on Jan 5, 2017
  1. Fix Symbol#duplicable? for Ruby 2.4.0.

    Ruby 2.4.0 has trouble duplicating certain symbols created from
    strings via `to_sym`.
    
    It didn't happen with `'symbol'.to_sym.dup` for some reason, but
    works fine with the longer string sample.
    
    Once a newer Ruby version with a fix is released we'll get have
    a failing test case we can fix.
    
    Ref: #27532
    kaspth committed with rafaelfranca Jan 1, 2017
Commits on Jan 4, 2017
  1. Merge pull request #27553 from rails/backport-2-4-time-changes

    Backport Active Support Date/Time changes for Ruby 2.4
    pixeltrix committed on GitHub Jan 4, 2017
  2. Adjust test setup to match the old way

    pixeltrix committed Jan 3, 2017
  3. Use include instead of prepend for 1.9.3 compatibility

    Ruby 1.9.3 doesn't have Module#prepend so we have to do it the old
    school way of removing existing method definitions and defining our
    method using class_eval.
    pixeltrix committed Jan 3, 2017
  4. Run Active Support tests when preserving timezones

    Add to the matrix of Travis tests an entry that runs the Active Support
    tests when `ActiveSupport.to_time_preserves_timezone = true`.
    
    (cherry picked from commit eb3d409)
    pixeltrix committed with pixeltrix Apr 28, 2016
  5. Cache to_time to improve performance when comparing

    In #25880 we tried to cache localtime to fix the performance
    regression but that proved to be difficult due to the fact that
    localtime/getlocal can take a utc_offset argument. We tried
    caching based on the argument but since the argument can be nil
    sometimes that meant that if the TZ environment variable changed
    then the cached value for nil became invalid. By moving the
    caching to DateAndTime#compatibility we don't have to worry about
    arguments since it doesn't take any.
    
    There is a possible edge condition where preserve_timezone is set
    to false and the system timezone changes then it could result in
    a cached value being incorrect but the only way to fix this would
    be to remove all caching and live with the performance issue.
    
    (cherry picked from commit 9128ba5)
    pixeltrix committed Oct 2, 2016
  6. Fix tests when preserving timezones

    These two tests are explicitly testing that to_time is returning times
    with the sytem timezone's UTC offset, therefore they will fail when
    running them with `ActiveSupport.to_time_preserves_timezone = true`.
    
    (cherry picked from commit b782665)
    pixeltrix committed with pixeltrix Apr 28, 2016
  7. Follow up of c9c5788

    [ci skip]
    
    (cherry picked from commit abeabdb)
    vipulnsward committed with pixeltrix Apr 23, 2016
  8. Make getlocal and getutc always return instances of Time

    Previously these methods could return either a DateTime or a Time
    depending on how the ActiveSupport::TimeWithZone instance had
    been constructed. Changing to always return an instance of Time
    eliminates a possible stack level too deep error in to_time where
    it was wrapping a DateTime instance.
    
    As a consequence of this the internal time value is now always an
    instance of Time in the UTC timezone, whether that's as the UTC
    time directly or a representation of the local time in the timezone.
    
    There should be no consequences of this internal change and if
    there are it's a bug due to leaky abstractions.
    
    (cherry picked from commit ee5e476)
    pixeltrix committed with pixeltrix Apr 23, 2016
  9. Add DateTime#subsec

    Mirrors the Time#subsec method by returning the fraction
    of the second as a Rational.
    
    (cherry picked from commit a424bbb)
    pixeltrix committed with pixeltrix Apr 23, 2016
  10. Change Time#sec_fraction to use subsec

    Time instances can have fractional parts smaller than a nanosecond.
    
    (cherry picked from commit 88d844b)
    pixeltrix committed with pixeltrix Apr 23, 2016
  11. Add additional aliases for DateTime#utc

    (cherry picked from commit dbc7a7c)
    pixeltrix committed with pixeltrix Apr 23, 2016
  12. Add CHANGELOG entry for #24700

    (cherry picked from commit 229737e)
    pixeltrix committed with pixeltrix Apr 23, 2016
  13. Add Time#sec_fraction

    Mirrors the DateTime#sec_fraction method by returning the fraction
    of the second as a Rational.
    
    (cherry picked from commit 7fb2a63)
    pixeltrix committed with pixeltrix Apr 23, 2016
  14. Move `DateTime#getlocal` to `/core_ext/date_time/calculations.rb`

    `DateTime#getlocal` is newly added public API.
    It's responsible is same as `DateTime#utc`, so `calculations.rb` is
    a best plase to define this method.
    For keeping consistency with `DateTime#utc`, defines `#localtime` and
    defines `getlocal` as an alias method.
    
    (cherry picked from commit 941eee5)
    yui-knk committed with pixeltrix Apr 23, 2016
  15. Add require of mattr_accessor since Compatibility relies on it.

    Follow up to
    c9c5788
    
    (cherry picked from commit de60169)
    Fryguy committed with pixeltrix Apr 25, 2016
  16. Add compatibility for Ruby 2.4 `to_time` changes

    In Ruby 2.4 the `to_time` method for both `DateTime` and `Time` will
    preserve the timezone of the receiver when converting to an instance
    of `Time`. Since Rails 5.0 will support Ruby 2.2, 2.3 and later we
    need to introduce a compatibility layer so that apps that upgrade do
    not break. New apps will have a config initializer file that defaults
    to match the new Ruby 2.4 behavior going forward.
    
    For information about the changes to Ruby see:
    https://bugs.ruby-lang.org/issues/12189
    https://bugs.ruby-lang.org/issues/12271
    
    Fixes #24617.
    
    (cherry picked from commit c9c5788)
    pixeltrix committed with pixeltrix Apr 23, 2016
  17. Merge pull request #27566 from npezza93/singular_collection_ids-fix

    Fix collection_singular_ids= ignores different primary key on relationhip
    rafaelfranca committed on GitHub Jan 4, 2017
Commits on Jan 3, 2017
  1. Merge pull request #27473 from matthewd/4-2-2-4

    4-2-stable + ruby 2.4
    matthewd committed on GitHub Jan 3, 2017
Commits on Dec 28, 2016
  1. Have Bundler resolve for the right Ruby version on Travis

    This is a bit over-constraining for the committed lock file, but Travis
    ignores that anyway.
    matthewd committed Dec 27, 2016
Commits on Dec 27, 2016
  1. Ignore warnings in CLI output

    They're not good, but they're not what these tests care about.
    matthewd committed Dec 27, 2016
  2. Merge pull request #27414 from matthewd/fix-xml-vs-html-assertion

    Revise the "XML is not HTML" test
    matthewd committed Dec 20, 2016
  3. Limit length of secret being passed

    Very similar to PR #25758, see more in depth reasoning there.
    maclover7 committed with matthewd Dec 20, 2016
  4. Merge pull request #27366 from utilum/avoid_fixnum_warning

    Fix Fixnum deprecated warning in Ruby 2.4+
    matthewd committed Dec 18, 2016
  5. Merge pull request #27293 from y-yagi/fix_duplicable_with_2_4

    change return value of `duplicable?` with Ruby 2.4+
    kaspth committed with matthewd Dec 13, 2016
  6. Merge pull request #27349 from y-yagi/fix_ruby_warning_in_ruby_2_4

    fix new warning in ruby 2.4
    rafaelfranca committed with matthewd Dec 14, 2016