Commit Graph

82 Commits

Author SHA1 Message Date
Rafael Mendonça França
325748d6b5 New CHANGELOG entries always in the top 2012-10-01 23:17:13 -03:00
Brian Durand
e3a746b6fc Optimize ActiveSupport::Cache::Entry to reduce memory and processing overhead. 2012-09-30 09:26:04 -07:00
Jeremy Kemper
86ebe0bd36 Tests tag the Rails log with the current test class and test case 2012-09-26 11:17:02 -07:00
Jeremy Kemper
d36f57f430 Add logger.push_tags and .pop_tags to complement logger.tagged 2012-09-26 10:16:40 -07:00
Carlos Antonio da Silva
1eef814e7a Add changelog entry and docs about class delegation using the symbol :class
See #7613. [ci skip]
2012-09-20 18:50:53 -03:00
gregolsen
da26dfbefd Date.beginning_of_week thread local and beginning_of_week application config option added (default is Monday) 2012-09-18 17:18:19 +03:00
Larry Lv
1efe30ebce set up config_accessor with a default value by block
* 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.
2012-09-17 09:14:21 +08:00
Steve Klabnik
ed2fea908a Deprecate ActiveSupport::Benchmarkable#silence.
Due to its lack of thread safety, we're deprecating this, and it
will be removed in Rails 4.1.

Fixes #4060.
2012-09-15 06:19:55 +04:00
Pranas Kiziela
54575d8797 Allow passing block to deep_merge and deep_merge!
Hash#merge accepts block that you can use to customize how hash values
are merged. This change makes merge and deep_merge compatible.
2012-09-13 23:01:18 +03:00
Rafael Mendonça França
8692db59af Copy-edit deprecation relared documentation [ci skip] 2012-09-13 14:02:18 -03:00
Piotr Niełacny
71993c6f97 Change ActiveSupport::Deprecation to class.
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.
2012-09-13 08:42:00 +02:00
Bogdan Gusiev
f11fc7308a Revert "Changelog entry for PR #7560"
This reverts commit ca80067bbe4662c60b933188ad3769605742e812.
Entry already added in 895233
2012-09-10 21:57:57 +03:00
Bogdan Gusiev
ca80067bbe Changelog entry for PR #7560 2012-09-10 21:38:12 +03:00
Kalys Osmonov
6b2a24c3bd &#39 dates back to SGML when &#x27 was introduced in HTML 4.0 2012-09-09 19:48:32 +06:00
Carlos Antonio da Silva
dcc68fa443 Fix Active Support changelog formatting [ci skip] 2012-09-07 11:12:16 -03:00
Carlos Antonio da Silva
8952339750 Add Changelog entry for #7560: deprecate #filter in AS::Callbacks [ci skip] 2012-09-07 11:12:00 -03:00
Leo Cassarani
edab820d9e Extend HashWithIndifferentAccess#update to take an optional block
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.
2012-09-05 00:59:29 +01:00
Xavier Noria
810a50dacf CHANGELOGs are now per branch
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.
2012-08-28 21:15:16 +02:00
Rafael Mendonça França
8c6fcbc2b1 Add CHANGELOG entry for #3578 [ci skip] 2012-08-21 18:39:37 -03:00
Guillermo Iguaran
82663306f4 Replace deprecated memcache-client gem with dalli in ActiveSupport::Cache::MemCacheStore
memcache-client was deprecated in favour of dalli in 2010.
2012-08-17 22:22:55 -05:00
Rafael Mendonça França
8781b266b9 Sync CHANGELOGs [ci skip] 2012-08-11 13:13:58 -03:00
Carlos Antonio da Silva
a9dccda936 Fallback to :en locale instead of handling a constant with defaults
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.
2012-08-11 00:20:19 -03:00
Carlos Antonio da Silva
b6e00c6764 Bring back changelog entries for Active Support
Removed in 0228a73b1094a3e19ad291d2ce4789890c09578a, pull request #7310.
2012-08-11 00:16:42 -03:00
Mark Turner
0228a73b10 Add html_escape note to CHANGELOG 2012-08-09 16:54:52 -07:00
Erich Menge
83f2ffcf43 Deprecate ActiveSupport::JSON::Variable
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
2012-08-07 19:36:08 -03:00
Xavier Noria
2f58795e78 defines String#indent [closes #7263] [Xavier Noria & Ace Suares] 2012-08-07 16:57:28 +02:00
José Valim
0e3c66691a Update activesupport/CHANGELOG.md 2012-07-31 15:48:17 +03:00
David Heinemeier Hansson
04998cd0c9 Add Object#try! with the old NoMethodError raising behavior 2012-07-27 12:33:02 -05:00
David Heinemeier Hansson
99ea1a875b will now return nil instead of raise a NoMethodError if the receiving object does not implement the method 2012-07-27 12:22:38 -05:00
Carlos Antonio da Silva
215d41d802 Update 4.0 Release Notes with changelogs [ci skip]
Also fix some wrong formatting.

Related discussion:
ab72040b74 (commitcomment-1525256)
2012-07-02 22:34:51 -03:00
Andrew White
98b46bf5e2 Make Time#change work with offsets other than UTC or local
Use Time.new to create times where the current offset is not zero or
not in the local time zone - closes #4847 and #6651.
2012-07-01 09:11:21 +01:00
Bogdan Gusiev
88230b7cf7 AS::Callbacks: deprecate monkey patch code
Deprecate usage of filter object with #before and #after
methods as around callback
2012-06-26 09:21:36 +03:00
paranoiase Kang
2773257ac6 Add prev_quarter and next_quarter method in Time/Date/DateTime 2012-06-20 11:39:11 -03:00
Xavier Noria
d3a99c32d1 removes the obsolete require_association method from dependencies
This is an obsolete method from the very early days,
apparently it was used circa 2004 because STI support
was not smart enough. This method is not public
interface, and we are heading a major version, so
removal seems right.
2012-06-10 00:38:40 +02:00
Francesco Rodriguez
5e1d40f773 add instance_accessor option to ActiveSupport::Configurable#config_accessor
Changes:

* Add `instance_accessor` option to opt out of the instance writer and
  instance reader methods.
* Raises a NameError if the name of the attribute is not valid.
* Update documentation and tests.
* Add CHANGELOG entry in activesupport.
2012-06-05 10:50:48 -05:00
Rafael Mendonça França
3449b757da Sync CHANGLOG with the 3-2-stable branch 2012-06-01 11:41:30 -03:00
Erich Menge
1f5dddcf2f Remove deprecated ActiveSupport::JSON::Variable. 2012-05-30 14:39:00 -05:00
Andrew Mutz
155cd5e6b5 Moving NumberHelpers from ActionView to ActiveSupport 2012-05-27 18:14:21 -07:00
Mark McSpadden
2b5b60fc3c Add Hash#deep_transform_keys and Hash#deep_transform_keys! Also convert deep_*_keys to use deep_transform_keys. 2012-05-23 13:11:06 -05:00
Lucas Húngaro
a4bb195c91 Adding deep versions of stringify_keys and symbolize_keys (plain and bang) for nested hashes 2012-05-23 11:56:10 -03:00
Mark McSpadden
6ff887321b Add Hash#transform_keys and Hash#transform_keys! and refactor *_keys methods to use them. 2012-05-23 09:08:04 -05:00
Angelo capilleri
5646d65d01 changed xml type datetime to dateTime, fixes #6328
XmlMini define the xml 'datatime', but according to
http://www.w3.org/TR/xmlschema-2/#dateTime could be better
change this to 'dateTime' with upper case letter 'T.
So 'DateTime' and 'Time' are redefined from 'datetime' to 'dateTime'

add the changing to the changelog
2012-05-23 14:45:56 +02:00
Alexey Vakhov
e4569b50d1 Add instance_accessor option to class_attribute 2012-05-22 00:28:34 +04:00
Andrew White
329a5a4322 Add CHANGELOG entry for constantize - closes #6165. 2012-05-19 15:47:35 +01:00
Xavier Noria
e5b91f2b1d copy-edits a recent CHANGELOG entry [ci skip] 2012-05-12 17:48:34 +02:00
Vasiliy Ermolovich
b8f394f4a3 Object#try can't call private methods 2012-05-12 14:07:21 +03:00
Francesco Rodriguez
c1ce4144d1 AS::Callbacks#run_callbacks remove key argument 2012-05-10 02:21:03 -05:00
Mark J. Titorenko
946875db22 Consistent CHANGELOG entry indentation. 2012-05-09 13:40:08 +01:00
Mark J. Titorenko
821771374f Add CHANGELOG section for unreleased Rails 3.2.4; document addition of #beginning_of_hour and #end_of_hour to Time and DateTime core extensions. 2012-05-09 13:35:49 +01:00
Piotr Sarnacki
0403928608 Updated CHANGELOG entry for deep_dup 2012-05-06 11:13:15 -07:00