David Heinemeier Hansson
18dbfcb363
Programatically define the log level methods and use the Logger constants instead (SyslogLogger didnt define them as I expected)
2011-10-19 14:54:00 -05: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 29a5aeaae9
.
2011-10-06 00:37:15 +02:00
Akira Matsuda
87eab595d8
ruby193: String#prepend is also unsafe
2011-10-05 15:26:29 +09:00
Akira Matsuda
9c4fe308b6
override unsafe methods only if defined on String
2011-10-05 15:26:28 +09:00
Ayrton De Craene
02b0f8d9ff
to_formatted_s is an instance method for a Range not an Array
2011-10-04 15:21:23 +03: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
José Valim
1efe41dc36
Merge pull request #3174 from phuibonhoa/master
...
Fixed file store to handle delete_matched being called before cache dir is created.
2011-10-02 02:30:44 -07: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
José Valim
37b9594a8e
Set the default options value for as_json in the encoder object.
2011-09-30 12:45:36 +02:00
Nicolás Hock Isaza
da914fa35c
Fixing `as_json` method for ActiveRecord models.
...
When you've got an AR Model and you override the `as_json` method,
you should be able to add default options to the renderer, like this:
class User < ActiveRecord::Base
def as_json(options = {})
super(options.merge(:except => [:password_digest]))
end
end
This was not possible before this commit. See the added test case.
2011-09-29 21:44:23 -05: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
Alexey Vakhov
f916474962
remove superfluous to_s in ERB::Util.html_escape
2011-09-24 23:27:06 +04:00
Ryan Oblak
06634f44d0
Minor doc fix to String#constantize
2011-09-23 10:21:34 -07:00
José Valim
36699977f2
Update CHANGELOG for safe_constantize.
2011-09-23 16:49:05 +02:00
José Valim
e8987c30d0
Use safe_constantize where possible.
2011-09-23 16:46:33 +02: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
667ef57de6
No need to create a range object
2011-09-22 14:14:24 -03: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 ( 8d63678d14
). 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
Philippe Huibonhoa
8d63678d14
Fixed issue in file store where it could create a filename that was too long for the file system. ( https://github.com/rails/rails/issues/3072 )
2011-09-21 21:00:46 -07:00
Vijay Dev
8aa537c945
fix incorrect comment
2011-09-22 02:13:04 +05:30
brainopia
8e3d26733b
Fix test to reflect use of to_param for keys
2011-09-18 23:37:27 +04:00
Santiago Pastorino
cb0dbe35b8
Merge pull request #3049 from brainopia/fix_to_query_edge_case
...
Fix Hash#to_query edge case with html_safe string on 1.8 ruby
2011-09-17 17:15:33 -07:00
Santiago Pastorino
18116791d0
Proper lines numbers for stack trace info
2011-09-16 17:28:52 -07:00
brainopia
3a04e370e4
Fix Hash#to_query edge case with html_safe string on 1.8 ruby
2011-09-16 22:59:16 +04:00
Claudio Poli
b0ae34ad72
Fix typo in deprecation notice
2011-09-16 19:54:48 +03:00
Peter Suschlik
c9aac2a215
Fix typo in deprecation warning.
2011-09-16 09:08:53 +03:00
Willem van Bergen
6d520803ee
Test deprecation warning when not using an options hash as second parameter.
2011-09-15 15:51:30 -04:00
Willem van Bergen
41fea03342
Use an options hash to specify digest/cipher algorithm and a serializer for MessageVerifier and MessageEncryptor.
2011-09-15 14:27:12 -04:00
Willem van Bergen
2d30d4cb88
Add some documentation for the new serializer property of MessageVerifier and MessageEncryptor.
2011-09-15 13:23:08 -04:00
Willem van Bergen
db040cdf8b
Implement API suggestions of pull request.
2011-09-15 13:15:21 -04:00
Willem van Bergen
a8aaef6762
Fixed tests so that they will also run properly in other timezones.
2011-09-15 09:50:39 -04:00
Willem van Bergen
bffaa888ac
Custom serializers and deserializers in MessageVerifier and MessageEncryptor.
...
By default, these classes use Marshal for serializing and deserializing messages. Unfortunately, the Marshal format is closely associated with Ruby internals and even changes between different interpreters. This makes the resulting message very hard to impossible to unserialize messages generated by these classes in other environments like node.js.
This patch solves this by allowing you to set your own custom serializer and deserializer lambda functions. By default, it still uses Marshal to be backwards compatible.
2011-09-15 08:28:53 -04:00
Vijay Dev
823e16f57c
update 3.1 release date in changelogs
2011-09-14 22:46:12 +05:30
Semyon Perepelitsa
21b4244d41
Fix a typo in date
2011-09-12 20:53:10 +04:00
Vijay Dev
e05d4cea69
revert the changes from c60995f3
- related to marking sub,gsub as unavailable to use with safe strings
2011-09-09 01:05:07 +05:30
Xavier Noria
9987f1e34d
delete the CHANGELOG entry re SafeBuffer and sub/gsub, since it has been reverted
2011-09-08 21:28:17 +02:00
José Valim
6b010c2690
Revert removing gsub and sub from safe buffer.
2011-09-08 20:54:30 +02:00
Xavier Noria
d1d51077d5
mention the issue number for future reference
2011-09-08 05:22:02 -07:00
Xavier Noria
fb84450209
registers removal of sub and friends for safe strings in the CHANGELOG
2011-09-08 05:13:56 -07:00
Xavier Noria
827fcf453e
this should have gone with the previous commit
2011-09-08 05:02:47 -07:00
Xavier Noria
f7627de206
copy-edits a couple of exception messages
...
"Safe Buffer" should either be the constant with the class name,
or go in lower case. I've chosen to follow the same terminology
that is used in the AS core extensiong guide, "safe string",
though "safe buffer" is also used elsewhere, we should pick one.
2011-09-08 04:56:31 -07:00
Damien Mathieu
c60995f31d
better method documentation on disable safe string methods
2011-09-08 11:27:31 +02:00
Damien Mathieu
3718ccd2a6
remove support of symbols on classify and camelize
2011-09-08 10:22:21 +02:00