aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Enable `sudo` only in the required buildyuuji.yaginuma2018-09-141-4/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, PostgreSQL + Ruby 2.5.1 build has failed. https://travis-ci.org/rails/rails/jobs/427502723#L2940-L2942 https://travis-ci.org/rails/rails/jobs/427496382#L2921-L2923 https://travis-ci.org/rails/rails/jobs/427470858#L2921-L2923 This is because PostgreSQL server abnormally terminates when ramfs becomes full. Ref: https://travis-ci.org/rails/rails/jobs/427960998#L7614 This occurs since d54d0c95750e2693da495b75ac5fa0280253972d. In d54d0c95750e2693da495b75ac5fa0280253972d, `sudo` is used in preprocessing for setting MySQL. In Travis, even if specified `sudo: false`, when using `sudo` in build, sudo-enabled infrastructure is used. https://docs.travis-ci.com/user/reference/overview/#virtualisation-environment-vs-operating-system As container-based infrastructure was changed to sudo-enabled infrastructure, the disk settings etc were also changed, it seems that this phenomenon occurred. This can also be handled by extending ramfs(https://github.com/travis-ci/travis-ci/issues/9036#issuecomment-357189213). However, using sudo-enabled in all builds affects the execution time of build, so I think that it is good to use sudo-enabled only in the necessary builds.
* Merge pull request #33874 from gkemmey/sqlite-expression-indexesRafael França2018-09-135-6/+70
|\ | | | | SQLite3 adapter supports expression indexes
| * SQLite3 adapter supports expression indexesgkemmey2018-09-135-6/+70
| |
* | Merge pull request #33875 from yahonda/drop_mysql_51_supportRyuta Kamizono2018-09-142-2/+2
|\ \ | | | | | | | | | | | | Bump MySQL version requirement to 5.5.8 in the template files [ci skip]
| * | Bump MySQL version requirement to 5.5.8 in the template filesYasuo Honda2018-09-132-2/+2
| | | | | | | | | | | | Follow-up #33853
* | | Merge pull request #33800 from aeroastro/feature/doc-change-for-blankXavier Noria2018-09-131-1/+1
|\ \ \ | | | | | | | | Improve API document on Object#blank?
| * | | Revert falsey with example reorderedTakumasa Ochi2018-09-141-2/+2
| | | |
| * | | Improve API document on Object#blank?Takumasa Ochi2018-09-061-2/+2
| | | | | | | | | | | | | | | | | | | | * Introduce `falsey` to represent both `nil` and `false`. * Keep consistent order between abstract description and examples.
* | | | Merge pull request #33569 from eric-hemasystems/conditional-flash-helperRafael França2018-09-132-3/+13
|\ \ \ \ | |_|_|/ |/| | | Conditionally use `helper_method` in Flash concern
| * | | Conditionally use `helper_method` in Flash concernEric Anderson2018-08-092-3/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I was attempting to use the `flash` functionality in a `Metal` controller. When including the `flash` concern I received the following error: NoMethodError: undefined method `helper_method'.... Either: - `AbstractController::Helpers` should be a dependency of `ActionController::Flash` - `ActionController::Flash` should not require the existence of `AbstractController::Helpers`. Since my use case (set a flash and redirect) has no need for the helper method and that is a common use case, making the dependency conditional seemed the better option. NOTE: This is similar to issue #21067 only the error is within Rails itself while that issue had the error within Devise.
* | | | Merge pull request #33871 from gregmolnar/database_configurationsEileen M. Uchitelle2018-09-131-0/+1
|\ \ \ \ | |_|_|/ |/| | | add `any?` to DatabaseConfigurations
| * | | add `any?` to DatabaseConfigurationsGreg Molnar2018-09-131-0/+1
| | | |
* | | | Merge pull request #33378 from numbata/subclass-redefine-autosave-callbacksRafael Mendonça França2018-09-134-1/+32
|\ \ \ \ | | | | | | | | | | | | | | | Allow subclasses to redefine autosave callbacks for associated records
| * | | | Allow subclasses to redefine autosave callbacks for associated recordsAndrey Subbota2018-07-274-1/+32
| | | | |
* | | | | Merge pull request #33853 from yahonda/use_utf8mb4_only_if_availableJeremy Daer2018-09-133-4/+19
|\ \ \ \ \ | | | | | | | | | | | | Validate if `utf8mb4` character set and longer index key prefix is supported
| * | | | | Drop MySQL 5.1 supportYasuo Honda2018-09-132-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * MySQL 5.1 does not support `utf8mb4` character set * MySQL 5.1 had been already EOLed on Dec 2013 https://www.mysql.com/support/eol-notice.html > Per Oracle's Lifetime Support policy, as of December 31, 2013, MySQL 5.1 > is covered under Oracle Sustaining Support. * MySQL 5.5.8 is the first General Availability of MySQL 5.5 https://dev.mysql.com/doc/relnotes/mysql/5.5/en/news-5-5-8.html
| * | | | | Raise an exception if :charset is not specified and large prefixes / utf8mb4 ↵Yasuo Honda2018-09-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | are not supported
| * | | | | Validate if `utf8mb4` character set and longer index key prefix is supportedYasuo Honda2018-09-132-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Once #33608 merged If users create a new database using MySQL 5.1.x, it will fail to create databases since MySQL 5.1 does not know `utf8mb4` character set. This pull request removes `encoding: utf8mb4` from `mysql.yml.tt` to let create_database method handles default character set by MySQL server version. `supports_longer_index_key_prefix?` method will need to validate if MySQL 5.5 and 5.6 server configured correctly to support longer index key prefix, but not yet.
* | | | | | Merge pull request #33872 from sharang-d/fix-typoRafael França2018-09-131-1/+1
|\ \ \ \ \ \ | |_|_|/ / / |/| | | | | Update arguments.rb [ci skip]
| * | | | | Update arguments.rb [ci skip]Sharang Dashputre2018-09-131-1/+1
|/ / / / / | | | | | | | | | | | | | | | Fix typo `Instrinsic` -> `Intrinsic`
* | | | | Merge pull request #33869 from bogdanvlviv/add-changelog-entries-for-33849Ryuta Kamizono2018-09-132-0/+8
|\ \ \ \ \ | | | | | | | | | | | | Add changelog entries for #33849 [ci skip]
| * | | | | Add changelog entries for #33849 [ci skip]bogdanvlviv2018-09-132-0/+8
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since these changes related to the public API, I think we should add changelog entries. Related to #33838, #33849
* | | | | Merge pull request #33844 from kamipo/too_many_eager_load_idsRyuta Kamizono2018-09-136-5/+29
|\ \ \ \ \ | |/ / / / |/| | | | Eager loading/preloading should be worked regardless of large number of records
| * | | | Eager loading/preloading should be worked regardless of large number of recordsRyuta Kamizono2018-09-126-5/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since 213796f, bind params are used for IN clause if enabled prepared statements. Unfortunately, most adapter modules have a limitation for # of bind params (mysql2 65535, pg 65535, sqlite3 250000). So if eager loading large number of records at once, that query couldn't be sent to the database. Since eager loading/preloading queries are auto-generated by Active Record itself, so it should be worked regardless of large number of records like as before. Fixes #33702.
* | | | | Merge pull request #33860 from jhawthorn/faster_find_templatesRafael França2018-09-121-13/+53
|\ \ \ \ \ | | | | | | | | | | | | Use faster globs for template resolving
| * | | | | Fix for variants: :any special caseJohn Hawthorn2018-09-121-1/+3
| | | | | |
| * | | | | Use wildcard glob for optimized template resolvingJohn Hawthorn2018-09-121-13/+51
| | | | | |
* | | | | | Add a test that exercice better the behavior we expect in the query cacheRafael Mendonça França2018-09-121-2/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In production the query cache was already being loaded before the first request even without #33856, so added a test to make sure of it. This new test is passing even if #33856 is reverted.
* | | | | | Merge pull request #33849 from ↵Rafael França2018-09-122-1/+8
|\ \ \ \ \ \ | |/ / / / / |/| | | | | | | | | | | | | | | | | ricardotk002/include-helpers-action-dispatch-integration-test Include test helpers in ActionDispatch::IntegrationTest
| * | | | | Include test helpers when ActionDispatch::IntegrationTest is loadedRicardo Díaz2018-09-122-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As @dhh brings up, the point of `ActionDispatch::IntegrationTest` is to allow users to test the integration of all the pieces called by a controller. Asserting about the emails and jobs queued is part of that task. This commit includes the `ActionMailer::TestHelper` and `ActiveJob::TestHelper` modules when the ActionMailer and ActiveJob railties are initialized respectively.
* | | | | | Merge pull request #33854 from rigani/integer-multipleRafael França2018-09-121-1/+1
|\ \ \ \ \ \ | | | | | | | | | | | | | | Faster multiple_of? method
| * | | | | | Faster multiple_of? methodrigani2018-09-121-1/+1
| | | | | | |
* | | | | | | Merge pull request #33832 from bogdanvlviv/follow-up-33756Rafael França2018-09-125-31/+55
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Follow up #33756
| * | | | | | | Add mention about `ActiveRecord::Base::filter_attributes` to the changelog entrybogdanvlviv2018-09-122-8/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also remove `# :nodoc:` for `ActiveRecord::Core::ClassMethods` in order to show non-nodoc methods in that module on the api docs http://edgeapi.rubyonrails.org
| * | | | | | | Build string set when `filter_attributes` is assignedbogdanvlviv2018-09-122-7/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It would allow `filter_attributes` to be reused across multiple calls to `#inspect` or `#pretty_print`. - Add `require "set"` - Remove `filter_attributes` instance reader. I think there is no need to keep it.
| * | | | | | | DRY `activerecord/lib/active_record/core.rb` and fix testsbogdanvlviv2018-09-122-20/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Move ``` filter_attributes = self.filter_attributes.map(&:to_s).to_set filter_attributes.include?(attribute_name) && !read_attribute(attribute_name).nil? ``` to private method. - Fix tests in `activerecord/test/cases/filter_attributes_test.rb` - Ensure that `teardown` sets `ActiveRecord::Base.filter_attributes` to previous state. - Ensure that `Admin::Account.filter_attributes` is set to previous state in the "filter_attributes could be overwritten by models" test. Follow up #33756
| * | | | | | | Clarify docs of `config.filter_parameters` and `#filter_attributes`bogdanvlviv2018-09-122-2/+2
|/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add mention that `config.filter_parameters` also filters out sensitive values of database columns when call `#inspect` since #33756.
* | | | | | | Merge pull request #33856 from ↵Eileen M. Uchitelle2018-09-122-3/+34
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | eileencodes/fix-query-cache-to-load-before-first-request Fix query cache to load before first request
| * | | | | | | Fix query cache to load before first requestEileen Uchitelle2018-09-122-3/+34
|/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In a test app we observed that the query cache was not enabled on the first request. This was because the query cache hooks are installed on load and active record is loaded in the middle of the first request. If we remove the `on_load` from the railtie the query cache hooks will be installed before the first request, allowing the cache to be enabled on that first request. This is ok because query cache doesn't load anything else, only itself so we're not eager loading all of active record before the first request, just the query cache hooks. [Eileen M. Uchitelle & Matthew Draper]
* | | | | | | Merge pull request #33852 from sharang-d/patch-2Yuji Yaginuma2018-09-121-1/+1
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | | Update test_helper_test.rb
| * | | | | | Update test_helper_test.rbSharang Dashputre2018-09-121-1/+1
|/ / / / / / | | | | | | | | | | | | Fix typo `wiht` -> `with`
* | | | | | Merge pull request #33848 from sharang-d/patch-2Rafael França2018-09-111-1/+1
|\ \ \ \ \ \ | | | | | | | | | | | | | | Update action_mailer_basics.md
| * | | | | | Update action_mailer_basics.md [ci skip]Sharang Dashputre2018-09-121-1/+1
|/ / / / / / | | | | | | | | | | | | | | | | | | Add backticks to code
* | | | | | Merge pull request #33819 from kevindew/yarn-pathRafael França2018-09-111-1/+1
|\ \ \ \ \ \ | | | | | | | | | | | | | | Run yarn install relative to Rails.root
| * | | | | | Run yarn install relative to Rails.rootKevin Dew2018-09-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We may not always have binstubs relative to the directory we are running the rake task from. The particular case for this is with a mountable Rails engine and dummy app that is created to test it. This sets all the tasks up to run under an `app` namespace in railties/lib/rails/tasks/engine.rake This change resolves a problem whereby running `app:yarn:install` would have no effect as it would try to run in the plugins bin directory rather than the test/dummy/bin. This also means that it installs from test/dummy/package.json and into test/dummy/node_modules which is behaviour consistent with a normal Rails app. On a rails engine: ``` ➜ tmp rails plugin new rails-plugin --mountable ➜ tmp cd rails-plugin ``` Before this change: ``` ➜ rails-plugin rake app:yarn:install ➜ rails-plugin ``` After this change: ``` ➜ rails-plugin rake app:yarn:install yarn install v1.9.4 info No lockfile found. [1/4] 🔍 Resolving packages... [2/4] 🚚 Fetching packages... [3/4] 🔗 Linking dependencies... [4/4] 📃 Building fresh packages... ✨ Done in 0.07s. ``` When this change is ran against a normal rails install there is not a behavioural change: ``` ➜ tmp rails new full-app ➜ tmp cd full-app ➜ full-app git:(master) ✗ rake yarn:install yarn install v1.9.4 info No lockfile found. [1/4] 🔍 Resolving packages... [2/4] 🚚 Fetching packages... [3/4] 🔗 Linking dependencies... [4/4] 📃 Building fresh packages... ✨ Done in 0.09s. ```
* | | | | | | Merge pull request #33483 from DylanReile/masterRafael França2018-09-111-0/+2
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Disable content security policy for mailer previews
| * | | | | | | Disable content security policy for mailer previewsDylan Reile2018-07-301-0/+2
| | | | | | | |
* | | | | | | | Merge pull request #27792 from tjoyal/sandbox-tagged-loggingRafael Mendonça França2018-09-113-10/+35
|\ \ \ \ \ \ \ \ | |_|_|/ / / / / |/| | | | | | | | | | | | | | | TaggedLogging to return a new logger instance
| * | | | | | | TaggedLogging to return a new logger instanceThierry Joyal2017-02-273-10/+34
| | | | | | | |
* | | | | | | | Merge pull request #33821 from schneems/schneems/digester-no-arrayRichard Schneeman2018-09-112-10/+22
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Move digest path calculation out of loop