| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
When secrets confirmed with the `secrets:edit` command, `secrets.yml.enc`
will change without updating the secrets.
Therefore, even if only want to check secrets, the difference will come
out. This is a little inconvenient.
In order to solve this problem, added the `secrets:show` command.
If just want to check secrets, no difference will occur use this command.
|
| |
|
|
|
|
| |
- [Rails <= 5.0](https://github.com/rails/rails/blob/5-0-stable/railties/lib/rails/commands/test.rb#L6) used to add the `<app_root>/test` as a string; this behaviour changed in rails 5.1, it's appending a `Pathname` object
|
|
|
|
|
| |
Fix the mistake of not using Ruby's ENV hash from the get go and get
windows support.
|
|\
| |
| | |
Correctly set user_supplied_options when there is no whitespace in option specification
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
specification
Current `user_supplied_options` method can not set the value correctly
if there is no space between option and value (e.g., `-p9000`).
This makes it possible to set the value correctly in the case like the above.
Fixes #29138
|
| |
| |
| |
| |
| |
| | |
Setup config/secrets.yml.enc with template contents for people to edit.
Then generate encryption key and encrypt the initial secrets.
|
|/
|
|
|
| |
Needed back when we attempted to wait for editors, but now we expect
users to pass a -w flag to their $EDITOR.
|
|
|
|
|
|
|
|
|
| |
It wasn't clear that system tests don't run with the rest of the test
suite and are part of a separate command.
This documents the `test:system` command as well as update the Rails
runner help documentation to make it clearer that system tests are run
via their own command by default.
|
|
|
|
| |
Fixes #28988
|
| |
|
|
|
|
|
| |
The `header` option checks only whether it is specified or not.
https://github.com/rails/rails/blob/e8c33349bfabca28996ac74d344d69c7aaffec50/railties/lib/rails/commands/dbconsole/dbconsole_command.rb#L52
|
| |
|
|\
| |
| | |
Correctly reset ARGV for "rails runner `CODE' arg arg arg..."
|
| |
| |
| |
| |
| |
| | |
The code itself should not be in the ARGV vector.
Fixes #28515
|
|/
|
|
|
|
|
| |
This is a regression from when the server command switched to its own
argument parser, as opposed to Rack's. Rack's argument parser, when
provided with a "host" argument, gives that value precedence over
environment variables.
|
|
|
|
|
| |
Instead of calling methods of Rails.application directly, we need to
use a method that is considered for the rails engine.
|
|\
| |
| | |
Show correct commands in help
|
| |
| |
| |
| |
| | |
Currently rails' help shows only namespace. However, the secrets command
needs to specify command. Therefore, I fixed the command to display in help.
|
| |
| |
| |
| |
| |
| | |
Mostly just that it's there.
Closes #28193.
|
| |
| |
| |
| |
| |
| | |
In order to avoid `NoMethodError` when it is nil.
Follow up to 82f7dc6178f86e5e2dd82f9e528475a6acee6cd8
|
| |
| |
| |
| | |
Prefer Thor's say method to Kernel's plain puts.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| | |
Ref: https://github.com/rails/rails/blob/master/railties/lib/rails/commands/server/server_command.rb#L194
|
|/
|
|
|
|
|
|
| |
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
|
|\
| |
| | |
[close #24435] Send user_supplied_options to server
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Most editors support a wait flag of some kind which prevents their
process from exiting until the file or window is closed.
Prefer people to assign that themselves than us mucking around
with File mtimes or other such things.
Example of an editor config:
```
export EDITOR="atom --wait"
```
|
| |
|
| |
|
| |
|
|
|
|
|
| |
When executing the test via rake, since `rake` is set for `run_via`, `ruby` should not be set.
Related 2cb6c27310452da11b93d729c3b760ce988106e1
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|\ |
|
| | |
|
| |
| |
| |
| |
| |
| | |
Gems like rspec-rails depend on `ARGV` being shifted, and `scaffold`
(for example) not being the first item in `ARGV`. This should allow
rspec-rails to be passing on Rails master.
|
| |
| |
| |
| |
| |
| |
| |
| | |
This fixes the following warning.
```
Expected boolean default value for '--rc'; got "~/.railsrc" (string)
```
|
|/
|
|
|
|
|
|
|
|
| |
The `ServerCommand` inherits Thor, but currently does not use Thor
option parser.
Therefore, if leave the argument of Thor as it is, it becomes an error by
the argument checking of Thor.
To avoid it, to use the Thor option parser instead of reimplementing it.
Fixes #26964
|
|
|
|
|
| |
`Gem.win_platform?` check if it is Windows more accurately.
Ref: https://github.com/ruby/ruby/blob/ruby_2_2/lib/rubygems.rb#L945..L952
|
|
|
|
|
|
|
|
|
| |
When making the new command insfrastructure I had missed that
`bin/rails runner some_file.rb some args` would pass the extra
args onto the file in `ARGV`.
Now fixed by allowing the command to take extra args again, and
make sure to remove the file name from `ARGV`.
|
|
|
|
| |
YAML and ERB were removed at 971d510
|
|
|
|
|
| |
They're just barren on the site and confure more than guide, instead
rely on the built in --help to guide users.
|
|
|
|
| |
We need to use on_load so that plugins will get the same functionality
|
|
|
|
|
|
|
|
|
|
|
|
| |
The test framework should not be autoloaded in production mode. Before
this commit, the testing railtie would extend AS::TestCase. This caused
AS::TestCase to be preloaded regardless of the environment in which we
were running.
This commit just moves the code that adds line filtering support in to
the test command where we actually execute the test runner. That allows
us to maintain the line runner feature but only load the minimal amount
of code we need.
|
|
|
|
| |
`mongrel` was removed in #26408. But have back accidentally in #26414.
|
| |
|
| |
|
| |
|