| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
Reading `Rails::Commands::Command` feels excessive. Especially if users can subclass command
to write their own commands — which I'd like to aim for.
Switch to `Rails::Command` before we get too far into things.
|
|
|
|
|
|
|
| |
We should first attempt to run commands through Rails command, and then
fall back to trying the commands tasks.
Because eventually the commands tasks should be their own commands.
|
|
|
|
|
|
|
|
|
| |
When attempting to run a `rake` task with `bin/rails`, Rails would see
check that a Rake task existed and ask users if they meant to run it with
rake.
We don't need that anymore, as the goal is to have `rails` be a valid way
to run rake tasks.
|
|
|
|
|
|
|
|
|
|
|
|
| |
The class level version is responsible for changing a task name to
command name, then finding a command and run it if there is one.
The instance level `run` then makes sure arguments have been parsed
into `@options` and runs the command by sending it.
`Rails::Commands::Command.run` returns true to make it work within
`Rails::CommandsTask`, but won't in the future when it handles
all option parsing.
|
|\
| |
| |
| |
| | |
prathamesh-sonpatki/mention-redirect-path-in-assert-response
Add redirection path in the error message of assert_response if response is :redirect
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
:redirect
- If the assert_response is checking for any non-redirect response like
:success and actual response is :redirect then, the error message displayed
was -
Expected response to be a <success>, but was <302>
- This commit adds the redirect path to the error message of
assert_response if the response is :redirect.
So above message is changed to -
Expected response to be a <success>, but was a redirect to <http://test.host/posts/lol>
|
| |
| |
| |
| |
| |
| |
| |
| | |
When `parse_options_for` was called for a command that
hadn't set up any option parsing with `options_for`, the `call` method
would be sent to `-> {}`, which didn't like to be passed two arguments.
Switch to `proc {}` which can accept several arguments.
|
|\ \
| | |
| | | |
even if a write fails, store the raw value
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
I want to streamline the wording around `command`, and not
start pondering about instances.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The `ARGV` constant in Ruby is not a string, it's an array as demonstrated
by running:
```
$ ruby -e "p ARGV"
=> []
$
$ ruby -e "p ARGV" test/file.rb --version=2
=> ["test/file.rb", "--version=2"]
```
|
| | |
| | |
| | |
| | |
| | |
| | | |
* Ditch the instance methods local variable.
* Prefer Ruby's default nil return, and remove else branch.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Checking that a command exists before running it is an implementation detail
of the Rails command and Rake task world right now.
Eventually I'd like to get rid of `exists?`, when I've worked out another way
to fall back to run the old tasks.
|
| | |
| | |
| | |
| | |
| | | |
Users shouldn't have to lookup the command name for a task. Put it in
the private section, so it doesn't show up in any generated documentation.
|
| | |
| | |
| | |
| | |
| | | |
The previous spelling seemed a bit too generous with the whitespace, and
looked out of place when amongst others.
|
|\ \ \
| | | |
| | | | |
Add note about serialization to update_columns documentation [ci skip]
|
| | |/
| |/| |
|
|\ \ \
| | | |
| | | | |
remove warning from postgresql geometric test
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This removes the following warning which has been out in the case of a PostgreSQL 9.3 below.
```
activerecord/test/cases/adapters/postgresql/geometric_test.rb:265: warning: instance variable @connection not initialized
```
|
|\ \ \ \
| |_|/ /
|/| | | |
Add Rails command infrastructure
|
|/ / / |
|
|\ \ \
| | | |
| | | | |
Replace ActionMailer::Base.respond_to? with respond_to_missing?
|
| | | | |
|
| | | | |
|
|\ \ \ \
| |/ / /
|/| | | |
Fix the Railties tests
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Railsties tests are broken with this new update checker so we will use
the old one until we have the tests fixed.
|
| | | |
| | | |
| | | |
| | | | |
Related with e62ddac05b7d827ae870898d7cd9eaf76e0730aa
|
| | | |
| | | |
| | | |
| | | | |
Related with 668c006cf33a63ac3f8a8f064c772a339341e70c.
|
|/ / / |
|
|\ \ \
| |/ /
|/| | |
Remove old comment about AC::Parameters>subclasses
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
[ci skip]
Q: What happens if you initialize an AR model by passing Parameters that
have not been whitelisted with `permit`?
A: An `ActiveModel::ForbiddenAttributesError` is raised.
I think this behavior is correct, and it's better than what used to happen,
with unpermitted parameter being simply ignored.
|
|\ \
| | |
| | | |
Fix failing test using custom file watcher
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
LoadingTest#test_does_not_reload_constants_on_development_if_custom_file_watcher_always_returns_false in railties/test/application/loading_test.rb is failing with: `NoMethodError: undefined method 'execute' for #<#<Class:0x00000002465a30>:0x00000001f79698>`
The test creates an anonymous class to be used as a custom file watcher using `config.file_watcher=`. Per the Rails guides for Configuring, the class set to `config.file_watcher` “Must conform to ActiveSupport::FileUpdateChecker API”. Per the docs for ActiveSupport::FileUpdateChecker, the API depends on four methods: #initialize, #updated?, #execute, and #execute_if_updated. The custom file watcher in the failing test only implements the first two methods.
This pull request adds #execute and #execute_if_updated to the custom file_watcher, conforming it to the ActiveSupport::FileUpdateChecker API, and passing the test.
|
|\ \ \
| |/ /
|/| | |
Revert "don't start a new process for every test file"
|
|/ /
| |
| |
| |
| | |
This reverts commit 5a0e0e72995472e315738dcea5b5a12d6e3d3489.
This commit causes railties tests on TravisCI to always return a 0 status (all tests passing), even when tests are failing. Reverting for now until a new solution can be found.
|
| |
| |
| |
| |
| |
| | |
This will also get the defaults from attribute definitions like:
attribute :type, :string, default: "SomethingElse"
|
| |
| |
| |
| | |
`has_attribute?` method to check wether a given attribute has been defined.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This solves the following error:
ActiveRecord::StatementInvalid: Could not find table 'guitars'
It seems that the table structure of the `Guitar` model has not been
necessary until now. Due to the wrong table name the model was not
correctly linked to the table.
|
|\ \
| | |
| | |
| | | |
STI cast new instances to `default type` on initialize.
|
|/ /
| |
| |
| | |
fixes #17121
|
|\ \
| | |
| | | |
Update autoloading_and_reloading_constants.md
|
| | |
| | |
| | | |
Fixed a typo
|
|/ /
| |
| |
| |
| | |
It appears that I missed this one when I delegated all the non-mutation
array methods that were not on Enumerable
|
|\ \
| | |
| | | |
Modify unscoped usage guide to include chaining [ci skip]
|
| | | |
|
|\ \ \
| | | |
| | | | |
Explain the connection pool error message better [ci skip]
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The previous message was misleading (especially for Ops guys) when
diagnosing problems related to the database connection.
The message was suggesting that the connection cannot be obtained which
normally assumes the need to look at the database.
But this isn't the case as the connection could not be retrieved from
the application's internal connection pool.
The new message should make it more explicit and remove the confusion.
|
|\ \ \ \
| | | | |
| | | | | |
rescue memcached errors in a consistent way
|
| | | | | |
|
|\ \ \ \ \
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
chriskottom/fix-minitest-plugin-with-minitest-rails-gem
Allow use of minitest-rails gem with test runner
|