1. 05 3月, 2013 2 次提交
  2. 26 2月, 2013 1 次提交
    • C
      Fix deletion of empty directories: · b8837066
      Charles Jones 提交于
      1. When comparing the directory to delete against the top level
         cache_path, use File.realpath to make sure we aren't comparing two
         unequal strings that point to the same path. This occurs, for
         example, when cache_path has a trailing slash, which it does in the
         default Rails configuration. Since the input to
         delete_empty_directories never has a trailing slash, the comparison
         will never be true and the top level cache directory (and above) may
         be deleted. However…
      
      2. File.delete raises EPERM when trying to delete a directory, so no
         directories have ever been deleted. Changing the code to Dir.delete
         fixes that.
      b8837066
  3. 25 2月, 2013 4 次提交
  4. 24 2月, 2013 2 次提交
  5. 23 2月, 2013 1 次提交
  6. 22 2月, 2013 2 次提交
  7. 18 2月, 2013 1 次提交
  8. 11 2月, 2013 1 次提交
    • R
      Supress warning about method redifinition · cfd85255
      Ryunosuke SATO 提交于
      In i18n gem, the following methods are defined.
      - `Hash#except`
      - `Hash#slice`
      
      But if there are defined already, i18n skips these definitions.
      So these definition by `active_support` are required before `require 'i18n'`.
      cfd85255
  9. 10 2月, 2013 3 次提交
  10. 07 2月, 2013 1 次提交
  11. 31 1月, 2013 2 次提交
  12. 29 1月, 2013 4 次提交
  13. 28 1月, 2013 1 次提交
  14. 23 1月, 2013 1 次提交
  15. 22 1月, 2013 3 次提交
  16. 21 1月, 2013 2 次提交
    • A
      Use `DateTime.parse` inside `String#to_datetime` · ee345821
      Andrew White 提交于
      Use the standard library's `DateTime.parse` because it's marginally
      faster and supports partial date/time strings.
      
      Benchmark:
             user     system      total        real
      old  3.980000   0.000000   3.980000 (  3.987606)
      new  3.640000   0.010000   3.650000 (  3.641342)
      ee345821
    • A
      Standardise the return value of `to_time` · b79adc43
      Andrew White 提交于
      This commit standardises the return value of `to_time` to an instance
      of `Time` in the local system timezone, matching the Ruby core and
      standard library behavior.
      
      The default form for `String#to_time` has been changed from :utc to
      :local but research seems to suggest the latter is the more common form.
      
      Also fix an edge condition with `String#to_time` where the string has
      a timezone offset in it and the mode is :local. e.g:
      
        # Before:
        >> "2000-01-01 00:00:00 -0500".to_time(:local)
        => 2000-01-01 05:00:00 -0500
      
        # After:
        >> "2000-01-01 00:00:00 -0500".to_time(:local)
        => 2000-01-01 00:00:00 -0500
      
      Closes #2453
      b79adc43
  17. 20 1月, 2013 2 次提交
  18. 19 1月, 2013 1 次提交
  19. 18 1月, 2013 1 次提交
  20. 17 1月, 2013 1 次提交
    • C
      Remove i18n symbol dependency · 6bb784ea
      Chris McGrath 提交于
      date.order is the only key in rails i18n that is required to be a
      symbol. This patch allows for symbols or strings which means:
      
      * No requirement for symbol type in .yml files. A future
        YAML.safe_load wouldn't need to load symbols
      * Rails could actually use json rather than yml as the backend
      6bb784ea
  21. 14 1月, 2013 1 次提交
  22. 11 1月, 2013 3 次提交