aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/generators/rails/plugin/templates/Gemfile
diff options
context:
space:
mode:
authorMatthew Draper <matthew@trebex.net>2015-12-18 18:02:21 +1030
committerMatthew Draper <matthew@trebex.net>2015-12-18 18:02:21 +1030
commit46d1cc90be94307f313a3ab384bd176a5b7f58b3 (patch)
treeffcd8621849fcb5d7f914ac4ac67bd79151a843f /railties/lib/rails/generators/rails/plugin/templates/Gemfile
parent8f8cb1baa3b5609969805fcdd7295f3d7de2bd6b (diff)
downloadrails-46d1cc90be94307f313a3ab384bd176a5b7f58b3.tar.gz
rails-46d1cc90be94307f313a3ab384bd176a5b7f58b3.tar.bz2
rails-46d1cc90be94307f313a3ab384bd176a5b7f58b3.zip
Allow normal version updates within a release series
We originally chose to apply very strict versioning on the `rails` entry in the Gemfile, because our future versioning policy was not strongly defined. Now it is, and our policy is very much designed on the expectation that people will regularly update to the latest patch level in their release series... so we should encourage that. Of course, Gemfile.lock will do its job and prevent unplanned updates, just as it does for every other gem in the bundle... but if you run `bundle update`, we want to get you the latest bug/security fixes without requiring a manual edit of the Gemfile entry. Our current version could be a few different shapes, so it takes a bit of work to find the right specifier, but in principle, we match anything of the form x.y.*, where x.y matches our current release series.
Diffstat (limited to 'railties/lib/rails/generators/rails/plugin/templates/Gemfile')
-rw-r--r--railties/lib/rails/generators/rails/plugin/templates/Gemfile2
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/lib/rails/generators/rails/plugin/templates/Gemfile b/railties/lib/rails/generators/rails/plugin/templates/Gemfile
index f085a2577a..3bb4badeb4 100644
--- a/railties/lib/rails/generators/rails/plugin/templates/Gemfile
+++ b/railties/lib/rails/generators/rails/plugin/templates/Gemfile
@@ -1,7 +1,7 @@
source 'https://rubygems.org'
<% if options[:skip_gemspec] -%>
-<%= '# ' if options.dev? || options.edge? -%>gem 'rails', '~> <%= Rails::VERSION::STRING %>'
+<%= '# ' if options.dev? || options.edge? -%>gem 'rails', '<%= Array.wrap(rails_version_specifier).join("', '") %>'
<% else -%>
# Declare your gem's dependencies in <%= name %>.gemspec.
# Bundler will treat runtime dependencies like base dependencies, and