Commit Graph

18 Commits

Author SHA1 Message Date
Petrik
ec28de4260 Add missing headers to Active Support docs [ci-skip]
Having a h1 heading will improve SEO and makes things look more consistent.
2023-04-23 16:02:56 +02:00
Jean Boussier
c6886a1ab0 ActiveSupport::Reloader should not report exception
Since it always delegate to an actual executor that does report
them already, this cause exceptions to be reported twice.

Fix: https://github.com/rails/rails/issues/46100
2022-09-22 17:46:18 +02:00
Jean Boussier
115be62709 Wrap rails runner in executor
The main reason is to automatically report uncaught exceptions
since `rails runner` is often used for cron tasks and such.
2022-06-10 14:16:49 +02:00
Aaron Patterson
f9a2ad0394
Fix reloader to work with new Executor signature
This is a follow up to [CVE-2022-23633].
2022-02-11 11:48:19 -08:00
Ryuta Kamizono
892e38c78e Enable Style/RedundantBegin cop to avoid newly adding redundant begin block
Currently we sometimes find a redundant begin block in code review
(e.g. https://github.com/rails/rails/pull/33604#discussion_r209784205).

I'd like to enable `Style/RedundantBegin` cop to avoid that, since
rescue/else/ensure are allowed inside do/end blocks in Ruby 2.5
(https://bugs.ruby-lang.org/issues/12906), so we'd probably meets with
that situation than before.
2018-12-21 06:12:42 +09:00
Akira Matsuda
ae30b9b885 Missing require "active_support/executor" 2018-10-30 10:17:09 +09:00
Matthew Draper
c39ed435eb
Merge pull request #30100 from kirs/doc-reloader
Document public hooks in AS::Reloader
2017-11-17 19:33:29 +10:30
Akira Matsuda
589dd0f6c9 [Active Support] require_relative => require
This basically reverts 8da30ad6be34339124ba4cb4e36aea260dda12bc
2017-10-21 22:48:27 +09:00
Kir Shatrov
a41c55c0a3 Document public hooks in AS::Reloader [ci skip] 2017-08-14 21:18:33 +03:00
Koichi ITO
ac717d65a3 [Active Support] rubocop -a --only Layout/EmptyLineAfterMagicComment 2017-07-11 13:12:32 +09:00
Kir Shatrov
72950568dd Use frozen-string-literal in ActiveSupport 2017-07-09 15:08:29 +03:00
Akira Matsuda
8da30ad6be [Active Support] require => require_relative 2017-07-01 18:38:04 +09:00
David Heinemeier Hansson
1c275d812f Add option for class_attribute default (#29270)
* Allow a default value to be declared for class_attribute

* Convert to using class_attribute default rather than explicit setter

* Removed instance_accessor option by mistake

* False is a valid default value

* Documentation
2017-05-29 18:01:50 +02:00
Xavier Noria
d66e7835be applies new string literal convention in activesupport/lib
The current code base is not uniform. After some discussion,
we have chosen to go with double quotes by default.
2016-08-06 18:10:53 +02:00
Matthew Draper
291a098c11 Directly support stateful executor hooks
Also, make sure to call the +complete+ hooks if +run+ fails.
2016-04-05 06:57:01 +09:30
Matthew Draper
f0528a544c Prevent nested ExecutionWrapper calls even when using run! directly 2016-03-04 00:35:43 +10:30
Ryuta Kamizono
ad340ecae1 Fix ActiveSupport::Reloader.check!
The test failure in `bug_report_templates/action_controller_master.rb`
is due to `app.reloader.check` is `nil`.
2016-03-02 07:45:13 +09:00
Matthew Draper
d3c9d808e3 Publish AS::Executor and AS::Reloader APIs
These should allow external code to run blocks of user code to do
"work", at a similar unit size to a web request, without needing to get
intimate with ActionDipatch.
2016-03-02 02:14:20 +10:30