aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorschneems <richard.schneeman@gmail.com>2017-08-09 16:27:54 -0500
committerschneems <richard.schneeman@gmail.com>2017-08-09 16:27:54 -0500
commita8f59044fb18ce718367ffe4cd3ec0259c766b5f (patch)
treebb2bb8a2b0fd31b64688eb9b17472cdcb2c1c6ef
parent54ed5270c5b696ea14f4e2251b8ea0e0ac2c4dfa (diff)
downloadrails-a8f59044fb18ce718367ffe4cd3ec0259c766b5f.tar.gz
rails-a8f59044fb18ce718367ffe4cd3ec0259c766b5f.tar.bz2
rails-a8f59044fb18ce718367ffe4cd3ec0259c766b5f.zip
Revert "Set Ruby version in Gemfile and .ruby-version by default"
This reverts commit fd7f978a5068921380308fe439af3923566c8f61.
-rw-r--r--railties/CHANGELOG.md6
-rw-r--r--railties/lib/rails/generators/rails/app/app_generator.rb5
-rw-r--r--railties/lib/rails/generators/rails/app/templates/ruby-version1
-rw-r--r--railties/test/generators/app_generator_test.rb12
4 files changed, 0 insertions, 24 deletions
diff --git a/railties/CHANGELOG.md b/railties/CHANGELOG.md
index 73793be78c..31c443bb9f 100644
--- a/railties/CHANGELOG.md
+++ b/railties/CHANGELOG.md
@@ -2,12 +2,6 @@
*Yuji Yaginuma*
-* Add `ruby x.x.x` version to `Gemfile` and create `.ruby-version`
- root file containing the current Ruby version when new Rails applications are
- created.
-
- *Alberto Almagro*
-
* Support `-` as a platform-agnostic way to run a script from stdin with
`rails runner`
diff --git a/railties/lib/rails/generators/rails/app/app_generator.rb b/railties/lib/rails/generators/rails/app/app_generator.rb
index cbe68823d4..6d0b668f05 100644
--- a/railties/lib/rails/generators/rails/app/app_generator.rb
+++ b/railties/lib/rails/generators/rails/app/app_generator.rb
@@ -49,10 +49,6 @@ module Rails
copy_file "README.md", "README.md"
end
- def ruby_version
- template "ruby-version", ".ruby-version"
- end
-
def gemfile
template "Gemfile"
end
@@ -257,7 +253,6 @@ module Rails
def create_root_files
build(:readme)
build(:rakefile)
- build(:ruby_version)
build(:configru)
build(:gitignore) unless options[:skip_git]
build(:gemfile) unless options[:skip_gemfile]
diff --git a/railties/lib/rails/generators/rails/app/templates/ruby-version b/railties/lib/rails/generators/rails/app/templates/ruby-version
deleted file mode 100644
index c444f33b0f..0000000000
--- a/railties/lib/rails/generators/rails/app/templates/ruby-version
+++ /dev/null
@@ -1 +0,0 @@
-<%= RUBY_VERSION -%>
diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb
index 44c4688aa4..3e9f19fa9a 100644
--- a/railties/test/generators/app_generator_test.rb
+++ b/railties/test/generators/app_generator_test.rb
@@ -4,7 +4,6 @@ require "generators/shared_generator_tests"
DEFAULT_APP_FILES = %w(
.gitignore
- .ruby-version
README.md
Gemfile
Rakefile
@@ -809,17 +808,6 @@ class AppGeneratorTest < Rails::Generators::TestCase
end
end
- def test_inclusion_of_ruby_version
- run_generator
-
- assert_file "Gemfile" do |content|
- assert_match(/ruby '#{RUBY_VERSION}'/, content)
- end
- assert_file ".ruby-version" do |content|
- assert_match(/#{RUBY_VERSION}/, content)
- end
- end
-
def test_version_control_initializes_git_repo
run_generator [destination_root]
assert_directory ".git"