aboutsummaryrefslogtreecommitdiffstats
path: root/railties
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #28368 from y-yagi/add_test_for_secrets_commandKasper Timm Hansen2017-03-151-0/+13
|\ | | | | Add secrets edit test
| * Add secrets edit testyuuji.yaginuma2017-03-121-0/+13
| |
* | Merge pull request #28409 from y-yagi/make_destroy_command_work_within_enginesEileen M. Uchitelle2017-03-152-2/+57
|\ \ | | | | | | Make destroy command work within engines
| * | Make destroy command work within enginesyuuji.yaginuma2017-03-142-2/+57
| |/ | | | | | | | | Instead of calling methods of Rails.application directly, we need to use a method that is considered for the rails engine.
* | Merge pull request #28422 from ↵Kasper Timm Hansen2017-03-151-7/+7
|\ \ | | | | | | | | | | | | y-yagi/rename_app_update_test_to_more_appropriate_name Rename test of `app:update` to more appropriate name
| * | 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`.
* | Add CHANGELOG entry for --skip-coffee [ci skip]claudiob2017-03-141-0/+4
| | | | | | | | Was added in #25248 by @bluesh55
* | Move "fixes" to a new lineJon Moss2017-03-131-1/+3
|/ | | | [ci skip]
* Merge pull request #28182 from y-yagi/show_correct_rails_commandsKasper Timm Hansen2017-03-098-18/+47
|\ | | | | Show correct commands in help
| * Show correct commands in helpyuuji.yaginuma2017-03-038-18/+47
| | | | | | | | | | Currently rails' help shows only namespace. However, the secrets command needs to specify command. Therefore, I fixed the command to display in help.
* | [ci skip] Document read_encrypted_secrets config.Kasper Timm Hansen2017-03-091-0/+8
| | | | | | | | | | | | Mostly just that it's there. Closes #28193.
* | Use appropriate type in generators testyuuji.yaginuma2017-03-081-1/+1
| | | | | | | | | | | | | | | | This fixes the following thor's warning. ``` Expected string default value for '--generate'; got false (boolean) ```
* | [ci skip] 🎬 expensive: take twoKasper Timm Hansen2017-03-061-1/+1
| |
* | 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.
* | | Avoid running system tests by defaultRobin Dupret2017-03-055-10/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These tests may be expansive so let's only allow users to run them through `bin/rails test:system` or by passing a path to the `test` command. The same applies for `bin/rake test`. Refs #28109.
* | | 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
* | | Remove unnecessary system test codeeileencodes2017-03-031-13/+0
| | | | | | | | | | | | | | | | | | | | | It turns out that we don't need to require system tests in the railties test helper so we can remove it. If you're using system tests they will be loaded by inheriting from ActionDispatch::SystemTestCase and the routes will be loaded by ActionDispatch::IntegrationTest.
* | | Fix random failure on system test with ajaxFumiaki MATSUSHIMA2017-03-031-0/+28
|/ / | | | | | | | | | | | | | | If application has ajax, browser may begin request after rollback. `teardown_fixtures` will be called after `super` on `after_teardown` so we must call `Capybara.reset_sessions!` before `super` https://github.com/rails/rails/blob/b61a56541aecd7ac685d4f19d943177a3f1b465a/activerecord/lib/active_record/fixtures.rb#L857
* | [ci skip] Add changelog entry for #28139.Kasper Timm Hansen2017-03-021-0/+16
| | | | | | | | Includes a script to ease an app's upgrade.
* | Inline CIPHER constant.Kasper Timm Hansen2017-03-021-6/+3
| |
* | Move key packing into encryptor.Kasper Timm Hansen2017-03-022-6/+4
| |
* | Add back yaml require.Kasper Timm Hansen2017-03-021-0/+1
| |
* | Merge pull request #28139 from stouset/update-secrets-to-use-modern-cryptoKasper Timm Hansen2017-03-022-17/+16
|\ \ | | | | | | Update secrets to use modern crypto
| * | Default Secrets to AES-128-GCM, using ActiveSupport::MessageEncryptorStephen Touset2017-03-012-17/+16
| | | | | | | | | | | | Fixes #28135.
* | | Convert `ENV["EDITOR"]` to string before checkyuuji.yaginuma2017-03-021-1/+1
| | | | | | | | | | | | | | | | | | In order to avoid `NoMethodError` when it is nil. Follow up to 82f7dc6178f86e5e2dd82f9e528475a6acee6cd8
* | | [ci skip] Add changelog entry for encrypted secrets.Kasper Timm Hansen2017-03-011-0/+14
| | | | | | | | | | | | Just dispatch to the command help itself for more info.
* | | Put it to me straight: just say it.Kasper Timm Hansen2017-03-011-3/+3
| | | | | | | | | | | | Prefer Thor's say method to Kernel's plain puts.
* | | Tell users how to assign a $EDITOR.Kasper Timm Hansen2017-03-012-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In case there's no $EDITOR assigned users would see a cryptic: ``` % EDITOR= bin/rails secrets:edit Waiting for secrets file to be saved. Abort with Ctrl-C. sh: /var/folders/wd/xnncwqp96rj0v1y2nms64mq80000gn/T/secrets.yml.enc: Permission denied New secrets encrypted and saved. ``` That error is misleading, so give a hint in this easily detectable case. Fixes #28143.
* | | Merge pull request #28239 from ↵Kasper Timm Hansen2017-03-011-1/+1
|\ \ \ | | | | | | | | | | | | | | | | y-yagi/use_appropriate_type_for_test_framework_option Use appropriate type for `test_framework` option
| * | | Use appropriate type for `test_framework` optionyuuji.yaginuma2017-03-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes the following warning. ``` Expected string default value for '--test-framework'; got false (boolean) ```
* | | | Merge pull request #28230 from y-yagi/HOST_to_be_in_uppercaseRafael França2017-02-281-1/+1
|\ \ \ \ | | | | | | | | | | `HOST` must be all capital letters
| * | | | `HOST` must be all capital lettersyuuji.yaginuma2017-03-011-1/+1
| |/ / / | | | | | | | | | | | | Ref: https://github.com/rails/rails/blob/master/railties/lib/rails/commands/server/server_command.rb#L194
* | | | Merge pull request #28120 from vfonic/plugin-generator-skip-turbolinks-dummyRafael França2017-02-281-0/+1
|\ \ \ \ | |/ / / |/| | | Allow skipping of turbolinks for test dummy application for plugin/engine
| * | | 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.
* | | | Fix http -> https [ci skip]kenta-s2017-02-281-1/+1
|/ / /
* | | Use released webpacker in new applicationsyuuji.yaginuma2017-02-281-1/+1
| | | | | | | | | | | | Because webpacker 1.0 already released.
* | | Merge pull request #28196 from ↵Andrew White2017-02-272-3/+25
|\ \ \ | | | | | | | | | | | | | | | | y-yagi/set_correct_host_except_development_environment Set correct host except development environment
| * | | Set correct host except development environmentyuuji.yaginuma2017-02-272-3/+25
| | |/ | |/| | | | | | | | | | | | | | | | | | | Currently `localhost` is used for the default host in all environments. But up to Rails 5.0, `0.0.0.0` is used except for development. So fixed to use the same value as 5.0. Fixes #28184
* | | Merge pull request #28160 from ↵Eileen M. Uchitelle2017-02-271-2/+2
|\ \ \ | |/ / |/| | | | | | | | y-yagi/only_load_systemtestcase_if_puma_is_defined Only load SystemTestCase if Puma is defined
| * | Only load SystemTestCase if Puma is definedyuuji.yaginuma2017-02-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | SystemTestCase supports only Puma, and always load puma's file. https://github.com/rails/rails/blob/master/actionpack/lib/action_dispatch/system_testing/server.rb#L1 For that reason, the case of use Capybara but do not use Puma, it will cause an error. So we need to check about Puma is defined as well.
* | | 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 #28137 from schneems/schneems/fix-default-puma-portRichard Schneeman2017-02-242-11/+52
|\ \ \ | |/ / |/| | [close #24435] Send user_supplied_options to server
| * | [close #24435] Send user_supplied_options to serverschneems2017-02-242-11/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently when Puma gets a `:Port` it doesn't know if it is Rails' default port or if it is one that is specified by a user. Because of this it assumes that the port passed in is always a user defined port and therefor 3000 always "wins" even if you specify `port` inside of the `config/puma.rb` file when booting your server with `rails s`. The fix is to record the options that are explicitly passed in from the user and pass those to the Puma server (or all servers really). Puma then has enough information to know when `:Port` is the default and when it is user defined. I went ahead and did this for all values rails server exposes as server side options for completeness. The hardest thing was converting the input say `-p` or `--port` into the appropriate "name", in this case `Port`. There may be a more straightforward way to do this with Thor, but I'm not an expert here. Move logic for parsing user options to method Better variable name for iteration Explicitly test `--port` user input ✂️ Update array if environment variables are used
* | | Merge pull request #28150 from ↵Rafael França2017-02-242-0/+10
|\ \ \ | | | | | | | | | | | | | | | | y-yagi/do_not_display_hidden_namespaces_in_generators_help does not show hidden namespaces in generator's help
| * | | does not show hidden namespaces in generator's helpyuuji.yaginuma2017-02-242-0/+10
| | | |
* | | | Merge pull request #28062 from ↵Rafael França2017-02-242-1/+16
|\ \ \ \ | |/ / / |/| | | | | | | | | | | 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-242-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | Make help short-cut alias to workyuuji.yaginuma2017-02-242-1/+24
| | | |
* | | | Make version short-cut alias to workyuuji.yaginuma2017-02-242-1/+25
| |_|/ |/| |