From 9a560bc09d5d061615051796aada29e7af23113a Mon Sep 17 00:00:00 2001 From: Nikita Esaulov Date: Thu, 15 Mar 2018 23:57:47 +0300 Subject: Add a comment describing spec.files method in the .gemspec template --- lib/bundler/templates/newgem/newgem.gemspec.tt | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/bundler/templates/newgem/newgem.gemspec.tt b/lib/bundler/templates/newgem/newgem.gemspec.tt index 97da2b14d8..4e21a2d7a6 100644 --- a/lib/bundler/templates/newgem/newgem.gemspec.tt +++ b/lib/bundler/templates/newgem/newgem.gemspec.tt @@ -28,6 +28,7 @@ Gem::Specification.new do |spec| "public gem pushes." end + # Specify which files should be added to the gem when it is released. spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) } end -- cgit v1.2.1 From 59069cfbb9ee8661446ece89df26b9cfb6f93240 Mon Sep 17 00:00:00 2001 From: Nikita Esaulov Date: Fri, 16 Mar 2018 00:14:12 +0300 Subject: Add a message after new gem generation with link to bundler.io guides --- lib/bundler/cli/gem.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/bundler/cli/gem.rb b/lib/bundler/cli/gem.rb index ebfaf75b8c..e41ef37f5b 100644 --- a/lib/bundler/cli/gem.rb +++ b/lib/bundler/cli/gem.rb @@ -158,6 +158,10 @@ module Bundler # Open gemspec in editor open_editor(options["edit"], target.join("#{name}.gemspec")) if options[:edit] + + Bundler.ui.info "Gem '#{name}' was successfully created. " \ + "For detailed information on further steps please visit https://bundler.io/guides/creating_gem.html" + rescue Errno::EEXIST => e raise GenericSystemCallError.new(e, "There was a conflict while creating the new gem.") end -- cgit v1.2.1 From 5637f676c5de28073333cc088963208271960693 Mon Sep 17 00:00:00 2001 From: Nikita Esaulov Date: Fri, 16 Mar 2018 00:19:57 +0300 Subject: :cop: --- lib/bundler/cli/gem.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/bundler/cli/gem.rb b/lib/bundler/cli/gem.rb index e41ef37f5b..cbfb1531a5 100644 --- a/lib/bundler/cli/gem.rb +++ b/lib/bundler/cli/gem.rb @@ -160,8 +160,7 @@ module Bundler open_editor(options["edit"], target.join("#{name}.gemspec")) if options[:edit] Bundler.ui.info "Gem '#{name}' was successfully created. " \ - "For detailed information on further steps please visit https://bundler.io/guides/creating_gem.html" - + "For detailed information on further steps pleaseg visit https://bundler.io/guides/creating_gem.html" rescue Errno::EEXIST => e raise GenericSystemCallError.new(e, "There was a conflict while creating the new gem.") end -- cgit v1.2.1 From 594597295bc5b9cc21302acbf4c56b12405d0a50 Mon Sep 17 00:00:00 2001 From: Nikita Esaulov Date: Fri, 16 Mar 2018 00:31:07 +0300 Subject: Fix typo --- lib/bundler/cli/gem.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/bundler/cli/gem.rb b/lib/bundler/cli/gem.rb index cbfb1531a5..d5dec323de 100644 --- a/lib/bundler/cli/gem.rb +++ b/lib/bundler/cli/gem.rb @@ -160,7 +160,7 @@ module Bundler open_editor(options["edit"], target.join("#{name}.gemspec")) if options[:edit] Bundler.ui.info "Gem '#{name}' was successfully created. " \ - "For detailed information on further steps pleaseg visit https://bundler.io/guides/creating_gem.html" + "For detailed information on further steps please visit https://bundler.io/guides/creating_gem.html" rescue Errno::EEXIST => e raise GenericSystemCallError.new(e, "There was a conflict while creating the new gem.") end -- cgit v1.2.1 From e76cd7f41c782f02d7bab7cfaf785e58bfb98690 Mon Sep 17 00:00:00 2001 From: Nikita Esaulov Date: Fri, 16 Mar 2018 01:10:38 +0300 Subject: Add a comment about default spec.files setup --- lib/bundler/templates/newgem/newgem.gemspec.tt | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/bundler/templates/newgem/newgem.gemspec.tt b/lib/bundler/templates/newgem/newgem.gemspec.tt index 4e21a2d7a6..e706e90f66 100644 --- a/lib/bundler/templates/newgem/newgem.gemspec.tt +++ b/lib/bundler/templates/newgem/newgem.gemspec.tt @@ -29,6 +29,7 @@ Gem::Specification.new do |spec| end # Specify which files should be added to the gem when it is released. + # The `git ls-files -z` default will base this on all the files checked in to git. spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) } end -- cgit v1.2.1 From 46b8f26487a7c58f8cedb821b1cabba2c4f7ded0 Mon Sep 17 00:00:00 2001 From: Nikita Esaulov Date: Fri, 16 Mar 2018 14:58:59 +0300 Subject: Change comments --- lib/bundler/cli/gem.rb | 2 +- lib/bundler/templates/newgem/newgem.gemspec.tt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/bundler/cli/gem.rb b/lib/bundler/cli/gem.rb index d5dec323de..58e2f8a3fd 100644 --- a/lib/bundler/cli/gem.rb +++ b/lib/bundler/cli/gem.rb @@ -160,7 +160,7 @@ module Bundler open_editor(options["edit"], target.join("#{name}.gemspec")) if options[:edit] Bundler.ui.info "Gem '#{name}' was successfully created. " \ - "For detailed information on further steps please visit https://bundler.io/guides/creating_gem.html" + "For more information on making a RubyGem visit https://bundler.io/guides/creating_gem.html" rescue Errno::EEXIST => e raise GenericSystemCallError.new(e, "There was a conflict while creating the new gem.") end diff --git a/lib/bundler/templates/newgem/newgem.gemspec.tt b/lib/bundler/templates/newgem/newgem.gemspec.tt index e706e90f66..991d645cc6 100644 --- a/lib/bundler/templates/newgem/newgem.gemspec.tt +++ b/lib/bundler/templates/newgem/newgem.gemspec.tt @@ -29,7 +29,7 @@ Gem::Specification.new do |spec| end # Specify which files should be added to the gem when it is released. - # The `git ls-files -z` default will base this on all the files checked in to git. + # The `git ls-files -z` loads the files in the RubyGem that have been added into git. spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) } end -- cgit v1.2.1