Commit Graph

2100 Commits

Author SHA1 Message Date
Santiago Pastorino
cebe5c2fac It's not needed to initialize the attr when calling mattr_writer 2010-07-18 06:06:58 +08:00
Aaron Patterson
606d8fdfc8 drained? is never called 2010-07-17 14:45:59 -07:00
Aaron Patterson
fa73e777a1 private method is not needed 2010-07-17 14:44:29 -07:00
Aaron Patterson
4226c93779 removing Binding class 2010-07-17 14:35:44 -07:00
Aaron Patterson
9c80f5b391 use === to avoid regular expression creation, and speed up string comparison 2010-07-17 13:14:38 -07:00
wycats
16bae77c56 Revert "Improve performance of MessageVerifier while keeping it constant time"
This reverts commit 8b05c5207dd5757d55d0c384740db289e6bd5415.
2010-07-13 16:13:54 -07:00
Benjamin Quorning
7e075e6247 Fixed many references to the old config/environment.rb and Rails::Initializer 2010-07-13 13:00:21 +02:00
Xavier Noria
2f04c87855 Merge remote branch 'docrails/master' 2010-07-09 22:08:24 +02:00
Jaime Iniesta
c6f4c5916e Minor typos: 'built-in' instead of 'built in', 'built into' instead of 'built in to' 2010-07-09 17:53:47 +02:00
Norman Clarke
6f83a57ac7 Improve bang method defs, make slice! operate in-place. [#5028 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-07-08 22:59:24 +02:00
José Valim
a5dda97602 Define a convention for descendants and subclasses.
The former should be symmetric with ancestors and include all children. However, it should not include self since ancestors + descendants should not have duplicated. The latter is symmetric to superclass in the sense it only includes direct children.

By adopting a convention, we expect to have less conflict with other frameworks, as Datamapper. For this moment, to ensure ActiveModel::Validations can be used with Datamapper, we should always call ActiveSupport::DescendantsTracker.descendants(self) internally instead of self.descendants avoiding conflicts.
2010-07-05 13:01:27 +02:00
Santiago Pastorino
5bf3294c8b Move Date#xmlschema to conversions and add a missing require 2010-07-04 14:10:28 -07:00
Santiago Pastorino
f6d7a4d251 Removes the dependency that AMo has on tzinfo
[#4979 state:committed]
2010-07-03 02:26:18 -03:00
Santiago Pastorino
201f373e7a Refactor move some date, time and date_time methods to */zones and fixed some requires 2010-07-03 02:13:44 -03:00
Santiago Pastorino
8cc746331c Time#formatted_offset is defined in core_ext/time/conversions
[#4979]
2010-07-02 20:22:35 -07:00
Geoff Buesing
227e1caea5 Time#as_json: use Time#formatted_offset instead of strftime %z directive, which is non-standard and inaccurate on some platforms (e.g., Mac OS X).
[#4979]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-07-02 11:50:16 -07:00
Santiago Pastorino
cb321546b7 Time has it own implementation of xmlschema, now AMo doesn't depend on TZInfo
[#4979 state:committed]

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-07-02 01:51:03 +02:00
Santiago Pastorino
4a0c514eb4 AS json refactor, move to_json implementation to core_ext and a cleanup a bit the code 2010-07-01 12:04:11 -07:00
José Valim
53b34e8476 Avoid calls to Rails::Application since this is not the official API.
Your application should *always* reference your application const (as Blog::Application) and Rails.application should be used just internally.
2010-07-01 18:43:44 +02:00
Cyril Mougel
9024545a6b fix failure if behavior is not define and try use the default
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-07-01 12:17:21 +02:00
José Valim
e596a8e14c Add the possibility to have several behaviors in AS::Deprecation. 2010-07-01 10:26:45 +02:00
Xavier Noria
c63cf7bf0d Merge remote branch 'rails/master' 2010-06-30 20:47:26 +02:00
bodhi
2eaae1f50b add note of which configuration option to set in deprecation warning message [#5012 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-30 16:58:05 +02:00
José Valim
9ab8cfc21a Improve the idiom used in multibyte chars a bit. 2010-06-30 15:01:23 +02:00
Alex Muntean
265b7c5edf Fix ActiveSupport::Multibyte::Chars#slice for empty strings when starting offset is negative [#4717 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-30 15:00:55 +02:00
Norman Clarke
4dbb6e3ff0 Update Unicode database to 5.2.0. [#5011 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-30 13:22:35 +02:00
James MacAulay
16cef77d37 Fix AS::MB::Chars#+ to not alter self [#4646 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-30 13:22:28 +02:00
Gonçalo Silva
68bd46ffb9 performance tests now working accurately on 1.9, using Ruby with the GCdata patch 2010-06-29 17:12:37 -07:00
wycats
d4c7d3fd94 Create a deprecation behavior that triggers a notification for deprecation notices, and make the behaviors independent of the environment names.
* In Rails 2.3 apps being upgraded, you will need to add the deprecation
  configuration to each of your environments. Failing to do so will
  result in the same behavior as Rails 2.3, but with an outputted warning
  to provide information on how to set up the setting.
* New Rails 3 applications generate the setting
* The notification style will send deprecation notices using
  ActiveSupport::Notifications. Third-party tools can listen in to
  these notifications to provide a streamlined view of the
  deprecation notices occurring in your app.
* The payload in the notification is the deprecation warning itself
  as well as the callstack from the point that triggered the
  notification.
2010-06-29 12:20:15 -07:00
Santiago Pastorino
b2633f9f93 Don't store incorrect values in zones_map
[#4942 state:committed]

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-28 19:35:33 +02:00
Thiago Pradi
0175c470c0 Documentation for Array#sample 2010-06-28 13:31:57 -03:00
Santiago Pastorino
6cc29ab65f Implemented getbyte as an aliased method and RDoc added
Signed-off-by: Xavier Noria <fxn@hashref.com>
2010-06-28 01:45:57 +02:00
Santiago Pastorino
cfb38319bc Makes more sense to ask about method_defined?
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-28 01:26:01 +02:00
Santiago Pastorino
a822ce78b3 String#[] doesn't return the byte representation on 1.9.2, we should use getbyte that was already added as a Ruby < 1.9 core_ext
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-27 20:30:29 +02:00
Santiago Pastorino
fa96638bf2 Added getbyte as a core_ext to Ruby < 1.9
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-27 20:30:24 +02:00
Santiago Pastorino
926ca9c102 Load JSON additions (as to_json) on active_support/all.
[#4730 state:committed]

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-26 21:15:18 +02:00
Santiago Pastorino
51be8dbded Move constantize from conversions to inflections.
This removes ActiveModel dependency on TZInfo.

[#4979 state:committed]

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-26 20:49:30 +02:00
chaitanyav
9958950f78 Add OrderedHash#invert to preserve order in ruby 1.8 [#4875]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-26 12:05:25 +02:00
José Valim
7bd85a8fc2 Work around the fact the JSON gem was overwriting to_json implementation for all Ruby core classes.
This is required because the JSON gem is incompatible with Rails behavior and was not allowing ActiveModel::Errors to be serialized.
So we need to ensure Rails implementation is the one triggered. [#4890 state:resolved]
2010-06-26 12:01:13 +02:00
Norman Clarke
cfaaed3f40 Move some methods into 1.8.x-only proxy. [#4978 state:resolved]
These methods had been overridden because they had bugs on 1.9.1.  Since
Rails now supports only 1.9.2, and these methods now work properly on
that version, there's no longer any need to override them.

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-26 10:16:37 +02:00
rohit
cae33c4158 Remove previously defined class method logger to supress warnings in Active Support test suites. [#4618 state:open]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-26 00:27:31 +02:00
Paul Mucur
158e22dae0 Alias ActiveSupport::OrderedHash#update to ActiveSupport::OrderedHash.merge!
This ensures that an OrderedHash's keys are set up appropriately when using update.

[#4973 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-06-25 15:02:20 -07:00
Nick Sieger
b549d93d2f AS::Isolation functional on Windows/JRuby.
Doesn't make up for the fact that it's slooooooooow, though.

Signed-off-by: wycats <wycats@gmail.com>
2010-06-24 09:10:58 -07:00
José Valim
6788db824a Move Rails::LogSubscriber to ActiveSupport::LogSubscriber, allowing frameworks like ActiveRecord and ActiveResource to log outsude Rails::Application [#4816 state:resolved] 2010-06-24 13:23:43 +02:00
José Valim
69abbe8934 Avoid using Pathname on Resolver and AS::Dependencies. 2010-06-24 01:06:37 +02:00
Xavier Noria
6f83a5036d renames load_(once_)paths to autoload_(once_)paths in dependencies and config 2010-06-24 00:17:28 +02:00
Prem Sichanugrist
6c4bab306a Missing require for the class/attribute.rb [4812 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-22 17:18:28 +02:00
David Calavera
b8330a2261 preventing memcached initialization errors with default servers list [#4921 state:resolved]
As of this writing the JRuby client does not support a default port.

Signed-off-by: Xavier Noria <fxn@hashref.com>
2010-06-22 16:28:29 +02:00
Josh Kalderimis
fd03f1738e removed default Formatter in logger, not needed with 1.8.7 upwards
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-22 01:19:02 +02:00
Josh Kalderimis
dad71c6099 removed 'unless const_defined?' code smell
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-21 23:34:45 +02:00