aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/generators
Commit message (Collapse)AuthorAgeFilesLines
* Don't comment out config.file_watcher during Rails upgradeyuuji.yaginuma2017-03-221-14/+0
| | | | | | | This is necessary only when updating to Rails 5.0, it is not necessary for updating to 5.1. Related #24243
* Default to yielding a `form` variable.Kasper Timm Hansen2017-03-201-4/+4
| | | | More intention revealing and means `f` can go F itself 😋
* Add `app:update` task to enginesyuuji.yaginuma2017-03-201-0/+16
| | | | | | Occasionally we update the file generated by engine. Therefore, I think that there is a task for updating as well as application in the engine, it is convenient for updating.
* Merge pull request #28481 from y-yagi/fix_warningKasper Timm Hansen2017-03-201-3/+3
|\ | | | | Fix `warning: character class has duplicated range`
| * Fix `warning: character class has duplicated range`yuuji.yaginuma2017-03-201-3/+3
| | | | | | | | | | | | | | | | | | | | This fixes the following warnings: ``` railties/test/generators/encrypted_secrets_generator_test.rb:15: warning: character class has duplicated range: /[\w\d]+/ railties/test/generators/encrypted_secrets_generator_test.rb:18: warning: character class has duplicated range: /production:\n# external_api_key: [\w\d]+/ railties/test/generators/encrypted_secrets_generator_test.rb:19: warning: character class has duplicated range: /production:\n# external_api_key: [\w\d]+/ ```
* | Correctly check whether key is defined in configurationyuuji.yaginuma2017-03-191-0/+12
|/ | | | | | | | | | | | | It can not check correctly with `defined?` ```ruby irb(main):001:0> Rails.application.config.active_record => {:maintain_test_schema=>true, :belongs_to_required_by_default=>true} irb(main):002:0> defined?(Rails.application.config.active_record) => nil ``` Follow up to #28469
* Track the version-compatible config settings inside railtiesMatthew Draper2017-03-182-22/+8
| | | | | | | | | | | | | | | | Instead of forcing new applications to carry an initializer that just switches things to what their default "should" be, we can handle it internally. The initializer is then only used by upgraders: it shows what the new default would be (commented out), while their upgraded application continues to operate as it did before. Under this model, a multiply-upgraded application could accumulate several new_framework_defaults_*.rb files, for each release series it has traversed. A given release series only needs to generate the latest, though, because we don't support `rails app:upgrade` while skipping releases.
* Merge pull request #28409 from y-yagi/make_destroy_command_work_within_enginesEileen M. Uchitelle2017-03-151-0/+55
|\ | | | | Make destroy command work within engines
| * Make destroy command work within enginesyuuji.yaginuma2017-03-141-0/+55
| | | | | | | | | | Instead of calling methods of Rails.application directly, we need to use a method that is considered for the rails engine.
* | Rename test of `app:update` to more appropriate nameyuuji.yaginuma2017-03-151-7/+7
|/ | | | | `rails:update` was changed to `app:update` in 6fb31638c8b61731103d4963272755b217a2df87. Therefore, I think that it is better that the test name is also `app_update`.
* Merge pull request #28062 from ↔Rafael França2017-02-241-0/+15
|\ | | | | | | | | y-yagi/make_adding_gemfile_entry_work_even_if_specify_only_the_plugin_name Make adding gemfile entry work even if specify only the plugin name
| * Make adding gemfile entry work even if specify only the plugin nameyuuji.yaginuma2017-02-241-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | Whether the command was executed within the rails application is checked by whether or not the application's path matches `app_path`. https://github.com/rails/rails/blob/5-0-stable/railties/lib/rails/generators/rails/plugin/plugin_generator.rb#L439..L441 Therefore, if only plugin name is specified in `app_path`, addition to Gemfile is not done. However, in the rails guide an example of specifying only plugin name is given, and it is considered that there are many cases where only plugin name is specified. For that reason, made it work even if only plugin name was specified.
* | Revert "Revert "Add encrypted secrets""Kasper Timm Hansen2017-02-232-0/+43
| |
* | Revert "Add encrypted secrets" (#28127)David Heinemeier Hansson2017-02-232-43/+0
| |
* | Add encrypted secrets (#28038)Kasper Timm Hansen2017-02-232-0/+43
| |
* | Merge pull request #27572 from matthewd/prerelease-specifierMatthew Draper2017-02-231-4/+4
|\ \ | | | | | | Simplify the version specifier generated by prereleases
| * | Simplify the version specifier generated by prereleasesMatthew Draper2017-01-051-4/+4
| | | | | | | | | | | | | | | "~> 1.2.3.pre4" will automatically allow "1.2.4" -- no need for an explicit range.
* | | Revert back to the original of using package.json in the root of the project ↔David Heinemeier Hansson2017-02-212-6/+6
| | | | | | | | | | | | (#28093)
* | | Merge pull request #28055 from robertomiranda/patch-3Guillermo Iguaran2017-02-211-1/+1
|\ \ \ | | | | | | | | Use Puma 3.7
| * | | Use Puma 3.7.xRoberto Miranda2017-02-201-1/+1
| | |/ | |/| | | | | | | ref this commit seems that has not been merged into 3.7 https://github.com/puma/puma/commit/42bec4600c51ab8a1c1ee5a0e1b738a4ffd82bf2
* | | Move and rename system testseileencodes2017-02-202-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Move system tests back into Action Pack * Rename `ActionSystemTest` to `ActionDispatch::SystemTestCase` * Remove private base module and only make file for public `SystemTestCase` class, name private module `SystemTesting` * Rename `ActionSystemTestCase` to `ApplicationSystemTestCase` * Update corresponding documentation and guides * Delete old `ActionSystemTest` files
* | | Turn system testing into it's own gem and renameeileencodes2017-02-202-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Renames `Rails::SystemTestCase` to `ActionSystemTest` and moves it to a gem under the Rails name. We need to name the class `ActionSystemTestCase` because the gem expects a module but tests themselves expect a class. Adds MIT-LICENSE, CHANGELOG, and README for the future.
* | | Add tests for system testingeileencodes2017-02-203-1/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Adds test case test * Adds driver adapter test * Adds tests for capybara seleium driver (testing the settings not actually opening the browser to test capybara w/ selenium because that would so so so slow) * Adds tests for rack test driver * Adds tests for generators
* | | Merge pull request #28059 from y-yagi/do_not_run_git_init_inside_test_dummyGuillermo Iguaran2017-02-201-0/+1
|\ \ \ | | | | | | | | Do not run `git init` in dummy application
| * | | Do not run `git init` in dummy applicationyuuji.yaginuma2017-02-181-0/+1
| |/ /
* / / Add test for generate namespaced integration testShota Iguchi2017-02-161-2/+6
|/ /
* | Merge pull request #27605 from ↔Godfrey Chan2017-02-141-0/+20
|\ \ | | | | | | | | | | | | mtsmfm/fix-generator-command-for-nested-rails-engine-take-2 Fix generator command for nested (namespaced) rails engine (take 2)
| * | Fix generator command for nested (namespaced) rails engine (take 2)Fumiaki MATSUSHIMA2017-01-071-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rewrite https://github.com/rails/rails/pull/27550 085546df45 was reverted (b6ffb5efcb) because it change the return of `namespaced_path` from String to Array. ---------------- If we create nested (namespaced) rails engine such like bukkits-admin, `bin/rails g scaffold User name:string age:integer` will create `bukkits-admin/app/controllers/bukkits/users_controller.rb` but it should create `bukkits-admin/app/controllers/bukkits/admin/users_controller.rb`. In #6643, we changed `namespaced_path` as root path because we supposed application_controller is always in root but nested rails engine's application_controller will not.
* | | remove `ActiveSupport.halt_callback_chains_on_return_false` from everywhereyuuji.yaginuma2017-02-081-1/+0
| | |
* | | Ignore yarn error log fileyuuji.yaginuma2017-02-031-0/+5
| | |
* | | Merge pull request #27784 from y-yagi/add_warnings_option_to_test_runnerRafael França2017-01-301-0/+11
|\ \ \ | | | | | | | | add warnings option to test runner
| * | | add warnings option to test runneryuuji.yaginuma2017-01-241-0/+11
| | | |
* | | | do not run `git init` when specify the `pretend` optionyuuji.yaginuma2017-01-231-0/+1
|/ / / | | | | | | | | | | | | When specifying the `pretend` option, expect that no processing will be done, so do not execute `git init` as well.
* | | Merge pull request #27632 from dixpac/repo_initializeRafael Mendonça França2017-01-182-2/+8
|\ \ \ | | | | | | | | | | | | Initalize git repo when creatin new rails app
| * | | Initalize git repo when creatin new rails appdixpac2017-01-122-2/+8
| | | | | | | | | | | | | | | | | | | | * If `--skip-git` is not specified initalize git repo when creating new rails app
| * | | Revert "Merge pull request #27619 from dixpac/add_missing_generator_test"yuuji.yaginuma2017-01-101-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 8cb3cdffdb70f3575518d24ea96ec891e40d21d0, reversing changes made to 3bc747bd8676dc940b531067e2861dcd4ac28efc. Reason: This test already exists in `SharedGeneratorTests`. Ref: https://github.com/rails/rails/blob/master/railties/test/generators/shared_generator_tests.rb#L109..L112 https://github.com/rails/rails/blob/master/railties/test/generators/app_generator_test.rb#L55..L56
| * | | Test `--skip-git` generator optiondixpac2017-01-091-0/+5
| | | |
* | | | Move config reset to ensure blockAndrew White2017-01-171-1/+2
| | | | | | | | | | | | | | | | We don't want to leak the extra migration path to other railties tests.
* | | | Move config reset to ensure blockAndrew White2017-01-171-1/+2
| | | | | | | | | | | | | | | | We don't want to leak the extra migration path to other railties tests.
* | | | Generate migrations at path set by `config.paths["db/migrate"]`Kevin Glowacz2017-01-162-0/+20
| | | |
* | | | make all rails commands work in engineyuuji.yaginuma2017-01-091-0/+1
|/ / / | | | | | | | | | | | | | | | | | | | | | Currently, all rails commands can be executed in engine, but `server`, `console`, `dbconsole` and `runner` do not work. This make all rails commands work in engine. Related to #22588
* / / Don't generate HTML/ERB templates for scaffold controller with --api flagPrathamesh Sonpatki2017-01-071-0/+6
|/ / | | | | | | - Fixes #27591.
* | Revert "Merge pull request #27550 from ↔Rafael Mendonça França2017-01-031-20/+0
| | | | | | | | | | | | | | | | | | mtsmfm/fix-generator-command-for-nested-rails-engine" This reverts commit 1e969bfb98b88799e2c759fce25a1d8cf00d7ce7, reversing changes made to a5041f267ded119c2d00b8786c2f2c1e3f93c8a1. Reason: It breaks the public API
* | Fix generator command for nested (namespaced) rails engineFumiaki MATSUSHIMA2017-01-031-0/+20
|/ | | | | | | | | | | | | If we create nested (namespaced) rails engine such like bukkits-admin, `bin/rails g scaffold User name:string age:integer` will create `bukkits-admin/app/controllers/bukkits/users_controller.rb` but it should create `bukkits-admin/app/controllers/bukkits/admin/users_controller.rb`. In #6643, we changed `namespaced_path` as root path because we supposed application_controller is always in root but nested rails engine's application_controller will not.
* Remove bin/yarn if yarn is skipped, tidy up testsPrathamesh Sonpatki2017-01-011-0/+7
| | | | | | - No need to remove bin/yarn separately for API only apps because :skip_yarn is set to true for API only apps. - Added a test for :skip_yarn config.
* Correct indent-accounting in controller route generationMatthew Draper2016-12-251-1/+1
| | | | | | Fixes #27447 [Matthew Draper & Yuuji Yaginuma]
* Privatize unneededly protected methods in Railties testsAkira Matsuda2016-12-244-4/+4
|
* fix broken tests (#27308)Yuji Yaginuma2016-12-081-3/+2
| | | Follow up to 0d20530e5edfd7d00fbc2a38ef5f87eca6ccc924
* specify `skip_yarn` option in API-only Application (#27309)Yuji Yaginuma2016-12-081-1/+4
|
* Make Yarn the default, drop default vendor/asset directories (#27300)David Heinemeier Hansson2016-12-082-25/+11
|