bogdanvlviv
b7beb5d4e5
Fix formatting of ActiveJob::TestHelper
api docs
2018-08-20 13:05:29 +03:00
bogdanvlviv
2ec60fb818
Allow assert_performed_with
to be called without a block.
...
Example:
```
def test_assert_performed_with
MyJob.perform_later(1,2,3)
perform_enqueued_jobs
assert_performed_with(job: MyJob, args: [1,2,3], queue: 'high')
end
```
Follow up #33626 .
2018-08-20 13:05:29 +03:00
bogdanvlviv
11634e8ef8
Fix assert_performed_jobs
and assert_no_performed_jobs
...
Execution of `assert_performed_jobs`, and `assert_no_performed_jobs`
without a block should respect passed `:except`, `:only`, and `:queue` options.
2018-08-20 13:05:29 +03:00
bogdanvlviv
2bf8b4eb0e
Add changelog entry about adding :queue
option to job assertions and helpers
...
Note that it removes changelog entry of #33265 since the entry in this commits
includes that too.
2018-08-20 13:05:29 +03:00
bogdanvlviv
de4420da44
Allow :queue
option to assert_no_performed_jobs
.
...
If the `:queue` option is specified, then only the job(s) enqueued to a specific
queue will not be performed.
Example:
```
def test_assert_no_performed_jobs_with_queue_option
assert_no_performed_jobs queue: :some_queue do
HelloJob.set(queue: :other_queue).perform_later("jeremy")
end
end
```
2018-08-20 13:05:29 +03:00
bogdanvlviv
d50fb21e4d
Allow :queue
option to assert_performed_jobs
.
...
If the `:queue` option is specified, then only the job(s) enqueued to a specific
queue will be performed.
Example:
```
def test_assert_performed_jobs_with_queue_option
assert_performed_jobs 1, queue: :some_queue do
HelloJob.set(queue: :some_queue).perform_later("jeremy")
HelloJob.set(queue: :other_queue).perform_later("bogdan")
end
end
```
2018-08-20 13:05:29 +03:00
bogdanvlviv
e0cf042fa2
Fix perform_enqueued_jobs
...
Set
````
queue_adapter.perform_enqueued_jobs = true
queue_adapter.perform_enqueued_at_jobs = true
queue_adapter.filter = only
queue_adapter.reject = except
queue_adapter.queue = queue
```
if block given.
Execution of `flush_enqueued_jobs` doesn't require that.
2018-08-20 13:05:22 +03:00
bogdanvlviv
ec2e8f645e
Allow :queue
option to perform_enqueued_jobs
.
...
If the `:queue` option is specified, then only the job(s) enqueued to
a specific queue will be performed.
Example:
```
def test_perform_enqueued_jobs_with_queue
perform_enqueued_jobs queue: :some_queue do
MyJob.set(queue: :some_queue).perform_later(1, 2, 3) # will be performed
HelloJob.set(queue: :other_queue).perform_later(1, 2, 3) # will not be performed
end
assert_performed_jobs 1
end
```
Follow up #33265
[bogdanvlviv & Jeremy Daer]
2018-08-20 00:20:06 +03:00
Kasper Timm Hansen
44007c0709
Don't put up with not saying it.
...
Commands generally prefer say to puts.
2018-08-19 19:58:05 +02:00
Ryuta Kamizono
f0f74a76db
Merge pull request #33657 from jychen7/fix-test-association-enum
...
Improve test case to test enum correctly
2018-08-20 02:57:02 +09:00
Kasper Timm Hansen
cc14bf77ca
Merge pull request #33631 from anniecodes/initializers-command
...
Move the initializers rake task to Rails::Command
2018-08-19 19:38:17 +02:00
Kasper Timm Hansen
3c6d2ec46e
Merge pull request #33656 from bogdanvlviv/follow-up-33413
...
activestorage: yarn build
2018-08-19 19:34:10 +02:00
Ryuta Kamizono
b6e583343a
SQLite3: Fix rename reference column not to lose foreign key constraint
...
Fixes #33520 .
2018-08-20 02:27:14 +09:00
Rich
d510295b31
Improve test case to test enum correctly
...
without define the enum in class “SpecialBook”, any string status will be casted to integer 0. Then the test have no meaning.
[Rich Chen]
2018-08-20 01:18:28 +08:00
Ryuta Kamizono
fd1ec91c73
Merge pull request #33655 from bogdanvlviv/follow-up-33653
...
DRY in Active Record Query Interface [ci skip]
2018-08-20 01:37:34 +09:00
bogdanvlviv
0e77706dc5
activestorage: yarn build
...
Context https://github.com/rails/rails/pull/33413#issuecomment-414137587
2018-08-19 19:33:16 +03:00
bogdanvlviv
b91dc57928
DRY in Active Record Query Interface [ci skip]
...
The sentence "This is exactly the same as defining a class method ..."
is not true, so #33653 fixed it, but added changes repeat what is explained
a few lines below. We can remove this part since a user is able to get info
about the difference between scopes and class methods below.
Context https://github.com/rails/rails/pull/33653#discussion_r211105969 .
Reverts #33653 , 97feb4996b1c88f770101dfce6d4d3a6baf6bb33.
2018-08-19 19:29:41 +03:00
Ryuta Kamizono
97feb4996b
Fix syntax error in the doc [ci skip]
2018-08-19 23:35:04 +09:00
Richard Schneeman
878800559d
Merge pull request #33653 from LemonAndroid/patch-1
...
Explained difference between scope & class method
2018-08-19 06:36:45 -07:00
yuuji.yaginuma
85a63e6888
Update google-cloud-storage
gem version [ci skip]
...
Now requires version 1.11 or newer. Ref: bf5f41d948b6f3f27db7fdc2b70897aec991065f
2018-08-19 15:24:00 +09:00
George Claghorn
093d8d3953
Retry ActiveStorage::AnalyzeJobs on download integrity check failures
2018-08-19 01:19:51 -04:00
George Claghorn
116fae6ef9
Remove superfluous test
...
This test no longer covers the behavior of ActiveStorage::PurgeJob. Attached blobs are ignored by ActiveStorage::Blob#purge as of 934fccd, which includes an equivalent model test.
2018-08-19 01:10:50 -04:00
Ryuta Kamizono
274a9c772f
Address intermittent CI failure due to non-determined sort order
...
https://travis-ci.org/rails/rails/jobs/417783260#L1173-L1179
2018-08-19 12:22:46 +09:00
LemonAndroid
e2589989d0
Explained difference between scope & class method
2018-08-19 05:07:03 +02:00
Ryuta Kamizono
dc796a0d40
Ensure foreign_keys
assertions after alter table
...
If `foreign_keys` is fetched before alter table, it couldn't notice
whether foreign keys are broken or not after alter table.
2018-08-19 09:09:38 +09:00
Ryuta Kamizono
b2c1e29c14
Enable Style/ParenthesesAroundCondition cop
...
To prevent style check in review like https://github.com/rails/rails/pull/33608#discussion_r211087605 .
2018-08-19 08:16:21 +09:00
Javan Makhmali
9270c6d7fc
Merge pull request #33413 from cseelus/active-storage-direct-uploads-multiple-submit-buttons
...
Support multiple submit buttons in Active Storage forms
2018-08-18 15:43:59 -04:00
Chris Seelus
880f977925
Enable multiple submit buttons for Active Storage forms
2018-08-18 19:31:39 +02:00
yuuji.yaginuma
87d5415f0a
Fix unclosed tags [ci skip]
2018-08-18 16:23:20 +09:00
yuuji.yaginuma
e49fb7921e
Increment execution count before deserialize arguments
...
Currently, the execution count increments after deserializes arguments.
Therefore, if an error occurs with deserialize, it retries indefinitely.
In order to prevent this, the count is moved before deserialize.
Fixes #33344 .
2018-08-18 11:22:41 +09:00
Richard Schneeman
d6688892f6
Merge pull request #33645 from arye-dov-eidelman/master
...
[skip ci] Fix overlapping text in the guide
2018-08-17 14:16:11 -07:00
Arye Dov Eidelman
bcd4c38171
[skip ci] Fix overlapping text in the guide
...
Fix a layout issue in the rails guides, where the navigation covers the main text,
if the page is between 800 and 960 pixels wide. (issue #33406 )
2018-08-17 16:41:42 -04:00
yuuji.yaginuma
0193b89be6
Remove unused requires
2018-08-17 12:51:14 +09:00
Ryuta Kamizono
6563a73e89
Merge pull request #33537 from ZASMan/update_action_mailer_docs_custom_view_paths
...
Add note for custom mailer view paths in action mailer guide. [ci skip]
2018-08-17 12:43:09 +09:00
Zane
16acf4f9c7
Add note for custom mailer view paths in action mailer guide. [ci skip]
...
Adds stuff
Fixes a typo
Integrates changes
Adds link to append_view_path in actionmailer guide.
2018-08-16 21:37:08 -04:00
Yuji Yaginuma
959bf6c8d3
Merge pull request #33636 from wjordan/normalize_encode_params_require_hash
...
add missing indifferent_access require for #normalize_encode_params
2018-08-17 07:53:04 +09:00
Will Jordan
ce6e18a0c1
add missing indifferent_access require for #normalize_encode_params
...
Fixes #33634 .
2018-08-16 13:27:00 -07:00
Ryuta Kamizono
e0231a0e79
Merge pull request #33633 from utilum/update_image_processing_to_latest_version
...
Update image_processing to the latest version
2018-08-17 02:48:14 +09:00
utilum
c5fbfb8c12
Update image_processing to the latest version
...
Version 1.6.0 includes 3a958bc419
which saves us a warning: shadowing outer local variable - options.
I see it locally, but for some reason not on the CI.
2018-08-16 19:04:57 +02:00
Annie-Claude Côté
0d3b5fc0f5
Update 'rake initializers' to use Rails::Command under the hood
...
* Invoke Rails::Command within the rake task
* Adds test for calling initializers with 'bin/rake'
* Adds deprecation warning to the rake task
2018-08-16 10:50:37 -04:00
Annie-Claude Côté
1ce2f9a55c
Move 'rails initializers' command to Rails::Command
2018-08-16 10:46:11 -04:00
Annie-Claude Côté
ccdb23d500
[ci skip] Add deprecration of to CHANGELOG
2018-08-16 10:11:31 -04:00
Richard Schneeman
9730d313c3
Merge pull request #33576 from aried3r/patch-5
...
Harmonize shell commands in dev guide [ci skip]
2018-08-16 06:05:55 -07:00
Ryuta Kamizono
b40fbb5f95
Merge pull request #33585 from yahonda/diag33520
...
SQLite3 adapter `alter_table` method restores foreign keys
2018-08-16 20:46:37 +09:00
Ryuta Kamizono
3ef3a92179
Merge pull request #33603 from kamipo/fix_numericality_validator
...
Fix numericality validator not to be affected by custom getter
2018-08-16 20:35:39 +09:00
Anton Rieder
852b688669
Harmonize shell commands in dev guide [ci skip]
2018-08-16 12:31:49 +02:00
Ryuta Kamizono
265eeb2559
Merge pull request #33629 from bogdanvlviv/follow-33626
...
Add example `perform_enqueued_jobs` without block to api docs [ci skip]
2018-08-16 15:51:02 +09:00
bogdanvlviv
f169752163
Add example perform_enqueued_jobs
without block to api docs [ci skip]
...
Follow up #33626
2018-08-16 09:29:30 +03:00
George Claghorn
e33c3cd8cc
Extract ActiveStorage::SetCurrent
...
Provide a handy concern for custom Active Storage controllers that can't inherit from ActiveStorage::BaseController.
2018-08-16 01:41:15 -04:00
Ryuta Kamizono
51bdbc2d01
Enable Lint/UriEscapeUnescape cop not to allow using obsolete methods in the future
...
Follow up #33627 .
2018-08-16 13:08:56 +09:00