| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Wash out your old! These adhoc scripts are replaced by the new
commands.
|
|
|
|
| |
Prescribed some review fixes for myself!
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Rails test runner supports three ways to run tests: directly, via rake, or ruby.
When Running with Ruby ala `ruby -Itest test/models/post_test.rb` our test file would
be evaluated first, requiring `test_helper` and then `active_support/testing/autorun`
that would then require the test file (which it hadn't been before) thus reevaluating
it. This caused exceptions if using Active Support's declarative syntax.
Fix this by shifting around when we set the how we're run to closer mimick the require
order.
If we're running with `bin/rails test` the test command file is run first and we then
set `run_with_rails_extension`, later we hit `active_support/testing/autorun` and do
nothing — because we've been run elsewhere.
If we at this point haven't set `run_with_rails_extension` we've been running with
`ruby` this whole time and thus we set that.
We should always trigger `Minitest.autorun` as it doesn't hurt to call it twice.
Consolidate the two methods into a single one that better brings out the intent of
why they're there.
|
|
|
|
|
|
|
|
| |
Revise the require in the test command to use `active_support/testing/autorun`
and spare us the minitest spec syntax as detailed in 5da4d51.
Also move the require to the top of the file for consistency with the rest of
Rails' requires across the project.
|
| |
|
|
|
|
| |
see https://github.com/seattlerb/minitest/blob/f9605387e4af7d657921a83aaf0ae364f6d26a57/lib/minitest.rb#L51-L65
|
| |
|
|
|
|
|
|
|
|
|
| |
Currently mongrel is not maintained.
And it couldn't be built with any Ruby versions that
supported by Rails.
It is reasonable to remove the word "mongrel" in order to avoid
confusion from newcomer.
|
|
|
|
|
| |
Extract a common method of `Rails::CommandsTasks` and
`Rails::Engine::CommandsTasks` to the module.
|
|
|
|
|
|
|
|
| |
Style/SpaceBeforeBlockBraces
Style/SpaceInsideBlockBraces
Style/SpaceInsideHashLiteralBraces
Fix all violations in the repository.
|
|
|
|
| |
Hash syntax auto-correcting breaks alignments. 411ccbdab2608c62aabdb320d52cb02d446bb39c
|
|
|
|
| |
Some case expressions remain, need to think about those ones.
|
|\
| |
| |
| |
| | |
y-yagi/show_error_message_when_error_raised_in_rails_runner
show error message when error raised in rails runner
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
Eagerly requiring Rake could put 100ms on to the Rails boot time. Shimmy that
down to 0 by requiring Rake when no native Rails command exists and we try to
run a Rake task. Or when printing all the Rake commands through `rails help`.
Fixes #25029
|
| | |
|
| | |
|
|/
|
|
|
| |
The current code base is not uniform. After some discussion,
we have chosen to go with double quotes by default.
|
| |
|
|
|
|
| |
Add handling of cleaning up backtrace from IRB console in case of errors
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- We need to pass the restart command to Puma so that it will use it
while restarting the server.
- Also made sure that all the options passed by user while starting
the server are used in the generated restart command so that they will
be used while restarting the server.
- Besides that we need to remove the server.pid file for the previous running
server because otherwise Rack complains about it's presence.
- We don't care if the server.pid file does not exist. We only want to delete
it if it exists.
- This also requires some changes on Puma side which are being tracked
here - https://github.com/puma/puma/pull/936.
- Fixes #23910.
|
|
|
|
|
|
| |
If use rails together with `spring`, `spring` is rewrite `$0` in the interior
command name. Therefore, for `$0` correct command name does not appear, `$0` has
been modified so that it does not use.
|
|
|
|
|
|
|
| |
The default is that's false, caching even if you do not specify the caching option is determined not to use,
and `tmp/caching-dev.txt` will be deleted.
If it is this, regardless of whether or not there is `tmp/caching-dev.txt`, be sure to order would be necessary to specify the caching option,
I think that in than good to so as not to do anything by default.
|
|
|
|
|
| |
Lets have the server and the Rake task go through the same ropes, so we can
share all the file lookup, adding, and deleting code.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix bug (#22811) that occurs when rails server is started in daemon mode
and optional path to the `server.pid` file is omitted. Store default path
in a constant instead of evaluating it multiple time using `File.expand_path`.
The bug in detail: The server startup procedure crashes, since it tries to
open a file at `/tmp/pids/server.pid` instead of
`<path to project>/tmp/pids/server.pid`. This bug was introduced in 51211a94bd
when Rack was upgraded from version 1.x to 2.x. Since version 2.x,
Rack does not memoize the options hash [1], and as a consequence
`Rails::Server#default_options` will be evaluated multiple times.
The hash returned by `Rails::Server#default_options` holds the default path
to the `server.pid` file. The path is generated with the method
`File.expand_path`. However, the return value of this method depends on the
current working directory [2], which changes once `Process.daemon` is invoked
by `Rack::Server#daemonize_app` and the process is detached from the current
shell.
Close #22811
[1]https://git.io/vzen2
[2]http://ruby-doc.org/core-2.1.5/File.html#method-c-expand_path
|
|\
| |
| | |
[close #22917] Don't output to `STDOUT` twice
|