From 89a12c931b1f00b90e74afffcdc2fc21f14ca663 Mon Sep 17 00:00:00 2001 From: Xavier Noria <fxn@hashref.com> Date: Fri, 6 Feb 2015 20:41:42 +0100 Subject: README.rdoc -> README.md for newly generated applications README.rdoc was generated to support the doc:app task. Now that this task is gone we can switch to Markdown, which is nowadays a better default. --- railties/CHANGELOG.md | 4 ++++ .../rails/generators/rails/app/app_generator.rb | 2 +- .../rails/generators/rails/app/templates/README.md | 24 ++++++++++++++++++++++ .../generators/rails/app/templates/README.rdoc | 24 ---------------------- railties/test/generators/actions_test.rb | 4 ++-- railties/test/generators/app_generator_test.rb | 2 +- 6 files changed, 32 insertions(+), 28 deletions(-) create mode 100644 railties/lib/rails/generators/rails/app/templates/README.md delete mode 100644 railties/lib/rails/generators/rails/app/templates/README.rdoc (limited to 'railties') diff --git a/railties/CHANGELOG.md b/railties/CHANGELOG.md index 8c536982fc..f88e6242c0 100644 --- a/railties/CHANGELOG.md +++ b/railties/CHANGELOG.md @@ -1,3 +1,7 @@ +* Newly generated applications get a `README.md` in Markdown. + + *Xavier Noria* + * Remove the documentation tasks `doc:app`, `doc:rails`, and `doc:guides`. *Xavier Noria* diff --git a/railties/lib/rails/generators/rails/app/app_generator.rb b/railties/lib/rails/generators/rails/app/app_generator.rb index b6e6642f11..977f5a1c03 100644 --- a/railties/lib/rails/generators/rails/app/app_generator.rb +++ b/railties/lib/rails/generators/rails/app/app_generator.rb @@ -38,7 +38,7 @@ module Rails end def readme - copy_file "README.rdoc", "README.rdoc" + copy_file "README.md", "README.md" end def gemfile diff --git a/railties/lib/rails/generators/rails/app/templates/README.md b/railties/lib/rails/generators/rails/app/templates/README.md new file mode 100644 index 0000000000..55e144da18 --- /dev/null +++ b/railties/lib/rails/generators/rails/app/templates/README.md @@ -0,0 +1,24 @@ +## README + +This README would normally document whatever steps are necessary to get the +application up and running. + +Things you may want to cover: + +* Ruby version + +* System dependencies + +* Configuration + +* Database creation + +* Database initialization + +* How to run the test suite + +* Services (job queues, cache servers, search engines, etc.) + +* Deployment instructions + +* ... diff --git a/railties/lib/rails/generators/rails/app/templates/README.rdoc b/railties/lib/rails/generators/rails/app/templates/README.rdoc deleted file mode 100644 index db0fbe031b..0000000000 --- a/railties/lib/rails/generators/rails/app/templates/README.rdoc +++ /dev/null @@ -1,24 +0,0 @@ -== README - -This README would normally document whatever steps are necessary to get the -application up and running. - -Things you may want to cover: - -* Ruby version - -* System dependencies - -* Configuration - -* Database creation - -* Database initialization - -* How to run the test suite - -* Services (job queues, cache servers, search engines, etc.) - -* Deployment instructions - -* ... diff --git a/railties/test/generators/actions_test.rb b/railties/test/generators/actions_test.rb index c4b6441397..c6de2c1fb9 100644 --- a/railties/test/generators/actions_test.rb +++ b/railties/test/generators/actions_test.rb @@ -222,14 +222,14 @@ class ActionsTest < Rails::Generators::TestCase def test_readme run_generator Rails::Generators::AppGenerator.expects(:source_root).times(2).returns(destination_root) - assert_match "application up and running", action(:readme, "README.rdoc") + assert_match "application up and running", action(:readme, "README.md") end def test_readme_with_quiet generator(default_arguments, quiet: true) run_generator Rails::Generators::AppGenerator.expects(:source_root).times(2).returns(destination_root) - assert_no_match "application up and running", action(:readme, "README.rdoc") + assert_no_match "application up and running", action(:readme, "README.md") end def test_log diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb index 8cef40b151..ca26e0c8d7 100644 --- a/railties/test/generators/app_generator_test.rb +++ b/railties/test/generators/app_generator_test.rb @@ -5,7 +5,7 @@ require 'mocha/setup' # FIXME: stop using mocha DEFAULT_APP_FILES = %w( .gitignore - README.rdoc + README.md Gemfile Rakefile config.ru -- cgit v1.2.3