aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* | | Make Webpacker the default JavaScript compiler for Rails 6 (#33079)David Heinemeier Hansson2018-09-3049-327/+285
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Use Webpacker by default on new apps * Stop including coffee-rails by default * Drop using a js_compressor by default * Drop extra test for coffeescript inclusion by default * Stick with skip_javascript to signify skipping webpack * Don't install a JS runtime by default any more * app/javascript will be the new default directory for JS * Make it clear that this is just for configuring the default Webpack framework setup now * Start using the Webpack tag in the default layout * Irrelevant test * jQuery is long gone * Stop having asset pipeline compile default application.js * Add rails-ujs by default to the Webpack setup * Add Active Storage JavaScript to application.js pack by default * Consistent quoting * Add Turbolinks to default pack * Add Action Cable to default pack Need some work on how to set the global consumer that channels will work with. @javan? * Require all channels by default and use a separate consumer stub * Channel generator now targets Webpack style * Update task docs to match new generator style * Use uniform import style * Drop the JS assets generator It was barely helpful as it was. It’s no longer helpful in a Webpacked world. Sayonara! * Add app/javascript to the stats directories * Simpler import style Which match the other imports. * Address test failures from dropping JS compilation (and compression) * webpacker-default: Modify `AssetsGeneratorTest` Before: ``` $ bin/test test/generators/assets_generator_test.rb Run options: --seed 46201 F Failure: AssetsGeneratorTest#test_assets [/Users/ttanimichi/ghq/github.com/ttanimichi/rails/railties/test/generators/assets_generator_test.rb:12]: Expected file "app/assets/javascripts/posts.js" to exist, but does not bin/test /Users/ttanimichi/ghq/github.com/ttanimichi/rails/railties/test/generators/assets_generator_test.rb:10 . Finished in 0.031343s, 63.8101 runs/s, 95.7152 assertions/s. 2 runs, 3 assertions, 1 failures, 0 errors, 0 skips ``` After: ``` $ bin/test test/generators/assets_generator_test.rb Run options: --seed 43571 .. Finished in 0.030370s, 65.8545 runs/s, 65.8545 assertions/s. 2 runs, 2 assertions, 0 failures, 0 errors, 0 skips ``` * webpacker-default: Modify `ChannelGeneratorTest` Before: ``` $ bin/test test/generators/channel_generator_test.rb Run options: --seed 8986 .F Failure: ChannelGeneratorTest#test_channel_with_multiple_actions_is_created [/Users/ttanimichi/ghq/github.com/ttanimichi/rails/railties/test/generators/channel_generator_test.rb:43]: Expected file "app/assets/javascripts/channels/chat.js" to exist, but does not bin/test /Users/ttanimichi/ghq/github.com/ttanimichi/rails/railties/test/generators/channel_generator_test.rb:34 .F Failure: ChannelGeneratorTest#test_channel_is_created [/Users/ttanimichi/ghq/github.com/ttanimichi/rails/railties/test/generators/channel_generator_test.rb:29]: Expected file "app/assets/javascripts/channels/chat.js" to exist, but does not bin/test /Users/ttanimichi/ghq/github.com/ttanimichi/rails/railties/test/generators/channel_generator_test.rb:22 E Error: ChannelGeneratorTest#test_cable_js_is_created_if_not_present_already: Errno::ENOENT: No such file or directory @ apply2files - /Users/ttanimichi/ghq/github.com/ttanimichi/rails/railties/test/fixtures/tmp/app/assets/javascripts/cable.js bin/test /Users/ttanimichi/ghq/github.com/ttanimichi/rails/railties/test/generators/channel_generator_test.rb:60 F Failure: ChannelGeneratorTest#test_channel_suffix_is_not_duplicated [/Users/ttanimichi/ghq/github.com/ttanimichi/rails/railties/test/generators/channel_generator_test.rb:87]: Expected file "app/assets/javascripts/channels/chat.js" to exist, but does not bin/test /Users/ttanimichi/ghq/github.com/ttanimichi/rails/railties/test/generators/channel_generator_test.rb:80 F Failure: ChannelGeneratorTest#test_channel_on_revoke [/Users/ttanimichi/ghq/github.com/ttanimichi/rails/railties/test/generators/channel_generator_test.rb:77]: Expected file "app/assets/javascripts/cable.js" to exist, but does not bin/test /Users/ttanimichi/ghq/github.com/ttanimichi/rails/railties/test/generators/channel_generator_test.rb:68 Finished in 0.064384s, 108.7227 runs/s, 481.4861 assertions/s. 7 runs, 31 assertions, 4 failures, 1 errors, 0 skips ``` After: ``` $ bin/test test/generators/channel_generator_test.rb Run options: --seed 44857 ....... Finished in 0.060243s, 116.1961 runs/s, 697.1764 assertions/s. 7 runs, 42 assertions, 0 failures, 0 errors, 0 skips ``` * Fix shared generator tests. * webpacker-default: Modify `ControllerGeneratorTest` The JS assets generator was dropped. ref. https://github.com/rails/rails/commit/46215b179483d3e4d264555f5a4952f43eb8142a * Revert "Simpler import style". It's currently failing with an error of "TypeError: undefined is not an object (evaluating '__WEBPACK_IMPORTED_MODULE_2_activestorage___default.a.start')". Waiting for @javan to have a look. This reverts commit 5d3ebb71059f635d3756cbda4ab9752027e09256. * require webpacker in test app * Add webpacker without making the build hang/timeout. (#33640) * use yarn workspaces to allow for installing unreleased packages and only generate js/bootsnap when required * no longer need to have webpacker in env templates as webpacker moved this config to yml file * Fix rubocop violation * Got the test passing for the running scaffold * update expected lines of code * update middleware tests to account for webpacker * disable js in plugins be default to get the tests passing (#34009) * clear codeclimate report issues * Anything newer than currently released is good * Use Webpacker development version during development of Rails * Edge should get development webpacker as well * Add changelog entry for Webpacker change
* | | Handle UPDATE/DELETE with OFFSET in ArelRyuta Kamizono2018-10-016-19/+35
| | |
* | | Merge pull request #23593 from meinac/add_index_option_for_change_tableRyuta Kamizono2018-10-013-0/+22
|\ \ \ | | | | | | | | | | | | index option added for change_table migrations
| * | | Index option added for change_table migrationsMehmet Emin INAC2018-09-223-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In case if we want to add a column into the existing table with index on it, we have to add column and index in two seperate lines. With this feature we don't need to write an extra line to add index for column. We can just use `index` option. Old behaviour in action: ``` change_table(:languages) do |t| t.string :country_code t.index: :country_code end ``` New behaviour in action: ``` change_table(:languages) do |t| t.string :country_code, index: true end ``` Exactly same behaviour is already exist for `create_table` migrations.
* | | | Merge pull request #33256 from ilkkao/ilkkao/remove-unused-params-optionRyuta Kamizono2018-10-013-5/+5
|\ \ \ \ | | | | | | | | | | | | | | | Don't handle params option in a special way in url_for helper
| * | | | Don't handle params option in a special way in url_for helperIlkka Oksanen2018-08-203-5/+5
| | | | |
* | | | | Merge pull request #32031 from yahonda/remove_redundant_freezeRyuta Kamizono2018-10-01109-268/+274
|\ \ \ \ \ | | | | | | | | | | | | Add `Style/RedundantFreeze` to remove redudant `.freeze`
| * | | | | Add `Style/RedundantFreeze` to remove redudant `.freeze`Yasuo Honda2018-09-29109-268/+274
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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'
* | | | | | Explain why we have explicit marshaling methodsDavid Heinemeier Hansson2018-09-301-2/+6
| | | | | |
* | | | | | make actionview templates marshalable so that they can be serialized during ↵lsylvester2018-09-302-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | the parallel tests (#34030)
* | | | | | Merge pull request #34031 from lsylvester/require-except-before-aliasing-itYuji Yaginuma2018-10-011-0/+1
|\ \ \ \ \ \ | | | | | | | | | | | | | | Require the except hash extension before trying to alias it
| * | | | | | Require the except hash extension before trying to alias itLachlan Sylvester2018-10-011-0/+1
|/ / / / / /
* | | | | | Place `PartialQuery` and `PartialQueryCollector` in the same fileRyuta Kamizono2018-09-302-24/+28
| | | | | |
* | | | | | Handle DELETE with LIMIT in ArelRyuta Kamizono2018-09-309-69/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MySQL supports DELETE with LIMIT and ORDER BY. https://dev.mysql.com/doc/refman/8.0/en/delete.html Before: ``` Post Destroy (1.0ms) DELETE FROM `posts` WHERE `posts`.`id` IN (SELECT `id` FROM (SELECT `posts`.`id` FROM `posts` WHERE `posts`.`author_id` = ? ORDER BY `posts`.`id` ASC LIMIT ?) __active_record_temp) [["author_id", 1], ["LIMIT", 1]] ``` After: ``` Post Destroy (0.4ms) DELETE FROM `posts` WHERE `posts`.`author_id` = ? ORDER BY `posts`.`id` ASC LIMIT ? [["author_id", 1], ["LIMIT", 1]] ```
* | | | | | `SQLString#compile` is no longer used since ↵Ryuta Kamizono2018-09-302-15/+5
| | | | | | | | | | | | | | | | | | | | | | | | 53521a9e39b9d8af4165d7703c36dc905f1f8f67
* | | | | | `visitor.accept` doesn't handle `&block`Ryuta Kamizono2018-09-301-2/+2
| | | | | |
* | | | | | Use private attr_reader in ArelRyuta Kamizono2018-09-303-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | No longer needed workaround for Ruby 2.2 "private attribute?" warning. Related 6d63b5e49a399fe246afcebad45c3c962de268fa.
* | | | | | Remove `visit_Fixnum` and `visit_Bignum`Ryuta Kamizono2018-09-303-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | Follow up ae406cd633dab2cafbc0d1bb5922d1ca40056ea0.
* | | | | | Make `test_initialize_with_invalid_attribute` work correctlyyuuji.yaginuma2018-09-301-4/+6
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Originally specified attributes were only normal values, and `ActiveRecord::MultiparameterAssignmentErrors` did not occur. In addition, an assertion is performed only on rescue, even if an exception does not occur, the test passes. To avoid this use `assert_raise`.
* | | | | Reset `ActiveRecord::Base.configurations` to the value beforeyuuji.yaginuma2018-09-291-1/+2
| | | | |
* | | | | Merge pull request #34020 from tgturner/update-cache-docsYuji Yaginuma2018-09-291-2/+2
|\ \ \ \ \ | | | | | | | | | | | | Updates expires_in docs
| * | | | | Updates expires_in docsGraham Turner2018-09-281-2/+2
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | Previously the documentation for expires_in suggested that the option was available for all cache stores. This clarifies that the behavior can be supported, but is not always supported.
* | | | | Merge pull request #34021 from ↵Eileen M. Uchitelle2018-09-2811-19/+83
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | | | | | | gmcgibbon/change_migrations_paths_command_option_to_db Refactor migrations_path command option to database
| * | | | Refactor migrations_path command option to databaseGannon McGibbon2018-09-2811-19/+83
| | | | |
* | | | | Documentation clarity in ActiveJob::TestHelper [ci skip] (#33571)Mohit Natoo2018-09-281-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Documentation clarity in ActiveJob::TestHelper [ci skip] * Documentation for options [Mohit Natoo + Rafael Mendonça França]
* | | | | Merge pull request #34012 from abraham-chan/indifferent-access-withoutRafael França2018-09-283-0/+18
|\ \ \ \ \ | | | | | | | | | | | | Fix HashWithIndifferentAccess#without bug
| * | | | | Fix HashWithIndifferentAccess#without bugAbraham Chan2018-09-283-0/+18
| | | | | |
* | | | | | Merge pull request #34017 from utilum/update_backburner_to_latest_versionRafael França2018-09-281-2/+2
|\ \ \ \ \ \ | |_|/ / / / |/| | | | | Update backburner to the latest version
| * | | | | Update backburner to the latest versionutilum2018-09-281-2/+2
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | version 1.5.0 includes to warning fixes that show on tests: https://github.com/nesquena/backburner/commit/cd9670146bca4df83ae2aacb95b3e6d1c1c1eee8 https://github.com/nesquena/backburner/commit/4dfa22bda1685ca1afa9f7d474df471ca6364e69
* | | | | Merge pull request #33348 from ruralocity/update-validation-contexts-guideRyuta Kamizono2018-09-281-9/+27
|\ \ \ \ \ | | | | | | | | | | | | Update guide for validation custom contexts [ci skip]
| * | | | | Update guide for validation custom contexts [ci skip]Aaron Sumner2018-07-111-9/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Active Record validations guide's section on custom contexts appears to be incomplete. the code sample shows a context being added to validations, but not being used. Add to the sample code for this section by showing validations being run with and without the custom context. Add a second sample code block showing that validations with no context are also run, when a context is used.
* | | | | | Merge pull request #33570 from mohitnatoo/queue_adapter_name_docRyuta Kamizono2018-09-281-0/+2
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Documentation for queue_adapter_name method in ActiveJob::QueueAdapter [ci skip]
| * | | | | | Documentation for queue_adapter_name method in ActiveJob::QueueAdapter [ci skip]Mohit Natoo2018-08-101-0/+2
| | | | | | |
* | | | | | | Merge pull request #34013 from bogdan/relation-merge-fromRyuta Kamizono2018-09-282-3/+10
|\ \ \ \ \ \ \ | |_|_|/ / / / |/| | | | | | Bugfix ActiveRecord::Relation#merge special case of from clause
| * | | | | | Bugfix ActiveRecord::Relation#merge special case of from clauseBogdan Gusiev2018-09-282-3/+10
|/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | When one relation is merged into another that has a different base class merging `from_clause` causes invalid SQL to be generated
* | | | | | Merge pull request #34010 from Edouard-chin/ec-uneeded-requireRyuta Kamizono2018-09-282-1/+1
|\ \ \ \ \ \ | | | | | | | | | | | | | | LoggerSilence doesn't require concurrent:
| * | | | | | LoggerSilence doesn't require concurrent:Edouard CHIN2018-09-282-1/+1
|/ / / / / / | | | | | | | | | | | | | | | | | | - LoggerThreadSafeLevel does nowaday since 2518bda97cbbcb33dc9a92e70d5b01c09e64d12d
* | | | | | Merge pull request #33880 from robbertbrak/masterRyuta Kamizono2018-09-281-1/+3
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clarify transactional behavior of after_commit and after_rollback callbacks [ci skip]
| * | | | | | Clarify transactional behavior of after_commit and after_rollback callbacksRobbert Brak2018-09-141-1/+3
| | | | | | |
* | | | | | | Merge pull request #33833 from duduribeiro/patch-2Gannon McGibbon2018-09-271-1/+1
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | [ci skip] Do not recommend testing stored object in template
| * | | | | | | [ci skip] Recommend testing information displayed over object storedKadu Ribeiro2018-09-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since `assigns` is not placed by default with Rails, we suggested to test if the right information was displayed instead of suggesting to test if the right object was stored in the template.
* | | | | | | | Merge pull request #31441 from mrhead/rails-ujs-xhr-redirectsRafael França2018-09-274-2/+37
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Do not enable disabled elements for XHR redirects
| * | | | | | | | Do not enable disabled elements for XHR redirectsPatrik Bóna2018-09-274-2/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes #29473.
* | | | | | | | | Handle more unsafe String methods (#33990)Janosch Müller2018-09-274-11/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Handle more unsafe String methods * Fix codeclimate issue * Revert stylistic change [Janosch Müller + Rafael Mendonça França]
* | | | | | | | | Merge pull request #34007 from gmcgibbon/automatic_labelingRafael França2018-09-271-0/+46
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Add probot autolabeler config
| * | | | | | | | | Add probot autolabeler configGannon McGibbon2018-09-271-0/+46
| | | | | | | | | |
* | | | | | | | | | Add configuration to no-response probot pluginRafael França2018-09-271-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ci skip]
* | | | | | | | | | Merge pull request #34002 from gmcgibbon/fix_deeply_nested_scoped_rootRafael França2018-09-272-1/+17
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | Fix optionally scoped root route unscoped access
| * | | | | | | | | | Fix optionally scoped root route unscoped accessGannon McGibbon2018-09-272-1/+17
| |/ / / / / / / / /
* | | | | | | | | | Merge pull request #34006 from kamipo/remove_debug_codeRyuta Kamizono2018-09-281-10/+0
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | Revert "record who created the node when $DEBUG is true"