Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 2715

Show
Ignore:
Timestamp:
10/23/05 20:00:05 (3 years ago)
Author:
bitsweat
Message:

r3689@sedna: jeremy | 2005-10-16 10:24:36 -0700
Ticket 2404 - delete fixtures after using them
r3744@sedna: jeremy | 2005-10-23 12:28:28 -0700
track dirty and loaded fixtures more carefully
r3745@sedna: jeremy | 2005-10-23 12:29:39 -0700
fix broken tests
r3756@sedna: jeremy | 2005-10-23 15:51:00 -0700
Global Logger.silencer switch for Logger#silence.
r3757@sedna: jeremy | 2005-10-23 15:51:35 -0700
Correct changelogs

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/actionpack/CHANGELOG

    r2696 r2715  
    44 
    55* Abbreviate RAILS_ROOT in traces 
    6  
    76 
    87*1.10.1* (October 19th, 2005) 
  • trunk/activerecord/CHANGELOG

    r2714 r2715  
     1*SVN* 
     2 
     3* Keep closer tabs on dirty, loaded, and declared fixtures.  #2404 [ryand-ruby@zenspider.com] 
     4 
     5* Map Active Record time to SQL TIME.  #2575, #2576 [Robby Russell <robby@planetargon.com>] 
     6 
     7* Clarify semantics of ActiveRecord::Base#respond_to?  #2560 [skaes@web.de] 
     8 
     9* Fixed Association#clear for associations which have not yet been accessed. #2524 [Patrick Lenz <patrick@lenz.sh>] 
     10 
     11* HABTM finders shouldn't return readonly records.  #2525 [Patrick Lenz <patrick@lenz.sh>] 
     12 
     13* Make all tests runnable on their own. #2521. [Blair Zajac <blair@orcaware.com>] 
     14 
    115*1.12.1* (October 19th, 2005) 
    2  
    3 * Keep closer tabs on dirty, loaded, and declared fixtures.  #2404 [ryand-ruby@zenspider.com] 
    4  
    5 * Map Active Record time to SQL TIME.  #2575, #2576 [Robby Russell <robby@planetargon.com>] 
    6  
    7 * Clarify semantics of ActiveRecord::Base#respond_to?  #2560 [skaes@web.de] 
    8  
    9 * Fixed Association#clear for associations which have not yet been accessed. #2524 [Patrick Lenz <patrick@lenz.sh>] 
    10  
    11 * HABTM finders shouldn't return readonly records.  #2525 [Patrick Lenz <patrick@lenz.sh>] 
    12  
    13 * Make all tests runnable on their own. #2521. [Blair Zajac <blair@orcaware.com>] 
    1416 
    1517* Always parenthesize :conditions options so they may be safely combined with STI and constraints. 
  • trunk/activesupport/CHANGELOG

    r2690 r2715  
     1*SVN* 
     2 
     3* Set Logger.silencer = false to disable Logger#silence.  Useful for debugging fixtures. 
     4 
    15* Add title case method to String to do, e.g., 'action_web_service'.titlecase #  => 'Action Web Service'. [Marcel Molina Jr.] 
    26 
  • trunk/activesupport/lib/active_support/clean_logger.rb

    r2553 r2715  
    11require 'logger' 
     2require File.dirname(__FILE__) + '/class_attribute_accessors' 
    23 
    34class Logger #:nodoc: 
     5  cattr_accessor :silencer 
     6  self.silencer = true 
     7 
    48  # Silences the logger for the duration of the block. 
    59  def silence(temporary_level = Logger::ERROR) 
    6     old_logger_level, self.level = level, temporary_level 
    7     yield self 
    8   ensure 
    9     self.level = old_logger_level 
     10    if silencer 
     11      begin 
     12        old_logger_level, self.level = level, temporary_level 
     13        yield self 
     14      ensure 
     15        self.level = old_logger_level 
     16      end 
     17    else 
     18      yield self 
     19    end 
    1020  end 
    1121 
  • trunk/activesupport/test/clean_logger_test.rb

    r2563 r2715  
    3333    end 
    3434 
    35     assert_equal "error\nfatal\nerror\nfatal\n", @out.string 
     35    # Silencer off. 
     36    Logger.silencer = false 
     37    @logger.silence do |logger| 
     38      logger.warn   'unsilenced' 
     39    end 
     40    Logger.silencer = true 
     41 
     42    assert_equal "error\nfatal\nerror\nfatal\nunsilenced\n", @out.string 
    3643  end 
    3744end