aboutsummaryrefslogtreecommitdiffstats
path: root/railties/Rakefile
Commit message (Collapse)AuthorAgeFilesLines
* Better spread out the railties testsMatthew Draper2019-04-091-2/+39
|
* Install JavaScript packages before run testyuuji.yaginuma2019-02-111-1/+1
| | | | | | | | | | | | | Some tests are running yarn install during the test. The directory used for isolation test is not subject to yarn workspace, and it occurs because the required package is not installed. In order to avoid this, I fixed all necessary packages to be installed before run test and use symlink to `node_modules`. This is a bit complicated, as `yarn install` needs to be run in a specific directory before running the test. However, running `yarn install` every time run the test is expensive when testing locally and should be avoided.
* Respect ENV variables when finding DBs etc for the test suiteMatthew Draper2019-02-061-4/+17
| | | | | If they're not set we'll still fall back to localhost, but this makes it possible to run the tests against a remote Postgres / Redis / whatever.
* Make Webpacker the default JavaScript compiler for Rails 6 (#33079)David Heinemeier Hansson2018-09-301-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Fix assignment of TESTOPTS in railties test taskutilum2018-07-011-1/+3
| | | | | | The assignment of `ENV["TESTOPTS"]` to `ARGV`, introduced in 09f9a7a5b, did not take into account passing multiple options, such as `--verbose --seed=1`. This patch fixes it.
* Enable TESTOPTS in railties testsutilum2018-06-261-1/+1
| | | | | | | Unlike the other components' test suites, railties' currently ignores such useful options as `"--verbose"` or `"--name"`. This patch allows us to use them.
* Enable warnings in all test tasksutilum2018-05-231-1/+1
| | | | Also normalize AJ task use t, like all other Rails test tasks.
* Run in-app rails commands via fork+load where possibleMatthew Draper2017-09-041-1/+6
| | | | | While this avoids shell argument parsing, we still pass through everything in our stack.
* Run all railties tests before reporting failureMatthew Draper2017-09-031-1/+14
|
* Don't start a new process for every test fileMatthew Draper2017-09-031-10/+34
| | | | | This effectively reverts 200cf32e207728df287cac2ec113a7cbe277c1eb, restoring a variant of 5a0e0e72995472e315738dcea5b5a12d6e3d3489.
* Adding frozen_string_literal pragma to Railties.Pat Allan2017-08-141-0/+2
|
* 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
|
* Define path with __dir__bogdanvlviv2017-05-231-5/+5
| | | | | | ".. with __dir__ we can restore order in the Universe." - by @fxn Related to 5b8738c2df003a96f0e490c43559747618d10f5f
* Fix ability to run railties test suiteDavid Heinemeier Hansson2016-12-081-0/+1
|
* modernizes hash syntax in railtiesXavier Noria2016-08-061-2/+2
|
* applies new string literal convention to the rest of the projectXavier Noria2016-08-061-7/+7
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* Remove package:clean taskJavan Makhmali2016-05-241-1/+0
| | | | Introduced in d6f2000a67cc63aa67414c75ce77de671824ec52 and was only used by Action Cable. Now handled by Action Cable’s assets:compile task.
* Wrangle the asset build into something that sounds more generalMatthew Draper2016-02-011-0/+3
|
* Revert "don't start a new process for every test file"Matthew Erhard2015-12-021-21/+8
| | | | | This reverts commit 5a0e0e72995472e315738dcea5b5a12d6e3d3489. This commit causes railties tests on TravisCI to always return a 0 status (all tests passing), even when tests are failing. Reverting for now until a new solution can be found.
* don't start a new process for every test fileAaron Patterson2015-11-031-8/+21
| | | | | | | we can just reuse the parent process. We should figure out what files are commonly required among the test files and try to require them in the parent so that the require time cost is amortized across the processes.
* Disable warnings in railties testsRafael Mendonça França2015-08-271-1/+1
|
* Remove unused package tasksArun Agrawal2015-05-281-9/+0
| | | | We are using `all:build` now.
* Remove broken and unused release taskArun Agrawal2015-05-221-9/+0
| | | | | - We do release with release.rb - There is no `rake/gemcutter`
* Follow up to #16613Robin Dupret2014-09-281-0/+1
| | | | | | | | | | | | Since we want this flag to be enabled anytime we are running the tests under JRuby, let's enable this at the Rakefile level so people get the performance boost on their local checkout. Moreover, we avoid having to update this particular line anytime the option changes on the JRuby side. The only drawback is that we have to define it in every Rakefile but there's no big deal, this is already the case for other options.
* Removed unused require from RakefileArun Agrawal2013-07-141-4/+0
|
* Removed unused broken task for update README [ci skip]Arun Agrawal2013-07-141-9/+0
|
* Saying gemcutter => rubygems [ci skip]Arun Agrawal2013-06-211-1/+1
|
* Add TEST_DIRS enviroment for constrain test directories in rakefileAbd ar-Rahman Hamidi2013-04-081-2/+3
|
* Turning on warnings in "rake test" for railtiesArun Agrawal2013-04-011-1/+1
|
* Add rake test descriptionsanemat2013-01-011-0/+2
| | | | No behavior change
* remove misleading comment in Rakefileschneems2012-09-241-3/+0
| | | Comment introduced in https://github.com/rails/rails/commit/bbb3e5a8 before rake `isolate:test` was even introduced https://github.com/rails/rails/commit/bbb3e5a8
* Remove useless load path modificationsSantiago Pastorino2012-05-111-1/+2
|
* Rakefile executable attributes and shebang lines has been removedRoman V. Babenko2012-05-021-1/+0
|
* remove unused pguides rake task from railtiesVijay Dev2012-05-021-9/+0
|
* moves the guides up to the root directoryXavier Noria2012-03-171-12/+0
|
* railties depends on actionpack, so put actionpack in the include pathAaron Patterson2011-09-091-1/+7
|
* rake already ships with a ruby commandAaron Patterson2011-09-091-2/+1
|
* fixes Rake::GemPackageTask deprecation warnings from rake 0.9.0Vijay Dev2011-05-241-2/+2
|
* removes the :update_ujs task in railtiesXavier Noria2011-05-041-4/+0
|
* Prototype and Scriptaculous are no longer vendored, but provided by ↵Xavier Noria2011-04-301-1/+0
| | | | prototype-rails from now on, also the -j option of the application generator is removed
* Make update_ujs task update the right filesSantiago Pastorino2011-04-291-2/+2
|
* sorry, the CI cannot lie to us anymoreAaron Patterson2011-01-121-1/+1
|
* use https to fetch files from GitHubAkira Matsuda2010-12-261-2/+2
| | | | | | | | see: https://github.com/blog/738-sidejack-prevention-phase-2-ssl-everywhere [#6223 state:committed] Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* Rakefiles are executables, and rake loads rake, not rakefile coderaggi2010-11-251-1/+1
|
* -j parameter added to rails new command.siong19872010-10-111-2/+3
| | | | | | | | Now you can start your apps with jquery with rails new myapp -j jquery, the default is still prototype [#5613 state:committed] Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* deletes the rdoc task of each component, they are no longer published separatelyXavier Noria2010-08-201-16/+0
|
* Bump up rdoc to 2.5.10Santiago Pastorino2010-08-181-1/+1
|
* update Rakefiles for RDoc 2.5Aaron Patterson2010-07-231-4/+11
|
* Makes Rakefile activate rdoc >= 2.5.9Santiago Pastorino2010-07-231-1/+1
| | | | Signed-off-by: Xavier Noria <fxn@hashref.com>