aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/generators
Commit message (Collapse)AuthorAgeFilesLines
...
| * enable_fragment_cache_loggingRob Jonson2018-10-091-0/+1
| | | | | | | | | | | | | | | | fragment caching was refactored in (I think 5.2) and by default doesn't log cache info this is confusing in development where rails dev:cache now turns on caching, but doesn't show any different logging output better to enable debugging by default for dev - and let people turn it off if preferred
* | Revert "Remove node_modules path from assets load paths since we use webpack ↵bogdanvlviv2019-01-061-0/+4
| | | | | | | | | | | | | | | | by default" This reverts commit 129f8ac6ffcafb2e6e13c9ef13dda4cc47f5af0d. See https://github.com/rails/rails/commit/02d2958b6cd84d687d89112eb7e2306a6a89c082#commitcomment-31849196
* | Add `--skip-action-text` option to `rails new`bogdanvlviv2019-01-052-1/+10
| | | | | | | | | | Since PR#34816 was merged in c6ef670aee186a2880b7be59c4c6892b5c983e58, we should add this option for flexibility, and consistency.
* | Fix `new_framework_defaults_6_0.rb` filebogdanvlviv2019-01-041-1/+1
| | | | | | | | | | `Rails.application.config.active_job.return_false_on_aborted_enqueue` should be commented as well.
* | Send Active Storage jobs to dedicated queues by defaultGeorge Claghorn2019-01-041-2/+6
| | | | | | Match Action Mailbox, which sets a default queue for each of its two jobs.
* | Merge pull request #34816 from ↵Rafael Mendonça França2019-01-031-1/+4
|\ \ | | | | | | | | | | | | | | | bogdanvlviv/add-skip-action-mailbox-option-to-rails-new-cmd Add `--skip-action-mailbox` option to `rails new`
| * | Add `--skip-action-mailbox` option to `rails new`bogdanvlviv2018-12-281-1/+4
| | | | | | | | | | | | Related to https://github.com/rails/rails/commit/ddaf06779aa51d5d1ca462c21c53f2ed169a0d2f
* | | Capistrano is no longer a dominant force in the deployment strategy for new appsDavid Heinemeier Hansson2019-01-031-3/+0
| | |
* | | Don't load Action Mailbox when Active Storage is skippedGeorge Claghorn2018-12-291-1/+1
|/ /
* | Don't load Action Mailbox when Active Record is skippedGeorge Claghorn2018-12-282-2/+7
| |
* | Load Action Mailbox when other components are skippedGeorge Claghorn2018-12-281-0/+1
| |
* | Add option to set parallel test worker count to the physical core count of ↵Bogdan2018-12-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the machine (#34735) * Add option to set parallel test worker count to the physical core count of the machine Also, use the physical core count of the machine as the default number of workers, and generate the `test_helper.rb` file with `parallelize(workers: :number_of_processors)` Closes #34734 * Ensure that we always test parallel testing Since #34734 we decided to use the physical core count of the machine as the default number of workers in the parallel testing, we need to ensure that some tests use at least 2 workers because we could run those tests on VM that has only 1 physical core. It also fixes tests failures on the CI since Travis server we are using has only one physical core. See https://travis-ci.org/rails/rails/jobs/469281088#L2352
* | Do not show post install message on rails newRafael Mendonça França2018-12-131-4/+4
| |
* | Fix warning: shadowing outer local variable - attributeRyuta Kamizono2018-12-131-1/+1
| |
* | Merge pull request #34691 from gmcgibbon/rm_helper_generator_suffixRyuta Kamizono2018-12-131-0/+5
|\ \ | | | | | | | | | Remove redundant suffixes on generated helpers.
| * | Remove redundant suffixes on generated helpers.Gannon McGibbon2018-12-121-0/+5
| | |
* | | Remove redundant suffixes on generated integration tests.Gannon McGibbon2018-12-121-0/+6
|/ /
* | Fix boolean interaction in scaffold system testsGannon McGibbon2018-12-122-0/+13
| |
* | Remove redundant suffixes on generated system tests.Gannon McGibbon2018-12-111-0/+5
| |
* | Upgrade Rubocop to 0.61.1 and fix offensesVinicius Stock2018-12-101-16/+16
| |
* | Abort early if generator command fails (#34420)David Rodríguez2018-12-071-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * No need to go through ruby * Abort early if a generator command fails * Reuse `rails_command` method * Bump thor minimum dependency to 0.20.3 * Add some minimal docs * Add a changelog entry * Restore original logging
* | Merge pull request #33992 from kirs/enqueue-return-falseRafael França2018-12-051-0/+3
|\ \ | | | | | | Make AJ::Base#enqueue return false if the job wasn't enqueued
| * | Make AJ::Base#enqueue return false if the job wasn't enqueuedKir Shatrov2018-10-281-0/+3
| | |
* | | Bump the minimum version of PostgreSQL to 9.3Yasuo Honda2018-11-252-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://www.postgresql.org/support/versioning/ - 9.1 EOLed on September 2016. - 9.2 EOLed on September 2017. 9.3 is also not supported since Nov 8, 2018. https://www.postgresql.org/about/news/1905/ I think it may be a little bit early to drop PostgreSQL 9.3 yet. * Deprecated `supports_ranges?` since no other databases support range data type * Add `supports_materialized_views?` to abstract adapter Materialized views itself is supported by other databases, other connection adapters may support them * Remove `with_manual_interventions` It was only necessary for PostgreSQL 9.1 or earlier * Drop CI against PostgreSQL 9.2
* | | Merge pull request #34410 from gmcgibbon/test_support_windowsEileen M. Uchitelle2018-11-191-1/+1
|\ \ \ | | | | | | | | Windows support for parallelization and instrumenter
| * | | Windows support for parallelization and instrumenterGannon McGibbon2018-11-081-1/+1
| | | | | | | | | | | | | | | | | | | | Add Windows support for `ActiveSupport::Testing::Parallelization` and `ActiveSupport::Notifications::Instrumenter`.
* | | | Fix a method call in bin/setup fileNihad Abbasov2018-11-151-1/+1
| | | | | | | | | | | | | | | | Follow up to a725539de677adbea0ced19d65647e975dbd3f84
* | | | add a nice alias for the --webpack optionAlessandro Rodi2018-11-131-2/+2
|/ / /
* | | Add `connect_src` example to content security policy initializeryuuji.yaginuma2018-11-041-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If want to use `webpack-dev-server` with CSP enabled, need to specify `connect-src`. Related to: https://github.com/rails/webpacker/commit/cd7ecf4d48496341aecd81c0c2f69fe4e50a7cd4 This is a matter of `webpacker`. But since `webpacker` is now used by default, to prevent user confusion, I think that better to include an example of `connect-src.`
* | | Keep new line after the last dependencyyuuji.yaginuma2018-11-041-1/+1
| | | | | | | | | | | | | | | If add a package with `yarn`, it will have a newline after the last dependency so let's match with that.
* | | Restore `encoding: utf8mb4` in database.ymlYasuo Honda2018-10-301-0/+1
|/ / | | | | | | | | | | | | rails/rails#33853 and rails/rails#33929 removed `encoding: utf8mb4` from database.yml since at that time MySQL 5.1 is supported with the master branch. Since MySQL 5.1 has been dropped, we can restore `encoding: utf8mb4` in database.yml
* | Merge pull request #34275 from bogdanvlviv/skip_yarn-to-skip_javascriptRafael França2018-10-237-18/+11
|\ \ | | | | | | Remove `--skip-yarn` in favor of `--skip-javascript`
| * | Remove node_modules path from assets load paths since we use webpack by defaultbogdanvlviv2018-10-221-4/+0
| | | | | | | | | | | | Related to #33079
| * | Remove `--skip-yarn` in favor of `--skip-javascript`bogdanvlviv2018-10-227-15/+12
| | | | | | | | | | | | | | | | | | Since #33079 Webpacker the default JavaScript compiler for Rails. Webpacker uses `yarn` so seems like it doesn't make sense for Rails to keep `--skip-yarn` option.
* | | Add missing dot in comment in .gitignore templateJochem Schulenklopper2018-10-221-1/+1
|/ / | | | | | | My submission for the tiniest commit and PR contest: add a missing dot in a comment line in the generator template for .gitignore. (I just noticed this missing; consistency is king :-)
* | Merge pull request #34279 from ↵Ryuta Kamizono2018-10-221-1/+0
|\ \ | | | | | | | | | | | | bogdanvlviv/remove-extra-remove_file-skip_action_cable Remove extra call `remove_file` on `rails new` with `--skip_action_cable`
| * | Remove extra call `remove_file` on `rails new` with `--skip_action_cable`bogdanvlviv2018-10-221-1/+0
| | | | | | | | | | | | | | | There is no need to remove this file since the line below removes entire directory in which that file is placed.
* | | Merge pull request #34274 from ↵Ryuta Kamizono2018-10-221-6/+1
|\ \ \ | |/ / |/| | | | | | | | bogdanvlviv/remove-yarn-files-from-gitignore-template Remove yarn's files from `.gitignore` template
| * | Remove yarn's files from `.gitignore` template for new rails appbogdanvlviv2018-10-211-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | Webpacker already does it, see https://github.com/rails/webpacker/blob/895d2cfc15eda2edae9e667c642a02523d958f53/lib/install/template.rb#L25-L33 I also opened PR https://github.com/rails/webpacker/pull/1765 in order to make it add `/yarn-error.log` file too.
* | | Remove `:javascript` from `Rails::PluginBuilder::PASSTHROUGH_OPTIONS`bogdanvlviv2018-10-221-1/+1
|/ / | | | | | | `--javascript` option was removed by 42198064c35ff3b701496309f90df2abc229efbe
* | Remove unnecessary escape characterFrancesco Rodríguez2018-10-191-2/+2
| |
* | Fix generated Gemfile missing gems on jrubyDavid Rodríguez2018-10-171-1/+1
| |
* | Show object ids in scaffold pages when displaying referenced objectsRasesh Patel2018-10-142-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Resolve Issue#29200 When scaffolding a model that references another model the generated show and index html pages display the object directly on the page. Basically, it just shows a memory address. That is not very helpful. In this commit we show the object's id rather than the memory address. This updates the scaffold templates and the json builder files.
* | Use `--skip-webpack-install` by defaultyuuji.yaginuma2018-10-091-1/+1
| | | | | | | | To remove extra `--no-skip-javascript` tests.
* | Avoid `webpacker:install` if unnecessaryyuuji.yaginuma2018-10-091-0/+1
| | | | | | | | | | `webpacker:install` also includes execution of yarn, it takes time to execute, so avoid unnecessary tests.
* | Add `skip-webpack-install` optionyuuji.yaginuma2018-10-092-1/+8
|/ | | | | This option is useful when want to check only the files generated by `rails new`, or if want to do something before `webpacker:install`.
* Merge pull request #34084 from trustvox/masterRafael França2018-10-052-4/+2
|\ | | | | Remove "include FileUtils" sentence in setup/update bin files
| * Remove "include FileUtils" sentence in setup/update bin filesBruno Casali2018-09-172-4/+2
| | | | | | | | | | According with rubocop style guide "Style/MixinUsage" is good to use only in class/module not directly in file.
* | Add retry_on/discard suggestions for common cases.Francesco Rodríguez2018-10-051-0/+5
| | | | | | | | | | | | | | | | This adds the same suggestions added here: https://github.com/rails/rails/blob/01a69e27a4e55504af8fe776826d659550e6f89e/activejob/lib/rails/generators/job/templates/application_job.rb These appear when `app/jobs/application_job.rb` doesn't exist, but not for new applications.
* | Make Webpacker the default JavaScript compiler for Rails 6 (#33079)David Heinemeier Hansson2018-09-3017-126/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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