Commit Graph

110 Commits

Author SHA1 Message Date
Jeremy Kemper
b6fd6ccc8f AS::Dependencies also has core extensions; don't autoload it. 2008-11-24 22:42:11 -08:00
Jeremy Kemper
104f3a5776 Add config.preload_frameworks to load all frameworks at startup. Default to false so Rails autoloads itself as it's used. 2008-11-24 18:43:04 -08:00
Jeremy Kemper
536c239966 JSON can't be autoloaded since it includes core extensions 2008-11-24 13:08:25 -08:00
Joshua Peek
fffb1da3f2 require json lib when serialization is loaded 2008-11-24 11:52:29 -06:00
Joshua Peek
703fecb4fc Add LAZY env flag for testing autoload/lazy load feature 2008-11-24 11:37:57 -06:00
Joshua Peek
368117c041 Autoload more ActiveSupport libs 2008-11-24 11:35:21 -06:00
Jeremy Kemper
6c7463deab Autoload ActiveSupport::Duration, Gzip, OptionMerger, OrderedHash, OrderedOptions, StringInquirer, TimeWithZone, and TimeZone also 2008-11-23 16:11:32 -08:00
Jeremy Kemper
0eca8111f2 Autoload ActiveSupport::SecureRandom and ::MessageVerifier 2008-11-23 15:39:28 -08:00
Michael Koziarski
d460c9a255 Add ActiveSupport::MessageVerifier to aid users who need to store tamper-proof messages in cookies etc.
This is particularly useful for things like remember-me tokens in web applications and auto-unsubscribe links in emails.
2008-11-23 15:33:59 +01:00
David Heinemeier Hansson
f42c77f927 Added ActiveSupport::BacktraceCleaner and Rails::BacktraceCleaner for cutting down on backtrace noise (inspired by the Thoughtbot Quiet Backtrace plugin) [DHH] 2008-11-22 18:06:08 +01:00
Sven Fuchs
12118963ac use :en as a default locale (in favor of :en-US)
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
2008-11-18 14:23:53 +01:00
Pratik Naik
a5cdb7a813 Remove stuff that was deprecated in 2-1-stable 2008-10-21 11:34:56 +01:00
Pratik Naik
259a7a844b Add tests for ActiveSupport::Rescuable. Use ActiveSupport::Rescuable in ActionController::Base. 2008-10-04 22:13:50 +01:00
Sven Fuchs
a3b7fa78bf I18n: Introduce I18n.load_path in favor of I18n.load_translations and change Simple backend to load translations lazily. [#1048 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-09-20 19:26:16 +01:00
Jeremy Kemper
657898c821 Merge commit 'sven/i18n'
Conflicts:
	activesupport/lib/active_support.rb
2008-08-27 12:31:07 -07:00
Joshua Peek
87fafe4074 Moved Logger extensions into core_ext 2008-08-27 11:33:18 -05:00
Hongli Lai (Phusion
b3411ff59e Deprecate Rails::SecretKeyGenerator in favor of ActiveSupport::SecureRandom.
SecureRandom has a few minor security enhancements and can be used as a drop-in replacement

Signed-off-by: Michael Koziarski <michael@koziarski.com>
[#913 state:committed]
2008-08-27 15:08:16 +02:00
Marko Seppae
0fcd5b5466 I18n: removed call to #populate from main library files 2008-08-27 10:36:00 +02:00
Jeremy Kemper
172606e21f Harmonize framework require strategy. Don't add self to load path since Rails initializer and RubyGems handle it. 2008-08-25 21:22:34 -07:00
Sven Fuchs
aad429a46e Merge branch 'master' into i18n 2008-08-21 19:04:39 +02:00
Joshua Peek
f388725bd6 Partial revert of 2681685 premature TypeArray abstraction 2008-08-21 00:28:25 -05:00
Iain Hecker
c1e0d8aa48 Locale file changed to yaml 2008-08-20 18:01:12 +02:00
Sven Fuchs
f26380b775 switch to using I18n.load_translations instead of requiring plain ruby files 2008-08-13 09:53:25 +02:00
Joshua Peek
2681685450 Extract ActiveSupport::TypedArray class to ensure an array is all of the same type [#673 state:resolved] 2008-07-22 11:12:16 -05:00
Sven Fuchs
931f366ffc merge forward to current rails/master 2008-07-16 03:41:11 +02:00
Joshua Peek
8a9934a9d9 Added Memoizable mixin for caching simple lazy loaded attributes 2008-07-14 19:50:32 -05:00
Sven Fuchs
428aa24d24 Renamed lang/ to locale/ because that's what we seem to
standarize on. Also, in future this place can be used for data/code that's
not literally translations but conceptually belongs to the locale (like
custom pluralization algorithms etc.).
2008-06-21 11:35:02 +02:00
Sven Fuchs
c1e2506494 Changed process of storing translations from the
client libraries to the backend: clients now can pass a block to
backend#populate which can contain code to load and register translations.

This makes sense for backends that persist their translations (e.g. to db)
so the repeated loading and passing of translations throughout the server
startup would be wasted resources.
2008-06-21 11:27:19 +02:00
Sven Fuchs
4a8486a1b1 add lang file for active_support 2008-06-19 16:43:30 +02:00
Joshua Peek
5fe2878973 Renamed StringQuestioneer to StringInquirer. 2008-06-04 15:06:32 -05:00
David Heinemeier Hansson
8afa725f4b Wrapped Rails.env in StringQuestioneer so you can do Rails.env.development? [DHH] 2008-06-03 17:44:56 -05:00
Joshua Peek
c08547d226 Namespace Inflector, Dependencies, OrderedOptions, and TimeZone under ActiveSupport [#238 state:resolved] 2008-06-03 13:32:53 -05:00
Joshua Peek
49846f8586 Create a seperate file for ActiveSupport::OrderedHash. 2008-05-14 12:48:37 -05:00
Geoff Buesing
022d9f7ce6 Introduce ActiveSupport::TimeWithZone, for wrapping Time instances with a TimeZone. Introduce instance methods to Time for creating TimeWithZone instances, and class methods for managing a global time zone
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8696 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-23 01:56:22 +00:00
Jeremy Kemper
aae37bb4f7 Extract ActiveSupport::Callbacks from Active Record, test case setup and teardown, and ActionController::Dispatcher. Closes #10727.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8664 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-19 02:44:45 +00:00
Jeremy Kemper
139b92495f * Continue evolution toward ActiveSupport::TestCase and friends. #10679 [Josh Peek]
* TestCase: introduce declared setup and teardown callbacks. Pass a list of methods and an optional block to call before setup or after teardown. Setup callbacks are run in the order declared; teardown callbacks are run in reverse.  [Jeremy Kemper]


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8570 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-05 13:34:15 +00:00
David Heinemeier Hansson
2a9ad9ccbc Moved the caching stores from ActionController::Caching::Fragments::* to ActiveSupport::Cache::*. If you're explicitly referring to a store, like ActionController::Caching::Fragments::MemoryStore, you need to update that reference with ActiveSupport::Cache::MemoryStore [DHH] Deprecated ActionController::Base.fragment_cache_store for ActionController::Base.cache_store [DHH] All fragment cache keys are now by default prefixed with the 'views/' namespace [DHH] Added ActiveRecord::Base.cache_key to make it easier to cache Active Records in combination with the new ActiveSupport::Cache::* libraries [DHH] Added ActiveSupport::Gzip.decompress/compress(source) as an easy wrapper for Zlib [Tobias Luetke] Included MemCache-Client to make the improved ActiveSupport::Cache::MemCacheStore work out of the box [Bob Cottrell, Eric Hodel] Added config.cache_store to environment options to control the default cache store (default is FileStore if tmp/cache is present, otherwise MemoryStore is used) [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8546 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-03 21:05:12 +00:00
Jeremy Kemper
f91acf0258 Ruby 1.9 compat: move from the deprecated Base64 module to ActiveSupport::Base64. Closes #10554.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8433 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-18 21:14:07 +00:00
Michael Koziarski
2cc0cac3ef Introduce TestCase subclasses for testing rails applications allowing tests to be DRY'd up a bit and to provide a path toward tidying up our monkeypatching of test/unit.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8022 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-26 02:21:21 +00:00
Jeremy Kemper
e7040b09e8 Rebundle Builder 2.1.2 but prefer a newer RubyGem if available.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7828 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-10 23:01:41 +00:00
Jeremy Kemper
b1e394e67f Builder unbundle message directs to Bulk updating Gem source index for: http://gems.rubyforge.org
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7789 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-08 03:19:39 +00:00
Jeremy Kemper
845e6ff45a String#to_xs uses the fast_xs extension if available for Builder speedup.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7773 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-07 09:15:26 +00:00
Jeremy Kemper
34b576700d Introduce BasicObject as Builder::BlankSlate for Ruby 1.9 forward compatibility.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7762 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-07 01:07:00 +00:00
David Heinemeier Hansson
79a9c7a702 Added ActiveSupport::BufferedLogger as a duck-typing alternative (albeit with no formatter) to the Ruby Logger, which provides a very nice speed bump (inspired by Ezra's buffered logger) [DHH] Changed the default logger from Ruby's own Logger with the clean_logger extensions to ActiveSupport::BufferedLogger for performance reasons [DHH]. (You can change it back with config.logger = Logger.new(/path/to/log, level).)
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7626 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-25 03:47:37 +00:00
Jeremy Kemper
e6941149ab Deprecation: removed Reloadable.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7473 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-14 00:25:59 +00:00
Tobias Lütke
8f5c83bdea Added assert_difference and assert_no_difference to test/unit assertions
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6647 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-01 21:02:37 +00:00
Michael Koziarski
276c9f29cd Make 1.months and friends accurate by introducing a Duration class. #6835 [eventualbuddha]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5940 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-15 06:54:50 +00:00
Michael Koziarski
f238d495b7 Add ActiveSupport::Multibyte. Provides String#chars which lets you deal with strings as a sequence of chars, not of bytes. Closes #6242 [Julian Tarkhanov, Manfred Stienstra & Jan Behrens]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5223 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-10-03 23:45:32 +00:00
Jeremy Kemper
965ae90bc6 Eliminate Active Support warnings.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4839 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-08-29 08:24:04 +00:00
Michael Koziarski
7692191f5a Initial Version of Deprecation for Rails[Koz]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4623 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-07-27 00:10:06 +00:00
Rick Olson
47ffc04621 move vendor inside lib so that rake freeze_edge works
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3818 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-08 16:54:57 +00:00
David Heinemeier Hansson
cd989472a5 Added Hash#to_xml and Array#to_xml that makes it much easier to produce XML from basic structures [DHH] Moved Jim Weirich's wonderful Builder from Action Pack to Active Support (it's simply too useful to be stuck in AP) [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3812 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-08 02:56:25 +00:00
David Heinemeier Hansson
01b1a87729 Added reusable reloading support through the inclusion of the Relodable module that all subclasses of ActiveRecord::Base, ActiveRecord::Observer, ActiveController::Base, and ActionMailer::Base automatically gets [DHH]. Added auto-loading support for classes in modules, so Conductor::Migration will look for conductor/migration.rb and Conductor::Database::Settings will look for conductor/database/settings.rb [Nicholas Seckar]. Refactored extensions to module, class, and object in active support [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3493 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-01-29 00:37:39 +00:00
Sam Stephenson
e567a5eb1a Add ActiveSupport::JSON and Object#to_json for converting Ruby objects to JSON strings
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3356 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-27 03:11:03 +00:00
Sam Stephenson
85fe1ecaef Add Object#with_options for DRYing up multiple calls to methods having shared options
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3314 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-15 20:03:23 +00:00
David Heinemeier Hansson
28329ec8f8 Include OrderedOptions by default
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2421 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-09-30 07:07:44 +00:00
David Heinemeier Hansson
3cf7a0a460 Added Kernel#silence_warnings and puts it into use throughout the framework
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2179 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-09-11 04:58:27 +00:00
David Heinemeier Hansson
6d566e82b4 Fixed rails_generator to be usable without RubyGems #686 [Cristi BALAN]. Moved all active support dependencies into active support
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@838 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-03-06 12:20:53 +00:00
David Heinemeier Hansson
f9fca1eb63 Moved TimeZone to Active Support
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@768 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-02-23 15:13:03 +00:00
David Heinemeier Hansson
dcfd6aa3bd Move Controllers wrapper module away from environment.rb and into dependencies.rb
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@627 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-02-15 16:21:56 +00:00