diff options
author | The Bundler Bot <bot@bundler.io> | 2018-09-14 07:06:25 +0000 |
---|---|---|
committer | Colby Swandale <me@colby.fyi> | 2018-10-05 13:48:27 +1000 |
commit | ef12e08f7c21348b66d57e4f9c7f9c5ea0f88e45 (patch) | |
tree | 649f8bb43726d32f00991e54b4ed0c9e44e68b13 /spec | |
parent | 5b3ddedac45984ed74afb22c087fc7b273ccdc37 (diff) | |
download | bundler-ef12e08f7c21348b66d57e4f9c7f9c5ea0f88e45.tar.gz |
Auto merge of #6697 - walf443:added_changelog_section, r=hsbt
[CLI::GEM] bundle gem will generate homepage_uri and code and changelog section …
### What was the end-user problem that led to this PR?
The problem was I always have to remember how to add CHANGELOG.md when I set up a new gem.
### What was your diagnosis of the problem?
My diagnosis was that CHANGELOG.md has become enough of a community standard that it makes sense to offer it in bundle gem.
### What is your fix for the problem, implemented in this PR?
My fix is only added metadata[:changelog_uri] to generated gemspec file.
Changelog.md file is not generated by default.
### Why did you choose this fix out of the possible options?
I chose this fix because Changelog.md file format is different by projects.
(cherry picked from commit c7ed6a2cda1963da6b1cdd0bfcffd8616527a9aa)
Diffstat (limited to 'spec')
-rw-r--r-- | spec/bundler/gem_helper_spec.rb | 1 | ||||
-rw-r--r-- | spec/commands/newgem_spec.rb | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/spec/bundler/gem_helper_spec.rb b/spec/bundler/gem_helper_spec.rb index c36204c542..a627129fe3 100644 --- a/spec/bundler/gem_helper_spec.rb +++ b/spec/bundler/gem_helper_spec.rb @@ -77,6 +77,7 @@ RSpec.describe Bundler::GemHelper do before(:each) do content = app_gemspec_content.gsub("TODO: ", "") content.sub!(/homepage\s+= ".*"/, 'homepage = ""') + content.gsub!(/spec\.metadata.+\n/, "") File.open(app_gemspec_path, "w") {|file| file << content } end diff --git a/spec/commands/newgem_spec.rb b/spec/commands/newgem_spec.rb index 1a3e8236b6..97605bf526 100644 --- a/spec/commands/newgem_spec.rb +++ b/spec/commands/newgem_spec.rb @@ -196,7 +196,7 @@ RSpec.describe "bundle gem" do process_file(bundled_app("newgem", "newgem.gemspec")) do |line| # Simulate replacing TODOs with real values case line - when /spec\.metadata\['allowed_push_host'\]/, /spec\.homepage/ + when /spec\.metadata\["(?:allowed_push_host|homepage_uri|source_code_uri|changelog_uri)"\]/, /spec\.homepage/ line.gsub(/\=.*$/, "= 'http://example.org'") when /spec\.summary/ line.gsub(/\=.*$/, "= %q{A short summary of my new gem.}") |