aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/generators
Commit message (Collapse)AuthorAgeFilesLines
...
* Move `package.json` creation to `create_root_files`yuuji.yaginuma2017-05-041-4/+5
| | | | | Since `package.json` is created in root directory, it is appropriate to create it in `create_root_files`.
* Remove unnecessary `package.json` deletionyuuji.yaginuma2017-05-011-4/+0
| | | | | The `package.json` is created only if `skip_yarn` is not specified. https://github.com/rails/rails/blob/a4c1282854795d1f0d7696ce1ccbabf94b3d9098/railties/lib/rails/generators/rails/app/app_generator.rb#L202..L204
* Ensure bin/yarn matches the one generated by webpackeryuuji.yaginuma2017-04-231-2/+3
| | | | | | Import from https://github.com/rails/webpacker/pull/277. Fixes https://github.com/rails/webpacker/issues/278
* Namespace CSS selectors on error pagesJan Krutisch2017-04-203-18/+18
| | | | The css selectors on the generated error pages are too broad (for example `text-align: center` on `body` and thus bleed out to the following pages (say, by pressing the back button) when using Turbolinks. This commit namespaces all the selectors.
* Merge pull request #28708 from y-yagi/dont_generate_system_test_filesRafael França2017-04-191-0/+4
|\ | | | | Don't generate system test files if `skip_system_test` option is specified
| * Don't generate system test files if `skip_system_test` option is specifiedyuuji.yaginuma2017-04-121-0/+4
| |
* | Use released sass-rails instead of master versionRafael Mendonça França2017-04-191-1/+1
| |
* | Add `form_with_generates_remote_forms` config.Kasper Timm Hansen2017-04-162-3/+4
| | | | | | | | | | | | | | Allows users to not have remote forms by default, since there's more JS harness, e.g. bundling rails-ujs, otherwise. Also don't skip creating defaults file anymore. Sprockets isn't the only new config.
* | Fix rubocop violationsyuuji.yaginuma2017-04-121-1/+1
|/
* SpacesRafael Mendonça França2017-04-071-0/+1
|
* More :scissors:Rafael Mendonça França2017-04-071-1/+1
|
* :scissors:Rafael França2017-04-071-1/+1
|
* Remove unnecessary `javascript` option checkyuuji.yaginuma2017-03-291-4/+1
| | | | Follow up to #28546
* Merge pull request #28549 from jess/patch-1Rafael França2017-03-281-0/+1
|\ | | | | make it clear how to enable caching
| * add proper punctuationJess Brown2017-03-231-1/+1
| |
| * make it clear how to enable cachingJess Brown2017-03-231-0/+1
| | | | | | since this is a new change, many will be coming here to toggle the true/false config and not find it. This will allow them to quickly implement the change.
* | Merge pull request #28557 from ↵Rafael França2017-03-271-0/+33
|\ \ | | | | | | | | | | | | y-yagi/remove_unnecessary_files_to_api_applications_when_app_task_task_executed Remove unnecessary files to API-only Applications when `app:task` task executed
| * | Remove unnecessary files to API-only Applications when `app:task` task executedyuuji.yaginuma2017-03-241-0/+33
| |/
* | Merge pull request #28546 from claudiob/drop-j-optionRafael Mendonça França2017-03-271-8/+0
|\ \ | | | | | | | | | Remove -j (--javascript) option from `rails new`
| * | Remove -j (--javascript) option from `rails new`claudiob2017-03-231-8/+0
| |/ | | | | | | | | | | | | | | | | | | | | | | The "-j" option was added 5 years ago (https://github.com/rails/rails/commit/d9c39c3a) when we wanted to support prototype-rails and jquery-rails. Prototype is not as popular and jQuery is not a requirement anymore. Still the "-j" option can be used to install *any* gem that ends in "-rails". This "might" open security issues and does not bring great benefits anymore. If you know which "-rails"-ending gem you want to install, you can manually add it to the Gemfile just like any other gem.
* | Merge pull request #28541 from ota42y/fix/gemfile_generator_fixEileen M. Uchitelle2017-03-273-2/+6
|\ \ | | | | | | ignore system test gems on Gemfile when execute with --skip-test option
| * | ignore system test gems on Gemfile when execute with --skip-test optionota42y2017-03-273-2/+6
| |/
* / add field ids when generating a scaffold form.Yves Senn2017-03-262-3/+7
|/ | | | | | This is a follow up to a6d065e. When using `form_with` you must supply field ids manually. Since the scaffold generator is using labels we need to make sure that they are linked up properly.
* Merge pull request #28534 from claudiob/list-webpackersRafael França2017-03-221-1/+2
|\ | | | | List options for `rails new --webpack=WEBPACK`
| * List options for `rails new --webpack=WEBPACK`claudiob2017-03-221-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When you type `rails new -h`, the `--database=DATABASE` options display this useful message: > Preconfigure for selected database (options: mysql/postgresql/sqlite3/oracle/frontbase/ibm_db/sqlserver/jdbcmysql/jdbcsqlite3/jdbcpostgresql/jdbc) However, the `--webpack=WEBPACK` option only displays this: > Preconfigure for app-like JavaScript with Webpack so it's hard to know *which* values are valid for `WEBPACK`. This commit improves the help message to display: > Preconfigure for app-like JavaScript with Webpack (options: react/vue/angular) The implication of this commit is that the list needs to be manually updated whenever rails/webpacker adds support for a new framework. However, I don't imagine this list to change very frequently, and I think that the benefit of display the list to the users is greater than the hustle of updating the list when needed.
* | Merge pull request #28524 from claudiob/comment-api-keyRafael França2017-03-221-2/+2
|\ \ | |/ |/| Don't add a dummy API key to every new Rails app
| * Don't add a dummy API key to every new Rails appclaudiob2017-03-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Every new Rails app is currently generated with `Rails.application.secrets[:api_key]` set to `123`. This comes from a line in `config/secrets.yml` that, in my opinion, should be left commented out to only serve as a syntax example, rather than being actually set in every Rails app. Additionally, we might want to give a better example than `123`, since in the same file we are suggesting to > Make sure the secret is at least 30 characters and all random, > no regular words or you'll be exposed to dictionary attacks. The result of this commit is that `config/secrets.yml` will include something like: ```yaml # Shared secrets are available across all environments. # shared: # api_key: f56930851993982510d5bd9236f4108f6fe7c15448f1c6923a51872e0dbae1a24d274b318abb6518b540dfb51079c61640885f607467e5ed1053849be7587d61 ``` rather than this: ```yaml # Shared secrets are available across all environments. shared: api_key: 123 ```
* | Don't comment out config.file_watcher during Rails upgradeyuuji.yaginuma2017-03-221-2/+0
|/ | | | | | | This is necessary only when updating to Rails 5.0, it is not necessary for updating to 5.1. Related #24243
* Start Rails 5.2 developmentMatthew Draper2017-03-221-0/+1
|
* Default to yielding a `form` variable.Kasper Timm Hansen2017-03-201-8/+8
| | | | More intention revealing and means `f` can go F itself 😋
* Merge pull request #28406 from ↵Kasper Timm Hansen2017-03-201-1/+1
|\ | | | | | | | | chukitow/feature/user-form-with-instead-of-form-for-scaffold user form with instead of form for in scaffold generator
| * disable remote submitsIvan Velasquez2017-03-141-1/+1
| |
| * user form with instead of form for in scaffold generatorIvan Velasquez2017-03-131-1/+1
| |
* | Add `app:update` task to enginesyuuji.yaginuma2017-03-201-1/+1
| | | | | | | | | | | | 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.
* | Track the version-compatible config settings inside railtiesMatthew Draper2017-03-184-37/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Bump Capybara and include Minitest::Assertionseileencodes2017-03-171-1/+1
|/ | | | | | | | | | | | | | | | | | | | | Capybara was updated in teamcapybara/capybara#1841 to use Minitest style assertions so that system test output shows x number of assertions, x numbe of failures, etc. Before: ``` 6 runs, 0 assertions, 0 failures, 0 errors, 0 skips ``` After: ``` 6 runs, 7 assertions, 1 failures, 0 errors, 0 skips ``` This change bumps Capybara from 2.7.0 to 2.13.0 and includes the required minitest assertion file in the test case. :tada:
* Merge pull request #28257 from yahonda/app_generators_use_oracle_enhancedAndrew White2017-03-062-5/+6
|\ | | | | Update `database.yml` when `rails new <new_app> -d oracle` specified
| * Update `database.yml` when `rails new <new_app> -d oracle` specifiedYasuo Honda2017-03-022-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Install "activerecord-oracle_enhanced-adapter". Oracle adapter used to be a bundled one. Now it is a 3rd party one. Also "ruby-oci8" is a required gem for CRuby, not for JRuby. - Remove oracle entry for JRuby since Oracle enhanced adapter supports both CRuby and JRuby with single gem. - Change adapter name from `oracle` to `oracle_enhanced` in the oracle.yml. Not changing `-d oracle` - Update `DATABASE_URL` entry to use a dash instead of an underscore Refer https://github.com/rails/rails/commit/d72a0cbc807a14d3eec02a53317d11b9d9fa5815 for the reason.
* | A private method can't be called with `self.`Akira Matsuda2017-03-041-2/+2
|/ | | | | | | | So calling `filename_with_extensions` omitting the second argument like this https://github.com/slim-template/slim-rails/blob/8dbc1fbf859ebfa95b0884a0196a6ad9f0ca9cd5/lib/generators/slim/scaffold/scaffold_generator.rb#L10 causes NoMethodError. fixes #28275
* Skip turbolinks for engine test applicationViktor Fonic2017-02-281-0/+1
| | | | | When `rails new plugin` is invoked, turbolinks should be skipped in the dummy test application generated by the plugin generator.
* Use released webpacker in new applicationsyuuji.yaginuma2017-02-281-1/+1
| | | | Because webpacker 1.0 already released.
* Imporove docs for Rails::AppGenerator [ci skip]dixpac2017-02-251-0/+8
| | | | | Add example so its easier to understand how one can overide an app generator.
* Merge pull request #28062 from ↵Rafael França2017-02-241-1/+1
|\ | | | | | | | | 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-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Use double quotes in the generated plugin test script.Kasper Timm Hansen2017-02-231-3/+3
| |
* | Merge pull request #28105 from y-yagi/add_wrapper_for_plugins_test_runnerKasper Timm Hansen2017-02-231-7/+1
|\ \ | | | | | | Add wrapper for plugin's test runner
| * | Add wrapper for plugin's test runneryuuji.yaginuma2017-02-221-7/+1
| | | | | | | | | | | | | | | | | | | | | Currently, private API is directly used in `bin/test`. It is necessary to change `bin/test` when changing private API. To avoid this, provide a wrapper file and modify `bin/test` to just require that file.
* | | Revert "Revert "Add encrypted secrets""Kasper Timm Hansen2017-02-234-2/+78
| | |
* | | Revert "Add encrypted secrets" (#28127)David Heinemeier Hansson2017-02-234-78/+2
| | |
* | | Add encrypted secrets (#28038)Kasper Timm Hansen2017-02-234-2/+78
| | |