Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 321 lines (196 sloc) 11.207 kB
572c3d5 @tenderlove * BufferedLogger is deprecated. Use ActiveSupport::Logger, or the lo…
tenderlove authored
1 ## Rails 4.0.0 (unreleased) ##
88d59de @steveklabnik Deprecate Hash#diff.
steveklabnik authored
2
6ee03a4 Rename ActiveSupport::BasicObject to ActiveSupport::ProxyObject
Francesco Rodriguez authored
3 * Deprecate `ActiveSupport::BasicObject` in favor of `ActiveSupport::ProxyObject`.
4 This class is used for proxy classes. It avoids confusion with Ruby's BasicObject
5 class.
6
7 *Francesco Rodriguez*
8
9ee0ffb @urielka Patched Marshal#load to work with constant autoloading (active_suppor…
urielka authored
9 * Patched Marshal#load to work with constant autoloading.
10 Fixes autoloading with cache stores that relay on Marshal(MemCacheStore and FileStore). [fixes #8167]
11
12 *Uriel Katz*
13
005d910 @pixeltrix Make `Time.zone.parse` to work with JavaScript date strings
pixeltrix authored
14 * Make `Time.zone.parse` to work with JavaScript format date strings. *Andrew White*
15
ce73055 @exviva Add #seconds_until_end_of_day to DateTime and Time
exviva authored
16 * Add `DateTime#seconds_until_end_of_day` and `Time#seconds_until_end_of_day`
17 as a complement for `seconds_from_midnight`; useful when setting expiration
18 times for caches, e.g.:
19
20 <% cache('dashboard', expires_in: Date.current.seconds_until_end_of_day) do %>
21 ...
22
23 *Olek Janiszewski*
24
bd85260 @steveklabnik Simplify String#mb_chars and stop proxying #class
steveklabnik authored
25 * No longer proxy ActiveSupport::Multibyte#class. *Steve Klabnik*
26
92da512 @carlosantoniodasilva Properly deprecate #pending from AS::TestCase
carlosantoniodasilva authored
27 * Deprecate `ActiveSupport::TestCase#pending` method, use `skip` from MiniTest instead. *Carlos Antonio da Silva*
28
1fab200 @nikitug Make XmlMini.with_backend usable with threads
nikitug authored
29 * `XmlMini.with_backend` now may be safely used with threads:
30
31 Thread.new do
32 XmlMini.with_backend("REXML") { rexml_power }
33 end
34 Thread.new do
35 XmlMini.with_backend("LibXML") { libxml_power }
36 end
37
38 Each thread will use it's own backend.
39
40 *Nikita Afanasenko*
41
a8c3ea9 @fxn let remove_constant still delete Kernel#autoload constants [rounds #8…
fxn authored
42 * Dependencies no longer trigger Kernel#autoload in remove_constant [fixes #8213]. *Xavier Noria*
bff4d8d @fxn dependencies no longer trigger Kernel#autoload in remove_const [fixes…
fxn authored
43
c940aa6 @carlosantoniodasilva Use new mocha version and add changelog entry for #8180
carlosantoniodasilva authored
44 * Simplify mocha integration and remove monkey-patches, bumping mocha to 0.13.0. *James Mead*
45
78dca35 @senny `#as_json` isolates options when encoding a hash. Closes #8182
senny authored
46 * `#as_json` isolates options when encoding a hash.
47 Fix #8182
48
49 *Yves Senn*
50
88d59de @steveklabnik Deprecate Hash#diff.
steveklabnik authored
51 * Deprecate Hash#diff in favor of MiniTest's #diff. *Steve Klabnik*
52
346ccf3 @route Kernel#capture replaced by version which can catch output from subpro…
route authored
53 * Kernel#capture can catch output from subprocesses *Dmitry Vorotilin*
572c3d5 @tenderlove * BufferedLogger is deprecated. Use ActiveSupport::Logger, or the lo…
tenderlove authored
54
9cda6a3 @nikitug Use `tag!` instead of `method_missing` in `to_xml` conversions.
nikitug authored
55 * `to_xml` conversions now use builder's `tag!` method instead of explicit invocation of `method_missing`.
56
57 *Nikita Afanasenko*
58
642e1af @steveklabnik Fixed timezone mapping of Solomon Islands.
steveklabnik authored
59 * Fixed timezone mapping of the Solomon Islands. *Steve Klabnik*
60
b955939 @gazay Make caller attribute in deprecation methods optional
gazay authored
61 * Make callstack attribute optional in
62 ActiveSupport::Deprecation::Reporting methods `warn` and `deprecation_warning`
63
64 *Alexey Gaziev*
65
f38e752 @dgraham Implement replace method so key? works correctly.
dgraham authored
66 * Implement HashWithIndifferentAccess#replace so key? works correctly. *David Graham*
67
851f8c1 atomicc.rb: Don't assume we may chown/chmod a file.
Daniele Sluijters authored
68 * Handle the possible Permission Denied errors atomic.rb might trigger due to its chown and chmod calls. *Daniele Sluijters*
69
a4b1196 @Mik-die add more testcases and doc about Hash#extract!
Mik-die authored
70 * Hash#extract! returns only those keys that present in the receiver.
5d27338 @Mik-die make Hash#extract! more symmetric with Hash#slice
Mik-die authored
71
72 {:a => 1, :b => 2}.extract!(:a, :x) # => {:a => 1}
73
74 *Mikhail Dieterle*
75
a4b1196 @Mik-die add more testcases and doc about Hash#extract!
Mik-die authored
76 * Hash#extract! returns the same subclass, that the receiver is. I.e.
5d27338 @Mik-die make Hash#extract! more symmetric with Hash#slice
Mik-die authored
77 HashWithIndifferentAccess#extract! returns HashWithIndifferentAccess instance.
78
79 *Mikhail Dieterle*
80
325748d @rafaelfranca New CHANGELOG entries always in the top
rafaelfranca authored
81 * Optimize ActiveSupport::Cache::Entry to reduce memory and processing overhead. *Brian Durand*
82
86ebe0b @jeremy Tests tag the Rails log with the current test class and test case
jeremy authored
83 * Tests tag the Rails log with the current test class and test case:
84
85 [SessionsControllerTest] [test_0002_sign in] Processing by SessionsController#create as HTML
86 [SessionsControllerTest] [test_0002_sign in] ...
87
88 *Jeremy Kemper*
89
ce73055 @exviva Add #seconds_until_end_of_day to DateTime and Time
exviva authored
90 * Add `logger.push_tags` and `.pop_tags` to complement logger.tagged:
d36f57f @jeremy Add logger.push_tags and .pop_tags to complement logger.tagged
jeremy authored
91
92 class Job
93 def before
94 Rails.logger.push_tags :jobs, self.class.name
95 end
96
97 def after
98 Rails.logger.pop_tags 2
99 end
100 end
101
102 *Jeremy Kemper*
103
1eef814 @carlosantoniodasilva Add changelog entry and docs about class delegation using the symbol …
carlosantoniodasilva authored
104 * Allow delegation to the class using the `:class` keyword, replacing
105 `self.class` usage:
106
107 class User
108 def self.hello
109 "world"
110 end
111
112 delegate :hello, to: :class
113 end
114
115 *Marc-Andre Lafortune*
116
117 * `Date.beginning_of_week` thread local and `beginning_of_week` application
118 config option added (default is Monday).
119
120 *Innokenty Mikhailov*
da26dfb @gregolsen Date.beginning_of_week thread local and beginning_of_week application…
gregolsen authored
121
1efe30e @larrylv set up config_accessor with a default value by block
larrylv authored
122 * An optional block can be passed to `config_accessor` to set its default value
123
124 class User
125 include ActiveSupport::Configurable
126 config_accessor :hair_colors do
127 [:brown, :black, :blonde, :red]
128 end
129 end
130
131 User.hair_colors # => [:brown, :black, :blonde, :red]
132
133 *Larry Lv*
134
ed2fea9 @steveklabnik Deprecate ActiveSupport::Benchmarkable#silence.
steveklabnik authored
135 * ActiveSupport::Benchmarkable#silence has been deprecated due to its lack of
1eef814 @carlosantoniodasilva Add changelog entry and docs about class delegation using the symbol …
carlosantoniodasilva authored
136 thread safety. It will be removed without replacement in Rails 4.1.
137
138 *Steve Klabnik*
139
140 * An optional block can be passed to `Hash#deep_merge`. The block will be invoked
141 for each duplicated key and used to resolve the conflict.
ed2fea9 @steveklabnik Deprecate ActiveSupport::Benchmarkable#silence.
steveklabnik authored
142
1eef814 @carlosantoniodasilva Add changelog entry and docs about class delegation using the symbol …
carlosantoniodasilva authored
143 *Pranas Kiziela*
54575d8 @pranas Allow passing block to deep_merge and deep_merge!
pranas authored
144
71993c6 @LTe Change ActiveSupport::Deprecation to class.
LTe authored
145 * ActiveSupport::Deprecation is now a class. It is possible to create an instance
146 of deprecator. Backwards compatibility has been preserved.
147
148 You can choose which instance of the deprecator will be used.
149
8692db5 @rafaelfranca Copy-edit deprecation relared documentation [ci skip]
rafaelfranca authored
150 deprecate :method_name, :deprecator => deprecator_instance
71993c6 @LTe Change ActiveSupport::Deprecation to class.
LTe authored
151
152 You can use ActiveSupport::Deprecation in your gem.
153
8692db5 @rafaelfranca Copy-edit deprecation relared documentation [ci skip]
rafaelfranca authored
154 require 'active_support/deprecation'
155 require 'active_support/core_ext/module/deprecation'
71993c6 @LTe Change ActiveSupport::Deprecation to class.
LTe authored
156
8692db5 @rafaelfranca Copy-edit deprecation relared documentation [ci skip]
rafaelfranca authored
157 class MyGem
158 def self.deprecator
159 ActiveSupport::Deprecation.new('2.0', 'MyGem')
160 end
71993c6 @LTe Change ActiveSupport::Deprecation to class.
LTe authored
161
8692db5 @rafaelfranca Copy-edit deprecation relared documentation [ci skip]
rafaelfranca authored
162 def old_method
163 end
71993c6 @LTe Change ActiveSupport::Deprecation to class.
LTe authored
164
8692db5 @rafaelfranca Copy-edit deprecation relared documentation [ci skip]
rafaelfranca authored
165 def new_method
166 end
71993c6 @LTe Change ActiveSupport::Deprecation to class.
LTe authored
167
8692db5 @rafaelfranca Copy-edit deprecation relared documentation [ci skip]
rafaelfranca authored
168 deprecate :old_method => :new_method, :deprecator => deprecator
169 end
71993c6 @LTe Change ActiveSupport::Deprecation to class.
LTe authored
170
8692db5 @rafaelfranca Copy-edit deprecation relared documentation [ci skip]
rafaelfranca authored
171 MyGem.new.old_method
172 # => DEPRECATION WARNING: old_method is deprecated and will be removed from MyGem 2.0 (use new_method instead). (called from <main> at file.rb:18)
71993c6 @LTe Change ActiveSupport::Deprecation to class.
LTe authored
173
174 *Piotr Niełacny & Robert Pankowecki*
175
6b2a24c @kalys &#39 dates back to SGML when &#x27 was introduced in HTML 4.0
kalys authored
176 * `ERB::Util.html_escape` encodes single quote as `#39`. Decimal form has better support in old browsers. *Kalys Osmonov*
177
8952339 @carlosantoniodasilva Add Changelog entry for #7560: deprecate #filter in AS::Callbacks [ci…
carlosantoniodasilva authored
178 * `ActiveSupport::Callbacks`: deprecate monkey patch of object callbacks.
179 Using the #filter method like this:
180
181 before_filter MyFilter.new
182
183 class MyFilter
184 def filter(controller)
185 end
186 end
187
188 Is now deprecated with recommendation to use the corresponding filter type
189 (`#before`, `#after` or `#around`):
190
191 before_filter MyFilter.new
192
193 class MyFilter
194 def before(controller)
195 end
196 end
197
198 *Bogdan Gusiev*
199
edab820 @leocassarani Extend HashWithIndifferentAccess#update to take an optional block
leocassarani authored
200 * An optional block can be passed to `HashWithIndifferentAccess#update` and `#merge`.
201 The block will be invoked for each duplicated key, and used to resolve the conflict,
202 thus replicating the behaviour of the corresponding methods on the `Hash` class.
203
204 *Leo Cassarani*
205
8c6fcbc @rafaelfranca Add CHANGELOG entry for #3578 [ci skip]
rafaelfranca authored
206 * Remove `j` alias for `ERB::Util#json_escape`.
207 The `j` alias is already used for `ActionView::Helpers::JavaScriptHelper#escape_javascript`
208 and both modules are included in the view context that would confuse the developers.
209
210 *Akira Matsuda*
211
8266330 @guilleiguaran Replace deprecated `memcache-client` gem with `dalli` in ActiveSuppor…
guilleiguaran authored
212 * Replace deprecated `memcache-client` gem with `dalli` in ActiveSupport::Cache::MemCacheStore
213
214 *Guillermo Iguaran*
215
a9dccda @carlosantoniodasilva Fallback to :en locale instead of handling a constant with defaults
carlosantoniodasilva authored
216 * Add default values to all `ActiveSupport::NumberHelper` methods, to avoid
217 errors with empty locales or missing values.
218
219 *Carlos Antonio da Silva*
220
dcc68fa @carlosantoniodasilva Fix Active Support changelog formatting [ci skip]
carlosantoniodasilva authored
221 * `ActiveSupport::JSON::Variable` is deprecated. Define your own `#as_json` and
222 `#encode_json` methods for custom JSON string literals.
b6e00c6 @carlosantoniodasilva Bring back changelog entries for Active Support
carlosantoniodasilva authored
223
224 *Erich Menge*
225
226 * Add String#indent. *fxn & Ace Suares*
227
228 * Inflections can now be defined per locale. `singularize` and `pluralize`
229 accept locale as an extra argument.
230
231 *David Celis*
232
233 * `Object#try` will now return nil instead of raise a NoMethodError if the
234 receiving object does not implement the method, but you can still get the
235 old behavior by using the new `Object#try!`.
236
237 *DHH*
238
0228a73 @amerine Add html_escape note to CHANGELOG
amerine authored
239 * `ERB::Util.html_escape` now escapes single quotes. *Santiago Pastorino*
99ea1a8 @dhh will now return nil instead of raise a NoMethodError if the receivin…
dhh authored
240
215d41d @carlosantoniodasilva Update 4.0 Release Notes with changelogs [ci skip]
carlosantoniodasilva authored
241 * `Time#change` now works with time values with offsets other than UTC or the local time zone. *Andrew White*
98b46bf @pixeltrix Make Time#change work with offsets other than UTC or local
pixeltrix authored
242
215d41d @carlosantoniodasilva Update 4.0 Release Notes with changelogs [ci skip]
carlosantoniodasilva authored
243 * `ActiveSupport::Callbacks`: deprecate usage of filter object with `#before` and `#after` methods as `around` callback. *Bogdan Gusiev*
88230b7 @bogdan AS::Callbacks: deprecate monkey patch code
bogdan authored
244
215d41d @carlosantoniodasilva Update 4.0 Release Notes with changelogs [ci skip]
carlosantoniodasilva authored
245 * Add `Time#prev_quarter` and `Time#next_quarter` short-hands for `months_ago(3)` and `months_since(3)`. *SungHee Kang*
2773257 Add prev_quarter and next_quarter method in Time/Date/DateTime
paranoiase Kang authored
246
d3a99c3 @fxn removes the obsolete require_association method from dependencies
fxn authored
247 * Remove obsolete and unused `require_association` method from dependencies. *fxn*
248
5e1d40f add instance_accessor option to ActiveSupport::Configurable#config_ac…
Francesco Rodriguez authored
249 * Add `:instance_accessor` option for `config_accessor`.
250
251 class User
252 include ActiveSupport::Configurable
253 config_accessor :allowed_access, instance_accessor: false
254 end
255
256 User.new.allowed_access = true # => NoMethodError
257 User.new.allowed_access # => NoMethodError
258
259 *Francesco Rodriguez*
260
1f5dddc Remove deprecated ActiveSupport::JSON::Variable.
Erich Menge authored
261 * ActionView::Helpers::NumberHelper methods have been moved to ActiveSupport::NumberHelper and are now available via
262 Numeric#to_s. Numeric#to_s now accepts the formatting options :phone, :currency, :percentage, :delimited,
155cd5e @amutz Moving NumberHelpers from ActionView to ActiveSupport
amutz authored
263 :rounded, :human, and :human_size. *Andrew Mutz*
264
2b5b60f @markmcspadden Add Hash#deep_transform_keys and Hash#deep_transform_keys! Also conve…
markmcspadden authored
265 * Add `Hash#transform_keys`, `Hash#transform_keys!`, `Hash#deep_transform_keys`, and `Hash#deep_transform_keys!`. *Mark McSpadden*
6ff8873 @markmcspadden Add Hash#transform_keys and Hash#transform_keys! and refactor *_keys …
markmcspadden authored
266
a4bb195 @lucashungaro Adding deep versions of stringify_keys and symbolize_keys (plain and …
lucashungaro authored
267 * Changed xml type `datetime` to `dateTime` (with upper case letter `T`). *Angelo Capilleri*
5646d65 @acapilleri changed xml type datetime to dateTime, fixes #6328
acapilleri authored
268
e4569b5 @avakhov Add instance_accessor option to class_attribute
avakhov authored
269 * Add `:instance_accessor` option for `class_attribute`. *Alexey Vakhov*
270
329a5a4 @pixeltrix Add CHANGELOG entry for constantize - closes #6165.
pixeltrix authored
271 * `constantize` now looks in the ancestor chain. *Marc-Andre Lafortune & Andrew White*
272
a4bb195 @lucashungaro Adding deep versions of stringify_keys and symbolize_keys (plain and …
lucashungaro authored
273 * Adds `Hash#deep_stringify_keys` and `Hash#deep_stringify_keys!` to convert all keys from a +Hash+ instance into strings *Lucas Húngaro*
274
275 * Adds `Hash#deep_symbolize_keys` and `Hash#deep_symbolize_keys!` to convert all keys from a +Hash+ instance into symbols *Lucas Húngaro*
276
e5b91f2 @fxn copy-edits a recent CHANGELOG entry [ci skip]
fxn authored
277 * `Object#try` can't call private methods. *Vasiliy Ermolovich*
b8f394f @nashby Object#try can't call private methods
nashby authored
278
c1ce414 AS::Callbacks#run_callbacks remove key argument
Francesco Rodriguez authored
279 * `AS::Callbacks#run_callbacks` remove `key` argument. *Francesco Rodriguez*
280
946875d @mjtko Consistent CHANGELOG entry indentation.
mjtko authored
281 * `deep_dup` works more expectedly now and duplicates also values in +Hash+ instances and elements in +Array+ instances. *Alexey Gaziev*
0403928 @drogus Updated CHANGELOG entry for `deep_dup`
drogus authored
282
946875d @mjtko Consistent CHANGELOG entry indentation.
mjtko authored
283 * Inflector no longer applies ice -> ouse to words like slice, police, ets *Wes Morgan*
c9cbc17 @josevalim Update activesupport/CHANGELOG.md
josevalim authored
284
946875d @mjtko Consistent CHANGELOG entry indentation.
mjtko authored
285 * Add `ActiveSupport::Deprecations.behavior = :silence` to completely ignore Rails runtime deprecations *twinturbo*
9608395 Document #behavior= and update CHANGELOG
twinturbo authored
286
946875d @mjtko Consistent CHANGELOG entry indentation.
mjtko authored
287 * Make Module#delegate stop using `send` - can no longer delegate to private methods. *dasch*
1d48e50 @dasch Add changelog entry
dasch authored
288
946875d @mjtko Consistent CHANGELOG entry indentation.
mjtko authored
289 * AS::Callbacks: deprecate `:rescuable` option. *Bogdan Gusiev*
10bac29 @bogdan AS::Callbacks: deprecate rescuable option
bogdan authored
290
946875d @mjtko Consistent CHANGELOG entry indentation.
mjtko authored
291 * Adds Integer#ordinal to get the ordinal suffix string of an integer. *Tim Gildea*
a470d79 @vijaydev Document Integer#ordinal available in PR #2072.
vijaydev authored
292
946875d @mjtko Consistent CHANGELOG entry indentation.
mjtko authored
293 * AS::Callbacks: `:per_key` option is no longer supported
4f53091 @bogdan AS::Callbacks: rip out per_key option.
bogdan authored
294
946875d @mjtko Consistent CHANGELOG entry indentation.
mjtko authored
295 * `AS::Callbacks#define_callbacks`: add `:skip_after_callbacks_if_terminated` option.
7661955 @bogdan AS::Callbacks: :skip_after_callbacks_if_terminated option
bogdan authored
296
946875d @mjtko Consistent CHANGELOG entry indentation.
mjtko authored
297 * Add html_escape_once to ERB::Util, and delegate escape_once tag helper to it. *Carlos Antonio da Silva*
608eddc @carlosantoniodasilva Move escape_once logic to ERB::Util, where it belongs to
carlosantoniodasilva authored
298
946875d @mjtko Consistent CHANGELOG entry indentation.
mjtko authored
299 * Deprecates the compatibility method Module#local_constant_names,
300 use Module#local_constants instead (which returns symbols). *fxn*
04df7bb @fxn deprecates Module#local_constant_names
fxn authored
301
946875d @mjtko Consistent CHANGELOG entry indentation.
mjtko authored
302 * Deletes the compatibility method Module#method_names,
303 use Module#methods from now on (which returns symbols). *fxn*
748725e @fxn removes the compatibility method Module#method_names
fxn authored
304
946875d @mjtko Consistent CHANGELOG entry indentation.
mjtko authored
305 * Deletes the compatibility method Module#instance_method_names,
306 use Module#instance_methods from now on (which returns symbols). *fxn*
40bda76 @fxn removes the compatibility method Module#instance_method_names
fxn authored
307
946875d @mjtko Consistent CHANGELOG entry indentation.
mjtko authored
308 * BufferedLogger is deprecated. Use ActiveSupport::Logger, or the logger
309 from Ruby stdlib.
572c3d5 @tenderlove * BufferedLogger is deprecated. Use ActiveSupport::Logger, or the lo…
tenderlove authored
310
946875d @mjtko Consistent CHANGELOG entry indentation.
mjtko authored
311 * Unicode database updated to 6.1.0.
27bf1b1 @norman Added note about new Unicode version.
norman authored
312
946875d @mjtko Consistent CHANGELOG entry indentation.
mjtko authored
313 * Adds `encode_big_decimal_as_string` option to force JSON serialization of BigDecimals as numeric instead
314 of wrapping them in strings for safety.
18aa1ae @davout BigDecimal string wrapping in JSON serialization can now be opted-out…
davout authored
315
1f5dddc Remove deprecated ActiveSupport::JSON::Variable.
Erich Menge authored
316 * Remove deprecated ActiveSupport::JSON::Variable. *Erich Menge*
317
3785272 @bdurand Optimize log subscribers to check if the log level is sufficient befo…
bdurand authored
318 * Optimize log subscribers to check log level before doing any processing. *Brian Durand*
319
810a50d @fxn CHANGELOGs are now per branch
fxn authored
320 Please check [3-2-stable](https://github.com/rails/rails/blob/3-2-stable/activesupport/CHANGELOG.md) for previous changes.
Something went wrong with that request. Please try again.