diff options
author | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2015-10-26 09:01:51 +0900 |
---|---|---|
committer | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2015-12-17 21:24:52 +0900 |
commit | f34beb52e22e3e6f86f3f886f6c5d93b040013d9 (patch) | |
tree | 6a8f434acb79faaf0fc938d97a6ca5c15d577b55 /railties | |
parent | 47fed8060ac5d03d2ad220fd406949e436d418ea (diff) | |
download | rails-f34beb52e22e3e6f86f3f886f6c5d93b040013d9.tar.gz rails-f34beb52e22e3e6f86f3f886f6c5d93b040013d9.tar.bz2 rails-f34beb52e22e3e6f86f3f886f6c5d93b040013d9.zip |
README.rdoc -> README.md for newly generated plugins
I think Markdown is nowadays a better default.
Diffstat (limited to 'railties')
7 files changed, 13 insertions, 9 deletions
diff --git a/railties/CHANGELOG.md b/railties/CHANGELOG.md index b9d2db773a..bf4eae39b9 100644 --- a/railties/CHANGELOG.md +++ b/railties/CHANGELOG.md @@ -1,3 +1,7 @@ +* Newly generated plugins get a `README.md` in Markdown. + + *Yuji Yaginuma* + * The generated config file for the development environment includes a new config line, commented out, showing how to enable the evented file watcher. diff --git a/railties/lib/rails/generators/rails/plugin/plugin_generator.rb b/railties/lib/rails/generators/rails/plugin/plugin_generator.rb index 776019a6a0..7d7477de75 100644 --- a/railties/lib/rails/generators/rails/plugin/plugin_generator.rb +++ b/railties/lib/rails/generators/rails/plugin/plugin_generator.rb @@ -37,7 +37,7 @@ module Rails end def readme - template "README.rdoc" + template "README.md" end def gemfile diff --git a/railties/lib/rails/generators/rails/plugin/templates/%name%.gemspec b/railties/lib/rails/generators/rails/plugin/templates/%name%.gemspec index 3f5682b0c1..f9465aa4af 100644 --- a/railties/lib/rails/generators/rails/plugin/templates/%name%.gemspec +++ b/railties/lib/rails/generators/rails/plugin/templates/%name%.gemspec @@ -14,7 +14,7 @@ Gem::Specification.new do |s| s.description = "TODO: Description of <%= camelized_modules %>." s.license = "MIT" - s.files = Dir["{app,config,db,lib}/**/*", "MIT-LICENSE", "Rakefile", "README.rdoc"] + s.files = Dir["{app,config,db,lib}/**/*", "MIT-LICENSE", "Rakefile", "README.md"] <%= '# ' if options.dev? || options.edge? -%>s.add_dependency "rails", "~> <%= Rails::VERSION::STRING %>" <% unless options[:skip_active_record] -%> diff --git a/railties/lib/rails/generators/rails/plugin/templates/README.md b/railties/lib/rails/generators/rails/plugin/templates/README.md new file mode 100644 index 0000000000..61ad1ed36a --- /dev/null +++ b/railties/lib/rails/generators/rails/plugin/templates/README.md @@ -0,0 +1,3 @@ +# <%= camelized_modules %> + +This project rocks and uses MIT-LICENSE. diff --git a/railties/lib/rails/generators/rails/plugin/templates/README.rdoc b/railties/lib/rails/generators/rails/plugin/templates/README.rdoc deleted file mode 100644 index 25983ca5da..0000000000 --- a/railties/lib/rails/generators/rails/plugin/templates/README.rdoc +++ /dev/null @@ -1,3 +0,0 @@ -= <%= camelized_modules %> - -This project rocks and uses MIT-LICENSE.
\ No newline at end of file diff --git a/railties/lib/rails/generators/rails/plugin/templates/Rakefile b/railties/lib/rails/generators/rails/plugin/templates/Rakefile index bda55bae29..f1943644e4 100644 --- a/railties/lib/rails/generators/rails/plugin/templates/Rakefile +++ b/railties/lib/rails/generators/rails/plugin/templates/Rakefile @@ -10,7 +10,7 @@ RDoc::Task.new(:rdoc) do |rdoc| rdoc.rdoc_dir = 'rdoc' rdoc.title = '<%= camelized_modules %>' rdoc.options << '--line-numbers' - rdoc.rdoc_files.include('README.rdoc') + rdoc.rdoc_files.include('README.md') rdoc.rdoc_files.include('lib/**/*.rb') end diff --git a/railties/test/generators/plugin_generator_test.rb b/railties/test/generators/plugin_generator_test.rb index 60390cfa01..057561070f 100644 --- a/railties/test/generators/plugin_generator_test.rb +++ b/railties/test/generators/plugin_generator_test.rb @@ -6,7 +6,7 @@ DEFAULT_PLUGIN_FILES = %w( .gitignore Gemfile Rakefile - README.rdoc + README.md bukkits.gemspec MIT-LICENSE lib @@ -58,7 +58,7 @@ class PluginGeneratorTest < Rails::Generators::TestCase def test_generating_without_options run_generator - assert_file "README.rdoc", /Bukkits/ + assert_file "README.md", /Bukkits/ assert_no_file "config/routes.rb" assert_no_file "app/assets/config/bukkits_manifest.js" assert_file "test/test_helper.rb" do |content| @@ -386,7 +386,7 @@ class PluginGeneratorTest < Rails::Generators::TestCase def test_creating_gemspec run_generator assert_file "bukkits.gemspec", /s.name\s+= "bukkits"/ - assert_file "bukkits.gemspec", /s.files = Dir\["\{app,config,db,lib\}\/\*\*\/\*", "MIT-LICENSE", "Rakefile", "README\.rdoc"\]/ + assert_file "bukkits.gemspec", /s.files = Dir\["\{app,config,db,lib\}\/\*\*\/\*", "MIT-LICENSE", "Rakefile", "README\.md"\]/ assert_file "bukkits.gemspec", /s.version\s+ = Bukkits::VERSION/ end |