aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/commands
Commit message (Collapse)AuthorAgeFilesLines
...
* Add ENV['RACK_ENV'] support to rake runner/console/server.kennyj2012-12-062-2/+37
|
* Fix rails db command with sqlite3 databaseCarlos Antonio da Silva2012-11-181-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* Removing warning : assigned but unused variableArun Agrawal2012-11-101-1/+1
|
* Use Ruby 1.9 Hash syntax in railtiesRobin Dupret2012-10-141-4/+4
|
* warning fixed: ambiguous first argument; put parentheses or even spacesArun Agrawal2012-10-101-7/+7
|
* Set RACK_ENV to nil in the dbconsole testRafael Mendonça França2012-05-301-0/+1
| | | | This will fix the travis-ci build
* Remove support for rails server RAILS_ENV=env-nameSam Oliver2012-05-301-2/+2
|
* Fix various bugs with console arguments.Sam Oliver2012-05-302-39/+71
| | | | Allow hyphens in environment names again.
* More assert_match warnings fixed.Arun Agrawal2012-05-302-8/+8
|
* Fix `rails db -h` and cosmetic fixes in usage bannersAlexey Vakhov2012-05-221-0/+18
| | | | | | | 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.
* Use relative path to sqlite3 db in `rails db` commandAlexey Vakhov2012-05-221-6/+11
| | | | | | | | | | 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.
* Fix buildPiotr Sarnacki2012-05-061-7/+10
|
* More faster rails dbconsoleDmitry Vorotilin2012-05-061-28/+57
|
* Add Rails::DBConsole testsAlexey Vakhov2012-05-021-0/+128
|
* match rails console environment support, to serverschneems2012-03-221-0/+19
| | | | 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`.
* fix rails server support of RAILS_ENV variableschneems2012-03-201-0/+26
| | | | | | | 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
* Fix tests, Rails.env may be different on CIPiotr Sarnacki2012-02-161-2/+5
|
* Refactor Rails::Console to make it easier to test and add tests for itPiotr Sarnacki2012-02-161-0/+84