summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2018-10-26 16:26:41 -0300
committerDavid Rodríguez <deivid.rodriguez@riseup.net>2018-10-26 16:26:41 -0300
commit6a0da623dca36adfa573fee9e6e657718c6f5dd7 (patch)
treea3454782ff4cc75b7226115f01d9d5853a205b79
parentab325bde24853207450904b06a55b4a9766fdbf0 (diff)
downloadbundler-remove_old_rubygems_stuff_from_specs.tar.gz
Remove more unnecessary stuffremove_old_rubygems_stuff_from_specs
-rw-r--r--lib/bundler/templates/newgem/newgem.gemspec.tt15
-rw-r--r--spec/commands/newgem_spec.rb2
2 files changed, 4 insertions, 13 deletions
diff --git a/lib/bundler/templates/newgem/newgem.gemspec.tt b/lib/bundler/templates/newgem/newgem.gemspec.tt
index 113bf82eb2..c1a50fe912 100644
--- a/lib/bundler/templates/newgem/newgem.gemspec.tt
+++ b/lib/bundler/templates/newgem/newgem.gemspec.tt
@@ -21,18 +21,11 @@ Gem::Specification.new do |spec|
spec.license = "MIT"
<%- end -%>
- # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
- # to allow pushing to a single host or delete this section to allow pushing to any host.
- if spec.respond_to?(:metadata)
- spec.metadata["allowed_push_host"] = "TODO: Set to 'http://mygemserver.com'"
+ spec.metadata["allowed_push_host"] = "TODO: Set to 'http://mygemserver.com'"
- spec.metadata["homepage_uri"] = spec.homepage
- spec.metadata["source_code_uri"] = "TODO: Put your gem's public repo URL here."
- spec.metadata["changelog_uri"] = "TODO: Put your gem's CHANGELOG.md URL here."
- else
- raise "RubyGems 2.0 or newer is required to protect against " \
- "public gem pushes."
- end
+ spec.metadata["homepage_uri"] = spec.homepage
+ spec.metadata["source_code_uri"] = "TODO: Put your gem's public repo URL here."
+ spec.metadata["changelog_uri"] = "TODO: Put your gem's CHANGELOG.md URL here."
# Specify which files should be added to the gem when it is released.
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
diff --git a/spec/commands/newgem_spec.rb b/spec/commands/newgem_spec.rb
index 8503fd1066..8f033e5b4f 100644
--- a/spec/commands/newgem_spec.rb
+++ b/spec/commands/newgem_spec.rb
@@ -191,8 +191,6 @@ RSpec.describe "bundle gem" do
line.gsub(/\=.*$/, "= %q{A short summary of my new gem.}")
when /spec\.description/
line.gsub(/\=.*$/, "= %q{A longer description of my new gem.}")
- # Remove exception that prevents public pushes on older RubyGems versions
- when /raise "RubyGems 2.0 or newer/
else
line
end