Commit Graph

3108 Commits

Author SHA1 Message Date
John Barnette
7a559d389c Force a period when local times are ambiguous
This commit includes the essence of
https://github.com/rails/rails/pull/17409.
2014-11-10 12:56:35 +11:00
Dirkjan Bussink
c831f67d8b Remove Proc#bind from Rails 3.2 2014-10-08 14:08:40 +02:00
Charlie Somerville
ec80c63332 Time#to_time converts it back to local 2014-09-19 17:51:43 +10:00
Charlie Somerville
7edb47effd dup before changing to utc 2014-09-19 17:51:39 +10:00
Charlie Somerville
78e6c36ba3 convert times to local when quoting for db 2014-09-19 17:50:29 +10:00
Charlie Somerville
7684d715ef Merge remote-tracking branch 'upstream/3-2-stable' into 3-2-github 2014-09-15 14:04:33 +10:00
Rafael Mendonça França
53c845cb18 Preparing for 3.2.19 release 2014-07-02 12:55:09 -03:00
Rafael Mendonça França
297bff7f8f Make sure Active Support configurations are applied correctly
Before this patch configuration set using config.active_support
would not be set.

Closes #15364
2014-06-26 18:40:23 -03:00
Guillermo Iguaran
bc90ea63e9 Revert "Merge pull request #15794 from vishalzambre/patch-1"
This reverts commit 6d800a909e, reversing
changes made to 6a051299f9.

We don't apply non-security fixes to 3-2-stable branch!!!
2014-06-18 00:37:46 -05:00
Vishal Zambre
fca3cc23fa File.exists? is a deprecated name, use File.exist?
File.exists? is a deprecated name, use File.exist?
2014-06-18 10:51:27 +05:30
Rafael Mendonça França
4e8f1d2588 Preparing for 3.2.18 release 2014-05-06 11:33:10 -03:00
Charlie Somerville
3672a16373 don't override singleton_class? if it already exists 2014-04-10 20:27:14 +10:00
Charlie Somerville
c9acba55f1 define info_signal for new minitests 2014-04-10 19:47:39 +10:00
Rafael Mendonça França
666e9f65bd Preparing for 3.2.17 release 2014-02-18 15:16:57 -03:00
Aaron Patterson
64226302d8 updating the changelog 2013-12-02 16:17:19 -08:00
Aaron Patterson
2a0c4403fd bumping to 3.2.15 2013-10-15 11:48:53 -07:00
Aaron Patterson
eb8807e84d Merge branch '3-2-15' into 3-2-sec
* 3-2-15:
  bumping to rc3
  Revert "Merge pull request #12413 from arthurnn/inverse_of_on_build"
  Revert "Merge pull request #12443 from arthurnn/add_inverse_of_add_target"
  bumping to rc2
  Merge pull request #12443 from arthurnn/add_inverse_of_add_target
  bumping version to 3.2.15.rc1
  Fix STI scopes using benolee's suggestion. Fixes #11939
2013-10-15 11:15:08 -07:00
Aaron Patterson
e3abd78ee5 bumping to rc3 2013-10-11 14:16:06 -07:00
Aaron Patterson
5ede19b772 bumping to rc2 2013-10-04 13:46:35 -07:00
Aaron Patterson
5e277c8208 bumping version to 3.2.15.rc1 2013-10-03 11:52:44 -07:00
Michael Koziarski
5aee516b5e Remove the use of String#% when formatting durations in log messages
This avoids potential format string vulnerabilities where user-provided
data is interpolated into the log message before String#% is called.
2013-09-30 14:42:11 -07:00
Rafael Mendonça França
c539c684aa Merge pull request #12196 from h-lame/fix-activesupport-cache-filestore-cleanup
Fix FileStore#cleanup to no longer rely on missing each_key method
Conflicts:
	activesupport/CHANGELOG.md
	activesupport/test/caching_test.rb
2013-09-12 16:04:10 -03:00
Eugene Kalenkovich
adf6e30e3a Fix 1.8.7 incompatible respond_to_missing 2013-08-18 16:46:44 -05:00
Rafael Mendonça França
2b3ce8627b Merge branch '3-2-14' into 3-2-stable 2013-07-22 20:24:09 -03:00
Rafael Mendonça França
2fcd13eff2 Preparing for 3.2.14 release 2013-07-22 12:05:41 -03:00
Wolfram Arnold
803008eb97 Add respond_to_missing? for TaggedLogging which is needed if another log abstracter wraps a TaggedLogging instance.
It's also best practice when overriding method_missing.
2013-07-17 18:26:55 -07:00
Rafael Mendonça França
a96df04aac Preparing for 3.2.14.rc2 release 2013-07-16 13:00:33 -03:00
Rafael Mendonça França
facfc24f25 Preparing for 3.2.14.rc1 release 2013-07-12 21:06:50 -03:00
Andrew White
714cb5a436 Add missing require so that DateTime has the right superclass
If the DateTime core extensions were loaded before the Date core extensions
then you would get a superclass mismatch as DateTime hasn't been defined
yet so it gets set to Object by the acts_like core extension.

Fixes #11206

(cherry picked from commit 78f7d5b652000dbb1a11d34fe370c3fa82de840c)
2013-07-10 16:16:02 +01:00
Andrew White
b775987e72 Return local time for backwards compatibility 2013-07-09 15:40:59 +01:00
Andrew White
ccad803bf4 Retain offset and fraction when using Time.at_with_coercion
The standard Ruby behavior for Time.at is to return the same type of
time when passing an instance of Time as a single argument. Since the
an ActiveSupport::TimeWithZone instance may be a different timezone than
the system timezone and DateTime just understands offsets the best we
can do is to return an instance of Time with the correct offset.

It also maintains the correct fractional second value as well.

Fixes #11350.

Backports:
484253515c0e05760541dc48946361185c9e6904
1b3873730b96035a238dbff7627bd5942e6dc4e7
2013-07-09 14:04:49 +01:00
Rafael Mendonça França
a72a0eb85b Remove warning of assigned but unused variable 2013-07-06 17:16:37 -03:00
Carson Reinke
4265f1bccb Incorrectly providing program name the same as log message even when block is not provided. 2013-07-01 10:11:43 -04:00
Yves Senn
1db54d7d01 Backport rails/rails-perftest#2 to fix rake test:benchmark 2013-06-27 20:44:08 +02:00
Andrew White
f42e0fd3f4 Override Time.at to work with Time-like values
Time.at allows passing a single Time argument which is then converted
to an integer. The conversion code since 1.9.3r429 explicitly checks
for an instance of Time so we need to override it to allow DateTime
and ActiveSupport::TimeWithZone values.
2013-06-08 09:45:45 +01:00
Rafael Mendonça França
c910388587 Revert "Remove unicode character encoding from ActiveSupport::JSON.encode"
This reverts commit 815a9431ab.

Conflicts:
	activesupport/test/json/encoding_test.rb

Reason: This was causing a regression where the resulting string is always
returning UTF-8. Also it changes the behavior of this method on a stable release.

Fixes #9498.
2013-05-08 21:03:37 -03:00
Aaron Patterson
afcd01bf25 Merge branch '3-2-13' into 3-2-stable
* 3-2-13:
  bumping to 3.2.13
  fix protocol checking in sanitization [CVE-2013-1857]
  JDOM XXE Protection [CVE-2013-1856]
  fix incorrect ^$ usage leading to XSS in sanitize_css [CVE-2013-1855]
  stop calling to_sym when building arel nodes [CVE-2013-1854]
  Merge pull request #9616 from exviva/multiple_select_name_double_square_brackets
  bumping to rc2
  Revert "Merge pull request #8209 from senny/backport_8176"
  Freeze columns only once per Result
  Preparing for 3.2.13.rc1 release
  Update CHANGELOGs for 3.2.13 release.

Conflicts:
	actionmailer/CHANGELOG.md
	actionpack/CHANGELOG.md
	activemodel/CHANGELOG.md
	activeresource/CHANGELOG.md
	activesupport/CHANGELOG.md
	railties/CHANGELOG.md
2013-03-18 10:17:04 -07:00
Aaron Patterson
a4b5582772 bumping to 3.2.13 2013-03-18 09:23:04 -07:00
Ben Murphy
c0d06633f0 JDOM XXE Protection [CVE-2013-1856]
Conflicts:
	activesupport/test/xml_mini/jdom_engine_test.rb
2013-03-15 17:48:27 -07:00
Andrew White
ba910d7650 Fix ActiveSupport::TimeZone.parse when time is a local DST jump
The previous implementation `ActiveSupport::TimeZone.parse` used `Time.parse`
which applies the system time DST rules to the parsed time. Instead we now
use `Time.utc` and manually apply the offset.

Backport tests from:
005d910624bbfa724b638426a000c8074d4201a2
c89b6c4cdce7ee55ed3665c099d914222fe0344a
03becb13099c439f6aea5058546bc8b0b19b8db8

Fixes #9678.
2013-03-13 05:40:25 +00:00
Aaron Patterson
ccf256d8dc bumping to rc2 2013-03-06 15:05:13 -08:00
Steve Klabnik
5ca59b02d1 Preparing for 3.2.13.rc1 release 2013-02-27 12:19:06 -08:00
mikeycgto
6df2db3298 Update RUBY_VERSION check for performance testing to handle 2.0.0 2013-02-24 21:43:32 -05:00
SHIBATA Hiroshi
621b5b7f0e added marshal_load and marshal_dump for ProxyTestResult. Behavior of method_missing with Marshal.dump and Marshal.load is changing in ruby 2.0.0 later. 2013-02-24 16:32:26 -05:00
Aaron Patterson
7cc26fd15e search private and protected methods for convert_key 2013-02-24 16:32:25 -05:00
Prem Sichanugrist
fe4fce80f3 Add in missing requires 2013-02-24 15:29:24 -05:00
Aaron Patterson
f1efecfc3f Merge branch '3-2-sec' into 3-2-stable
* 3-2-sec:
  bumping version
  remove ruby-prof
  Fix issue with attr_protected where malformed input could circumvent protection
  fixing call to columns hash. run the damn tests when you backport!
  Bump rack dependency to 1.4.5
  Merge pull request #9224 from dylanahsmith/bigdecimal-takes-string
  Merge pull request #9208 from dylanahsmith/3-2-mysql-quote-numeric

Conflicts:
	Gemfile
	activerecord/CHANGELOG.md
2013-02-11 10:19:31 -08:00
Aaron Patterson
1dccd44a5c bumping version 2013-02-10 19:05:41 -08:00
James Mead
48f9999fc3 Make tests for the presence of MiniTest consistent.
There is an inconsistency between the conditional logic in
the definition of ActiveSupport::TestCase and the conditional logic in
ActiveSupport::Testing::SetupAndTeardown [1].

In some circumstances, it's possible for MiniTest to be defined, but
for ActiveSupport::TestCase *not* to have MiniTest::Unit::TestCase or
MiniTest::Assertions in its ancestor chain. e.g. in Ruby 1.8 with the
minitest gem included in the bundle. In this case, the
Test::Unit/MiniTest shim/wrapper is not present and so
Test::Unit::TestCase (and therefore ActiveSupport::TestCase) is
completely independent of MiniTest::Unit::TestCase.

The conditional logic in the definition of ActiveSupport::TestCase does
not take this scenario into account, whereas the logic in
ActiveSupport::Testing::SetupAndTeardown does take it into account.

The changes in this commit are an alternative to the change in [2] which
was reverted in [3].

Similar conditional logic exists in ActiveSupport::Testing::Isolation
[4], ActiveSupport::Testing::Pending [5],
ActiveSupport::Testing::Performance [6], and in their respective tests.
I have not addressed these, because I know less about what's going on
there, but it would be worth bringing them all into line too.

[1]
https://github.com/rails/rails/blob/3-2-stable/activesupport/lib/active_support/testing/setup_and_teardown.rb#L13
[2]
c3e186ec8d
[3]
267fb61277
[4]
https://github.com/rails/rails/blob/3-2-stable/activesupport/lib/active_support/testing/isolation.rb#L41
[5]
https://github.com/rails/rails/blob/3-2-stable/activesupport/lib/active_support/testing/pending.rb#L14
[6]
https://github.com/rails/rails/blob/3-2-stable/activesupport/lib/active_support/testing/performance.rb#L17
2013-01-14 13:59:24 +00:00
Dan Kubb
688d52933a Fix DateTime comparison with DateTime::Infinity object 2013-01-13 20:27:33 -08:00