aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Convert remaining usage of whitelist and blacklistKevin Deisz2018-08-245-14/+14
|
* Deprecate usage of ActionView::Template::Handlers::ERB::escape_whitelistKevin Deisz2018-08-241-2/+12
|
* Convert over the rest of the blacklist referencesKevin Deisz2018-08-241-2/+2
|
* Convert over the rest of the whitelist referencesKevin Deisz2018-08-2413-25/+25
|
* Merge pull request #33714 from cbothner/azure-service-swallowing-all-errorsGeorge Claghorn2018-08-242-5/+14
|\ | | | | Handle only specifically relevant Azure HTTPErrors ActiveStorage::Service::AzureStorageService#upload and #delete
| * Handle only specifically relevant Azure HTTPErrorsCameron Bothner2018-08-232-5/+14
|/ | | | | | | | | The Azure gem uses `Azure::Core::Http::HTTPError` for everything: checksum mismatch, missing object, network unavailable, and many more. (https://www.rubydoc.info/github/yaxia/azure-storage-ruby/Azure/Core/Http/HTTPError). Rescuing that class obscures all sorts of configuration errors. We should check the type of error in those rescue blocks, and reraise when needed.
* Revert "Merge pull request #33667 from ↵George Claghorn2018-08-232-20/+7
| | | | | | | cbothner/azure-service-swallowing-all-errors" This reverts commit b204d167c5cfebd59f771d406178e371811ac43a, reversing changes made to de6a200f82a3de399fa685d583503bc88dbc5e9f.
* Merge pull request #33667 from cbothner/azure-service-swallowing-all-errorsGeorge Claghorn2018-08-232-7/+20
|\ | | | | Handle only specifically relevant Azure HTTPErrors in ActiveStorage::Service::AzureStorageService
| * Handle only specifically relevant Azure HTTPErrorsCameron Bothner2018-08-232-7/+20
|/ | | | | | | | | The Azure gem uses `Azure::Core::Http::HTTPError` for everything: checksum mismatch, missing object, network unavailable, and many more. (https://www.rubydoc.info/github/yaxia/azure-storage-ruby/Azure/Core/Http/HTTPError). Rescuing that class obscures all sorts of configuration errors. We should check the type of error in those rescue blocks, and reraise when needed.
* Merge pull request #33681 from minaslater/replace-white-and-blacklistAaron Patterson2018-08-239-40/+41
|\ | | | | [ci skip] change all instances of blacklist and whitelist to denylist…
| * [ci skip] corrects more grammar awkwardness, replacing denylist with ↵Mina Slater2018-08-229-37/+41
| | | | | | | | restricted list and consistently use permitted
| * [ci skip] revert terminology related to syntaxMina Slater2018-08-221-1/+1
| |
| * [ci skip] fixes a few more grammar issues, changing a to an before the word ↵Mina Slater2018-08-224-12/+9
| | | | | | | | allowlist
| * [ci skip] fixes awkward grammarMina Slater2018-08-226-12/+12
| |
| * [ci skip] change all instances of blacklist and whitelist to denylist and ↵Mina Slater2018-08-2111-40/+40
| | | | | | | | allowlist
* | Merge pull request #31696 from BrentWheeldon/bmw-connection-pool-load-deadlockMatthew Draper2018-08-242-1/+41
|\ \ | | | | | | Prevent deadlocks when waiting for connection from pool.
| * | Prevent deadlocks when waiting for connection from pool.Brent Wheeldon2018-03-232-1/+41
| | | | | | | | | | | | | | | When a thread that had the load interlock but was blocked waiting to check a connection out of the connection pool but all of the threads using the available connections were blocked waiting to obtain the load interlock an `ActiveRecord::ConnectionTimeoutError` exception was be thrown by the thread waiting for the connection. When waiting for the connection to check out we should allow loading to proceed to avoid this deadlock.
* | | Merge pull request #33703 from bogdanvlviv/follow-up-33659George Claghorn2018-08-235-6/+17
|\ \ \ | | | | | | | | Follow up #33659
| * | | DRY in `assert_broadcasts`bogdanvlviv2018-08-232-2/+13
| | | | | | | | | | | | | | | | Test `assert_no_broadcasts` failure
| * | | Simplify configuring of `ActionCable.server.config.logger` for actioncable testsbogdanvlviv2018-08-231-1/+1
| | | | | | | | | | | | | | | | See `git grep "= Logger.new(nil)"`
| * | | Set the test adapter for the test environment by default in `config/cable.yml`bogdanvlviv2018-08-231-1/+1
| | | |
| * | | Clarify api docs of ActionCable::SubscriptionAdapter::Testbogdanvlviv2018-08-232-2/+2
| | | | | | | | | | | | | | | | Remove extra `:nodoc:` comment since private methods doesn't require that.
* | | | Fix typo s/Topic/Tag/Ryuta Kamizono2018-08-231-1/+1
| | | | | | | | | | | | | | | | `Topic` isn't loaded in this test file.
* | | | Merge pull request #33704 from matthewd/helper-path-with-sizeMatthew Draper2018-08-231-2/+1
|\ \ \ \ | | | | | | | | | | Use string lengths instead of regexp to extract path
| * | | | Use string lengths instead of regexp to extract pathMatthew Draper2018-08-231-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The regexp was introduced in 186ac4cdaa911a9af659a29f2179a19b99dea13b, and looks cosmetic. While they should be functionally identical in theory, in practice, case insensitive (but preserving) filesystems can give results that are differently-cased from the pattern we supplied. I don't know how to force the filesystem to do the surprising thing, even when running in an environment that _could_, so no new test.
* | | | | Merge pull request #32647 from eugeneius/lazy_transactionsMatthew Draper2018-08-2317-17/+185
|\ \ \ \ \ | | | | | | | | | | | | Omit BEGIN/COMMIT statements for empty transactions
| * | | | | Omit BEGIN/COMMIT statements for empty transactionsEugene Kenny2018-08-1317-17/+185
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a transaction is opened and closed without any queries being run, we can safely omit the `BEGIN` and `COMMIT` statements, as they only exist to modify the connection's behaviour inside the transaction. This removes the overhead of those statements when saving a record with no changes, which makes workarounds like `save if changed?` unnecessary. This implementation buffers transactions inside the transaction manager and materializes them the next time the connection is used. For this to work, the adapter needs to guard all connection use with a call to `materialize_transactions`. Because of this, adapters must opt in to get this new behaviour by implementing `supports_lazy_transactions?`. If `raw_connection` is used to get a reference to the underlying database connection, the behaviour is disabled and transactions are opened eagerly, as we can't know how the connection will be used. However when the connection is checked back into the pool, we can assume that the application won't use the reference again and reenable lazy transactions. This prevents a single `raw_connection` call from disabling lazy transactions for the lifetime of the connection.
* | | | | | Merge pull request #33696 from bogdanvlviv/follow-up-44007c070Kasper Timm Hansen2018-08-234-10/+10
|\ \ \ \ \ \ | |_|_|/ / / |/| | | | | Use `say`/`error` instead of `puts`/`$stderr.puts`
| * | | | | Use `say`/`error` instead of `puts`/`$stderr.puts`bogdanvlviv2018-08-224-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | Follow up 44007c07098a3c633180881cae9285da4622e63f
* | | | | | Merge pull request #33666 from ↵George Claghorn2018-08-229-18/+118
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | cbothner/fail-gracefully-from-activestorage-file-not-found Fail more gracefully from ActiveStorage missing file exceptions
| * | | | | | Respond with 404 in ActiveStorage::DiskController#show when file missingCameron Bothner2018-08-213-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `ActiveStorage::DiskController#show` generates a 404 Not Found response when the requested file is missing from the disk service. It previously raised `Errno::ENOENT`.
| * | | | | | Translate service-specific missing object exceptions into a generic oneCameron Bothner2018-08-217-18/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `ActiveStorage::Blob#download` and `ActiveStorage::Blob#open` raise `ActiveStorage::FileNotFoundError` when the corresponding file is missing from the storage service. Services translate service-specific missing object exceptions (e.g. `Google::Cloud::NotFoundError` for the GCS service and `Errno::ENOENT` for the disk service) into `ActiveStorage::FileNotFoundError`.
* | | | | | | Include form_with in form_helpers rails guide (#33523)Nick Schwaderer2018-08-221-53/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Include form_with in form_helpers rails guide * Include form_tag and form_for footnote * Id and class attributes are not wrapped anymore * Include note that all form_with forms are remote:true by default * Underline most common use case of form_with is with arguments * Form_with no longer accepts multiple hashes in form helper calls * Review final sections * Revert extra documentation * Remove unnecessary link
* | | | | | | Merge pull request #33698 from bogdanvlviv/follow-up-33693Rafael França2018-08-221-1/+0
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Remove extra execution of `uniq!` on action_methods
| * | | | | | | Remove extra execution of `uniq!` on action_methodsbogdanvlviv2018-08-221-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Execution of `to_set` below should remove duplicated elements. Follow up #33693
* | | | | | | | Merge pull request #33695 from peterzhu2118/masterRafael França2018-08-222-8/+11
|\ \ \ \ \ \ \ \ | |/ / / / / / / |/| | | | | | | Update ParameterFilter to yield original parameters
| * | | | | | | Update ParameterFilter to yield original parametersPeter Zhu2018-08-222-8/+11
| | |/ / / / / | |/| | | | |
* | | | | | | Merge pull request #33693 from schneems/schneems/action_methodsRichard Schneeman2018-08-221-1/+4
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Two fewer array allocations on action_methods
| * | | | | | | Two fewer array allocations on action_methodsschneems2018-08-221-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of creating new arrays for `uniq` and `map` we can instead modify the array in place.
* | | | | | | | Merge pull request #33697 from bogdanvlviv/rails-command-help-show-descriptionRafael França2018-08-222-2/+5
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Fix `rails initializers --help` and `rails dev:cache --help`
| * | | | | | | | Fix `rails initializers --help` and `rails dev:cache --help`bogdanvlviv2018-08-222-2/+5
| | |/ / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - `rails initializers --help` should show description set by `desc` See railties/lib/rails/command/base.rb:27 - Fix `rails dev:cache --help` ``` Traceback (most recent call last): 10: from bin/rails:4:in `<main>' 9: from bin/rails:4:in `require' 8: from /work/rails/railties/lib/rails/commands.rb:18:in `<top (required)>' 7: from /work/rails/railties/lib/rails/command.rb:46:in `invoke' 6: from /work/rails/railties/lib/rails/command/base.rb:65:in `perform' 5: from /home/vagrant/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/thor-0.20.0/lib/thor.rb:387:in `dispatch' 4: from /home/vagrant/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/thor-0.20.0/lib/thor/invocation.rb:126:in `invoke_command' 3: from /home/vagrant/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/thor-0.20.0/lib/thor/command.rb:27:in `run' 2: from /work/rails/railties/lib/rails/command/base.rb:150:in `help' 1: from /home/vagrant/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/thor-0.20.0/lib/thor.rb:170:in `command_help' /home/vagrant/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/thor-0.20.0/lib/thor/base.rb:497:in `handle_no_command_error': Could not find command "dev". (Thor::UndefinedCommandError) ``` Context https://github.com/rails/rails/pull/33694#issuecomment-415127304 Would be great to set a description to other commands.
* | | | | | | | Merge pull request #33685 from krusty3002/masterRafael França2018-08-221-0/+7
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Added explanation about new_framework_defaults.rb file [ci skip]
| * | | | | | | | Fixed file name [ci skip]Claas Zurawski2018-08-221-1/+1
| | | | | | | | |
| * | | | | | | | Added explanation about new_framework_defaults.rb file [ci skip]Claas Zurawski2018-08-221-0/+7
| | | | | | | | |
* | | | | | | | | Merge pull request #33694 from bogdanvlviv/follow-up-33631Rafael França2018-08-221-1/+0
|\ \ \ \ \ \ \ \ \ | |_|/ / / / / / / |/| | | | | | | | Remove `rake initializers` from rake tasks list
| * | | | | | | | Remove `rake initializers` from rake tasks listbogdanvlviv2018-08-221-1/+0
|/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | Context https://github.com/rails/rails/pull/33631#discussion_r210732565
* | | | | | | | Merge pull request #33162 from utilum/stop_using_mochaKasper Timm Hansen2018-08-2211-59/+200
|\ \ \ \ \ \ \ \ | |_|/ / / / / / |/| | | | | | | Stop using Mocha
| * | | | | | | Remove Mocha from Gemfileutilum2018-08-132-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | _Q.E.F._
| * | | | | | | Add method_call_assertions and use them instead of Mochautilum2018-08-136-36/+170
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Six Mocha calls prove quite resistant to Minitestification. For example, if we replace ``` ActiveRecord::Associations::HasManyAssociation .any_instance .expects(:reader) .never ``` with `assert_not_called`, Minitest wisely raises ``` NameError: undefined method `reader' for class `ActiveRecord::Associations::HasManyAssociation' ``` as `:reader` comes from a deeply embedded abstract class, `ActiveRecord::Associations::CollectionAssociation`. This patch tackles this difficulty by adding `ActiveSupport::Testing::MethodCallAsserts#assert_called_on_instance_of` which injects a stubbed method into `klass`, and verifies the number of times it is called, similar to `assert_called`. It also adds a convenience method, `assert_not_called_on_instance_of`, mirroring `assert_not_called`. It uses the new method_call_assertions to replace the remaining Mocha calls in `ActiveRecord` tests. [utilum + bogdanvlviv + kspath]
| * | | | | | | Stub with Minitest and test with MethodCallAssertionsutilum2018-08-133-17/+30
| | |_|/ / / / | |/| | | | |