aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | | | | | Reuse the exception class name in all places in the wrapperRafael Mendonça França2019-07-161-3/+4
| | | | | | | | |
* | | | | | | | | Make the selent exceptions configurable on the exception wrapperRafael Mendonça França2019-07-161-1/+5
| | | | | | | | |
* | | | | | | | | Merge pull request #31634 from afcapel/reduce-routing-error-log-noiseRafael Mendonça França2019-07-164-3/+34
|\ \ \ \ \ \ \ \ \ | |/ / / / / / / / |/| | | | | | | | | | | | | | | | | Reduce log noise handling ActionController::RoutingErrors
| * | | | | | | | Reduce log noise handling ActionController::RoutingErrorsAlberto Fernández Capel2019-05-284-3/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Each time a missing route is hit 32 lines of internal rails traces are written to the log. This is overly verbose and doesn't offer any actionable information to the user. With this change we'll still write an error message showing the route error but the trace will be omitted.
* | | | | | | | | Merge pull request #36557 from ↵Matthew Draper2019-07-162-3/+41
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sikachu/fix-source-annotation-extractor-annotation Fix problem with accessing deprecated constant proxy's subclass
| * | | | | | | | | Fix problem with accessing constant proxy subclassPrem Sichanugrist2019-07-052-3/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit fixes #36313. After #32065 moved `SourceAnnotationExtractor` into `Rails` module, it broke the ability to access `SourceAnnotationExtractor::Annotate` directly as user would get this error: TypeError: Rails::SourceAnnotationExtractor is not a class/module This commit fixes the issue by making `DeprecatedConstantProxy` to inherit from `Module` and then defines `method_missing` and `const_missing` to retain the previous functionality. Thank you Matthew Draper for the idea of how to fix the issue! [Prem Sichanugrist & Matthew Draper]
* | | | | | | | | | Merge pull request #36672 from jbaranov/strong-params-hashRafael França2019-07-162-0/+13
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | Add hash method to ActionController::Parameters
| * | | | | | | | | | Add hash method to ActionController::ParametersEugene Baranov2019-07-142-0/+13
| | | | | | | | | | |
* | | | | | | | | | | Merge pull request #36676 from ↵Rafael França2019-07-161-1/+1
|\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | wjessop/change_activestorage_metadata_duration_to_bound Different versions of ffprobe can return subtly different video lengths
| * | | | | | | | | | | Different versions of ffprobe can return subtly different video lengthsWill Jessop2019-07-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Specify a range so we can take this into account, but not get caught out by 0, nil or way too large values.
* | | | | | | | | | | | Merge pull request #36656 from Edouard-chin/ec-local-cache-referenceRafael França2019-07-152-1/+13
|\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | Return a copy of the cache entry when local_cache exists:
| * | | | | | | | | | | | Return a copy of the cache entry when local_cache exists:Edouard CHIN2019-07-112-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - When the local cache exists (during the request lifecycle), the entry returned from the LocalStore is passed as a reference which means mutable object can accidentaly get modified. This behaviour seems unnecessarily unsafe and is prone to issues like it happened in our application. This patch dup the `Entry` returned from the cache and dup it's internal value.
* | | | | | | | | | | | | active_support/core_ext/object/duplicable is not in use hereRyuta Kamizono2019-07-162-2/+0
| | | | | | | | | | | | |
* | | | | | | | | | | | | Merge pull request #36654 from Edouard-chin/ec-errors-deleteRafael França2019-07-152-1/+7
|\ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Returns `nil` when `AM::Errors#delete` doesn't delete anything:
| * | | | | | | | | | | | | Returns `nil` when `AM::Errors#delete` doesn't delete anything:Edouard CHIN2019-07-112-1/+7
| |/ / / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - `AM::Errors#delete` currently returns an empty array when trying to delete an error that doesn't exist. This behaviour is surprising and I think it would be better to no return a truthy value but instead return nil like `Hash#delete` does.
* | | | | | | | | | | | | Merge pull request #36649 from Edouard-chin/ec-errors-strit-match-collectionRafael França2019-07-152-2/+24
|\ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix `AM::Errors.added?` trying to generate a message:
| * | | | | | | | | | | | | Fix `AM::Errors.added?` trying to generate a message:Edouard CHIN2019-07-102-2/+24
| |/ / / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - When a ActiveRecord record get saved and validated as part of a collection association, the errors attribute are changed to reflect the children names. You end up with an error attribute that will look like this: `author.errors # {:'books.title' => [:blank]}` https://github.com/rails/rails/blob/2fe20cb55c76e6e50ec3a4ec5b03bbb65adba290/activerecord/lib/active_record/autosave_association.rb#L331-L340 We then can't check if the `books.title` errors was added using `ActiveModel::Errors#added?` because it tries to generate a message to make the match and end up calling the "books.title" method on the Author. ``` author.errors.added?(:'books.title', :blank) => NoMethodError: undefined method `books.title' ``` This patch modify the behaviour of `strict_match?` to not generate a message to make the comparison but instead make a strict comparison with the `options` from the error.
* | | | | | | | | | | | | Merge pull request #36640 from Edouard-chin/ec-uniq-validation-fixRafael França2019-07-152-2/+3
|\ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix errors getting duplicated when passed validations options:
| * | | | | | | | | | | | | Fix errors getting duplicated when passed validations options:Edouard CHIN2019-07-102-2/+3
| |/ / / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - In 86620cc3aa8e2630bc8d934b1a86453276b9eee9, a change was made on how we remove error duplication on a record for autosave association This fix has one caveat where validation having a `if` / `unless` options passed as a proc would be considered different. Example: ```ruby class Book < ApplicationRecord has_one :author validates :title, presence: true, if -> { true } validates :title, presence: true, if -> { true } end Book.new.valid? # false Book.errors.full_messages # ["title can't be blank", "title can't be blank"] ``` While this example might sound strange, I think it's better to ignore `AM::Validations` options (if, unless ...) when making the comparison.
* | | | | | | | | | | | | Remove caveat for older Ruby's `dup` behavior [ci skip]Ryuta Kamizono2019-07-161-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In older Ruby, nil, Symbol, Fixnum, Rational, and Complex were not duplicable. In Ruby 2.5, all of them are duplicable.
* | | | | | | | | | | | | Merge pull request #36684 from ↵Eileen M. Uchitelle2019-07-151-4/+0
|\ \ \ \ \ \ \ \ \ \ \ \ \ | |_|_|_|_|_|_|/ / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | soartec-lab/fix/update_guide_active_support_not_mention_old_ruby Delete mention of Ruby 1.9 [skip ci]
| * | | | | | | | | | | | Delete mention of Ruby 1.9 [skip ci]soartec-lab2019-07-151-4/+0
| | |_|_|_|_|/ / / / / / | |/| | | | | | | | | |
* | | | | | | | | | | | Merge pull request #36532 from itsWill/add_to_a_to_annotated_source_codeGannon McGibbon2019-07-153-12/+29
|\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | Empty array instead of nil for source_extract
| * | | | | | | | | | | | Empty array instead of nil for source_extractGuilherme Mansur2019-07-143-12/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The source_extract method will return nil when it can't find the file name in the backtrace, methods that consume this method expect an array and the nil ends up causing type errors down the road like it happened here: #36341. This patch refactors the source_extract method so that it returns an empty array instead of nil when it can't find the source code. Co-authored-by: Kasper Timm Hansen <kaspth@gmail.com>
* | | | | | | | | | | | | Inline anemic log guardDavid Heinemeier Hansson2019-07-151-6/+3
| |/ / / / / / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the only use of it
* | | | | | | | | | | | Merge pull request #36663 from igor04/load_database_yaml_fixEileen M. Uchitelle2019-07-152-1/+6
|\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | Prevent exception of loading database yaml with blank config file
| * | | | | | | | | | | | Prevent exception of loading database yaml with blank config file [closes: ↵igor042019-07-122-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | #36661]
* | | | | | | | | | | | | Merge pull request #36679 from jacobbednarz/update-feature-policy-example-configYuji Yaginuma2019-07-153-3/+3
|\ \ \ \ \ \ \ \ \ \ \ \ \ | |_|_|_|/ / / / / / / / / |/| | | | | | | | | | | | Use reserved domain for example configuration
| * | | | | | | | | | | | Use reserved domain for example configurationJacob Bednarz2019-07-153-3/+3
|/ / / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Updates the generator output to use a reserved domain[1] instead of a potentially real world domain. [1]: https://tools.ietf.org/html/rfc2606#section-3
* | | | | | | | | | | | Merge pull request #36675 from kamipo/fix_activestorage_failureRyuta Kamizono2019-07-141-1/+0
|\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | Fix activestorage CI failure due to ffprove version differece
| * | | | | | | | | | | | Fix activestorage CI failure due to ffprove version differeceRyuta Kamizono2019-07-141-1/+0
|/ / / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Our CI environment is upgraded from stretch to buster then ffprove version is also upgraded from 3.2.14 to 4.1.3. https://packages.debian.org/stretch/ffmpeg https://packages.debian.org/buster/ffmpeg Somehow those ffprove returns different metadata for `rotated_video.mp4`. ``` $ ffprobe -print_format json -show_streams -v error rotated_video.mp4 > ffprobe41.json $ diff -ub ffprobe32.json ffprobe41.json --- ffprobe32.json 2019-07-14 20:02:13.000000000 +0900 +++ ffprobe41.json 2019-07-14 19:59:08.000000000 +0900 @@ -27,8 +27,8 @@ "time_base": "1/17594", "start_pts": 3976, "start_time": "0.225986", - "duration_ts": 91981, - "duration": "5.227975", + "duration_ts": 88000, + "duration": "5.001705", "bit_rate": "321546", "bits_per_raw_sample": "8", "nb_frames": "44", @@ -78,8 +78,8 @@ "time_base": "1/44100", "start_pts": 0, "start_time": "0.000000", - "duration_ts": 227865, - "duration": "5.167007", + "duration_ts": 227850, + "duration": "5.166667", "bit_rate": "109732", "max_bit_rate": "109732", "nb_frames": "223", ``` In the case on the `test "analyzing a rotated video"`, most important part is `assert_equal 90, metadata[:angle]`, the accidental difference of duration for ffprove version is out of scope for the test.
* | | | | | | | | | | | Merge pull request #36658 from Shopify/duplicable-changesRyuta Kamizono2019-07-142-118/+8
|\ \ \ \ \ \ \ \ \ \ \ \ | |_|_|_|_|_|_|_|_|_|_|/ |/| | | | | | | | | | | Remove dead code in duplicable.rb
| * | | | | | | | | | | Implement UnboundMethod#duplicable?Jean Boussier2019-07-122-2/+11
| | | | | | | | | | | |
| * | | | | | | | | | | Remove dead code in duplicable.rbJean Boussier2019-07-111-120/+1
| | | | | | | | | | | |
* | | | | | | | | | | | Update guide for render file:John Hawthorn2019-07-131-19/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most of this section was written from the time that render file: was the default, before CVE-2016-0752. This updates the guide to the Rails 6 `render file:` behaviour, moves it to a more appropriate part of the file. [ci skip]
* | | | | | | | | | | | Remove obsolete or discouraged render examplesJohn Hawthorn2019-07-131-9/+1
| |_|_|_|/ / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most of these examples no longer work. The ability to render an absolute path was removed as part of CVE-2016-0752. In Rails 6 we changed `render file:` to only take exact paths and always to render them as raw files. Rendering a template with its extensions _is_ supported, but I don't think should be recommended. This also removes `render file:` from an example where it isn't relevant. [ci skip]
* | | | | | | | | | | let the upgrading guide point to the autoloading guide for STIs [skip ci]Xavier Noria2019-07-131-14/+1
| | | | | | | | | | |
* | | | | | | | | | | simplifies Zeitwerk compat instructions in upgrading guide [skip ci]Xavier Noria2019-07-121-35/+5
| | | | | | | | | | |
* | | | | | | | | | | improves zeitwerk:checkXavier Noria2019-07-121-73/+25
| |_|/ / / / / / / / |/| | | | | | | | |
* | | | | | | | | | ports edits to the upgrading guide [skip ci]Xavier Noria2019-07-121-0/+23
| | | | | | | | | |
* | | | | | | | | | make sure zeitwerk:check only deals with directories [closes #36461]Xavier Noria2019-07-121-4/+5
| | | | | | | | | |
* | | | | | | | | | active_support/deprecation has to be already required via ↵Akira Matsuda2019-07-129-12/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | active_support/rails.rb
* | | | | | | | | | active_support/deprecation is not in use hereAkira Matsuda2019-07-122-2/+0
| | | | | | | | | |
* | | | | | | | | | active_support/rails has to be required via abstract_controller.rbAkira Matsuda2019-07-121-1/+0
| | | | | | | | | |
* | | | | | | | | | A type class or nil has to respond_to :to_sAkira Matsuda2019-07-121-2/+1
| | | | | | | | | |
* | | | | | | | | | No Woman, No tryAkira Matsuda2019-07-123-3/+0
| | | | | | | | | |
* | | | | | | | | | try (Just a Little Bit Harder)Akira Matsuda2019-07-121-2/+1
| | | | | | | | | |
* | | | | | | | | | active_support/dependencies/autoload is already required via active_support.rbAkira Matsuda2019-07-124-7/+0
| | | | | | | | | |
* | | | | | | | | | Make sure to require active_support.rb before requiring active_support/rails.rbAkira Matsuda2019-07-121-0/+1
| | | | | | | | | |
* | | | | | | | | | These are already required via rails/command.rbAkira Matsuda2019-07-121-2/+0
| | | | | | | | | |