Commit Graph

2945 Commits

Author SHA1 Message Date
Xavier Noria
173eacadf1 adds deprecation warnings to the RDoc of Array#uniq_by(!) 2011-12-20 08:08:27 -08:00
Vijay Dev
1a18198af0 remove conflict marker 2011-12-23 01:08:53 +05:30
Aaron Patterson
367741ef22 Revert "Added Enumerable#pluck to wrap the common pattern of collect(&:method) *DHH*"
This reverts commit 4d20de8a50d889a09e6f5642984775fe796ca943.

Conflicts:

	activesupport/CHANGELOG.md
	activesupport/lib/active_support/core_ext/enumerable.rb
	activesupport/test/core_ext/enumerable_test.rb
2011-12-22 12:21:18 -07:00
José Valim
e003bafc11 Merge pull request #4135 from nashby/deprecate-uniq-by
deprecate Array#uniq_by and Array#uniq_by!
2011-12-22 09:22:32 -08:00
Vasiliy Ermolovich
c4df2d0b6e deprecate Array#uniq_by and Array#uniq_by! in favor of Array#uniq and Array#uniq! from ruby 1.9 2011-12-22 19:34:39 +03:00
Sergey Nartimov
9d97173c5a no more need to make Time#to_date and Time#to_datetime public
they are public in actual 1.9 ruby version (tested at least in 1.9.2-p180)
2011-12-22 18:53:07 +03:00
José Valim
fa5adfb1e8 Update activesupport/lib/active_support.rb 2011-12-22 09:35:22 +01:00
Sergey Nartimov
4f6af26a88 remove AS whiny nil extension and deprecate config.whiny_nils 2011-12-22 10:28:36 +03:00
Vasiliy Ermolovich
7bfaa979e4 remove Proces.daemon from core_ext 2011-12-22 08:43:42 +03:00
José Valim
fccc952ccd Merge pull request #4104 from lest/remove-1-8-code
remove Enumerable#each_with_object from core_ext as it is present in ruby 1.9
2011-12-21 11:26:19 -08:00
Aaron Patterson
78ea731a76 Merge pull request #4097 from guilleiguaran/safebuffer-html-escape
We don't need a special html_escape for 1.8 anymore
2011-12-21 09:33:03 -08:00
lest
f1b4cacbae remove Enumerable#each_with_object from core_ext as it is present in ruby 1.9 2011-12-21 19:07:00 +03:00
lest
a57c6441a8 remove Kernel#singleton_class from core_ext as it is present in ruby 1.9 2011-12-21 18:53:38 +03:00
Vasiliy Ermolovich
c52ce1dae2 remove Array#sample from core_ext 2011-12-21 17:31:40 +03:00
Guillermo Iguaran
ba7ef5365e We don't need a special html_escape for 1.8 anymore 2011-12-21 08:34:25 -05:00
lest
55943873cd remove dead code as ruby 1.9.3 has Base64 module 2011-12-21 11:48:46 +03:00
Sergey Nartimov
b7cfd09466 remove support for ruby 1.8 in AS String extensions 2011-12-21 11:29:10 +03:00
Uģis Ozols
ee69ef62a8 Remove some of the ActiveSupport core extensions related to 1.8. 2011-12-21 09:29:59 +02:00
Sergey Nartimov
e7d827ec50 requiring enumerator is not nessessary in ruby 1.9 2011-12-20 21:14:57 +03:00
José Valim
fb1c06a694 Remove more dead code from AS. 2011-12-20 18:38:20 +01:00
José Valim
7ab4775106 Initial pass at removing dead 1.8.x code from Active Support.
There are a bunch of other implicit branches that adds
1.8.x specific code that still needs to be removed. Pull
requests for those cases are welcome.
2011-12-20 18:22:21 +01:00
Vijay Dev
500ca98fef Merge branch 'master' of github.com:lifo/docrails 2011-12-20 22:18:42 +05:30
David Heinemeier Hansson
632fa15fa4 rails/master is now 4.0.0.beta and will only support Ruby 1.9.3+ 2011-12-20 09:30:37 -06:00
José Valim
6a6fc4e1db Remove deprecations from Active Support. 2011-12-20 15:18:42 +01:00
Aaron Patterson
572c3d5178 * BufferedLogger is deprecated. Use ActiveSupport::Logger, or the logger
from Ruby stdlib.
2011-12-19 18:41:37 -08:00
David Heinemeier Hansson
9d6e52b55e Party like its R-C-UNO! 2011-12-19 18:34:57 -06:00
Semyon Perepelitsa
2aedb202c1 Fix syntax error in rdocs.
Ruby assumes curly braces in foo {} as a block, for hash we need to put parentheses or omit braces
2011-12-20 01:35:43 +08:00
José Valim
4f35d5a18b Merge pull request #4007 from exviva/expand_cache_key_for_one_element_array
Fix expanding cache key for single element arrays
2011-12-16 14:40:09 -08:00
Olek Janiszewski
abe915f237 Fix expanding cache key for single element arrays
In short:
expand_cache_key(element) should not equal expand_cache_key([element])

This way a fragment cache key for an index page with only a single
element in the collection is different than a fragment cache for a
typical show page for that element.
2011-12-16 17:58:25 +01:00
José Valim
1668b900b5 Merge pull request #3963 from lest/logger-missing-require
missing require in buffered logger
2011-12-13 02:33:05 -08:00
José Valim
80256abb39 FileUpdateChecker should be able to handle deleted files. 2011-12-13 11:23:21 +01:00
lest
d060d6d131 missing require in buffered logger 2011-12-13 12:36:32 +03:00
José Valim
1f5b9bbdb3 Clean up FileUpdateChecker API. 2011-12-13 10:07:02 +01:00
José Valim
ffa8bfeed9 Merge pull request #3954 from bdurand/null_store_2
Add ActiveSupport::Cache::NullStore for testing and development
2011-12-12 14:03:50 -08:00
José Valim
fa1d9a884c Speed up development by only reloading classes if dependencies files changed.
This can be turned off by setting `config.reload_classes_only_on_change` to false.

Extensions like Active Record should add their respective files like db/schema.rb and db/structure.sql to `config.watchable_files` if they want their changes to affect classes reloading.

Thanks to https://github.com/paneq/active_reload and Pastorino for the inspiration. <3
2011-12-12 22:54:04 +01:00
José Valim
62cda03fa8 Provide a dir => extension API to file update checker. 2011-12-12 22:54:04 +01:00
Brian Durand
04d5eae4e8 Add ActiveSupport::Cache::NullStore to expose caching interface without actually caching for development and test environments. 2011-12-12 13:40:29 -06:00
José Valim
9a51053c1d Update checker returns a boolean if callback was executed or not. 2011-12-12 19:41:17 +01:00
José Valim
57e0c038d6 Allow FileUpdateChecker to work with globs. 2011-12-12 14:57:09 +01:00
Jeremy Kemper
9147613ce0 Remove duplicate html_escape docs 2011-12-11 15:56:21 -07:00
Jeremy Kemper
63cd943226 Use 1.9 native XML escaping to speed up html_escape and shush regexp warnings
length      user     system      total        real
before  6      0.010000   0.000000   0.010000 (  0.012378)
after   6      0.010000   0.000000   0.010000 (  0.012866)
before  60     0.040000   0.000000   0.040000 (  0.046273)
after   60     0.040000   0.000000   0.040000 (  0.036421)
before  600    0.390000   0.000000   0.390000 (  0.390670)
after   600    0.210000   0.000000   0.210000 (  0.209094)
before  6000   3.750000   0.000000   3.750000 (  3.751008)
after   6000   1.860000   0.000000   1.860000 (  1.857901)
2011-12-11 15:51:43 -07:00
Miles Georgi
3d6eafe32e Overrode Hash#nested_under_indifferent_access in HashWithIndifferentAccess
to return self.
2011-12-11 13:08:50 -08:00
Aaron Patterson
4beaa9b839 Try to keep people from calling the deprecated flush method. 2011-12-10 16:31:59 -08:00
José Valim
cd7fbcbba8 Fix AS test suite. 2011-12-10 11:17:00 +01:00
Aaron Patterson
04ef93dae6 * ActiveSupport::BufferedLogger#silence is deprecated. If you want to squelch
logs for a certain block, change the log level for that block.

*   ActiveSupport::BufferedLogger#open_log is deprecated.  This method should
    not have been public in the first place.

*   ActiveSupport::BufferedLogger's behavior of automatically creating the
    directory for your log file is deprecated.  Please make sure to create the
    directory for your log file before instantiating.

*   ActiveSupport::BufferedLogger#auto_flushing is deprecated.  Either set the
    sync level on the underlying file handle like this:

        f = File.open('foo.log', 'w')
        f.sync = true
        ActiveSupport::BufferedLogger.new f

    Or tune your filesystem.  The FS cache is now what controls flushing.

*   ActiveSupport::BufferedLogger#flush is deprecated.  Set sync on your
    filehandle, or tune your filesystem.
2011-12-09 16:05:57 -08:00
Vijay Dev
94dcbe8115 fix nodocs 2011-12-09 01:15:54 +05:30
José Valim
d1abf29e79 Remove NilClass whiners feature.
Removing this feature causes boost in performance when using Ruby 1.9.

Ruby 1.9 started to do implicit conversions using `to_ary` and `to_str`
in some STDLIB methods (like Array#join). To do such implicit conversions,
Ruby 1.9 always dispatches the method and rescues the NoMethodError exception
in case one is raised.

Therefore, since the whiners feature defined NilClass#method_missing, such
implicit conversions for nil became much, much slower. In fact, just defining
NilClass#method_missing (even without the whiners feature) already causes a
massive slow down. Here is a snippet that shows such slow down:

    require "benchmark"
    Benchmark.realtime { 1_000.times { [nil,nil,nil].join } }

    class NilClass
      def method_missing(*args)
        raise NoMethodError
      end
    end

    Benchmark.realtime { 1_000.times { [nil,nil,nil].join } }
2011-12-08 20:28:09 +01:00
Mark Rushakoff
6f253fb440 Fix inflection regexes for mouse, mice 2011-12-07 23:14:02 -08:00
José Valim
885a599303 Just track "require" if we have something in the watching stack.
A patch has been provided earlier and we have asked for feedback:

    https://gist.github.com/1437939

Except one case, all other cases showed improvements in boot time.
2011-12-06 21:09:44 +01:00
Aaron Patterson
a2f7c1dc67 make method signatures match the superclass signature 2011-12-05 18:36:27 -08:00