1. 09 12月, 2017 6 次提交
  2. 08 12月, 2017 6 次提交
  3. 07 12月, 2017 11 次提交
  4. 06 12月, 2017 10 次提交
  5. 05 12月, 2017 6 次提交
    • T
      Add more tests for the `--webpack` option · 6a11b0c1
      Tsukuru Tanimichi 提交于
      6a11b0c1
    • T
      Modify `test_webpack_option` · b9fb7451
      Tsukuru Tanimichi 提交于
      b9fb7451
    • Y
      Add missing require · 7efb4d23
      yuuji.yaginuma 提交于
      Follow up of 3c442b6d
      
      Without this require, it will fail when run CSP test alone.
      Ref: https://travis-ci.org/rails/rails/jobs/311715758#L2976
      7efb4d23
    • R
      Merge pull request #31334 from yhirano55/fix_example_code_in_active_job · 0f8568f5
      Ryuta Kamizono 提交于
      Fix example code in ActiveJob::Core [ci skip]
      0f8568f5
    • S
      Fix CSP copy boolean directives (#31326) · 3c442b6d
      Simon Dawson 提交于
      Use Object#deep_dup to safely duplicate policy values
      3c442b6d
    • Y
      Fix example code in ActiveJob::Core [ci skip] · 649f19ca
      Yoshiyuki Hirano 提交于
      1) It seems that it raise error on example code in `ActiveJob::Core`.
      
      Before:
      
      ```ruby
      class DeliverWebhookJob < ActiveJob::Base
        def serialize
          super.merge('attempt_number' => (@attempt_number || 0) + 1)
        end
      
        def deserialize(job_data)
          super
          @attempt_number = job_data['attempt_number']
        end
      
        rescue_from(Timeout::Error) do |exception|
          raise exception if @attempt_number > 5
          retry_job(wait: 10)
        end
      
        def perform
          raise Timeout::Error
        end
      end
      ```
      
      Then it run `DeliverWebhookJob.perform_now` in `rails console`. And raise error:
      
      NoMethodError: undefined method `>' for nil:NilClass
      from /app/jobs/deliver_webhook_job.rb:12:in `block in <class:DeliverWebhookJob>'
      
      So I thought it's necessary to fix it.
      
      After:
      
      ```ruby
      class DeliverWebhookJob < ActiveJob::Base
        attr_writer :attempt_number
      
        def attempt_number
          @attempt_number ||= 0
        end
      
        def serialize
          super.merge('attempt_number' => attempt_number + 1)
        end
      
        def deserialize(job_data)
          super
          self.attempt_number = job_data['attempt_number']
        end
      
        rescue_from(Timeout::Error) do |exception|
          raise exception if attempt_number > 5
          retry_job(wait: 10)
        end
      
        def perform
          raise Timeout::Error
        end
      end
      ```
      
      Then it run `DeliverWebhookJob.perform_now` in `rails console`. And it does'nt raise error NoMethodError.
      
      2) Use `Timeout::Error` instead of `TimeoutError` (`TimeoutError` is deprecated).
      649f19ca
  6. 04 12月, 2017 1 次提交