aboutsummaryrefslogtreecommitdiffstats
path: root/railties
Commit message (Collapse)AuthorAgeFilesLines
* show relative path the rerun snippet of test runner in rails engineyuuji.yaginuma2015-12-104-23/+63
| | | | | | | | | | | | | Since the absolute path is not required to re-run the test, modified so that unnecessary information is not displayed. ```ruby # before bin/rails test /path/to/blorgh/test/integration/navigation_test.rb:5 # after bin/rails test test/integration/navigation_test.rb:5 ```
* Fixed typo in mysql client parameterKent Sibilev2015-12-091-1/+1
|
* Remove duplicated assertion from api_app_generator testsJorge Bejar2015-12-091-2/+0
|
* We don't need to set config.debug_exception_response_format given that :api ↵Jorge Bejar2015-12-092-10/+0
| | | | is the default value for only API apps
* Make debug_exception_response_format config depends on api_only when is not setJorge Bejar2015-12-092-2/+37
|
* Add tests for api_only configuration settingJorge Bejar2015-12-091-0/+15
|
* Adjust comment in development.rb template file for app generatorJorge Bejar2015-12-091-3/+0
|
* Update Changelog with the added response_format option in AD::DebugExceptionsJorge Bejar2015-12-091-0/+9
|
* debug_exception_response_format needs to be writeable in ConfigurationJorge Bejar2015-12-091-2/+2
|
* Fix indent in generated Rails API env fileJorge Bejar2015-12-091-6/+6
|
* DebugException initialize with a response_format valueJorge Bejar2015-12-091-1/+1
|
* Add debug_exception_response_format config to configure DebugExceptionJorge Bejar2015-12-093-30/+43
| | | | behavior
* Do not include web-console in Rails API appsJorge Bejar2015-12-091-0/+2
|
* Response when error should be formatted properly in Rails API if local requestJorge Bejar2015-12-091-1/+1
|
* Fix #22232: rake test tasks exit status codeArkadiusz Fal2015-12-072-1/+10
| | | | | | | The exit status code was not set when tests were fired with `rake`. Now, it is being set and it matches behavior of running tests via `rails` command (`rails test`), so no matter if `rake test` or `rails test` command is used the exit code will be set.
* Clarify the need to run command twice.Kasper Timm Hansen2015-12-071-2/+2
| | | | | We had 2 pull requests erronously trying to remove the first command. Add some comments for clarity.
* Merge pull request #22508 from ↵Santiago Pastorino2015-12-072-0/+2
|\ | | | | | | | | y-yagi/remove_request_forgery_protection_from_rails_api remove `request_forgery_protection` initializer from rails api
| * remove `request_forgery_protection` initializer from rails apiyuuji.yaginuma2015-12-062-0/+2
| | | | | | | | | | In rails api, since default is so as not to use the `protect_from_forgery`, `request_forgery_protection` initializer I think that's unnecessary
* | Ditch `Commands` namespace for base command.Kasper Timm Hansen2015-12-064-83/+78
| | | | | | | | | | | | | | 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.
* | Invert command and commands tasks reference.Kasper Timm Hansen2015-12-063-10/+14
| | | | | | | | | | | | | | 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.
* | Remove "run with rake" suggestion.Kasper Timm Hansen2015-12-061-22/+0
| | | | | | | | | | | | | | | | | | 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.
* | Add class level `run` to Rails command.Kasper Timm Hansen2015-12-062-22/+15
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Replace `-> {}` with a proc.Kasper Timm Hansen2015-12-051-1/+1
| | | | | | | | | | | | | | | | 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.
* | Remove `_instance` suffix from command.Kasper Timm Hansen2015-12-051-2/+2
| | | | | | | | | | I want to streamline the wording around `command`, and not start pondering about instances.
* | Default `argv` to an empty array.Kasper Timm Hansen2015-12-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | 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"] ```
* | Spruce up `command_for`.Kasper Timm Hansen2015-12-051-4/+1
| | | | | | | | | | | | * Ditch the instance methods local variable. * Prefer Ruby's default nil return, and remove else branch.
* | `exists?` isn't for users.Kasper Timm Hansen2015-12-051-1/+1
| | | | | | | | | | | | | | | | 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.
* | Move `command_name_for` to private section.Kasper Timm Hansen2015-12-051-4/+4
| | | | | | | | | | 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.
* | Add Rails command infrastructure and encapsulate development cachingChuck Callebs2015-12-049-51/+144
| |
* | Disable FileEventedUpdateChecker for nowRafael Mendonça França2015-12-041-5/+1
| | | | | | | | | | Railsties tests are broken with this new update checker so we will use the old one until we have the tests fixed.
* | Mac OS X use /private as directory to temp fileRafael Mendonça França2015-12-041-1/+1
| | | | | | | | Related with e62ddac05b7d827ae870898d7cd9eaf76e0730aa
* | Remove test_files check from plugin checksRafael Mendonça França2015-12-041-4/+0
| | | | | | | | Related with 668c006cf33a63ac3f8a8f064c772a339341e70c.
* | Remove warningsRafael Mendonça França2015-12-041-4/+4
|/
* Merge pull request #22469 from merhard/fix_custom_file_loader_testRafael França2015-12-021-0/+2
|\ | | | | Fix failing test using custom file watcher
| * Fix failing test using custom file watcherMatthew Erhard2015-12-021-0/+2
| | | | | | | | | | | | | | 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"Matthew Erhard2015-12-021-21/+8
|/ | | | | 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.
* allow use of minitest-rails gem with test runnerChris Kottom2015-11-302-1/+7
|
* add `bin/test` script to rails pluginyuuji.yaginuma2015-11-287-7/+153
|
* let the generated app Gemfile depend on listen 3.0.5Xavier Noria2015-11-261-1/+1
| | | | See https://github.com/rails/rails/commit/14b20ce9b38314943dcaf73b8dab7508b70ba487.
* Merge pull request #22263 from mastahyeti/csrf-origin-checkRafael França2015-11-261-0/+4
|\ | | | | | | | | Add option to verify Origin header in CSRF checks [Jeremy Daer + Rafael Mendonça França]
| * Add option to verify Origin header in CSRF checksBen Toews2015-11-251-0/+4
| |
* | Merge pull request #22401 from cllns/remove-br-from-scaffoldKasper Timm Hansen2015-11-252-3/+7
|\ \ | | | | | | Remove <br> from scaffold form, in favor of using CSS
| * | Remove <br> from scaffold, in favor of using CSSSean Collins2015-11-252-3/+7
| | |
* | | Merge pull request #22290 from y-yagi/donot_show_test_unit_jobEileen M. Uchitelle2015-11-251-0/+1
|\ \ \ | |/ / |/| | do not show Active Job test generator
| * | do not show Active Job test generatoryuuji.yaginuma2015-11-141-0/+1
| | | | | | | | | | | | | | | Like the other generator, for also Active Job, I think that there is no need to display for test generator.
* | | Merge pull request #22370 from yui-knk/remove_blank_lineAndrew White2015-11-241-1/+0
|\ \ \ | | | | | | | | Remove a blank line from a template for plugin `routes.rb`
| * | | Remove a blank line from a template for plugin `routes.rb`yui-knk2015-11-221-1/+0
| | | |
* | | | Merge pull request #22287 from dharamgollapudi/patch-2Rafael França2015-11-241-2/+1
|\ \ \ \ | | | | | | | | | | Move the desc one level up
| * | | | Move the desc one level up Dharam Gollapudi2015-11-131-2/+1
| | |/ / | |/| | | | | | Make the task visible (from rake -T) by moving the desc one level up
* | | | Merge pull request #22272 from y-yagi/remove_test_files_in_plugin_gemspecEileen M. Uchitelle2015-11-231-3/+0
|\ \ \ \ | |_|/ / |/| | | don't package test files in plugin gemspec