aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | Make form_with_generates_ids default in Rails 5.2Rafael Mendonça França2017-11-252-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the defaults being loaded are the 5.0 or 5.1 we disable generation of ids with form_with.
| * | | | | Change `form_with` to generates ids by defaultnpezza932017-11-2512-225/+310
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When `form_with` was introduced we disabled the automatic generation of ids that was enabled in `form_for`. This usually is not an good idea since labels don't work when the input doesn't have an id and it made harder to test with Capybara. You can still disable the automatic generation of ids setting `config.action_view.form_with_generates_ids` to `false.`
* | | | | | Merge pull request #30879 from toptal/add_better_logging_to_delayed_jobRafael França2017-11-252-0/+11
|\ \ \ \ \ \ | |/ / / / / |/| | | | | Improved logging of AJ's DelayedJob wrapper
| * | | | | Improve DelayedJob wrapper loggingJacek Lachowski2017-11-242-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ActiveJob wraps every adapter into its own class, that is later passed into DelayedJob which is responsible for displaying all the logs. This change improves the logging so we can easily trace executed jobs and see meaningful information in the logs.
* | | | | | Compare the actual string after comparing the HMAC proccessed stringsRafael Mendonça França2017-11-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Even that collisions are unlikely we need to make sure the two strings are equal. Timing is not important in this case because this only runs after the comparison between the SHA256 digested strings returns true.
* | | | | | Merge pull request #24510 from ↵Rafael Mendonça França2017-11-255-19/+37
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | vipulnsward/make-variable_size_secure_compare-public Make variable_size_secure_compare public
| * | | | | | Changed default behaviour of `ActiveSupport::SecurityUtils.secure_compare`,Vipul A M2017-06-075-19/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to make it not leak length information even for variable length string. Renamed old `ActiveSupport::SecurityUtils.secure_compare` to `fixed_length_secure_compare`, and started raising `ArgumentError` in case of length mismatch of passed strings.
* | | | | | | Merge pull request #30510 from yhirano55/add_nodoc_to_activerecordEileen M. Uchitelle2017-11-253-7/+7
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Add :nodoc: to activerecord [ci skip]
| * | | | | | | Add :nodoc: to activerecord [ci skip]Yoshiyuki Hirano2017-09-033-7/+7
| | | | | | | |
* | | | | | | | Merge pull request #31006 from ↵Eileen M. Uchitelle2017-11-252-0/+17
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | rails/kamipo/ordinal_methods_should_respect_loaded_records Ordinal methods should respect loaded records
| * | | | | | | | Ordinal methods should respect loaded recordsRyuta Kamizono2017-10-282-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We should reset partially loaded `@offsets` cache when latest records has loaded because the cache has been staled and it may not be consistent with latest records.
* | | | | | | | | Merge pull request #31226 from fgo/patch-22Eileen M. Uchitelle2017-11-251-3/+3
|\ \ \ \ \ \ \ \ \ | | |_|_|_|_|_|_|/ | |/| | | | | | | Update guide layout [ci skip]
| * | | | | | | | Update guide layout [ci skip]Francis Go2017-11-251-3/+3
|/ / / / / / / /
* | | | | | | | [ci skip] SecureRandom should mentioned Win32 CryptoAPI functions ins… ↵Atul Shimpi2017-11-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#31225) * [ci skip] SecureRandom should mentioned Win32 CryptoAPI functions instead of Win32 * Remove functions word
* | | | | | | | Merge pull request #31173 from matthewd/connection-fork-safetyMatthew Draper2017-11-255-0/+90
|\ \ \ \ \ \ \ \ | |_|_|_|_|_|_|/ |/| | | | | | | Improve AR connection fork safety
| * | | | | | | Improve AR connection fork safetyMatthew Draper2017-11-185-0/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use whatever adapter-provided means we have available to ensure forked children don't send quit/shutdown/goodbye messages to the server on connections that belonged to their parent.
* | | | | | | | Merge pull request #31215 from dixitp012/fix_rubocop_style_in_railtiesRafael França2017-11-241-0/+2
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Rubocop style: Missing magic comment
| * | | | | | | | Rubocop styleDixit Patel2017-11-241-0/+2
| | | | | | | | |
* | | | | | | | | Merge pull request #30881 from dimroc/masterVipul A M2017-11-251-36/+24
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Update documentation to lead with ajax param `event.detail` [ci skip]
| * | | | | | | | | Update documentation to lead with ajax param `event.detail`Dimitri Roche2017-11-241-4/+9
| | | | | | | | | |
| * | | | | | | | | Update documentation to lead with ajax param `event.detail`Dimitri Roche2017-10-131-36/+19
| | | | | | | | | |
* | | | | | | | | | Merge pull request #31217 from atul-shimpi/masterVipul A M2017-11-247-0/+0
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | [ci skip] Rails Associations examples contains ActiveRecord::Base ref…
| * | | | | | | | | | [ci skip] Rails Associations examples contains ActiveRecord::Base reference ↵Atul Shimpi2017-11-247-0/+0
| | |/ / / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | instead of ApplicationRecord in images
* | | | | | | | | | Merge pull request #31195 from mltsy/patch-2Vipul A M2017-11-241-1/+1
|\ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / |/| | | | | | | | | Fix tld_length documentation in ActionDispatch::Cookies [ci skip]
| * | | | | | | | | Fix tld_length documentationJoe Marty2017-11-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change recommendation for tld_length (for sharing cookies across subdomains of a 2-token TLD), to 2 instead of 1.
* | | | | | | | | | Correct render method's response header's content type for option(:body) ↵Avneet Singh Malhotra2017-11-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | from text/html to text/plain. (#31212)
* | | | | | | | | | Avoid connecting to GCS during app bootGeorge Claghorn2017-11-232-12/+14
| |_|_|_|_|_|/ / / |/| | | | | | | |
* | | | | | | | | Merge pull request #31178 from mtsmfm/fix-unstable-testRyuta Kamizono2017-11-231-2/+10
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Fix unstable test test_delegate_socket_errors_to_on_error_handler
| * | | | | | | | | Fix unstable test test_delegate_socket_errors_to_on_error_handlerFumiaki MATSUSHIMA2017-11-231-2/+10
|/ / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | | | | | Merge pull request #31194 from ↵Yuji Yaginuma2017-11-231-6/+1
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | yahonda/attributes_before_type_cast_on_boolean_with_jruby No difference between JRuby and CRuby at test_read_attributes_before_…
| * | | | | | | | | No difference between JRuby and CRuby at ↵Yasuo Honda2017-11-211-6/+1
| |/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | test_read_attributes_before_type_cast_on_a_boolean https://github.com/jruby/activerecord-jdbc-adapter ActiveRecord JDBC Adapter is actively developed and it supports Rails 5.1 now. This pull request addresses one of the failure when running ActiveRecord unit tests with ActiveRecord JDBC Adapter. As of right now, ActiveRecord JDBC Adapter supports Rails 5.1, not master branch then this test only can run on `5-1-stable` branch. But I have opened this pull request to `master` branch since this type cast should be going to work in the future versions of ActiveRecord JDBC Adapter . ```ruby $ ARCONN=jdbcmysql bin/test test/cases/attribute_methods_test.rb:203 Using jdbcmysql Run options: --seed 8874 F Finished in 0.709120s, 1.4102 runs/s, 1.4102 assertions/s. 1) Failure: AttributeMethodsTest#test_read_attributes_before_type_cast_on_a_boolean [/home/yahonda/git/rails/activerecord/test/cases/attribute_methods_test.rb:203]: Expected: "0" Actual: 0 1 runs, 1 assertions, 1 failures, 0 errors, 0 skips $ ```
* | | | | | | | | Merge pull request #31202 from fgo/patch-21Rafael França2017-11-221-9/+9
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Update Action Cable Overview Guide [ci skip]
| * | | | | | | | | Update Action Cable Overview Guide [ci skip]Francis Go2017-11-221-9/+9
| | | | | | | | | |
* | | | | | | | | | Merge pull request #31205 from tjschuck/doc_indentation_fixRyuta Kamizono2017-11-231-6/+6
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | Fix CustomUrls#direct doc formatting
| * | | | | | | | | | Fix CustomUrls#direct doc formattingT.J. Schuck2017-11-221-6/+6
|/ / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Particularly, the bulleted list was getting formatted as a code block because of the extra level of indentation. Pulling it back to the left makes it render properly as a list instead. [ci skip]
* | | | | | | | | | Merge pull request #31204 from tjschuck/doc_fix_some_backticks_to_ttRafael França2017-11-2213-27/+27
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | Update incorrect backtick usage in RDoc to teletype
| * | | | | | | | | | Update incorrect backtick usage in RDoc to teletypeT.J. Schuck2017-11-2213-27/+27
| |/ / / / / / / / / | | | | | | | | | | | | | | | | | | | | [ci skip]
* / / / / / / / / / Make ActiveSupport::TimeZone.all independent of previous lookups (#31176)Chris LaRose2017-11-223-3/+23
|/ / / / / / / / /
* | | | | | | | | Merge pull request #29887 from willnet/generator-suggestion-localeYuji Yaginuma2017-11-222-1/+15
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Fix generator suggestion raise error when I18n.available_locales don’t include :en
| * | | | | | | | | Fix generator suggestion raise error when I18n.available_locales don’t ↵willnet2017-11-222-1/+15
|/ / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | include :en
* | | | | | | | | Fix loading ActiveStorage::DiskController when CSRF protection is disabled ↵George Claghorn2017-11-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | by default
* | | | | | | | | Fix that some ASt route helpers silently discarded optionsGeorge Claghorn2017-11-211-10/+10
|/ / / / / / / /
* | | | | | | | Merge pull request #31188 from tgxworld/update_rack_testYuji Yaginuma2017-11-211-1/+1
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | FIX: `rack-test` 0.7.1 probably got yanked.
| * | | | | | | | Update `rack-test` to 0.8.Guo Xiang Tan2017-11-211-1/+1
|/ / / / / / / /
* | | | | | | | Remove unused `em-hiredis`yuuji.yaginuma2017-11-212-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `em-hiredis` is unused since 48766e32d31651606b9f68a16015ad05c3b0de2c
* | | | | | | | Provide attachment writersGeorge Claghorn2017-11-202-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Permit creating a record and attaching files in a single step. # Before: User.create!(user_params.except(:avatar)).tap do |user| user.avatar.attach(user_params[:avatar]) end # After: User.create!(user_params) [Yoshiyuki Hirano & George Claghorn]
* | | | | | | | MemCacheStore: Support expiring countersTakumasa Ochi2017-11-203-2/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Support `expires_in` in `ActiveSupport::Cache::MemCacheStore#increment` and `#decrement`. Closes #30716.
* | | | | | | | Load 5.2 defaults in ASt dummy appGeorge Claghorn2017-11-201-1/+1
| | | | | | | |
* | | | | | | | Fix direct uploads to local serviceGeorge Claghorn2017-11-203-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Disable CSRF protection for ActiveStorage::DiskController#update. The local disk service is intended to imitate a third-party service like S3 or GCS, so we don't care where direct uploads originate: they’re authorized by signed tokens. Closes #30290. [Shinichi Maeshima & George Claghorn]
* | | | | | | | Merge pull request #31185 from vipulnsward/threading-guideVipul A M2017-11-201-3/+3
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Pass over Execution guide[ci skip]