From 5803640261a324bd7d7665a2bad5b5dc6da29255 Mon Sep 17 00:00:00 2001 From: "yuuji.yaginuma" Date: Mon, 26 Jun 2017 05:46:12 +0900 Subject: Do not generate unused components contents in `app:update` task 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. --- railties/CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'railties/CHANGELOG.md') diff --git a/railties/CHANGELOG.md b/railties/CHANGELOG.md index 761e2f4ded..5ea007bc33 100644 --- a/railties/CHANGELOG.md +++ b/railties/CHANGELOG.md @@ -1,3 +1,10 @@ +* Skip unused components when running `bin/rails app:update`. + + If the initial app generation skipped Action Cable, Active Record etc., + the update task honors those skips too. + + *Yuji Yaginuma* + * Make Rails' test runner work better with minitest plugins. By demoting the Rails test runner to just another minitest plugin — -- cgit v1.2.3 From 1acd9a6464668d4d54ab30d016829f60b70dbbeb Mon Sep 17 00:00:00 2001 From: Robin Dupret Date: Mon, 5 Jun 2017 23:19:00 +0200 Subject: Allow to pass a connection to the `dbconsole` command Since 0a4f6009, it's possible to specify a 3-level database configuration to gather connections by environment. The `dbconsole` command will try to look for a database configuration which points to the current environment but with such flavour, the environment key is flushed out so let's add the ability to specify the connection and pick `primary` by default to be consistent with Active Record. --- railties/CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'railties/CHANGELOG.md') diff --git a/railties/CHANGELOG.md b/railties/CHANGELOG.md index 5ea007bc33..1c93f7408c 100644 --- a/railties/CHANGELOG.md +++ b/railties/CHANGELOG.md @@ -1,3 +1,10 @@ +* Allow to pass a custom connection name to the `rails dbconsole` + command when using a 3-level database configuration. + + $ bin/rails dbconsole -c replica + + *Robin Dupret*, *Jeremy Daer* + * Skip unused components when running `bin/rails app:update`. If the initial app generation skipped Action Cable, Active Record etc., -- cgit v1.2.3 From 48b249927375465a7102acc71c2dfb8d49af8309 Mon Sep 17 00:00:00 2001 From: Robin Dupret Date: Fri, 9 Jun 2017 00:15:41 +0200 Subject: Deprecate environment as an argument for dbconsole and console People should rather rely on the `-e` or `--environment` options to specify in which environment they want to work. This will allow us to specify the connection to pick as a regular argument in the future. --- railties/CHANGELOG.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'railties/CHANGELOG.md') diff --git a/railties/CHANGELOG.md b/railties/CHANGELOG.md index 1c93f7408c..0edf1015a0 100644 --- a/railties/CHANGELOG.md +++ b/railties/CHANGELOG.md @@ -1,3 +1,17 @@ +* Passing the environment's name as a regular argument to the + `rails dbconsole` and `rails console` commands is deprecated. + The `-e` option should be used instead. + + Previously: + + $ bin/rails dbconsole production + + Now: + + $ bin/rails dbconsole -e production + + *Robin Dupret*, *Kasper Timm Hansen* + * Allow to pass a custom connection name to the `rails dbconsole` command when using a 3-level database configuration. -- cgit v1.2.3 From 3777701f1380f3814bd5313b225586dec64d4104 Mon Sep 17 00:00:00 2001 From: Robin Dupret Date: Sun, 16 Jul 2017 14:54:04 +0200 Subject: Properly expand the environment's name Running the `console` and `dbconsole` commands with a regular argument as the environment's name automatically expand it to match an existing environment (e.g. dev for development). This feature wasn't available using the `--environment` (a.k.a `-e`) option. --- railties/CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'railties/CHANGELOG.md') diff --git a/railties/CHANGELOG.md b/railties/CHANGELOG.md index 0edf1015a0..db55d4fd69 100644 --- a/railties/CHANGELOG.md +++ b/railties/CHANGELOG.md @@ -1,3 +1,8 @@ +* Properly expand shortcuts for environment's name running the `console` + and `dbconsole` commands. + + *Robin Dupret* + * Passing the environment's name as a regular argument to the `rails dbconsole` and `rails console` commands is deprecated. The `-e` option should be used instead. -- cgit v1.2.3 From 0312a5c67e35b960e33677b5358c539f1047e4e1 Mon Sep 17 00:00:00 2001 From: Burke Libbey Date: Thu, 1 Jun 2017 14:28:51 -0400 Subject: Add bootsnap to default Gemfile: Bootsnap precomputes load path resolution and caches ruby ISeq and YAML parsing/compilation, reducing application boot time by approximately 50% on supported configurations. --- railties/CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'railties/CHANGELOG.md') diff --git a/railties/CHANGELOG.md b/railties/CHANGELOG.md index db55d4fd69..f720b7caab 100644 --- a/railties/CHANGELOG.md +++ b/railties/CHANGELOG.md @@ -1,3 +1,7 @@ +* Add `bootsnap` to default `Gemfile`. + + *Burke Libbey* + * Properly expand shortcuts for environment's name running the `console` and `dbconsole` commands. -- cgit v1.2.3 From ed44b145bd6d621cd19a4a3c94eff1311e9c3755 Mon Sep 17 00:00:00 2001 From: Cody Cutrer Date: Wed, 31 Aug 2016 09:28:44 -0600 Subject: support `-` as an argument to `rails runner` in Rails 4.0, you could use `/dev/stdin` on both Linux and Mac, but with the switch to Kernel.load in Rails 4.1, this broke on Linux (you get a LoadError). Instead, explicitly detect `-` as meaning stdin, then read from stdin explicitly, instead of performing file gymnastics. This should now work on any platform uniformly. Passing a script via stdin is useful when you're sshing to a server, and the script you want to run is stored locally. You could theoretically pass the entire script on the command line, but in reality you'll run into problems with the command being too long. --- railties/CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'railties/CHANGELOG.md') diff --git a/railties/CHANGELOG.md b/railties/CHANGELOG.md index f720b7caab..45e1f5f3ea 100644 --- a/railties/CHANGELOG.md +++ b/railties/CHANGELOG.md @@ -1,3 +1,8 @@ +* Support `-` as a platform-agnostic way to run a script from stdin with + `rails runner` + + *Cody Cutrer* + * Add `bootsnap` to default `Gemfile`. *Burke Libbey* -- cgit v1.2.3