aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/commands
Commit message (Collapse)AuthorAgeFilesLines
* Remove sqlite support from `rails dbconsole`Andrew White2015-04-221-3/+0
| | | | | | Support for versions of SQLite less than 3 was removed in #6011 as part of the Rails 4.0 release. Therefore there is no need to have support for it in the `rails dbconsole` command anymore.
* Don't ask something that we don't want toRafael Mendonça França2015-04-221-1/+1
| | | | | | We only want to support adapters that we officially support through the entire framework so it is better to not ask patches for adapters that we may not support
* [ci skip] Document running a rake command as a rails commandNick Cox2015-04-151-0/+11
|
* Revert "Merge pull request #19404 from dmathieu/remove_rack_env"Jeremy Kemper2015-03-204-4/+4
| | | | | | | Preserving RACK_ENV behavior. This reverts commit 7bdc7635b885e473f6a577264fd8efad1c02174f, reversing changes made to 45786be516e13d55a1fca9a4abaddd5781209103.
* Merge pull request #19404 from dmathieu/remove_rack_envAaron Patterson2015-03-194-4/+4
|\ | | | | Don't fallback to RACK_ENV when RAILS_ENV is not present
| * don't fallback to RACK_ENV when RAILS_ENV is not presentDamien Mathieu2015-03-194-4/+4
| |
* | `-e` / `--environment` for the test runner.Yves Senn2015-03-181-1/+1
| |
* | move argument parsing into the `Runner`.Yves Senn2015-03-181-3/+1
| |
* | Move some logic to runnerArthur Neves2015-03-181-13/+1
| |
* | no need to escape the method in a regex wrap, minitest does that for usArthur Neves2015-03-181-1/+1
| |
* | Add test run by line, and report error by lineArthur Neves2015-03-181-3/+13
| |
* | spike of a `OptionParser` backed test runner.Yves Senn2015-03-182-1/+15
|/
* Remove unused Rails::Server#log_pathPhill Baker2015-02-161-4/+0
| | | | | | | With refactors to Rails::Sever from v3 to v4, this method is no longer used and is untested. Previous usage: https://github.com/rails/rails/blob/3-2-stable/railties/lib/rails/commands/server.rb#L79 Currently set from: https://github.com/rails/rails/blob/7b75551a1a4539876f878f37a2439cd02f89d961/railties/lib/rails/application/configuration.rb#L69
* Use public Module#include, in favor of https://bugs.ruby-lang.org/issues/8846robertomiranda2015-01-311-1/+1
| | | | ref: https://github.com/rails/rails/pull/18763#issuecomment-72349769
* Merge pull request #18380 from nobu/Use-EXEEXTSantiago Pastorino2015-01-191-1/+3
|\ | | | | Use EXEEXT
| * Use EXEEXTNobuyoshi Nakada2015-01-071-1/+3
| | | | | | | | | | | | | | | | Use the configured variable EXEEXT, instead of hardcoded suffix and platform names. And on such platforms, files which do not end with the suffix are not executable, so the original names are not necessary, in general.
* | No need of requiring `rbconfig`, it is by-default loadedKuldeep Aggarwal2015-01-102-2/+0
|/
* Remove debugger supportRafael Mendonça França2015-01-042-38/+0
| | | | | bebugger doesn't work with Ruby 2.2 so we don't need to support it anymore
* Remove the tmp/sessions folder and its clear taskRobin Dupret2015-01-031-1/+1
| | | | | | | | | | Commit 1aea470 introduced this directory but this was at a time when the default way to store sessions was on the file system under the tmp directory. Let's remove references to it from the documentation as well. [Robin Dupret & yui-knk]
* Add a code checking about file or not to the rails db commandyuki37382014-12-161-1/+1
|
* Pass symbol as an argument instead of a blockErik Michaels-Ober2014-11-291-1/+1
|
* Merge pull request #17761 from pschrammel/masterYves Senn2014-11-261-1/+1
|\ | | | | | | be more general with adapter name
| * be more general with adapter namePeter Schrammel2014-11-251-1/+1
| |
* | Provide support for SQL Server connections with dbconsole using sqshJuan Ignacio Pumarino2014-11-261-0/+15
|/
* added description for rails generators, and fixed sentence formation for ↵Rishi Jain2014-11-102-0/+4
| | | | active_support/notifications [ci skip]
* Merge pull request #17280 from aditya-kapoor/remove-unneeded-fileYves Senn2014-10-161-9/+0
|\ | | | | remove unneeded file from Railties.
| * remove unneeded fileAditya Kapoor2014-10-161-9/+0
| |
* | use require_command! instead of calling its definitionAditya Kapoor2014-10-161-1/+1
|/
* Document that the default for `rails server -b` has changedGodfrey Chan2014-09-221-5/+1
| | | | Fixes #16578
* fix grammar [ci skip]Vijay Dev2014-08-221-1/+1
|
* fix server names [ci skip]Vijay Dev2014-08-221-1/+1
| | | Per feedback in https://github.com/rails/rails/commit/af63e4a2546629c3fb2d53cffb7d4ea0e8663f68#commitcomment-7477636
* Make text consistent in help text of rails server and console commands.Vijay Dev2014-08-212-13/+13
|
* Add ability to extend `rails server` command options parserAndrey Chernih2014-07-111-7/+11
| | | | | | | | | | | | | | | | | | | | | | | | | With this change it will be possible to add additional options to the `option_parser` like this: require 'rails/commands/server' module Rails class Server < ::Rack::Server class Options def option_parser_with_open(options) parser = option_parser_without_open options parser.on('-o', '--open', 'Open in default browser') { options[:open] = true } parser end alias_method_chain :option_parser, :open end def start_with_open start_without_open do `open http://localhost:3000` if options[:open] end end alias_method_chain :start, :open end end
* Fix rails dbconsole for jdbcmysql adapter.Gabriel Gilder and Jim Kingdon2014-05-051-1/+1
|
* Isolate debugger related codeDavid Rodríguez de Dios2014-04-101-11/+13
|
* Keep debugger support only for rubies < 2.0.0David Rodríguez de Dios2014-04-082-6/+25
|
* Let COMMAND_WHITELIST be an Array, not a StringAkira Matsuda2014-03-161-1/+1
|
* Removed unnecessary command "application"Arun Agrawal2014-03-101-6/+1
|
* Replace map.flatten with flat_map in railtiesErik Michaels-Ober2014-03-041-1/+1
|
* Ensure Active Record connection consistencyschneems2014-01-091-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently Active Record can be configured via the environment variable `DATABASE_URL` or by manually injecting a hash of values which is what Rails does, reading in `database.yml` and setting Active Record appropriately. Active Record expects to be able to use `DATABASE_URL` without the use of Rails, and we cannot rip out this functionality without deprecating. This presents a problem though when both config is set, and a `DATABASE_URL` is present. Currently the `DATABASE_URL` should "win" and none of the values in `database.yml` are used. This is somewhat unexpected to me if I were to set values such as `pool` in the `production:` group of `database.yml` they are ignored. There are many ways that active record initiates a connection today: - Stand Alone (without rails) - `rake db:<tasks>` - ActiveRecord.establish_connection - With Rails - `rake db:<tasks>` - `rails <server> | <console>` - `rails dbconsole` We should make all of these behave exactly the same way. The best way to do this is to put all of this logic in one place so it is guaranteed to be used. Here is my prosed matrix of how this behavior should work: ``` No database.yml No DATABASE_URL => Error ``` ``` database.yml present No DATABASE_URL => Use database.yml configuration ``` ``` No database.yml DATABASE_URL present => use DATABASE_URL configuration ``` ``` database.yml present DATABASE_URL present => Merged into `url` sub key. If both specify `url` sub key, the `database.yml` `url` sub key "wins". If other paramaters `adapter` or `database` are specified in YAML, they are discarded as the `url` sub key "wins". ``` ### Implementation Current implementation uses `ActiveRecord::Base.configurations` to resolve and merge all connection information before returning. This is achieved through a utility class: `ActiveRecord::ConnectionHandling::MergeAndResolveDefaultUrlConfig`. To understand the exact behavior of this class, it is best to review the behavior in activerecord/test/cases/connection_adapters/connection_handler_test.rb though it should match the above proposal.
* Only build a ConnectionSpecification if requiredJosé Valim2013-12-241-1/+1
|
* Use the new Resolver API in dbconsoleJosé Valim2013-12-231-3/+2
|
* Make `rails runner` command options more obviousschneems2013-12-191-5/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We're surrounding the options in angle brackets `<>` as is convention in `curl`: ``` $ curl --help Usage: curl [options...] <url> ``` And then in square brackets `[]` with bars `|` as in `tar`: ``` $ tar --help ... Create: tar -c [options] [<file> | <dir> | @<archive> | -C <dir> ] ``` To further clarify that the command can be used with both, we now show examples: ``` Examples: rails runner 'puts Rails.env' This runs the code `puts Rails.env` after loading the app rails runner path/to/filename.rb This runs the Ruby file located at `path/to/filename.rb` after loading the app ``` This format was taken from the `find` man pages: ``` EXAMPLES The following examples are shown as given to the shell: find / \! -name "*.c" -print Print out a list of all the files whose names do not end in .c. find / -newer ttt -user wnj -print Print out a list of all the files owned by user ``wnj'' that are newer than the file ttt. ``` The the text at the bottom is also shifted to improve readability.
* fixed rails dbconsole to support ENV['DATABASE_URL'].Huiming Teo2013-12-161-8/+5
|
* Use .railsrc while creating new plugin if availablePrathamesh Sonpatki2013-12-011-0/+14
| | | | - Fixes #10700
* Add positional information to eval call so that this information willPrathamesh Sonpatki2013-11-201-1/+1
| | | | | | | | | | be used in printing correct location where the exception occurred. Closes #12885 - Without this the location of exception is always the line on which 'eval' is called - But if the exception occurs in a gem outside of Rails, then that location is not printed in stacktrace
* AestheticsRafael Mendonça França2013-11-071-13/+13
|
* Move interrupt information to print_boot_information methodAlex Johnson2013-11-071-4/+1
|
* Extract method refactoring for Rails::Server#startAlex Johnson2013-11-071-24/+38
|
* More Warnings removed for ruby trunkArun Agrawal2013-11-011-1/+1
| | | | Same as 4d4ff531b8807ee88a3fc46875c7e76f613956fb