| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
| |
We used to pass the Rails::Application subclass to #run.
The Rails server then called #to_app to convert that class to the
actual Rack application.
if you surround `#run` with a call to `#map` the server no longer
convertes the class to the instance and we end up with unnecessary
delegation calls on every request.
|
|
|
|
| |
Cache the value of "super" in a variable and use it instead.
|
| |
|
| |
|
|
|
|
|
|
| |
* `rails test -f` will run the test suites with all fixtures loaded
* New application will now generated without `fixtures :all` line
enabled by default.
|
|
|
|
|
| |
Any flags that got set will be passed through to MiniTest::Unit.runner,
such as `-n`, `-s-, and `-v`.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To run the whole test suite:
$ rails test
To run the test file(s):
$ rails test test/unit/foo_test.rb [test/unit/bar_test.rb ...]
To run the test suite
$ rails test [models,helpers,units,controllers,mailers,...]
For more information, see `rails test --help`.
This command will eventually replacing `rake test:*`, and `rake test`
command will actually invoking `rails test` instead.
|
|
|
|
|
|
| |
I've also added a proper acceptance test which reproduced the issue.
Closes #9513, #9515.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Executable scripts are versioned code like the rest of your app. To generate a stub for a bundled gem: 'bundle binstubs unicorn' and 'git add bin/unicorn'
|
|
|
|
|
|
|
|
| |
Avoid swallowing all exceptions that might happen when requiring
debugger, just catch a LoadError if it cannot be loaded.
Check for more background:
https://github.com/rails/rails/commit/28fd867c9bc790636d37a28f288791cd0089a6fd#commitcomment-2386952
|
| |
|
| |
|
|
|
|
|
| |
This method doesn't need to be in the class, since it's only used only
from the instance.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Allow environment name to start with a substring of the default
environment names.
For example: tes, pro, prod, dev, devel, etc.
Fixing identation.
Adding test for Rails::Console.parse_arguments method.
Fix issue 8628 for Rails::DBConsole.
|
|
|
|
|
|
| |
command
Closes #8545
|
| |
|
| |
|
|
|
|
|
|
| |
Remove not used variable.
Remove config attr_reader causing warning.
Fix indent in runner file.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When using sqlite3 it was attempting to find the database file based on
Rails.root, the problem is that Rails.root is not always present because
we try to first manually load "config/database.yml" instead of loading
the entire app, to make "rails db" faster.
This means that when we're in the root path of the app, calling "rails db"
won't allow us to use Rails.root, making the command fail for sqlite3
with the error:
./rails/commands/dbconsole.rb:62:in `start':
undefined method `root' for Rails:Module (NoMethodError)
The fix is to simply not pass any dir string to File.expand_path, which
will make it use the current directory of the process as base, or the
root path of the app, which is what we want.
When we are in any other subdirectory, calling "rails db" should work
just fine, because "config/database.yml" won't be found, thus "rails db"
will fallback to loading the app, making Rails.root available.
Closes #8257.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
by Active Support)
Selecting which key extensions to include in active_support/rails
made apparent the systematic usage of Object#in? in the code base.
After some discussion in
https://github.com/rails/rails/commit/5ea6b0df9a36d033f21b52049426257a4637028d
we decided to remove it and use plain Ruby, which seems enough
for this particular idiom.
In this commit the refactor has been made case by case. Sometimes
include? is the natural alternative, others a simple || is the
way you actually spell the condition in your head, others a case
statement seems more appropriate. I have chosen the one I liked
the most in each case.
|
| |
|
|
|
|
| |
Allow hyphens in environment names again.
|
| |
|
| |
|
|
|
|
|
|
|
| |
Ruby tries to use '-h' as short version of '--header' by default
https://github.com/ruby/ruby/blob/trunk/lib/optparse.rb#L1372-1381.
To force `rails db -h` prints an usage message we should add the `-h`
options explicitly.
|
|
|
|
|
|
|
|
|
|
| |
Rails uses sqlit3 db file with a path relative to the rails root. It
allows to execute server not from rails root only. For example you
can fire `./spec/dummy/script/rails s` to start dummy application
server if you develop some engine gem.
Now the `rails db` command uses relative paths also and you can explore
your dummy db via `./spec/dummy/script/rails db` command.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
rails server takes `-e` as an argument to specify RAILS_ENV, rails console currently does not have the same interface. This commit fixes this disparity so developers can manually specify `RAILS_ENV` or can pass in an environment with a `-e`.
|
|
|
|
|
|
|
| |
When launching rails server from the command line with a rails environment specified such as `rails server RAILS_ENV=production` an error would occur since rails will try to use `RAILS_ENV=production` as it's server.
When launching rails with a specified server such as thin `rails server thin RAILS_ENV=production` no error will be thrown, but rails will not start up in the specified environment.
This fixes both of those cases
|
|
|
|
| |
production so that PID and timestamp are logged. fixes #5388
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch adds ability to set custom console if you want to use
something other than IRB. Previously the hack that people used
was:
silence_warnings do
require 'pry'
IRB = Pry
end
which is not the best way to customize things.
|