aboutsummaryrefslogtreecommitdiffstats
path: root/activejob/lib/active_job/arguments.rb
Commit message (Collapse)AuthorAgeFilesLines
* Enable `Layout/EmptyLinesAroundAccessModifier` copRyuta Kamizono2019-06-131-1/+0
| | | | | | | | | | | We sometimes say "✂️ newline after `private`" in a code review (e.g. https://github.com/rails/rails/pull/18546#discussion_r23188776, https://github.com/rails/rails/pull/34832#discussion_r244847195). Now `Layout/EmptyLinesAroundAccessModifier` cop have new enforced style `EnforcedStyle: only_before` (https://github.com/rubocop-hq/rubocop/pull/7059). That cop and enforced style will reduce the our code review cost.
* Do not deserialize GlobalID objects that were not generated by Active JobRafael Mendonça França2018-11-271-1/+1
| | | | | | | Trusting any GlobaID object when deserializing jobs can allow attackers to access information that should not be accessible to them. Fix CVE-2018-16476.
* Permit ActionController::Parameters for serializable HashBernie Chiu2018-11-191-3/+9
|
* Make `PERMITTED_TYPES` privateAlberto Almagro2018-11-121-4/+3
| | | | | | | | The constant `PERMITTED_TYPES` is only used by the private method `serialize_argument` and it already has the `# :nodoc:` annotation as the other constants in the class. Complements e899e22
* Document missing supported types [ci skip]Alberto Almagro2018-11-111-3/+6
| | | | | This commit adds missing types to the supported types list, which was extended in #30941
* Restore `private_constant` which is lost accidentally in #30941Ryuta Kamizono2018-11-091-1/+1
| | | | https://github.com/rails/rails/pull/30941/files#diff-fc90ec41ef75be8b2259526fe1a8b663L53
* Restore HWIA support to AJ::Arguments.deserializeGannon McGibbon2018-10-301-1/+4
| | | | | Restore HashWithIndifferentAccess support to ActiveJob::Arguments.deserialize.
* Add `Style/RedundantFreeze` to remove redudant `.freeze`Yasuo Honda2018-09-291-3/+3
| | | | | | | | | | | | | | | | | | | | | Since Rails 6.0 will support Ruby 2.4.1 or higher `# frozen_string_literal: true` magic comment is enough to make string object frozen. This magic comment is enabled by `Style/FrozenStringLiteralComment` cop. * Exclude these files not to auto correct false positive `Regexp#freeze` - 'actionpack/lib/action_dispatch/journey/router/utils.rb' - 'activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb' It has been fixed by https://github.com/rubocop-hq/rubocop/pull/6333 Once the newer version of RuboCop released and available at Code Climate these exclude entries should be removed. * Replace `String#freeze` with `String#-@` manually if explicit frozen string objects are required - 'actionpack/test/controller/test_case_test.rb' - 'activemodel/test/cases/type/string_test.rb' - 'activesupport/lib/active_support/core_ext/string/strip.rb' - 'activesupport/test/core_ext/string_ext_test.rb' - 'railties/test/generators/actions_test.rb'
* Update arguments.rb [ci skip]Sharang Dashputre2018-09-131-1/+1
| | | | Fix typo `Instrinsic` -> `Intrinsic`
* Permit list usage cleanup and clearer documentationKevin Deisz2018-08-271-6/+8
|
* Convert remaining usage of whitelist and blacklistKevin Deisz2018-08-241-5/+5
|
* Rails 6 requires Ruby 2.4.1+Jeremy Daer2018-02-171-3/+2
| | | | | | Skipping over 2.4.0 to sidestep the `"symbol_from_string".to_sym.dup` bug. References #32028
* Simplify the implementation of custom argument serializersRafael Mendonça França2018-02-141-2/+139
| | | | | | | | | | | | | We can speed up things for the supported types by keeping the code in the way it was. We can also avoid to loop trough all serializers in the deserialization by trying to access the class already in the Hash. We could also speed up the custom serialization if we define the class that is going to be serialized when registering the serializers, but that will remove the possibility of defining a serialzer for a superclass and have the subclass serialized using it.
* Introduce serializers to ActiveJobEvgenii Pecherkin2018-02-141-130/+2
|
* [Active Job] `rubocop -a --only Layout/EmptyLineAfterMagicComment`Koichi ITO2017-07-111-0/+1
|
* Use frozen-string-literal in ActiveJobKir Shatrov2017-07-091-0/+1
|
* Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"Matthew Draper2017-07-021-1/+0
| | | | | This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
* Enforce frozen string in RubocopKir Shatrov2017-07-011-0/+1
|
* Removed deprecated #original_exception in ActiveJob::DeserializationErrorRafael Mendonça França2016-10-101-13/+1
|
* Fixnum and Bignum are deprecated in Ruby trunkMatthew Draper2016-10-081-2/+2
| | | | https://bugs.ruby-lang.org/issues/12739
* fixes remaining RuboCop issues [Vipul A M, Xavier Noria]Xavier Noria2016-09-011-1/+1
|
* applies new string literal convention in activejob/libXavier Noria2016-08-061-4/+4
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* Support for unified Integer class in Ruby 2.4+Jeremy Daer2016-05-181-2/+3
| | | | | | | | Ruby 2.4 unifies Fixnum and Bignum into Integer: https://bugs.ruby-lang.org/issues/12005 * Forward compat with new unified Integer class in Ruby 2.4+. * Backward compat with separate Fixnum/Bignum in Ruby 2.2 & 2.3. * Drops needless Fixnum distinction in docs, preferring Integer.
* Added support for bigdecimals in perform laterSiva Gollapalli2015-12-031-2/+2
|
* Deprecate exception#original_exception in favor of exception#causeYuki Nishijima2015-11-031-9/+16
|
* Improve error message when serializing unsaved records for jobsFaraz Yashar2015-06-281-7/+14
|
* Add doc for original_exception in ActiveJob::DeserializationError [ci skip]Zachary Scott2015-04-291-0/+2
|
* nodoc private internal constants from ActiveJob::ArgumentsZachary Scott2015-04-261-0/+5
|
* Allow keyword arguments to work with ActiveJobSean Griffin2015-01-301-9/+40
| | | | | | | | | | | | | | | | | Unfortunately, the HashWithIndifferent access approach is insufficient for our needs. It's perfectly reasonable to want to use keyword arguments with Active Job, which we will see as a symbol keyed hash. For Ruby to convert this back to keyword arguments, it must deserialize to a symbol keyed hash. There are two primary changes to the serialization behavior. We first treat a HWIA separately, and mark it as such so we can convert it back into a HWIA during deserialization. For normal hashes, we keep a list of all symbol keys, and convert them back to symbol keys after deserialization. Fixes #18741.
* Add 'require' for Hash#with_indifferent_accessjoker10072014-12-211-0/+2
| | | | | | | | | ActiveJob::Arguments uses Hash#with_indifferent_access. But, activejob gem does not require Hash extension library. When we use activejob as standalone, we need extra require statement. This is unhandy. This commit fixes it.
* Add documentation on Active Job.mo khan2014-10-021-0/+6
| | | | | | | This adds documentation for the Active Job API. It includes documentation on how to configure the queue_adapter, and how to create new jobs. It adds links to the various other sections of the Active Job documentation.
* Fix string/gid collision in job argumentsJeremy Kemper2014-09-251-3/+27
| | | | Serialize Global IDs as special objects, distinguishable from Strings
* Tighten up AJ::Arguments and its testsJeremy Kemper2014-09-141-8/+14
| | | | | * Disallow deserialization of non-primitive objects * Broaden coverage; remove superfluous tests
* Bump globalid versionAbdelkader Boudih2014-09-121-1/+1
|
* Fix a warningMatthew Draper2014-09-051-1/+1
|
* [Active Job] Try to deserialize with GlobalID only strings and globalidsCristian Bica2014-09-031-1/+3
|
* Fix for double ActiveJob::DeserializationErorrCristian Bica2014-09-031-5/+5
|
* Fix a few typos [ci skip]Robin Dupret2014-08-241-1/+1
|
* Raise ActiveJob::SerializationError when cannot serialize job argumentsCristian Bica2014-08-241-2/+13
|
* [ActiveJob] raise DeserializationError when got an error deserializingCristian Bica2014-08-171-0/+12
|
* [ActiveJob] Use globalid gemAbdelkader Boudih2014-08-171-5/+2
|
* [ActiveJob] Convert ActiveJob::Arguments into moduleAbdelkader Boudih2014-08-171-6/+7
|
* Add 'activejob/' from commit '14f74a8331f94150dfee653224de8fc837797709'Abdelkader Boudih2014-08-121-0/+52
git-subtree-dir: activejob git-subtree-mainline: b45b99894a60eda434abec94d133a1cfd8de2dda git-subtree-split: 14f74a8331f94150dfee653224de8fc837797709