aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Remove method named "hash"Aaron Patterson2019-01-282-8/+10
| | | | | | We can't use the FixtureResolver as a hash key because it doesn't implement `hash` correctly. This commit renames the method to "data" (which is just as unfortunately named :( )
* Merge pull request #35030 from ↵Rafael França2019-01-282-2/+2
|\ | | | | | | | | alkesh26/actionpack-long-string-indentation-and-typo-fix Actionpack typo fixes.
| * Typo fixes action pack.alkesh262019-01-262-2/+2
| |
* | Add CHANGELOG entries for npm package renames [ci skip]Javan Makhmali2019-01-283-0/+18
| |
* | Convert path to string before call `length`yuuji.yaginuma2019-01-281-1/+1
| | | | | | | | | | | | | | | | Because eager load paths support to using `Pathname`, and `Pathname` doesn't have `length` method. Ref: https://travis-ci.org/rails/rails/jobs/485088071#L5140-L5143 Follow up aadeed1518b9092ea21adf49c728172368129f0e.
* | Simplify path prefix extractionXavier Noria2019-01-271-2/+3
| |
* | Fix a tiny typo [ci skip]Robin Dupret2019-01-261-1/+1
| | | | | | | | Follow-up to #35055.
* | Merge pull request #34970 from kamipo/timestamps_with_precision_by_defaultRyuta Kamizono2019-01-2614-75/+206
|\ \ | | | | | | Make `t.timestamps` with precision by default.
| * | Make `t.timestamps` with precision by defaultRyuta Kamizono2019-01-2614-75/+206
| | |
* | | Merge pull request #35057 from javan/actiontext/blob-embeds-onlyJavan Makhmali2019-01-262-1/+10
|\ \ \ | |/ / |/| | Fix error saving Action Text content containing non-blob attachables
| * | Fix error saving Action Text content containing non-blob attachablesJavan Makhmali2019-01-252-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Failing test before the ActionText::RichText change: ``` Error: ActionText::ModelTest#test_embed_extraction_only_extracts_file_attachments: ArgumentError: Could not find or build blob: expected attachable, got #<ActionText::Attachables::RemoteImage:0x00007fb0259fef70 @url="http://example.com/cat.jpg", @content_type="image", @width=nil, @height=nil> ```
* | | Fix `t.timestamps` missing `null: false` in `change_table bulk: true`Ryuta Kamizono2019-01-264-0/+36
| | |
* | | Allow `column_exists?` giving options without typeRyuta Kamizono2019-01-263-13/+13
| | |
* | | Fix typo: overriden -> overridden [ci skip] (#35060)Vipul A M2019-01-261-1/+1
| | |
* | | Merge pull request #35055 from bughit/patch-1Rafael França2019-01-261-0/+2
|\ \ \ | | | | | | | | document the possibility of app initializers running before gem initializers
| * | | document the possibility of app initializers running before gem initilizersbughit2019-01-251-0/+2
| | | | | | | | | | | | and suggest a workaround
* | | | Merge pull request #34803 from yahonda/use_xenialYuji Yaginuma2019-01-261-85/+32
|\ \ \ \ | | | | | | | | | | Use Ubuntu Xenial (16.04) at Travis CI
| * | | | Use Ubuntu Xenial (16.04) at Travis CIYasuo Honda2019-01-261-85/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://docs.travis-ci.com/user/reference/xenial/ * MySQL 5.7 and PostgreSQL 10 is available by default https://docs.travis-ci.com/user/reference/xenial/#databases-and-services * No matrixes necessary for "GEM=activerecord:mysql2", "GEM=activerecord:postgresql", "GEM=railties" and "GEM=actionmailer,activemodel,activesupport,actionview,activejob,activestorage,actionmailbox,actiontext" * Run mysql_upgrade for MariaDB * Increase ramfs size before install for "GEM=activerecord:postgresql" * Use FFMpeg 3.x using ppa:jonathonf/ffmpeg-3 Ubuntu 16.04 installs FFMpeg version 2.x by default, which does not pass two of Active Stroage tests reported at https://github.com/rails/rails/issues/34921 * Use `rabbitmq-server` package and service * Update bundler and rubygems to address "Could not find 'bundler' (1.17.2)" for ruby-head ``` $ bundle install --jobs 3 --retry 3 Traceback (most recent call last): 2: from /home/travis/.rvm/rubies/ruby-head/bin/bundle:30:in `<main>' 1: from /home/travis/.rvm/rubies/ruby-head/lib/ruby/2.7.0/rubygems.rb:302:in `activate_bin_path' /home/travis/.rvm/rubies/ruby-head/lib/ruby/2.7.0/rubygems.rb:283:in `find_spec_for_exe': Could not find 'bundler' (1.17.2) required by your /home/travis/build/rails/rails/Gemfile.lock. (Gem::GemNotFoundException) To update to the latest version installed on your system, run `bundle update --bundler`.\nTo install the missing version, run `gem install bundler:1.17.2`\n ``` * Use oraclejdk11 (18.9 LTS) to address the following error ``` $ ~/bin/install-jdk.sh --target "/home/travis/oraclejdk8" --workspace "/home/travis/.cache/install-jdk" --feature "8" --license "BCL" install-jdk.sh 2018-10-17 Expected feature release number in range of 9 to 13, but got: 8 ``` Refer: https://docs.travis-ci.com/user/reference/xenial/#jvm-clojure-groovy-java-scala-support
* | | | | Add missing require for `Float#to_d`yuuji.yaginuma2019-01-261-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In master, tests pass because `bigdecimal/util` requires in `active_support/xml_mini`. But test fails in 5-2-stable because that require does not exist. Ref: https://travis-ci.org/rails/rails/jobs/484627996#L1969
* | | | | Merge pull request #35054 from bogdanvlviv/exercise-redirect_backRyuta Kamizono2019-01-261-0/+29
|\ \ \ \ \ | | | | | | | | | | | | Ensure that `redirect_back` with `fallback_location` to another host is allowed
| * | | | | Ensure that `redirect_back` with `fallback_location` to another host is allowedbogdanvlviv2019-01-251-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | I would like to add those tests to prevent regression.
* | | | | | Loosen check of error cause fileyuuji.yaginuma2019-01-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since "actionpack" is not included in isolation test. Ref: https://travis-ci.org/rails/rails/jobs/484514392#L2715
* | | | | | Merge pull request #35056 from larskanis/origin-queue-classicRyuta Kamizono2019-01-262-9/+8
|\ \ \ \ \ \ | |_|_|_|/ / |/| | | | | Switch queue_classic back to origin repository
| * | | | | Switch queue_classic back to origin repositoryLars Kanis2019-01-252-9/+8
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | It has been moved to the a fork as part of https://github.com/rails/rails/pull/31671 . That was since to that time a required PR was not yet merged. Now the queue_classic master branch is compatible to recent pg versions, so that there's no need to keep using a fork.
* | | | | Merge pull request #35049 from yuki24/fix-33414Aaron Patterson2019-01-253-13/+34
|\ \ \ \ \ | |/ / / / |/| | | | Fixed a bug where the debug view does not show the error page properly
| * | | | Fixed a bug where the debug view does not show the error page properlyYuki Nishijima2019-01-243-13/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are two cases where the debug view does not show the error details properly: * When the cause is mapped to an HTTP status code the last exception is unexpectedly uwrapped * When the last error is thrown from a view template the debug view is not using the `rescues/template_error.html.erb` to generate the view Both the cases could be fixed by not unwrapping the exception. The only case where the exception should be unwrapped is when the last error is an `ActionView::Template::Error` object. In this case the HTTP status code is determined based on the cause. There are actually more wrapper exceptions that are intentionally thrown. However, there is a consistent pattern of setting the original message and original backtrace to the wrapper exception implemented, so the debug view will not lose the information about what went wrong eariler.
* | | | | Merge pull request #35042 from eileencodes/fix-error-message-for-missing-handlerEileen M. Uchitelle2019-01-254-8/+21
|\ \ \ \ \ | | | | | | | | | | | | Fix error raised when handler doesn't exist
| * | | | | Fix error raised when handler doesn't existEileen Uchitelle2019-01-254-8/+21
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While working on another feature for multiple databases (auto-switching) I observed that in development the first request won't autoload the application record connection for the primary database and may not yet know about the replica connection. In my test application this caused the application to thrown an error if I tried to send the first request to the replica before the replica was connected. This wouldn't be an issue in production because the application is preloaded. In order to fix this I decided to leave the original error message and delete the new error message. I updated the original error message to include the `role` to make it a bit clearer that the connection isn't established for that particular role. The error now reads: ``` No connection pool with 'primary' found for the 'reading' role. ``` A single database application will continue uisng the original error message: ``` No connection pool with 'primary' found. ```
* | | | | Merge pull request #35050 from ricardotk002/fix-typo-rails-testing-guidesGuillermo Iguaran2019-01-241-1/+1
|\ \ \ \ \ | |_|/ / / |/| | | | Fix typo in ActionCable::Connection::TestCase reference [ci-skip]
| * | | | Fix typo in ActionCable::Connection::TestCase referenceRicardo Diaz2019-01-241-1/+1
|/ / / /
* | | | Merge pull request #34789 from christos/fix-editing-new-environment-credentialsKasper Timm Hansen2019-01-253-2/+20
|\ \ \ \ | | | | | | | | | | Don't load app environment when editing credentials
| * | | | Don't load app environment when editing credentialsChristos Zisopoulos2018-12-263-2/+20
| | | | | | | | | | | | | | | | | | | | This avoids missing key exceptions caused by code that tries to read the credentials before they have been added to the encrypted file, for example when editing the credentials for a new environment.
* | | | | Merge pull request #34994 from schuetzm/host-authorization-only-in-developmentRafael França2019-01-242-4/+4
|\ \ \ \ \ | | | | | | | | | | | | Recommend adding the requested domain to hosts whitelist only in deve…
| * | | | | Recommend adding the requested domain to hosts whitelist only in developmentMarc Schütz2019-01-232-4/+4
| | | | | |
* | | | | | Merge pull request #35021 from palkan/refactor/broadcasting-for-testingKasper Timm Hansen2019-01-247-21/+84
|\ \ \ \ \ \ | | | | | | | | | | | | | | Action Cable: move channel_name to Channel.broadcasting_for
| * | | | | | fix fixture syntax in cable docs and guidesVladimir Dementyev2019-01-222-6/+6
| | | | | | |
| * | | | | | Add note about broadcast_to/broadcasting_for to change logVladimir Dementyev2019-01-222-1/+25
| | | | | | |
| * | | | | | Add Channel#broadcast_toVladimir Dementyev2019-01-222-2/+2
| | | | | | |
| * | | | | | Move `channel_name` to Channel.broadcasting_forVladimir Dementyev2019-01-225-14/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | That would allow us to test broadcasting made with channel, e.g.: ```ruby class ChatRelayJob < ApplicationJob def perform_later(room, msg) ChatChannel.broadcast_to room, message: msg end end ``` To test this functionality we need to know the underlying stream name (to use `assert_broadcasts`), which relies on `channel_name`. We had to use the following code: ```ruby assert_broadcasts(ChatChannel.broadcasting_for([ChatChannel.channel_name, room]), 1) do ChatRelayJob.perform_now end ``` The problem with this approach is that we use _internal_ API (we shouldn't care about `channel_name` prefix in our code). With this commit we could re-write the test as following: ```ruby assert_broadcasts(ChatChannel.broadcasting_for(room), 1) do ChatRelayJob.perform_now end ```
* | | | | | | Merge pull request #35047 from yuki24/prefer-strings-over-regexRafael França2019-01-241-22/+20
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Prefer strings over regex expressions
| * | | | | | | Prefer strings over regex expressionsYuki Nishijima2019-01-241-22/+20
| | |_|_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In this case statement, there are two patterns that start with the same line: when %r{/not_found} ... when %r{/not_found_original_exception} ... Because the string "/not_found_original_exception" does match the first one, it is never routed to what it is supposed to be routed, causing one of the tests for DebugExceptions to happen to be passing. After changing the regex expressions back to strings, I noticed that the test setup is not complete (the template object needs to be a proper template object). Once I fixed it all the tests started padding.
* | | | | | | Merge pull request #35045 from paracycle/uk-fix-partial-rendererRafael França2019-01-242-6/+6
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Fix partial renderer assuming `locals` responds to `symbolize_keys`
| * | | | | | | Add test for Hash-like object being passed to partial `locals`Ufuk Kayserilioglu2019-01-241-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test passes an instance of `ActionController::Parameters` that acts like a Hash but does not respond to some Hash methods like `symbolize_keys`. Moreover, if someone were to call `to_h` on the value it would fail since the parameter is not permitted. So this is a great way to ensure that the partial rendering pipeline does not mess with `locals`.
| * | | | | | | Revert "Allow usage of strings as locals for partial renderer"Ufuk Kayserilioglu2019-01-242-11/+1
| | | | | | | |
* | | | | | | | Merge pull request #35046 from kddeisz/make-and-and-case-node-expressionsRafael França2019-01-243-4/+11
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Make `And` and `Case` into expression nodes
| * | | | | | | | Make `And` and `Case` into expression nodesKevin Deisz2019-01-243-4/+11
|/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | Allows aliasing, predications, ordering, and various other functions on `And` and `Case` nodes. This brings them in line with other nodes like `Binary` and `Unary`.
* | | | | | | | Merge pull request #35033 from gmcgibbon/multilevel_command_root_namespaceRafael França2019-01-243-3/+18
|\ \ \ \ \ \ \ \ | |/ / / / / / / |/| | | | | | | Fix deeply nested namespace command printing
| * | | | | | | Fix deeply nested namespace command printingGannon McGibbon2019-01-243-3/+18
| | | | | | | |
* | | | | | | | Prefer ImageProcessing's resize_to_limit macro over resize_to_fitGeorge Claghorn2019-01-249-20/+20
| |_|_|_|_|/ / |/| | | | | | | | | | | | | | | | | | | | Don't upsize images smaller than the specified dimensions.
* | | | | | | Allow `column_exists?` to be passed `type` argument as a stringRyuta Kamizono2019-01-242-10/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently `conn.column_exists?("testings", "created_at", "datetime")` returns false even if the table has the `created_at` column. That reason is that `column.type` is a symbol but passed `type` is not normalized to symbol unlike `column_name`, it is surprising behavior to me. I've improved that to normalize a value before comparison.