aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | | | Merge pull request #34520 from yahonda/bump_pg93Rafael França2018-11-2612-410/+385
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Bump the minimum version of PostgreSQL to 9.3
| * | | | | | | Bump the minimum version of PostgreSQL to 9.3Yasuo Honda2018-11-2512-410/+385
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://www.postgresql.org/support/versioning/ - 9.1 EOLed on September 2016. - 9.2 EOLed on September 2017. 9.3 is also not supported since Nov 8, 2018. https://www.postgresql.org/about/news/1905/ I think it may be a little bit early to drop PostgreSQL 9.3 yet. * Deprecated `supports_ranges?` since no other databases support range data type * Add `supports_materialized_views?` to abstract adapter Materialized views itself is supported by other databases, other connection adapters may support them * Remove `with_manual_interventions` It was only necessary for PostgreSQL 9.1 or earlier * Drop CI against PostgreSQL 9.2
* | | | | | | | Merge pull request #34521 from azbshiri/mysql-exec-query-resultEileen M. Uchitelle2018-11-262-2/+15
|\ \ \ \ \ \ \ \ | |_|/ / / / / / |/| | | | | | | Test when using MySQL `exec_query` returns `ActiveRecord::Result` all…
| * | | | | | | When running exec_query MySQL always returns ActiveRecord::ResultAlireza Bashiri2018-11-252-2/+15
| |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | When running `exec_query` with `INSERT` (or other write commands), MySQL returns `ActiveRecord::Result`.
* | | | | | | Merge pull request #34525 from tnantoka/cache-key-low-level-cachingRyuta Kamizono2018-11-261-1/+1
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Use cache_key_with_version instead of cache_key for the example in Low-Level Caching [ci skip]
| * | | | | | | Use cache_key_with_version instead of cache_key for the example in Low-Level ↵tnantoka2018-11-261-1/+1
|/ / / / / / / | | | | | | | | | | | | | | | | | | | | | Caching [ci skip]
* | | | | | | Fix random CI failure due to non-deterministic sorting orderRyuta Kamizono2018-11-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | https://travis-ci.org/rails/rails/jobs/459534536#L1280
* | | | | | | Merge pull request #34522 from ↵Ryuta Kamizono2018-11-261-2/+0
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | yahonda/sqlite3_returns_primary_key_in_expected_order SQLite 3.7.16+ returns the order of the primary key columns
| * | | | | | | SQLite 3.7.16+ returns the order of the primary key columnsYasuo Honda2018-11-251-2/+0
| |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://www.sqlite.org/releaselog/3_7_16.html > 9 Enhance the PRAGMA table_info command so that the "pk" column is an increasing integer to show the order of columns in the primary key. Rails 6 supports SQLite 3.8 then we can remove this skip condition.
* | | | | | | Merge pull request #34524 from tomrossi7/updating-docsGannon McGibbon2018-11-251-7/+23
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | | Updating the Testing Guide to Reflect Emails Enqueued With ActiveJob
| * | | | | | Updating the Testing Guide to Reflect Emails Enqueued With ActiveJob [ci skip]Tom Rossi2018-11-251-7/+23
|/ / / / / /
* | | | | | ASt direct uploads: account for <button type="submit"> elementsTasos Maschalidis2018-11-242-4/+4
| | | | | |
* | | | | | Merge pull request #34519 from composerinteralia/duration-inspectRyuta Kamizono2018-11-251-1/+0
|\ \ \ \ \ \ | | | | | | | | | | | | | | Remove unnecessary reduce in Duration#inspect
| * | | | | | Remove unnecessary reduce in Duration#inspectDaniel Colson2018-11-241-1/+0
|/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the `Duration` class was introduced in 276c9f29, the `parts` were represented as an array of arrays (for example `[[:seconds, 5], [:days, 3], [:seconds, 7]]`). At that time the `reduce` in `#inspect` made sense, since we would need to get the totals for each part (the example would become `{ seconds: 12, days: 3 }`). With the current version of `Duration` we call `to_h` on the `parts` immediately on initialize, so now the `reduce` doesn't seem to be doing anything meaningful.
* | | | | | Merge pull request #34517 from EByrdS/immutable-enumRafael França2018-11-233-0/+19
|\ \ \ \ \ \ | | | | | | | | | | | | | | Pluralized enum raises error when attempting to modify
| * | | | | | Raises error when attempting to modify enum valuesebyrds2018-11-233-0/+19
| | | | | | |
* | | | | | | Merge pull request #34515 from BenjaminKim/patch-1Rafael França2018-11-231-1/+1
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | | rubyonrails.org has been ready for https
| * | | | | | rubyonrails.org has been ready for httpsBenjamin Kim2018-11-241-1/+1
|/ / / / / /
* | | | | | Merge pull request #34376 from composerinteralia/default_queue_nameRafael França2018-11-232-2/+29
|\ \ \ \ \ \ | | | | | | | | | | | | | | Allow using queue prefix with a default queue name
| * | | | | | Allow using queue prefix with a default queue nameDaniel Colson2018-11-032-2/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes #34366 Currently setting queue_name_prefix will not combine a prefix with the default_queue_name; it will only affect queue names set with `queue_as`. With this PR the prefix will affect the default_queue_name as well. Closes #19831 Currently setting default_queue_name doesn't actually affect the queue_name default (although default_queue_name does get used if you pass a falsey `part_name` to `queue_as`). This PR would get default_queue_name working as expected as well. Because the queue_name default is now a lambda wrapping the default_queue_name, rather than the default_queue_name itself, I had to update one test to use the instance method `#queue_name` (which `instance_exec`s the value) instead of the class method. I think this change is OK, since only the instance method is documented. There was a question about whether we want a `default_queue_name` configuration. If we want to get rid of it, I would also be happy to open a PR for that instead. It has been around for a while now, but it also hasn't really worked for a while now. r? @matthewd since you had an opinion about this before
* | | | | | | Merge pull request #34367 from gmcgibbon/rm_parameterized_delivery_jobRafael França2018-11-239-51/+50
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Deliver parameterized mail with DeliveryJob
| * | | | | | | Deliver parameterized mail with DeliveryJobGannon McGibbon2018-11-229-51/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Deliver parameterized mail with `ActionMailer::DeliveryJob` and remove `ActionMailer::Parameterized::DeliveryJob`.
* | | | | | | | Merge pull request #34455 from ↵Rafael França2018-11-233-1/+6
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | minimalweb/progressive_jpeg_inclusion_as_variable_content_type Add progressive JPG MIME-type to default variable content types
| * | | | | | | | Add progressive JPG to default variable content typesMaurice Kühlborn2018-11-213-1/+6
| | | | | | | | |
* | | | | | | | | Merge pull request #34468 from gmcgibbon/redact_sql_in_errorsRafael França2018-11-239-58/+112
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Redact SQL in errors
| * | | | | | | | | Redact SQL in errorsGannon McGibbon2018-11-229-58/+112
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move `ActiveRecord::StatementInvalid` SQL to error property. Also add bindings as an error property.
* | | | | | | | | | Keep executions for each specific exception (#34352)Alberto Almagro2018-11-235-4/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Keep executions for each specific declaration Fixes #34337 ActiveJob used the global executions counter to control the number of times a job should be retried. The problem with this approach was that in case a job raised different exceptions during its executions they weren't retried the number of times defined by their `attemps` number. **Example:** Having the following job: ```ruby class BuggyJob < ActiveJob::Base retry_on CustomException, attemps: 3 retry_on OtherException, attempts: 3 end ``` If the job raised `CustomException` in the first two executions and then it raised `OtherException`, the job wasn't retried anymore because the global executions counter was already indicating 3 attempts. With this patch each `retry_on` declaration has its specific counter so that the first two executions that raise `CustomException` don't affect the retries count that future exceptions may have. * Revert "clarifies documentation around the attempts arugment to retry_on" This reverts commit 86aa8f8c5631f77ed9a208e5107003c01512133e.
* | | | | | | | | | Merge pull request #34507 from albertoalmagro/rename-rtl-as-directionGannon McGibbon2018-11-232-18/+21
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | Use direction instead of rtl flag
| * | | | | | | | | | Use direction instead of rtl flag.Alberto Almagro2018-11-222-18/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Improve readability by using `direction` as CSS does. More info: https://developer.mozilla.org/en-US/docs/Web/CSS/direction Continues: #34486 [Alberto Almagro + Ufuk Kayserilioglu]
* | | | | | | | | | | Merge pull request #34511 from TomSpencerLondon/masterGannon McGibbon2018-11-231-1/+1
|\ \ \ \ \ \ \ \ \ \ \ | |_|_|_|/ / / / / / / |/| | | | | | | | | | Add ? for Whats Rails
| * | | | | | | | | | Add ? for Whats RailsTomSpencerLondon2018-11-231-1/+1
|/ / / / / / / / / /
* | | | | | | | | | Merge pull request #34037 from reitermarkus/atomic_write-permissionsRafael França2018-11-222-1/+15
|\ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / |/| | | | | | | | | `atomic_write`: Ensure correct permission when `tmpdir` is the same as `dirname`.
| * | | | | | | | | Ensure correct permission when `tmpdir` is the same as `dirname`.Markus Reiter2018-10-022-1/+15
| | | | | | | | | |
* | | | | | | | | | Use squiggly heredoc to strip odd indentation in the executed SQLRyuta Kamizono2018-11-2219-91/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before: ``` LOG: execute <unnamed>: SELECT t.oid, t.typname FROM pg_type as t WHERE t.typname IN ('int2', 'int4', 'int8', 'oid', 'float4', 'float8', 'bool') LOG: execute <unnamed>: SELECT t.oid, t.typname, t.typelem, t.typdelim, t.typinput, r.rngsubtype, t.typtype, t.typbasetype FROM pg_type as t LEFT JOIN pg_range as r ON oid = rngtypid WHERE t.typname IN ('int2', 'int4', 'int8', 'oid', 'float4', 'float8', 'text', 'varchar', 'char', 'name', 'bpchar', 'bool', 'bit', 'varbit', 'timestamptz', 'date', 'money', 'bytea', 'point', 'hstore', 'json', 'jsonb', 'cidr', 'inet', 'uuid', 'xml', 'tsvector', 'macaddr', 'citext', 'ltree', 'interval', 'path', 'line', 'polygon', 'circle', 'lseg', 'box', 'time', 'timestamp', 'numeric') OR t.typtype IN ('r', 'e', 'd') OR t.typinput::varchar = 'array_in' OR t.typelem != 0 LOG: statement: SHOW TIME ZONE LOG: statement: SELECT 1 LOG: execute <unnamed>: SELECT COUNT(*) FROM pg_class c LEFT JOIN pg_namespace n ON n.oid = c.relnamespace WHERE c.relkind IN ('r','v','m') -- (r)elation/table, (v)iew, (m)aterialized view AND c.relname = 'accounts' AND n.nspname = ANY (current_schemas(false)) ``` After: ``` LOG: execute <unnamed>: SELECT t.oid, t.typname FROM pg_type as t WHERE t.typname IN ('int2', 'int4', 'int8', 'oid', 'float4', 'float8', 'bool') LOG: execute <unnamed>: SELECT t.oid, t.typname, t.typelem, t.typdelim, t.typinput, r.rngsubtype, t.typtype, t.typbasetype FROM pg_type as t LEFT JOIN pg_range as r ON oid = rngtypid WHERE t.typname IN ('int2', 'int4', 'int8', 'oid', 'float4', 'float8', 'text', 'varchar', 'char', 'name', 'bpchar', 'bool', 'bit', 'varbit', 'timestamptz', 'date', 'money', 'bytea', 'point', 'hstore', 'json', 'jsonb', 'cidr', 'inet', 'uuid', 'xml', 'tsvector', 'macaddr', 'citext', 'ltree', 'interval', 'path', 'line', 'polygon', 'circle', 'lseg', 'box', 'time', 'timestamp', 'numeric') OR t.typtype IN ('r', 'e', 'd') OR t.typinput::varchar = 'array_in' OR t.typelem != 0 LOG: statement: SHOW TIME ZONE LOG: statement: SELECT 1 LOG: execute <unnamed>: SELECT COUNT(*) FROM pg_class c LEFT JOIN pg_namespace n ON n.oid = c.relnamespace WHERE c.relkind IN ('r','v','m') -- (r)elation/table, (v)iew, (m)aterialized view AND c.relname = 'accounts' AND n.nspname = ANY (current_schemas(false)) ```
* | | | | | | | | | Compile packs before run testyuuji.yaginuma2018-11-221-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sometimes `test_scaffold_tests_pass_by_default` test fails in CI. https://travis-ci.org/rails/rails/jobs/457621750#L2095-L2120 It seems `manifest.json` was broken. `webpacker` will compile automatically if packs is not compiled. If parallel test is enabled, it seems that this compilation process is executed simultaneously in multiple processes, and it may become an inconsistent state. In order to avoid this, compile before running the test.
* | | | | | | | | | Fix ruby warningsyuuji.yaginuma2018-11-221-2/+2
| |/ / / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes following warnings: ``` test/dependencies_test.rb:287: warning: possibly useless use of :: in void context test/dependencies_test.rb:300: warning: possibly useless use of a constant in void context ```
* | | | | | | | | Merge pull request #34339 from Edouard-chin/ec-mail-test-helperRafael França2018-11-217-9/+171
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Fix ActionMailer assertion not working for mail defining delivery_job:
| * | | | | | | | | Fix ActionMailer assertion not working for mail defining delivery_job:Edouard CHIN2018-11-213-5/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - If a Mail defines a custom delivery_job, all ActionMailer assertion helper (assert_emails, assert_enqueued_emails ...) wouldn't work. ```ruby MyMailer < ApplicationMailer self.delivery_job = MyJob end # This assertion will fail assert_emails(1) do MyMailer.my_mail.deliver_later end This PR leverage the new ActiveJob feature that accepts Procs for the `only` keyword and check if the delivery job is one of ActionMailer registered ones.
| * | | | | | | | | Allow all ActiveJob assertion helper to accept Proc in their `only` kw:Edouard CHIN2018-11-214-4/+101
|/ / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - That feature is useful to enqueue or assert that jobs got enqueued or performed based on dynamic conditions. We will be able to leverage that feature to fix all ActionMailer assertion helper issue when a Mailer define a custom delivery job (see next commit).
* | | | | | | | | Merge pull request #34498 from ThomBian/thombian/fix-opclass-parsingRyuta Kamizono2018-11-222-1/+13
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Fixing an issue when parsing an opclass by allowing indexed column in indexdef to be wrapped up by double quotes
| * | | | | | | | | Fixing an issue when parsing an opclass by allowing indexed columnThomas Bianchini2018-11-212-1/+13
|/ / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in indexdef to be wrapped up by double quotes Fixes #34493. *Thomas Bianchini*
* | | | | | | | | Merge pull request #34491 from rails/fix-query-cache-on-multiple-connectionsEileen M. Uchitelle2018-11-212-4/+27
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Fix query cache for multiple connections
| * | | | | | | | | Fix query cache for multiple connectionsEileen Uchitelle2018-11-202-4/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the query cache is only aware of one handler so once we added multiple databases switching on the handler we broke query cache for those reading connections. While #34054 is the proper fix, that fix is not straight forward and I want to make sure that the query cache isn't just broken for all other connections not in the main handler.
* | | | | | | | | | Remove odd spaces [ci skip]Ryuta Kamizono2018-11-211-2/+2
| | | | | | | | | |
* | | | | | | | | | Merge pull request #34489 from 6temes/add_slice_method_to_errorsRafael França2018-11-213-0/+39
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | Add slice! method to ActiveModel::Errors
| * | | | | | | | | | Add slice! method to ActiveModel::ErrorsDaniel Lopez Prat2018-11-213-0/+39
| | | | | | | | | | |
* | | | | | | | | | | Merge pull request #34497 from 6temes/make_documentation_for_slice_more_explicitRafael França2018-11-201-2/+3
|\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Expand documentation for Hash#slice!
| * | | | | | | | | | | Improve documentation for Hash#slice!Daniel Lopez 👾2018-11-211-2/+3
| |/ / / / / / / / / /
* | | | | | | | | | | Merge pull request #34495 from ↵Eileen M. Uchitelle2018-11-202-2/+39
|\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | rails/make-connection-handler-per-thread-not-per-fiber Make connection handler per thread instead of per fiber
| * | | | | | | | | | | Make connection handler per thread instead of per fiberEileen Uchitelle2018-11-202-2/+39
| | |/ / / / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The connection handler was using the RuntimeRegistry which kind of implies it's a per thread registry. But it's actually per fiber. If you have an application that uses fibers and you're using multiple databases, when you switch the connection handler to swap connections new fibers running on the same thread used to get a different connection id. This PR changes the code to actually use a thread so that we get the same connection. Fixes https://github.com/rails/rails/issues/30047 [Eileen M. Uchitelle, Aaron Patterson, & Arthur Neeves]