| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
| |
AS::BasicObject is used for proxy classes. Let's give it a less concerning
name. Also, it avoids the confusion with Ruby's Basic Object.
|
|
|
|
| |
(active_support/dependecies.rb) (issue #8167)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Chrome, Safari and Firefox serialize Date objects to strings such
as 'Mon May 28 2012 00:00:00 GMT-0700 (PDT)'. When these strings
are parsed the zone is interpreted as 'GMT-0700' which doesn't
exist in the TzInfo list of timezones.
By taking advantage of the improved date/time handling in 1.9.3
we can use `Date._parse` and the `:offset` value which is parsed
correctly.
Three tests were amended to make them pass:
1. test_parse_with_old_date
This needed changing to a different value because the original
value was before EST was adopted so was being changed to a
LMT (Local Mean Time) value after the change. It didn't before
because `DateTime` just has offsets from UTC not timezones.
2. test_parse_should_not_black_out_system_timezone_dst_jump
Changed the implementation of this test as the stubs were
dependent on internal implementation details of the test.
Confirmed that the modified test still failed when the
implementation of `parse` was restored to pre-#5571.
3. test_parse_should_black_out_app_timezone_dst_jump
Ditto.
Closes #5770.
|
| |
|
|
|
|
|
|
|
|
| |
This behavior mattered under Ruby 1.8, but that doesn't matter now
that we don't support it.
In addition, we don't want to proxy the #class method. A test was added
to prevent against regressions.
|
|
|
|
| |
Check https://github.com/rails/rails/pull/4575#issuecomment-5765575.
|
|
|
|
|
|
|
|
|
| |
This reverts commit 1620df78dff527b4fa3f7b204fa05d1b630aae17, reversing
changes made to 2d000328dfc0d4b297fb4bdcebc9af6c2fb559dc.
Conflicts:
activesupport/CHANGELOG.md
activesupport/lib/active_support/test_case.rb
|
|\
| |
| |
| |
| |
| |
| | |
Make XmlMini.with_backend usable with threads
Conflicts:
activesupport/CHANGELOG.md
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
`XmlMini.with_backend` now may be safely used with threads:
Thread.new do
XmlMini.with_backend("REXML") { rexml_power }
end
Thread.new do
XmlMini.with_backend("LibXML") { libxml_power }
end
Each thread will use it's own backend.
|
|/
|
|
|
| |
The method #remove_const does not load the file, so we
can still remove the constant.
|
| |
|
| |
|
|
|
|
|
|
| |
Setting options in a custom `#as_json` method had side effects.
Modifications of the `options` hash leaked outside and influenced
the conversion of other objects contained in the hash.
|
|
|
|
|
|
| |
It's no longer used in Rails any more.
See https://github.com/rails/rails/pull/8142\#issuecomment-10227297 for more
|
|\
| |
| | |
Kernel#capture replaced by version which can catch output from subprocesses
|
| | |
|
| |
| |
| |
| | |
Since version `3.0.x` `Builder` caches method passed to `method_missing` each time. This commit replaces `method_missing` call with `tag!` call to prevent method redefinition on each `to_xml` call with the same builder.
|
|/
|
|
|
|
|
|
| |
Fixes #8095.
For reference, here is the discussion about the mapping being
incorrect:
http://rubyforge.org/pipermail/tzinfo-users/2012-November/000114.html
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously this code just assumed it is capable of changing the file
ownership, both user and group. This will fail in a lot of scenario's
unless:
* The process is run as a superuser (root);
* The owning user and group are already set to the user and group we're
trying to chown to;
* The user chown'ing only changes the group to another group it is a
member of.
If either of those conditions are not met the filesystem will simply
deny the operation throwing an error.
It is also not always possible to do a chmod, there might be a SELinux
policy or another limitation preventing the user to change the file
mode. To this end the chmod call has also been added to the rescue
block.
I've also added a little comment above the chmod command that doing a
chmod on a file which has an ACL set will cause the ACL to be
recalculated / modified.
|
| |
|
| |
|
| |
|
|\
| |
| | |
Optimize log subscribers to check if the log level is sufficient
|
| |
| |
| |
| | |
performing an operations.
|
| | |
|
| | |
|
| | |
|
| | |
|
|/
|
|
| |
See #7613. [ci skip]
|
|
|
|
| |
option added (default is Monday)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* ActiveSupport::Configurable should allow config_accessor to take
default value by block, just like cattr_accessor.
class User
include ActiveSupport::Configurable
config_accessor :hair_colors do
[:brown, :black, :blonde, :red]
end
end
User.hair_colors # => [:brown, :black, :blonde, :red]
* remove trailing whitespaces in configurable.rb and its test file.
* Update ActiveSupport CHANGELOG.
|
|
|
|
|
|
|
| |
Due to its lack of thread safety, we're deprecating this, and it
will be removed in Rails 4.1.
Fixes #4060.
|
|
|
|
|
| |
Hash#merge accepts block that you can use to customize how hash values
are merged. This change makes merge and deep_merge compatible.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ActiveSupport::Deprecation is now a class rather than a module. You can
get instance of ActiveSupport::Deprecation calling #instance method.
ActiveSupport::Deprecation.instance
But when you need to get new object od ActiveSupport::Deprecation you
need to just call #new.
@instance = ActiveSupport::Deprecation.new
Since you can create a new object, you can change the version and the
name of the library where the deprecator concerned.
ActiveSupport::Deprecation.new('2.0', 'MyGem')
If you need use another deprecator instance you can select it in the
options of deprecate method.
deprecate :method, :deprecator => deprecator_instance
Documentation has been updated.
|
|
|
|
|
| |
This reverts commit ca80067bbe4662c60b933188ad3769605742e812.
Entry already added in 895233
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When a block is passed into the method, it will be invoked for each
duplicated key, with the key in question and the two values as
arguments. The value for the duplicated key in the receiver will
be set to the return value of the block.
This behaviour matches Ruby's long-standing implementation of
Hash#update and is intended to provide a more consistent interface.
HashWithIndifferentAccess#merge is also affected by the change, as it
uses #update internally.
|
|
|
|
|
|
|
|
|
|
| |
Changes in old branches needed to be manually synched in CHANGELOGs of newer ones.
This has proven to be brittle, sometimes one just forgets this manual step.
With this commit we switch to CHANGELOGs per branch. When a new major version is
cut from master, the CHANGELOGs in master start being blank.
A link to the CHANGELOG of the previous branch allows anyone interested to
follow the history.
|
| |
|
|
|
|
|
|
| |
ActiveSupport::Cache::MemCacheStore
memcache-client was deprecated in favour of dalli in 2010.
|
| |
|
|
|
|
|
|
|
|
| |
Action Pack already comes with a default locale fine for :en, that is
always loaded. We can just fallback to this locale for defaults, if
values for the current locale cannot be found.
Closes #4420, #2802, #2890.
|
|
|
|
| |
Removed in 0228a73b1094a3e19ad291d2ce4789890c09578a, pull request #7310.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Reason: ActiveSupport::JSON::Variable is not used anymore internally. It
was deprecated in 3-2-stable but we reverted all the deprecation for
point releases.
See #6536 and #6546.
Conflicts:
activesupport/lib/active_support/json/variable.rb
|