aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix segmentation fault in EventedFileUpdateCheckerutilum2018-04-242-4/+6
| | | | resolves #32705
* Merge pull request #32646 from derekprior/dp-schema-dumper-documentationSean Griffin2018-04-242-50/+40
|\ | | | | Update schema.rb documentation [CI SKIP]
| * Update schema.rb documentation [CI SKIP]Derek Prior2018-04-242-50/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The documentation previously claimed that `db/schema.rb` was "the authoritative source for your database schema" while simultaneously also acknowledging that the file is generated. These two statements are incongruous and the guides accurately call out that many database constructs are unsupported by `schema.rb`. This change updates the comment at the top of `schema.rb` to remove the assertion that the file is authoritative. The documentation also previously referred vaguely to "issues" when re-running old migrations. This has been updated slightly to hint at the types of problems that one can encounter with old migrations. In sum, this change attempts to more accurately capture the pros, cons, and shortcomings of the two schema formats in the guides and in the comment at the top of `schema.rb`. [Derek Prior & Sean Griffin] Co-authored-by: Sean Griffin <sean@seantheprogrammer.com>
* | `columns` is cached in the statementRyuta Kamizono2018-04-241-6/+3
| | | | | | | | https://github.com/sparklemotion/sqlite3-ruby/blob/v1.3.13/lib/sqlite3/statement.rb#L101-L104
* | Merge pull request #32708 from bdewater/base64-screenshotAndrew White2018-04-241-1/+1
|\ \ | | | | | | Use strict_encode64 instead of gsub newline for ScreenshotHelper
| * | Use strict_encode64 instead of gsub newline for ScreenshotHelperBart de Water2018-04-231-1/+1
| | |
* | | Merge pull request #32704 from eugeneius/mysql_statement_pool_hashRyuta Kamizono2018-04-242-5/+2
|\ \ \ | | | | | | | | Save a hash allocation in MySQL statement pool
| * | | Save a hash allocation in MySQL statement poolEugene Kenny2018-04-232-5/+2
| | | | | | | | | | | | | | | | There's no need to wrap the statement in a hash with a single key.
* | | | Flush tempfile after populating itGeorge Claghorn2018-04-231-0/+1
| | | | | | | | | | | | | | | | Ensure that other processes like ImageMagick and FFmpeg see the complete contents of the file.
* | | | Merge pull request #32471 from janko-m/use-image_processing-gemGeorge Claghorn2018-04-2317-92/+205
|\ \ \ \ | |/ / / |/| | | Use ImageProcessing gem for ActiveStorage variants
| * | | Don't swallow LoadError raised for missing libvipsJanko Marohnić2018-04-231-3/+7
| | | |
| * | | Add CHANGELOG entryJanko Marohnić2018-04-231-0/+19
| | | |
| * | | Correct typosJanko Marohnić2018-04-231-2/+2
| | | |
| * | | Recommend using :resize_to_fit after allJanko Marohnić2018-04-237-17/+17
| | | |
| * | | Replace :resize_to_fit with :resize in the guideJanko Marohnić2018-04-231-1/+1
| | | |
| * | | Remove warning that image will be loaded into memoryJanko Marohnić2018-04-231-4/+4
| | | | | | | | | | | | | | | | | | | | This is not true anymore, the image will be downloaded into a temporary file in a streaming fashion.
| * | | Show ImageProcessing macros in a dedicated exampleJanko Marohnić2018-04-232-16/+25
| | | |
| * | | Ensure result file is deleted on uploading errorsJanko Marohnić2018-04-221-4/+10
| | | |
| * | | Rename ActiveStorage.processor to .variant_processorJanko Marohnić2018-04-227-17/+17
| | | |
| * | | Use ImageProcessing gem for ActiveStorage variantsJanko Marohnić2018-04-1813-81/+156
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ImageProcessing gem is a wrapper around MiniMagick and ruby-vips, and implements an interface for common image resizing and processing. This is the canonical image processing gem recommended in [Shrine], and that's where it developed from. The initial implementation was extracted from Refile, which also implements on-the-fly transformations. Some features that ImageProcessing gem adds on top of MiniMagick: * resizing macros - #resize_to_limit - #resize_to_fit - #resize_to_fill - #resize_and_pad * automatic orientation * automatic thumbnail sharpening * avoids the complex and inefficient MiniMagick::Image class * will use "magick" instead of "convert" on ImageMagick 7 However, the biggest feature of the ImageProcessing gem is that it has an alternative implementation that uses libvips. Libvips is an alternative to ImageMagick that can process images very rapidly (we've seen up 10x faster than ImageMagick). What's great is that the ImageProcessing gem provides the same interface for both implementations. The macros are named the same, and the libvips implementation does auto orientation and thumbnail sharpening as well; only the operations/options specific to ImageMagick/libvips differ. The integration provided by this PR should work for both implementations. The plan is to introduce the ImageProcessing backend in Rails 6.0 as the default backend and deprecate the MiniMagick backend, then in Rails 6.1 remove the MiniMagick backend.
* | | | Merge pull request #32703 from janko-m/halve-memory-allocation-in-s3-downloadGeorge Claghorn2018-04-231-1/+1
|\ \ \ \ | | | | | | | | | | Halve memory allocation in S3Service#download
| * | | | Halve memory allocation in S3Service#downloadJanko Marohnić2018-04-231-1/+1
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | Aws::S3::Object#get returns a response with object content wrapped in an in-memory StringIO object. StringIO#read will return a copy of the content, which is not necessary because we can return the content directly using StringIO#string. This halves memory allocation of S3Service#download, because we remove unnecessary content duplication.
* | | | Remove key from session by using session.delete (#31685)Rafael Barbolo2018-04-231-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Remove key from session by using session.delete You are not deleting a key from session when you assign nil to that key. * Update guides on how to destroy a user session In this commit, the user id is removed from session and controller's variables related to the user are nullified. [Rafael Mendonça França + Rafael Barbolo]
* | | | Merge pull request #31881 from yewton/rails-ujs-with-yarn-autocleanRafael França2018-04-231-0/+2
|\ \ \ \ | | | | | | | | | | Update rails-ujs readme
| * | | | Update rails-ujs readmeYuto SASAKI2018-02-041-0/+2
| | | | | | | | | | | | | | | Add a note on using `yarn autoclean`.
* | | | | Use the same tag as other views to display the error messageyuuji.yaginuma2018-04-231-1/+1
| |_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since other views use the `h2` tag, should also use `h2` on `missing_exact_template.html.erb`. https://github.com/rails/rails/blob/76acaf6eb9ef3635e4c6f2ca9dba34edb50f541d/actionpack/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb#L5 https://github.com/rails/rails/blob/76acaf6eb9ef3635e4c6f2ca9dba34edb50f541d/actionpack/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb#L11 https://github.com/rails/rails/blob/76acaf6eb9ef3635e4c6f2ca9dba34edb50f541d/actionpack/lib/action_dispatch/middleware/templates/rescues/unknown_action.html.erb#L5
* | | | Merge pull request #32689 from yhirano55/update-testing-guidesGuillermo Iguaran2018-04-221-13/+14
|\ \ \ \ | | | | | | | | | | Update results of command in Testing guides [ci skip]
| * | | | Update results of command in Testing guides [ci skip]Yoshiyuki Hirano2018-04-231-13/+14
| | | | | | | | | | | | | | | | | | | | | | | | | * Results of command in testing guides are different from actual ones. * Updated them.
* | | | | Merge pull request #32690 from yhirano55/refactor-guides-javascriptsGuillermo Iguaran2018-04-222-26/+34
|\ \ \ \ \ | | | | | | | | | | | | Refactor guides javascripts
| * | | | | Refactor guides javascriptsYoshiyuki Hirano2018-04-232-26/+34
|/ / / / / | | | | | | | | | | | | | | | | | | | | * Remove `$` prefix from all variables (`$` prefix means jQuery object) * Old browsers doesn't support forEach. So use for instead of forEach.
* | | | | Merge pull request #32678 from yhirano55/use-vanilla-js-in-rails-guidesGuillermo Iguaran2018-04-225-95/+88
|\ \ \ \ \ | | | | | | | | | | | | :scissors: jQuery for Rails Guides
| * | | | | :scissors: jQuery for Rails GuidesYoshiyuki Hirano2018-04-215-95/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Rewrite with Vanilla JS * Confirmed with Chrome, Safari, Firefox
* | | | | | Merge pull request #32686 from yhirano55/fix-indentation-with-rubocopRyuta Kamizono2018-04-221-1/+1
|\ \ \ \ \ \ | |_|/ / / / |/| | | | | Fix indentation manually
| * | | | | Fix indentation manuallyYoshiyuki Hirano2018-04-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Rubocop auto-correct doesn't work well, so I fixed indentation manually.
* | | | | | Merge pull request #31554 from fatkodima/controller_generator_suffixGuillermo Iguaran2018-04-222-1/+33
|\ \ \ \ \ \ | | | | | | | | | | | | | | Gracefully handle extra "controller" when generating controller
| * | | | | | Gracefully handle extra "controller" when generating controllerfatkodima2018-03-232-1/+33
| | | | | | |
* | | | | | | Strip duplicated suffixes more strictlyRyuta Kamizono2018-04-226-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In the previous code incorrectly removes intermediate words.
* | | | | | | Merge pull request #32681 from bdewater/rubocop-0-54Ryuta Kamizono2018-04-226-15/+15
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Rubocop 0.54
| * | | | | | | Fix Style/RedundantReturn offensesBart de Water2018-04-213-3/+3
| | | | | | | |
| * | | | | | | Rubocop 0.54Bart de Water2018-04-213-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix `.rubocop.yml: Lint/EndAlignment has the wrong namespace - should be Layout` warning
* | | | | | | | Merge pull request #32685 from yhirano55/fix-duplicated-suffix-for-job-generatorRyuta Kamizono2018-04-223-0/+19
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Fix duplicated suffix for JobGenerator
| * | | | | | | | Fix duplicated suffix for JobGeneratorYoshiyuki Hirano2018-04-223-0/+19
| | | | | | | | |
* | | | | | | | | Merge pull request #32687 from yhirano55/add-generator-test-case-to-channelRyuta Kamizono2018-04-221-0/+10
|\ \ \ \ \ \ \ \ \ | |_|_|_|/ / / / / |/| | | | | | | | Add test case to ChannelGeneratorTest
| * | | | | | | | Add test case to ChannelGeneratorTestYoshiyuki Hirano2018-04-221-0/+10
|/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | * Add a test case to ensure avoid duplicated suffix in channel generator
* / / / / / / / Fix typo in constant name [ci skip]yuuji.yaginuma2018-04-221-1/+1
|/ / / / / / /
* | | | | | | Merge pull request #32673 from eugeneius/raw_post_multiple_requestsGeorge Claghorn2018-04-212-4/+13
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Reset RAW_POST_DATA between test requests
| * | | | | | | Reset RAW_POST_DATA between test requestsEugene Kenny2018-04-202-4/+13
| | |_|/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `RAW_POST_DATA` is derived from the `rack.input` header, which changes with each test request. It needs to be cleared in `scrub_env!`, or all requests within the same test will see the value from the first request.
* | | | | | | Using existing models for building multiple has_one through testsRyuta Kamizono2018-04-227-54/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Follow up of #32514.
* | | | | | | Merge pull request #32514 from ↵Ryuta Kamizono2018-04-227-1/+64
|\ \ \ \ \ \ \ | |_|/ / / / / |/| | | | | | | | | | | | | | | | | | | | samdec/multiple-has-one-through-associations-build-bug Fix .new with multiple through associations
| * | | | | | Fix .new with multiple through associationsSam DeCesare2018-04-097-1/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a bug with building an object that has multiple `has_many :through` associations through the same object. Previously, when building the object via .new, the intermediate object would be created instead of just being built. Here's an example: Given a GameBoard, that has_one Owner and Collection through Game. The following line would cause a game object to be created in the database. GameBoard.new(owner: some_owner, collection: some_collection) Whereas, if passing only one of those associations into `.new` would cause the Game object to be built and not created in the database. Now the above code will only build the Game object, and not save it.