aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/commands.rb
Commit message (Collapse)AuthorAgeFilesLines
* Replace comments' non-breaking spaces with spacesclaudiob2012-12-041-1/+1
| | | | | | | | | | Sometimes, on Mac OS X, programmers accidentally press Option+Space rather than just Space and don’t see the difference. The problem is that Option+Space writes a non-breaking space (0XA0) rather than a normal space (0x20). This commit removes all the non-breaking spaces inadvertently introduced in the comments of the code.
* Prompt to run rake when accidentally typed railsschneems2012-10-121-23/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Developers from all levels will accidentally run rake tasks using the `rails` keyword when they meant to use `rake`. Often times beginners struggle with the difference between the tools. The most common example would be `$ rails db:migrate` Rather than telling the developer simply that they did not use a valid rails command, we can see if it was a valid rake command first. If it is a valid rake command we can auto execute it giving the user a period of time to cancel if that isn't what they intended. Here is what `rake db:migrate` would look like if you cancel the command: ```sh $ rails db:migrate Assuming you meant: $ rake db:migrate press any key to cancel in 3 seconds > command terminated ... ``` Here is what it looks like if you don't cancel the command: ```sh $ rails db:migrate Assuming you meant: $ rake db:migrate press any key to cancel in 3 seconds > Running: $ rake db:migrate == Foo: migrating ============================================================ == Foo: migrated (0.0000s) =================================================== ```
* removes usage of Object#in? from the code base (the method remains defined ↵Xavier Noria2012-08-061-4/+2
| | | | | | | | | | | | | | | | | | | 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.
* Fix various bugs with console arguments.Sam Oliver2012-05-301-1/+9
| | | | Allow hyphens in environment names again.
* More faster rails dbconsoleDmitry Vorotilin2012-05-061-2/+1
|
* "rails new -h" shows message in rails directoryask2012-04-091-3/+7
|
* Rails::Plugin has goneSantiago Pastorino2012-01-031-1/+1
|
* Add Destroy AliasAndrey Ognevsky2011-08-221-1/+2
| | | | | | | | * Added destroy alias to rails generator * add alias info for destroy command * Updated command line guides
* Small missing information added to command description. --help also works ↵Bratish Goswami2011-07-231-1/+1
| | | | like -h.
* Merge pull request #1356 from flippingbits/fix_engine_generatorJosé Valim2011-06-091-5/+1
|\ | | | | Fix engine's generator
| * We moved engine commands to rails/engine/commandsStefan Sprenger2011-05-271-5/+1
| |
* | add alias info for runner commandVijay Dev2011-06-021-1/+1
|/
* Streamline generators initialization flow.José Valim2011-05-251-1/+5
|
* Add alias `r` for rails runnerJordi Romero2011-05-071-1/+2
|
* Remove `#among?` from Active SupportPrem Sichanugrist2011-04-131-1/+1
| | | | | | After a long list of discussion about the performance problem from using varargs and the reason that we can't find a great pair for it, it would be best to remove support for it for now. It will come back if we can find a good pair for it. For now, Bon Voyage, `#among?`.
* Change Object#either? to Object#among? -- thanks to @jamesarosen for the ↵David Heinemeier Hansson2011-04-121-1/+1
| | | | suggestion!
* Using Object#in? and Object#either? in various placesPrem Sichanugrist2011-04-111-1/+3
| | | | There're a lot of places in Rails source code which make a lot of sense to switching to Object#in? or Object#either? instead of using [].include?.
* Use exit(1) instead of exit(false)Philip Arndt2011-01-291-2/+2
|
* Apply exit code 1 when commands don't succeed so that other libraries can ↵Philip Arndt2011-01-291-0/+2
| | | | properly detect the failure.
* Use Rails::Engine.find in commands.rbPiotr Sarnacki2010-12-091-2/+1
|
* Tidy up generators commits.José Valim2010-11-171-4/+1
|
* Do not allow to use plugin_new generator directly, you should use Usage:Piotr Sarnacki2010-11-161-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | rails new APP_PATH [options] Options: -G, [--skip-git] # Skip Git ignores and keeps -r, [--ruby=PATH] # Path to the Ruby binary of your choice # Default: /Users/drogus/.rvm/rubies/ruby-1.8.7-p302/bin/ruby -b, [--builder=BUILDER] # Path to an application builder (can be a filesystem path or URL) [--edge] # Setup the application with Gemfile pointing to Rails repository [--dev] # Setup the application with Gemfile pointing to your Rails checkout [--skip-gemfile] # Don't create a Gemfile -d, [--database=DATABASE] # Preconfigure for selected database (options: mysql/oracle/postgresql/sqlite3/frontbase/ibm_db) # Default: sqlite3 -O, [--skip-active-record] # Skip Active Record files -m, [--template=TEMPLATE] # Path to an application template (can be a filesystem path or URL) -J, [--skip-prototype] # Skip Prototype files -T, [--skip-test-unit] # Skip Test::Unit files Runtime options: -s, [--skip] # Skip files that already exist -p, [--pretend] # Run but do not make any changes -f, [--force] # Overwrite files that already exist -q, [--quiet] # Supress status output Rails options: -v, [--version] # Show Rails version number and quit -h, [--help] # Show this help message and quit Description: The 'rails new' command creates a new Rails application with a default directory structure and configuration at the path you specify. Example: rails new ~/Code/Ruby/weblog This generates a skeletal Rails installation in ~/Code/Ruby/weblog. See the README in the newly created application to get going. command
* Allow running `rails plugin new` command inside rails applicationPiotr Sarnacki2010-11-161-6/+11
|
* Add more information to comments.José Valim2010-09-301-3/+5
|
* Try to guess application's directory while trying to run the server, but ↵Piotr Sarnacki2010-09-301-0/+5
| | | | only if config.ru is not present in current dir
* Allow running generators for Engine with usage of other application.Piotr Sarnacki2010-09-301-1/+11
| | | | | | | | After that commit, developers can set ENGINE_PATH in ENGINE/scripts/rails file and load application's ./script/rails (most of the time it will be dummy application used for testing). When running ./script/rails g it will use application to boot up, but then it will use Engine's root and configuration for generators.
* Add a header that tells Internet Explorer (all versions) to use the best ↵wycats2010-07-271-1/+1
| | | | | | available standards support. This ensures that IE doesn't go into quirks mode because it has been blacklisted by too many users pressing the incompatible button. It also tells IE to use the ChromeFrame renderer, if the user has installed the plugin. This guarantees that the best available standards support will be used on the client.
* Avoid calls to Rails::Application since this is not the official API.José Valim2010-07-011-5/+5
| | | | Your application should *always* reference your application const (as Blog::Application) and Rails.application should be used just internally.
* Changing command line API from 'rails blog' to 'rails new blog'.Mikel Lindsaar2010-06-041-0/+6
| | | | | | | | | | Also removed the limitation of not being able to call your new server any of the rails commands (generate, server, dbconsole, console etc) as there is no longer any ambiguity here. http://rails.lighthouseapp.com/projects/8994/tickets/4665 Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
* Ops. Rename performance to profiler.José Valim2010-04-291-1/+1
|
* The rake task :environment now loads config/environment.rb instead of ↵José Valim2010-04-291-54/+48
| | | | initializing the application on its own. This fixes [#4492 state:resolved] and also avoids the application being initialized twice in some rake tasks.
* Load the environment before executing rails console. [#3905 status:resolved]José Valim2010-03-121-1/+1
|
* Revert "Always load the environment before executing any command. [#3905 ↵José Valim2010-03-121-4/+6
| | | | | | status:resolved]" This reverts commit 16846553b8866eab2aa3b128a2a23a221a25f7e3.
* Always load the environment before executing any command. [#3905 ↵José Valim2010-03-121-6/+4
| | | | status:resolved]
* Fix server environment [#3877 status:resolved]Simo Niemelä2010-02-101-2/+5
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* rails runner loads environment after parsing command-line optionsJeremy Kemper2010-02-091-2/+0
|
* Take into account gem versions (so script/rails server can work outside the ↵José Valim2010-02-081-1/+1
| | | | application) and use Rails::Application.root instead of ROOT_PATH.
* server command loads the applicationJeremy Kemper2010-02-041-1/+2
|
* Remove duplicated version check.José Valim2010-02-041-2/+0
|
* -v and --version params now work on rails script in or our of an appMikel Lindsaar2010-02-041-0/+3
|
* Make bin/rails call rails/commands/application, fix generators usage and ↵José Valim2010-02-031-13/+66
| | | | update .gitignores.
* Move railties/lib/* into railties/lib/*Yehuda Katz + Carl Lerche2009-09-241-0/+17