1. 19 1月, 2018 1 次提交
  2. 11 1月, 2018 1 次提交
  3. 31 12月, 2017 1 次提交
  4. 29 11月, 2017 2 次提交
  5. 28 11月, 2017 1 次提交
  6. 23 11月, 2017 1 次提交
    • F
      Fix unstable test test_delegate_socket_errors_to_on_error_handler · 788c9085
      Fumiaki MATSUSHIMA 提交于
      I often face the following error when running test/connection/client_socket_test.rb:
      
      ```
      $ bin/test test/connection/client_socket_test.rb:38
      Run options: --seed 44035
      
      # Running:
      
      F
      
      Failure:
      ActionCable::Connection::ClientSocketTest#test_delegate_socket_errors_to_on_error_handler
      [/app/actioncable/test/connection/client_socket_test.rb:47]:
      --- expected
      +++ actual
      @@ -1 +1 @@
      -["foo"]
      +["Broken pipe", "Broken pipe", "Broken pipe", "foo"]
      ```
      
      It can be reproduced easily by applying the following patch:
      
      ```
      diff --git a/actioncable/test/connection/client_socket_test.rb b/actioncable/test/connection/client_socket_test.rb
      index 2051216010..6bb9f13ea7 100644
      --- a/actioncable/test/connection/client_socket_test.rb
      +++ b/actioncable/test/connection/client_socket_test.rb
      @@ -34,7 +34,8 @@ def on_error(message)
           @server.config.allowed_request_origins = %w( http://rubyonrails.com )
         end
      
      -  test "delegate socket errors to on_error handler" do
      +  1000.times do |i|
      +  test "delegate socket errors to on_error handler #{i}" do
           run_in_eventmachine do
             connection = open_connection
      
      @@ -47,6 +48,7 @@ def on_error(message)
             assert_equal %w[ foo ], connection.errors
           end
         end
      +  end
      
         test "closes hijacked i/o socket at shutdown" do
           run_in_eventmachine do
      ```
      
      The cause is writing io from different thread at the same time.
      
      `connection.process` sends handshake message from [StreamEventLoop's thread][] whereas
      `connection.handle_open` sends welcome message from current thread.
      
      [StreamEventLoop's thread]: https://github.com/rails/rails/blob/067fc779c4560fff4812614a2f78f9248f3e55f8/actioncable/lib/action_cable/connection/stream_event_loop.rb#L75
      788c9085
  7. 14 11月, 2017 1 次提交
  8. 13 11月, 2017 1 次提交
  9. 01 11月, 2017 1 次提交
  10. 26 10月, 2017 1 次提交
  11. 24 10月, 2017 1 次提交
  12. 21 10月, 2017 1 次提交
  13. 09 10月, 2017 2 次提交
    • J
      redis-rb 4.0 support · 53c516d8
      Jeremy Daer 提交于
      * Use `gem 'redis', '~> 4.0'` for new app Gemfiles
      * Loosen Action Cable redis-rb dep to `>= 3.3, < 5`
      * Bump redis-namespace for looser Redis version dep
      * Avoid using the underlying `redis.client` directly
      * Use `Redis.new` instead of `Redis.connect`
      53c516d8
    • J
      Distinguish missing adapter gems from load errors within the adapter · 55a2c101
      Jeremy Daer 提交于
      * When the adapter is missing, raise an exception that points out config
        typos and missing Gemfile entries. (We can assume that a non-builtin
        adapter was used since these are always available.)
      * When loading an adapter raises a LoadError, prefix its error message
        to indicate that the adapter is likely missing an optional dependency.
      55a2c101
  14. 26 9月, 2017 1 次提交
    • R
      ActionCable: use find method when unsubscribing · 4b629eca
      Richard Machielse 提交于
      If a frontend for some reason tries to unsubscribe from a non existing subscription, the following error is logged:
      
      Could not execute command from ({"command"=>"unsubscribe", "identifier"=>"{\"channel\":\"SomeChannel\"}"}) [NoMethodError - undefined method `unsubscribe_from_channel' for nil:NilClass]
      
      Instead, it will now properly log:
      
      Could not execute command from ({"command"=>"unsubscribe", "identifier"=>"{\"channel\":\"SomeChannel\"}"}) [RuntimeError - Unable to find subscription with identifier: {"channel":"SomeChannel"}]
      4b629eca
  15. 18 9月, 2017 1 次提交
  16. 01 9月, 2017 1 次提交
    • M
      Clarify intentions around method redefinitions · 2e6658ae
      Matthew Draper 提交于
      Don't use remove_method or remove_possible_method just before a new
      definition: at best the purpose is unclear, and at worst it creates a
      race condition.
      
      Instead, prefer redefine_method when practical, and
      silence_redefinition_of_method otherwise.
      2e6658ae
  17. 26 8月, 2017 1 次提交
  18. 22 8月, 2017 1 次提交
  19. 19 8月, 2017 1 次提交
  20. 17 8月, 2017 1 次提交
  21. 16 8月, 2017 1 次提交
    • K
      Fix RuboCop offenses · 7c260ae2
      Koichi ITO 提交于
      And enable `context_dependent` of Style/BracesAroundHashParameters cop.
      7c260ae2
  22. 12 8月, 2017 1 次提交
  23. 08 8月, 2017 1 次提交
    • C
      [ci skip] Prefer cookies.encrypted over signed (#30129) · af954ddd
      Claudio B 提交于
      In some examples and guides we are recommending to use code like:
      
      ```ruby
      verified_user = User.find_by(id: cookies.signed[:user_id])
      ```
      
      My suggestion is to use instead:
      
      ```ruby
      verified_user = User.find_by(id: cookies.encrypted[:user_id])
      ```
      
      which invites users to prefer the "newer" encrypted cookies over the
      "legacy" signed cookies.
      af954ddd
  24. 07 8月, 2017 1 次提交
  25. 24 7月, 2017 2 次提交
  26. 11 7月, 2017 1 次提交
  27. 06 7月, 2017 1 次提交
  28. 02 7月, 2017 2 次提交
  29. 01 7月, 2017 2 次提交
  30. 28 6月, 2017 1 次提交
  31. 27 6月, 2017 1 次提交
  32. 22 6月, 2017 1 次提交
    • M
      Allows for other common redis options to be in cable.yml, by default · f55ecc6a
      Marc Ignacio 提交于
      - Adds RedisAdapterTest::AlternateConfiguration to account
        for a relatively common alternative setup, as it’s used
        as the first example in the
        [Redis rubygem](https://github.com/redis/redis-rb#getting-started)
      
      - Supplies original RedisAdapterTest with more complete
        redis:// url format by adding a ‘userinfo’ (blank user),
        so that it resembles the alternate configuration
      
      - Supplies original EventedRedisAdapterTest with more complete
        redis:// url as well
      
      - Adds before_script to start redis-server with password as a daemon
        and with explicit defaults copied from the default redis.conf
        (Instead of using Travis' default init/upstart scripts for `redis` service)
      f55ecc6a
  33. 17 6月, 2017 1 次提交
  34. 14 6月, 2017 1 次提交
  35. 03 6月, 2017 1 次提交