1. 28 9月, 2017 1 次提交
  2. 18 8月, 2017 1 次提交
    • C
      Do not generate default alt text in image tags · 9a74c7b9
      Cameron Cundiff 提交于
      - Auto-generating content from the filename of an image is not suitable
        alternative text; alt text that isn't fully considered can be
        distracting and fatiguing for screen readers users (blind, low vision,
        dyslexic people).
      - Setting a filename fallback short circuits screen reader default
        behavior and configuration for blank descriptions.
      - Setting poor defaults also creates false negatives for accessibility
        linting and testing software, that makes it harder to improve
        application accessibility.
      
      ***
      
      - After this change, if authors leave images without alt text, screen
        readers will fallback to default behavior for missing alt text.
      - Also with this change, Automated linting and testing tools will
        correctly generate warnings.
      
      [Fixes #30096]
      9a74c7b9
  3. 14 8月, 2017 1 次提交
    • Y
      Clear mail after test · 2f469dc3
      yuuji.yaginuma 提交于
      If clear it before the test, the mail of the last executed test will not
      be correctly cleared.
      
      Therefore, executing the test with seed below will result in an error.
      
      ```
      ./bin/test -w --seed 55480
      Run options: --seed 55480
      
      # Running:
      
      ...........................................................................................................................................................F
      
      Failure:
      MailDeliveryTest#test_does_not_increment_the_deliveries_collection_on_error [/home/yaginuma/program/rails/master_y_yagi/rails/actionmailer/test/delivery_methods_test.rb:221]:
      --- expected
      +++ actual
      @@ -1 +1 @@
      -[]
      +[#<Mail::Message:47011389364640, Multipart: false, Headers: <Date: Mon, 14 Aug 2017 07:48:40 +0900>, <From: test-sender@test.com>, <To: test-receiver@test.com>, <Message-ID: <5990d748ea5b2_29342ac1af8bcf40886f7@yaginuma.mail>>, <Subject: Test Subject>, <Mime-Version: 1.0>, <Content-Type: text/plain>, <Content-Transfer-Encoding: 7bit>>]
      
      bin/test test/delivery_methods_test.rb:216
      ```
      2f469dc3
  4. 23 7月, 2017 1 次提交
  5. 02 7月, 2017 1 次提交
  6. 01 7月, 2017 1 次提交
  7. 20 6月, 2017 1 次提交
  8. 15 6月, 2017 1 次提交
    • M
      Allow mailers to configure their delivery job · d9bbde09
      Matthew Mongeau 提交于
      Setting delivery_job on a mailer class will cause MessageDelivery to use
      the specified job instead of ActionMailer::DeliveryJob:
      
          class MyMailer < ApplicationMailer
            self.delivery_job = MyCustomDeliveryJob
      
            ...
          end
      d9bbde09
  9. 23 5月, 2017 1 次提交
  10. 19 5月, 2017 1 次提交
  11. 07 5月, 2017 1 次提交
  12. 27 4月, 2017 1 次提交
  13. 07 4月, 2017 1 次提交
  14. 15 3月, 2017 2 次提交
  15. 02 3月, 2017 2 次提交
    • A
      Deprecate implicit coercion of `ActiveSupport::Duration` · 75924c45
      Andrew White 提交于
      Currently `ActiveSupport::Duration` implicitly converts to a seconds
      value when used in a calculation except for the explicit examples of
      addition and subtraction where the duration is the receiver, e.g:
      
          >> 2 * 1.day
          => 172800
      
      This results in lots of confusion especially when using durations
      with dates because adding/subtracting a value from a date treats
      integers as a day and not a second, e.g:
      
          >> Date.today
          => Wed, 01 Mar 2017
          >> Date.today + 2 * 1.day
          => Mon, 10 Apr 2490
      
      To fix this we're implementing `coerce` so that we can provide a
      deprecation warning with the intent of removing the implicit coercion
      in Rails 5.2, e.g:
      
          >> 2 * 1.day
          DEPRECATION WARNING: Implicit coercion of ActiveSupport::Duration
          to a Numeric is deprecated and will raise a TypeError in Rails 5.2.
          => 172800
      
      In Rails 5.2 it will raise `TypeError`, e.g:
      
          >> 2 * 1.day
          TypeError: ActiveSupport::Duration can't be coerced into Integer
      
      This is the same behavior as with other types in Ruby, e.g:
      
          >> 2 * "foo"
          TypeError: String can't be coerced into Integer
          >> "foo" * 2
          => "foofoo"
      
      As part of this deprecation add `*` and `/` methods to `AS::Duration`
      so that calculations that keep the duration as the receiver work
      correctly whether the final receiver is a `Date` or `Time`, e.g:
      
          >> Date.today
          => Wed, 01 Mar 2017
          >> Date.today + 1.day * 2
          => Fri, 03 Mar 2017
      
      Fixes #27457.
      75924c45
    • A
      Pass request params to ActionMailer::Preview · 8e6c6d85
      Alexey Zapparov 提交于
      8e6c6d85
  16. 04 2月, 2017 1 次提交
  17. 31 1月, 2017 2 次提交
  18. 30 1月, 2017 1 次提交
  19. 28 1月, 2017 2 次提交
  20. 17 1月, 2017 1 次提交
  21. 12 1月, 2017 1 次提交
  22. 11 1月, 2017 1 次提交
  23. 04 1月, 2017 1 次提交
  24. 23 12月, 2016 1 次提交
  25. 05 12月, 2016 1 次提交
  26. 30 11月, 2016 1 次提交
  27. 29 10月, 2016 1 次提交
  28. 10 10月, 2016 1 次提交
  29. 16 8月, 2016 1 次提交
  30. 08 8月, 2016 2 次提交
    • X
      code gardening: removes redundant selfs · a9dc4545
      Xavier Noria 提交于
      A few have been left for aesthetic reasons, but have made a pass
      and removed most of them.
      
      Note that if the method `foo` returns an array, `foo << 1`
      is a regular push, nothing to do with assignments, so
      no self required.
      a9dc4545
    • S
      Modify LogSubscriber for single partial's cache message. · ab2af4df
      Stan Lo 提交于
      Implement naive partial caching mechanism.
      
      Add test for LogSubscriber
      
      Use ActionView::Base#log_payload to store log_subscriber's payload, so we can pass cache result into it.
      
      Fixed tests
      
      Remove useless settings
      
      Check if #log_payload exists before calling it. Because other classes also includes CacheHelper but don't have is attribute
      
      Use @log_payload_for_partial_reder instead of #log_payload to carry ActionView's payload.
      
      Update test's hash syntax
      
      Add configuration to enable/disable fragment caching logging
      
      Remove unless test and add new test to ensure cache info won't effect next rendering's log
      
      Move :enable_fragment_cache_logging config from ActionView to ActionPack
      
      Apply new config to tests
      
      Update actionview's changelog
      
      Update configuration guide
      
      Improve actionview's changelog
      
      Refactor PartialRenderer#render and log tests
      
      Mute subscriber's log instead of disabling instrumentation.
      
      Fix typo, remove useless comment and use new hash syntax
      
      Improve actionpack's log_subscriber test
      
      Fix rebase mistake
      
      Apply new config to all caching intstrument actions
      ab2af4df
  31. 07 8月, 2016 4 次提交
  32. 16 5月, 2016 1 次提交
    • J
      Action Mailer: Declarative exception handling with `rescue_from`. · e35b98e6
      Jeremy Daer 提交于
      Follows the same pattern as controllers and jobs. Exceptions raised in
      delivery jobs (enqueued by `#deliver_later`) are also delegated to the
      mailer's rescue_from handlers, so you can handle the DeserializationError
      raised by delivery jobs:
      
      ```ruby
      class MyMailer < ApplicationMailer
        rescue_from ActiveJob::DeserializationError do
          …
        end
      ```
      
      ActiveSupport::Rescuable polish:
      * Add the `rescue_with_handler` class method so exceptions may be
        handled at the class level without requiring an instance.
      * Rationalize `exception.cause` handling. If no handler matches the
        exception, fall back to the handler that matches its cause.
      * Handle exceptions raised elsewhere. Pass `object: …` to execute
        the `rescue_from` handler (e.g. a method call or a block to
        instance_exec) against a different object. Defaults to `self`.
      e35b98e6