Josh Kalderimis
1a73407b85
Corrected the html_safe implementation for Array. Moved the html safe version of join to its own method (safe_join) as not to degrade the performance of join for unrelated html_safe use. [ #6298 state:resolved]
2011-02-10 23:47:54 +08:00
Paul Hieromnimon
f7221f5c75
Initial html_safe implemention for Array
2011-02-10 23:47:53 +08:00
Aaron Patterson
37efb517cb
fanout unsubscribe only accepted one argument, so taking *args here is probably bad
2011-02-09 14:33:56 -08:00
Aaron Patterson
3e02b3702e
just use an attr_accessor so we do not pay ||= on every notification call
2011-02-09 14:02:38 -08:00
Aaron Patterson
e50d43a201
fixing indentation
2011-02-09 13:47:32 -08:00
Aaron Patterson
3d0579fc03
speed up notification publishing by writing the delegate method
2011-02-09 13:46:47 -08:00
Santiago Pastorino and Emilio Tagua
0faa7ee2a0
Add missing require
2011-02-09 08:36:44 -02:00
Josh Kalderimis
3eb25fb880
fix for AS Gzip returning a UTF-8 string in Ruby 1.9 when it is actually binary [ #6386 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com>
2011-02-09 10:27:01 +01:00
Aaron Patterson
51414a0893
use === so that regular expressions are not required
2011-02-08 10:48:01 -08:00
Aaron Patterson
1df3b65acc
use === so that regular expressions are not required
2011-02-08 10:42:03 -08:00
Aaron Patterson
60da34b4be
notifier should be saved and re-set, not deleted
2011-02-07 14:35:11 -08:00
wycats
1fd9d978a7
Add initial FileWatcher implementation. The Backend is just an abstract implementation, which will be inherited by backends that do the heavy lifting.
2011-02-06 13:42:22 -08:00
Xavier Noria
8b5dc9caa5
Merge branch 'master' of git://github.com/lifo/docrails
2011-02-05 19:47:08 +01:00
Santiago Pastorino
78d23edf9a
Remove stupid mistake
2011-02-04 21:49:56 -02:00
Santiago Pastorino
da2d24f7cf
git am is better here
2011-02-04 21:36:10 -02:00
Brian Morearty
3a29bfae2c
Change Time.zone= docs.
...
Update the example to show how to reset the current thread's
Time.zone upon exiting a request.
2011-02-04 09:10:07 -08:00
Santiago Pastorino
092a4e296d
just < 1.9 is fine and 1.9.1 is not supported
2011-02-03 19:27:43 -02:00
Gabriel Horner
c0b4db0c28
fix OrderedHash#each* methods to return Enumerators when called without a block [ #6366 state:resolved]
...
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2011-02-03 19:26:36 -02:00
John Firebaugh
080345baca
Ruby 1.8.7+ provides to_date/to_datetime, AS just makes them public.
...
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2011-02-03 13:12:03 -02:00
John Firebaugh
bf0395837f
Preserve fractional seconds in DateTime#to_time
...
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2011-02-03 13:11:56 -02:00
Santiago Pastorino
434aa09560
Fix tests providing valid JSON
2011-02-02 20:53:03 -02:00
Maxime RETY
68e3fb8109
Fix JSON decoding of newline character with Yaml backend [ #3479 state:resolved]
...
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2011-02-02 18:57:48 -02:00
Gabriel Horner
9a0f43d3c1
OrderedHash#each* methods return self like Hash does [ #6364 state:resolved]
...
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2011-02-02 13:40:36 -02:00
Saimon Moore
c2aca3ddd7
Ensure I18n setup is only executed once if triggered on eager loading [ #6353 state:resolved]
...
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2011-02-01 15:36:09 -02:00
Saimon Moore
b1ca339b53
Additionally trigger i18n configuration setup before any eager loading [ #6353 state:resolved]
...
This handles the case where config.cache_classes is true and classes
are loaded before the I18n load path has had a chance to be populated.
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2011-02-01 15:35:48 -02:00
John Firebaugh
57bc25c5f8
Use run_callbacks; the generated _run_<name>_callbacks method is not a public interface.
...
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2011-01-31 19:45:53 -02:00
Aaron Patterson
c87fb22a06
make sure we play nicely when syck is activated
2011-01-28 15:00:52 -08:00
brainopia
eb33bd944d
Psych correctly gets visitor for SafeBuffer from superclass
2011-01-28 14:32:53 -08:00
brainopia
452dba72f5
Remove unneeded yaml_as declaration
2011-01-28 14:31:36 -08:00
Aaron Patterson
c29eef7da7
load psych by default if possible
2011-01-28 14:24:11 -08:00
Aaron Patterson
370bcd1a01
use ! " " YAML string literal syntax rather than removing both quotes
2011-01-21 14:09:59 -08:00
Aaron Patterson
7642b7531d
prefering psych as the yaml parser if possible, fixing assertions for YAML 1.1 compatibility
2011-01-21 11:16:40 -08:00
Aaron Patterson
2570c85cb7
fixing psych support in big decimal, fixing tests to support YAML 1.1
2011-01-21 11:16:40 -08:00
Xavier Noria
236f1f52cd
Merge branch 'master' of git://github.com/lifo/docrails
2011-01-20 10:33:38 +01:00
Aaron Patterson
36d6678690
removing usesless variable assignments
2011-01-18 15:52:56 -08:00
Nick Sutterer
7091d800b8
fixed a missing require that causes trouble when using AS in a non-rails env.
2011-01-18 23:28:51 +01:00
John Firebaugh
cc446eee99
Class.__subclasses__ was removed from Rubinius.
...
https://github.com/evanphx/rubinius/issues/issue/11
2fccbb5dad
2011-01-18 15:02:41 +08:00
Aaron Patterson
d780d1f508
ordering can change depending on ruby version, so parse the JSON and verify data structure equality
2011-01-17 16:06:55 -08:00
Alexey Nayden
a9163b547c
Complex struct encoding fix
...
[#6077 state:committed]
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2011-01-15 00:06:26 -02:00
Alexey Nayden
d2c17dbd11
Complex struct encoding test
...
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2011-01-15 00:06:17 -02:00
Neeraj Singh
b461fe76f4
editing comments regarding rescuable optoin in AS callbacks
2011-01-12 22:37:34 -05:00
Aaron Patterson
f2beb56c8b
fixing whitespace errors
2011-01-12 18:07:53 -08:00
Josh Kalderimis
199e220e88
Fixed various isolated test missing requires within AS.
...
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2011-01-12 12:37:28 -02:00
Josh Kalderimis
de18b85969
In AS, only inflector/methods is need in proxy_wrappers.rb, as well as date, date_time, and time conversions.rb. This fixes an issue when requiring json and AS saying that i18n is also required.
...
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2011-01-12 12:37:01 -02:00
Aaron Patterson
1cc556dc52
adding to_d to BigDecimal
2011-01-10 15:51:37 -08:00
John Firebaugh
726a66a7a4
Expand and clarify AS::Callbacks docs.
2011-01-09 10:00:15 -08:00
Nick Sutterer
7773c32400
corrected docs for Hash#to_xml and added examples.
2011-01-06 17:57:09 +01:00
Nick Sutterer
54f3aa8633
added tests for XmlMini#to_tag.
2011-01-06 17:56:22 +01:00
Aaron Patterson
5c66677987
make our yaml output consistent
2011-01-04 17:29:40 -08:00
Aaron Patterson
7bd32e4d1d
add Psych::SyntaxError to the list of rescued YAML exceptions
2011-01-04 16:52:47 -08:00
Aaron Patterson
4fabad7cf1
test that the custom ordered hash can be round-tripped
2011-01-04 15:07:15 -08:00
Aaron Patterson
a84b84efac
require Psych if possible, use Psych output when enabled
2011-01-04 15:07:15 -08:00
Aaron Patterson
b1dc9c004e
use dots for method calls
2011-01-04 15:07:15 -08:00
Jon Leighton
0619dc2319
Implement deprecated version of AssociationReflection#primary_key_name, which has been renamed to #foreign_key. Also bumping the deprecation_horizon in Active Support to 3.1.
2011-01-03 16:24:32 -08:00
Xavier Noria
99424eb099
Revert "Update CHANGELOGs to include 3.0.3 changes"
...
Reason: Sorry, CHANGELOGs can only be edited in master.
If you provide a patch I'll apply it myself. Thanks!
This reverts commit 1f8ecb85d7c1b3efdf45c3cf3461502b608c1a7c.
2011-01-02 00:20:59 +01:00
Prem Sichanugrist
1f8ecb85d7
Update CHANGELOGs to include 3.0.3 changes
2011-01-02 03:35:38 +07:00
Pratik Naik
0ac66caac5
Fix Duration#to_json
2010-12-29 22:20:14 +00:00
Neeraj Singh
27d0d4fffd
while defining callbacks option :rescuable => true
...
can be passed. There were no tests for this case.
This patch adds a test for :rescuable => true
option.
2010-12-29 05:32:23 +08:00
Xavier Noria
8a3132b8a9
Merge branch 'master' of git://github.com/lifo/docrails
2010-12-23 00:15:10 +01:00
Piotr Sarnacki
b613145284
Fix activesupport tests. These classes are not used anywhere
2010-12-22 09:44:46 +01:00
Piotr Sarnacki
1a2c427991
Ensure that uncountable are removed after test
2010-12-22 09:44:46 +01:00
John Paul Ashenfelter
9b4622a483
Added a word boundary to uncountable inflection regex for #singularize so short inflections like ors do not affect larger words like sponsors [ #6093 state:resolved]
2010-12-22 09:44:46 +01:00
Neeraj Singh
3c1a0a8b62
expand on set_callback method to explain that in
...
some cases an implicit :before is assumed
2010-12-21 15:45:50 -05:00
Ryan Bigg
1cacb08b21
Improve documentation on ActiveSupport::Deprecation.
2010-12-21 10:40:15 +10:00
Xavier Noria
880f8419c4
Merge branch 'master' of git://github.com/lifo/docrails
2010-12-20 20:13:34 +01:00
Emilio Tagua
02fc6fbccd
Merge remote branch 'rails/master' into identity_map
...
Conflicts:
activerecord/lib/active_record/associations/association_proxy.rb
activerecord/lib/active_record/autosave_association.rb
activerecord/lib/active_record/base.rb
activerecord/lib/active_record/persistence.rb
2010-12-20 11:23:07 -03:00
John Firebaugh
435bccda93
Replace AD::Callbacks.to_prepare with AD::Reloader.to_prepare
...
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-12-20 12:43:02 +01:00
zhengjia
ad14926b44
Fix the example in ActiveSupport::Concern
2010-12-17 18:54:57 -06:00
Pavel Gorbokon
1ce9b73e5c
Replace nested ifs with case/when
...
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2010-12-07 20:56:10 -02:00
Pavel Gorbokon
4c4c7a272f
Ommit nil in method call
...
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2010-12-07 20:55:39 -02:00
Xavier Noria
48386d245b
Merge branch 'master' of git://github.com/lifo/docrails
2010-12-05 10:33:50 +01:00
Ryan Bigg
7f1c794a11
Remove extra f
2010-12-03 13:29:02 +11:00
Santiago Pastorino
ae35a36afc
:method: is not needed when RDoc can detect it
2010-12-02 20:31:06 -02:00
Neeraj Singh
aa1ac1ca8c
Add comment for config_accessor method
2010-11-30 09:44:12 -05:00
Aditya Sanghi
8601f163a8
Merge branch 'master' of https://github.com/cylence/docrails into cylence-master
2010-11-29 21:36:43 +05:30
Aditya Sanghi
f28916194c
Resolves LH #6063 , should be :expires_in not :expire_in
2010-11-27 15:20:46 +05:30
José Valim
ce9456eca0
Only convert direct hash instances in hash with indifferent access.
2010-11-26 11:56:52 +01:00
raggi
cb1570936d
Rakefiles are executables, and rake loads rake, not rakefile code
2010-11-25 06:49:55 +08:00
raggi
d8692985fe
Don't depend on rubygems loading thread (for Mutex)
2010-11-25 06:47:27 +08:00
Josh Kalderimis
d7db6a8873
class inheritable attributes is used no more! all internal use of class inheritable has been changed to class_attribute. class inheritable attributes has been deprecated.
...
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-11-20 19:40:29 +01:00
José Valim
8d8062190d
I18n is always loaded on boot by Active Model or Action Pack, so no need for supporting lazy hooks.
2010-11-20 19:39:57 +01:00
Xavier Noria
206e48e8b9
applies API conventions to the RDoc of json_encode
...
* Examples running with the text are preferred over separate Example
sections.
* No need to call puts, in # => we show the return value, not STDOUT.
* Say explicitly that double quotes are removed.
* Specify that we are talking \uXXX, rather than, say, HTML entities.
2010-11-20 16:20:42 +01:00
Emilio Tagua
a84add0c2c
We don't need to dup key, since only value is weak.
2010-11-19 19:08:58 -03:00
Emilio Tagua
4da31d21bc
Add initial tests for WeakHash.
2010-11-19 19:08:42 -03:00
Emilio Tagua
0873d1e944
Use conditional to avoid warnings.
2010-11-19 19:08:28 -03:00
Emilio Tagua
ada014929b
Use ActiveSupport::WeakHash for MRI, JRuby prefers Weakling.
2010-11-19 19:08:28 -03:00
Xavier Noria
cb8f7a1156
removes orphan tests, custom String#% was removed from AS in 39d6f9e
2010-11-19 18:24:58 +01:00
Santiago Pastorino
52b71c01fd
Revert "Quick fix for not escaping []s (not ideal)"
...
According to http://www.ietf.org/rfc/rfc2616.txt and
http://tools.ietf.org/rfc/rfc3986.txt [ and ] are reserved characters
and should be escaped using "%" HEX HEX
This reverts commit 856d2fd874d72dd9f83204affff4edfef3308361 and
1ee9b40b18a0bed5bb10a0785f7e2730bac983f6..
2010-11-18 23:31:00 -02:00
Josh Kalderimis
ae44bf7c7e
bye bye extlib_inheritable_*, AS callbacks now using class_attribute
...
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-11-18 00:38:51 +01:00
Carl Lerche
ccd2f3ede5
Update the version.rb files to include a PRE part
2010-11-16 17:19:46 -08:00
Aaron Patterson
254b0a4bbb
using a merge with a Hash[] rather than a loop to add SAX parsed attributes
2010-11-16 10:09:42 -08:00
raggi
e6d14279b8
Add support for try to just yield the object to a block if no method is to be called. Kind of like a tap_if_present.
2010-11-14 17:23:44 +08:00
Larry Sprock
f43e5d160b
HashWithIndifferentAccess should not change the subclass of an array
2010-11-14 17:14:47 +08:00
José Valim
f912a359aa
Merge remote branch 'drogus/plugin_new'
...
Conflicts:
railties/test/generators/app_generator_test.rb
2010-11-11 19:39:21 +01:00
Santiago Pastorino
2651a87a33
Duck typing here
2010-11-11 01:33:27 -02:00
Alvaro Bautista
5dc7f34dca
Fix ActiveSupport::TimeWithZone#localtime method with DateTime
...
[#5344 state:committed]
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2010-11-11 01:30:28 -02:00
Santiago Pastorino
c20838596b
Remove unused method
2010-11-10 16:57:12 -02:00
Denis Odorcic
b961c6c158
Remove useless cgi
...
[#5943 state:committed]
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2010-11-10 16:43:26 -02:00
Xavier Noria
41366cdec6
syncs CHANGELOGs for 3.0.2 in 3-0-stable with the ones in master
2010-11-09 20:56:41 +01:00
Santiago Pastorino
4e0477c9b7
Test cache.key_file_path with separators ht. Jim Wilson [ #5611 ]
2010-11-07 20:02:14 -02:00