aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/generators
Commit message (Collapse)AuthorAgeFilesLines
* Move generator namespacing to BaseLisa Ugray2017-07-192-36/+37
| | | | | | | Generators need to be aware of namespace to work properly in engines. Methods to help with this lived in Rails::Generators::NamedBase. Moving them to Rails::Generators::Base (which NamedBase inherits from) allows a follow-up in which a namespace aware unnamed generator can be created.
* Add bootsnap to default Gemfile:Burke Libbey2017-07-172-0/+4
| | | | | | Bootsnap precomputes load path resolution and caches ruby ISeq and YAML parsing/compilation, reducing application boot time by approximately 50% on supported configurations.
* Set `represent_boolean_as_integer` via `configuration`yuuji.yaginuma2017-07-161-1/+1
|
* Merge pull request #29645 from y-yagi/check_component_when_run_app_updateKasper Timm Hansen2017-07-161-1/+1
|\ | | | | Do not generate unused components contents in `app:update` task
| * Do not generate unused components contents in `app:update` taskyuuji.yaginuma2017-07-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Currently, `app:update` generates all contents regardless of the component using in application. For example, even if not using Action Cable, `app:update` will generate a contents related to Action Cable. This is a little inconvenient. This PR checks the existence of the component and does not generate unnecessary contents. Can not check all options in this way. However, it will be able to prevent the generation of unnecessary files.
* | Remove blank lines in setupYoshiyuki Hirano2017-07-161-2/+3
|/
* Change sqlite3 boolean serialization to use 1 and 0Lisa Ugray2017-07-111-0/+4
| | | | | | | | | | | | | | | | | | | | Abstract boolean serialization has been using 't' and 'f', with MySQL overriding that to use 1 and 0. This has the advantage that SQLite natively recognizes 1 and 0 as true and false, but does not natively recognize 't' and 'f'. This change in serialization requires a migration of stored boolean data for SQLite databases, so it's implemented behind a configuration flag whose default false value is deprecated. The flag itself can be deprecated in a future version of Rails. While loaded models will give the correct result for boolean columns without migrating old data, where() clauses will interact incorrectly with old data. While working in this area, also change the abstract adapter to use `"TRUE"` and `"FALSE"` as quoted values and `true` and `false` for unquoted. These are supported by PostreSQL, and MySQL remains overriden.
* Fix typo in method nameyuuji.yaginuma2017-07-111-1/+1
|
* Protect from forgery by defaultLisa Ugray2017-07-102-3/+4
| | | | | | | | Rather than protecting from forgery in the generated ApplicationController, add it to ActionController::Base by config. This configuration defaults to false to support older versions which have removed it from their ApplicationController, but is set to true for Rails 5.2.
* [Railties] require => require_relativeAkira Matsuda2017-07-0132-43/+43
|
* Merge pull request #29418 from dinahshi/scaffold_system_testsEileen M. Uchitelle2017-06-305-11/+68
|\ | | | | Add system tests to generate scaffold
| * Add system tests to generate scaffoldDinah Shi2017-06-305-11/+68
| |
* | Ignore public/assetsamingilani2017-06-271-0/+4
| |
* | Add `railtie.rb` to the plugin generatorTsukuru Tanimichi2017-06-263-2/+14
| |
* | Deprecate an `capify!` method in generators and templatesyuuji.yaginuma2017-06-181-0/+1
| | | | | | | | | | | | | | | | | | The `capify` command has been removed by Capistrano 3 and became to `cap install`. Therefore, the `capify!` method has no meaning in Capistrano 3. I think that should deprecate. Ref: https://github.com/capistrano/capistrano/commit/492793916acf32ffe1604daec6fd4892c8935018
* | Use `require_relative` instead of `require` with full pathbogdanvlviv2017-06-142-2/+2
| |
* | Merge pull request #29425 from gsamokovarov/drop-the-irb-termGuillermo Iguaran2017-06-121-1/+1
|\ \ | | | | | | Drop IRB out of the web-console Gemfile comment
| * | Drop IRB out of the web-console Gemfile commentGenadi Samokovarov2017-06-121-1/+1
| |/ | | | | | | | | | | | | | | | | | | | | We don't provide exactly the same experience as IRB does, so let's not advertize it like that. We can say that it's an interactive console, without further references. I have also followed byebug's comment and changed the calling `console` part. Hopefully, this can hint that the invocation is not view specific and you can use it like the debugger statement. [ci skip]
* | Merge pull request #29263 from assain/default_message_encryptor_to_gcmKasper Timm Hansen2017-06-111-0/+4
|\ \ | |/ |/| Default Message Encryptor Cipher to AES-256-GCM From AES-256-CBC
| * set message_encryptor default cipher to aes-256-gcmAssain2017-06-121-0/+4
| | | | | | | | - Introduce a method to select default cipher, and maintain backward compatibility
* | Ensure MSSQL password uses real ENV var.Ken Collins2017-06-051-2/+2
|/
* Merge pull request #29079 from ↵Eileen M. Uchitelle2017-06-021-1/+1
|\ | | | | | | | | orhantoy/feature/fix-scaffold_controller-generator-usage [ci skip] Fix `scaffold_controller` generator usage
| * [ci skip] Fix `scaffold_controller` generator usageOrhan Toy2017-05-291-1/+1
| |
* | Remove the pathname dependency from bin/update and bin/setupBen Woosley2017-05-312-4/+2
| | | | | | | | We don't get any benefit from it at all.
* | Merge pull request #29088 from ↵Matthew Draper2017-05-311-3/+4
|\ \ | | | | | | | | | | | | greysteil/better-spacing-in-production-environment Better spacing in environments/production.rb file
| * | Better spacing in environments/production.rb fileGrey Baker2017-05-151-3/+4
| | | | | | | | | | | | | | | Previously there were a couple of places where double-spacing or no spacing was happening, depending on skipped options.
* | | Replace therubyracer with mini_racerSam2017-05-301-1/+1
| | |
* | | Add option for class_attribute default (#29270)David Heinemeier Hansson2017-05-291-4/+4
| |/ |/| | | | | | | | | | | | | | | | | | | | | * Allow a default value to be declared for class_attribute * Convert to using class_attribute default rather than explicit setter * Removed instance_accessor option by mistake * False is a valid default value * Documentation
* | Doh. We are doing this on secrets:setup. Revert "Ignore the encrypted ↵David Heinemeier Hansson2017-05-291-3/+0
| | | | | | | | | | | | secrets key file that is created by rails secrets:setup" This reverts commit 75500476eb7e953a06cc64e67ecc57b13ef8cc99.
* | Merge pull request #29266 from ojiry/add-elm-option-to-generator-descEileen M. Uchitelle2017-05-291-1/+1
|\ \ | | | | | | [ci skip] Add elm option of webpack to generator description
| * | Add elm option of webpack to generator descriptionRyoji Yoshioka2017-05-291-1/+1
| | |
* | | Ignore the encrypted secrets key file that is created by rails secrets:setupDavid Heinemeier Hansson2017-05-291-0/+3
|/ /
* | Merge pull request #28132 from mikeycgto/aead-encrypted-cookiesKasper Timm Hansen2017-05-281-0/+4
|\ \ | | | | | | AEAD encrypted cookies and sessions
| * | AEAD encrypted cookies and sessionsMichael Coyne2017-05-221-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit changes encrypted cookies from AES in CBC HMAC mode to Authenticated Encryption using AES-GCM. It also provides a cookie jar to transparently upgrade encrypted cookies to this new scheme. Some other notable changes include: - There is a new application configuration value: +use_authenticated_cookie_encryption+. When enabled, AEAD encrypted cookies will be used. - +cookies.signed+ does not raise a +TypeError+ now if the name of an encrypted cookie is used. Encrypted cookies using the same key as signed cookies would be verified and serialization would then fail due the message still be encrypted.
* | | Includes namespace in system test skelton when namespace is specifiedyuuji.yaginuma2017-05-281-1/+1
| | | | | | | | | | | | Fixes #29247
* | | Do not show --webpack option in the plugin help messageash2017-05-262-4/+5
| | |
* | | Merge pull request #29176 from bogdanvlviv/define-path-with__dir__Matthew Draper2017-05-2616-24/+24
|\ \ \ | | | | | | | | Define path with __dir__
| * | | Define path with __dir__bogdanvlviv2017-05-2316-24/+24
| |/ / | | | | | | | | | | | | | | | ".. with __dir__ we can restore order in the Universe." - by @fxn Related to 5b8738c2df003a96f0e490c43559747618d10f5f
* | | Merge pull request #29195 from kaspth/rails-secrets-better-edit-exceptionKasper Timm Hansen2017-05-252-16/+17
|\ \ \ | | | | | | | | Make `secrets:edit` run `secrets:setup` if it hasn't already.
| * | | Reorder first secrets edit flow.Kasper Timm Hansen2017-05-252-16/+17
| |/ / | | | | | | | | | | | | | | | Setup config/secrets.yml.enc with template contents for people to edit. Then generate encryption key and encrypt the initial secrets.
* | | We dont actually use the ultra short-hand, so no need to complicate things ↵David Heinemeier Hansson2017-05-241-1/+1
| | | | | | | | | | | | with it
* | | Slim down the source definitionDavid Heinemeier Hansson2017-05-241-5/+1
|/ /
* | Unused variableDavid Heinemeier Hansson2017-05-201-1/+0
| |
* | Use recyclable cache keys (#29092)David Heinemeier Hansson2017-05-183-24/+13
|/
* Allow capybara minor releasesJustin Coyne2017-05-051-1/+1
| | | | | | Capybara 2.14.0 was released. Loosen the tight constraint in the generated Gemfile, so that Rails applications can take advantage of the new version
* 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