Commit Graph

1464 Commits

Author SHA1 Message Date
José Valim
38ab982cff Log 'Filter chain halted as CALLBACKNAME rendered or redirected' every time a before callback halts. 2011-11-30 09:53:09 +01:00
Aaron Patterson
d9c2882077 Module#synchronize is deprecated with no replacement. Please use monitor from ruby's standard library. 2011-11-29 15:40:46 -08:00
Yehuda Katz
3c81fc3b91 Merge pull request #3767 from tadast/object_in
Object#in? also accepts multiple parameters
2011-11-26 18:10:48 -08:00
Tadas Tamošauskas
ebf69ab163 Object#in? also accepts multiple parameters 2011-11-26 23:51:09 +00:00
Vijay Dev
d157ca881b add more tests for monday and sunday methods 2011-11-26 23:53:57 +05:30
Arun Agrawal
cd6c5677fb Tests added for monday and sunday
Reference commits : 
a8f2860d0e7db86c61bb70935006100b04667ab1
80ac4dc6d0632937ccf61b38bc15fc2f6e27b18b
2011-11-26 23:37:01 +05:30
gregolsen
3f1a4c3415 beginning_of_week extended in both Time and Date so that to return week start based on start day that is monday by default 2011-11-25 12:02:49 -08:00
José Valim
7fcc8c0a1f Rely solely on active_model_serializer and remove the fancy constant lookup. 2011-11-23 23:45:27 +00:00
José Valim
0536ea8c78 Add safe_constantize to ActiveSupport::Dependencies. 2011-11-23 21:43:03 +00:00
José Valim
3ee0116c94 Optimize cache expansion by skipping rails cache id in nested keys. 2011-11-23 18:22:09 +00:00
Olek Janiszewski
a650dd05f8 Fix #3737 AS::expand_cache_key generates wrong key in certain situations (part 2)
`nil` and `false` both expand to `""` (empty string), while `true` expands to
`"true"`; `false` should expand to `"false"`
2011-11-23 18:11:38 +01:00
Olek Janiszewski
d8e6dc9cf1 Fix #3737 AS::expand_cache_key generates wrong key in certain situations
`cache_key` method is never called when the argument is a 1-element array
with something that responds to `cache_key`
2011-11-23 18:06:16 +01:00
Yehuda Katz
a93ee92da2 Merge pull request #3725 from marcandre/twz_eql
Fix inconsistencies with Time{WithZone}#{hash,eql?}
2011-11-22 13:01:37 -08:00
Marc-Andre Lafortune
a4912078c7 Fix inconsistencies with Time{WithZone}#{hash,eql?} 2011-11-22 15:37:16 -05:00
Xavier Noria
8f57bf207f tests predicates according to the boolean interpretation of their return value, not expecting specifically true or false
Respecting Genuine assert_equal false Edition
2011-11-21 14:22:16 -08:00
José Valim
401393b656 Deprecate InstanceMethods namespace handling in ActiveSupport::Concern.
This avoids the unnecessary "yo dawg, I heard you like include, so I put a module that includes your module when it is included" approach when building extensions.
2011-11-21 22:17:35 +00:00
Xavier Noria
f312e2142b Revert "tests predicates according to the boolean interpretation of their return value, not expecting specifically true or false"
Reason: there were some genuine tests for false when
reading values, going to revise those ones.

This reverts commit a539a5e3f3be68f027d3dfe43f88dc9f0642c743.
2011-11-21 14:14:11 -08:00
Xavier Noria
a539a5e3f3 tests predicates according to the boolean interpretation of their return value, not expecting specifically true or false 2011-11-21 14:11:40 -08:00
Xavier Noria
f3554777b2 cache entry: options[:compressed] is a regular flag, no need for !! 2011-11-21 14:01:53 -08:00
Vijay Dev
83bf0b626c refactor test_multiple_of 2011-11-16 02:36:36 +05:30
José Valim
a625523e75 Don't marshal dump twice when using encryptor. 2011-11-09 20:21:52 -02:00
José Valim
71e84a3b51 Deprecated ActiveSupport::MessageEncryptor#encrypt and decrypt. 2011-11-09 20:04:42 -02:00
Aaron Patterson
6a29ea04ae Merge pull request #3549 from luckydev/rmethod
remove_method tests and changes
2011-11-07 03:02:26 -08:00
Anand
aabd61af8e added remove_method core_ext tests 2011-11-07 16:22:52 +05:30
Henrik Hodne
9a7d916ceb Removed argument throwing warnings when running tests.
The last argument to DateTime.new/civil is the Julian day number for
when the calendar reform occured. DateTime ignores it if it's 0, and
sets it to the default of DateTime::ITALY instead, so we could just
leave it out. This also removes the warnings while running the
ActiveSupport tests (there still are some for the setup though).
2011-11-06 17:35:02 +01:00
Pavan Kumar Sunkara
1934b77406 Added the test case for #3537 2011-11-06 19:22:46 +05:30
Xavier Noria
d287e90870 implements AS::Notifications.subscribed, which provides subscriptions to events while a block runs 2011-11-05 12:02:54 -07:00
Vijay Dev
55621504b0 make class name consistent with the filename 2011-11-05 22:31:39 +05:30
Xavier Noria
11f6795b23 defines Module#qualified_const_(defined?|get|set) and String#deconstantize
This commit also implements a faster version of #demodulize I was unable
to isolate with git add --patch.

Not a big fan of the name #deconstantize. It complements #demodulize
getting rid of the rightmost constant, hence the name, but it is
unrelated to the well-known #constantize. So unsure. Could not come
with anything better, please feel free to rename.
2011-10-29 18:10:45 -07:00
Xavier Noria
0fc531392d let demodulize do less work, and add tests
This is also faster on 1.9.
2011-10-29 01:07:54 -07:00
José Valim
771ca79f74 Revert "Merge pull request #3395 from bdurand/fix_file_store_cleanup"
Tests were failing on Travis-CI.

This reverts commit 79d01a8f16e20c556a086a2f07e3ccb4400f9819, reversing
changes made to b838570bd69ff13d677fb43e79f10d6f3168c696.
2011-10-25 22:23:25 +02:00
Arun Agrawal
b6fc41275c Unused variable removed 2011-10-24 21:56:27 +05:30
José Valim
79d01a8f16 Merge pull request #3395 from bdurand/fix_file_store_cleanup
Fix ActiveSupport::Cache::FileStore.cleanup to actually work.
2011-10-21 12:42:06 -07:00
Brian Durand
ec93f363ca Fix ActiveSupport::Cache::FileStore.cleanup to actually work. 2011-10-21 13:28:24 -05:00
Brian Durand
d565fda5f2 Fix threading issues with BufferedLogger. 2011-10-21 12:43:52 -05:00
Arun Agrawal
c495cbcda9 Checking blank if tag might coming nil or blank
In log it should not show the empty array.
2011-10-21 16:11:09 +05:30
José Valim
6c126015a6 Ensure TaggegLogging is thread safe. 2011-10-19 22:26:56 +02:00
David Heinemeier Hansson
afde6fdd5e Added X-Request-Id tracking and TaggedLogging to easily log that and other production concerns 2011-10-19 12:59:33 -05:00
José Valim
59d6df5c69 Merge pull request #3151 from zenprogrammer/pluralize_without_count
Added include_count parameter to pluralize.
2011-10-17 07:02:39 -07:00
Yasuo Honda
281b8caf80 Fixed test_nonexisting_method_with_arguments to revert commit 29a5aea 2011-10-06 07:44:48 -04:00
José Valim
82d41c9698 Revert "don't raise NoMethodError the tried method doesn't exists"
This reverts commit 29a5aeaae976bf8432d57ec996c7c81932a39de6.
2011-10-06 00:37:15 +02:00
Jeremy Kemper
c10fcd2637 Merge pull request #2801 from jeremyevans/patch-1
Fix obviously breakage of Time.=== for Time subclasses
2011-10-03 10:53:09 -07:00
Christian Höltje
bb5e295d94 Rescuable spelling error 2011-10-03 10:15:31 -04:00
Philippe Huibonhoa
119a484e80 Improved testing so that it tests the real functionality and not the private method. 2011-10-02 01:39:52 -07:00
Philippe Huibonhoa
0baa8f8604 Added fix so that file store does not raise an exception when cache dir does not exist yet. This can happen if a delete_matched is called before anything is saved in the cache. 2011-09-29 18:59:40 -07:00
Ryan Oblak
4535191c61 Modified String#pluralize to take an optional count parameter. 2011-09-28 12:24:06 -07:00
José Valim
b2f34d1e35 Ensure that constantize just rescues NameError that applies to the constant being currently loaded. 2011-09-23 16:21:49 +02:00
Ryan Oblak
310565f537 Added ActiveSupport::Inflector.safe_constantize and String#safe_constantize; refactored common constantize tests into ConstantizeTestCases 2011-09-23 15:36:33 +02:00
Santiago Pastorino
855184c468 Merge pull request #3096 from phuibonhoa/master
FileStore key_file_path does not properly limit filenames to 255 characters
2011-09-22 10:03:54 -07:00
Philippe Huibonhoa
a0352a425f Updated existing test that fails with this fix (8d63678d1406c5518d437709af0fde717c0248d7). Before the fix the test was giving a false positive, because file_store.key_file_path would return an empty filename (i.e. test/tmp_cache/4D0/F4D rather than test/tmp_cache/4D0/F4D/xxxx…).
Even though the fix referenced above divides the filename into directories to prevent it from being too long, it seems that 1000 characters will always raise an error, so reducing the key size to 900).
2011-09-21 21:03:59 -07:00