aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgrosser <michael@grosser.it>2014-07-27 08:31:26 -0700
committergrosser <michael@grosser.it>2014-07-27 08:31:26 -0700
commit859a12460fd94fde974b90440e26172bf59bbb59 (patch)
tree48222ddd87ae34b81b759dcd448aed7518395bd5
parentd4bde24effb590c779969e9e723fd05682de4a14 (diff)
downloadbundler-859a12460fd94fde974b90440e26172bf59bbb59.tar.gz
prevent all new gems to be rubygems 2.0 only
-rw-r--r--lib/bundler/templates/newgem/newgem.gemspec.tt7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/bundler/templates/newgem/newgem.gemspec.tt b/lib/bundler/templates/newgem/newgem.gemspec.tt
index 342f4fe4..efd53e74 100644
--- a/lib/bundler/templates/newgem/newgem.gemspec.tt
+++ b/lib/bundler/templates/newgem/newgem.gemspec.tt
@@ -9,10 +9,9 @@ Gem::Specification.new do |spec|
spec.authors = [<%=config[:author].inspect%>]
spec.email = [<%=config[:email].inspect%>]
-<%- if ::Gem::Requirement.new(">= 2.0").satisfied_by? ::Gem::Version.new(::Gem::VERSION) -%>
- spec.metadata['allowed_push_host'] = "TODO: Set to 'http://mygemserver.com' to prevent pushes to rubygems.org, or delete to allow pushes to any server."
- spec.required_rubygems_version = ">= 2.0"
-<% end -%>
+ if spec.respond_to?(:metadata)
+ spec.metadata['allowed_push_host'] = "TODO: Set to 'http://mygemserver.com' to prevent pushes to rubygems.org, or delete to allow pushes to any server."
+ end
<%- if config[:ext] -%>
spec.extensions = ["ext/<%=config[:underscored_name]%>/extconf.rb"]