From 66b8c0f70c0d80932b03a0ba939401285aa6580e Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Thu, 3 Oct 2019 19:06:34 +0900 Subject: [PATCH] Use Gemfile instead of Gem::Specification#add_development_dependency. --- .gitignore | 1 + Gemfile | 7 ++++++- Rakefile | 4 ++-- net-smtp.gemspec | 17 ++++------------- 4 files changed, 13 insertions(+), 16 deletions(-) diff --git a/.gitignore b/.gitignore index 9106b2a..4ea5798 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ /pkg/ /spec/reports/ /tmp/ +Gemfile.lock diff --git a/Gemfile b/Gemfile index b64309e..3dc2883 100644 --- a/Gemfile +++ b/Gemfile @@ -1,4 +1,9 @@ source "https://rubygems.org" -# Specify your gem's dependencies in net-smtp.gemspec gemspec + +group :development do + gem "bundler" + gem "rake" + gem "test-unit" +end diff --git a/Rakefile b/Rakefile index d433a1e..80bc7bd 100644 --- a/Rakefile +++ b/Rakefile @@ -4,7 +4,7 @@ require "rake/testtask" Rake::TestTask.new(:test) do |t| t.libs << "test" t.libs << "lib" - t.test_files = FileList["test/**/*_test.rb"] + t.test_files = FileList['test/**/test_*.rb'] end -task :default => :test +task :default => [:test] diff --git a/net-smtp.gemspec b/net-smtp.gemspec index 053193b..86ed061 100644 --- a/net-smtp.gemspec +++ b/net-smtp.gemspec @@ -8,26 +8,17 @@ Gem::Specification.new do |spec| spec.authors = ["Hiroshi SHIBATA"] spec.email = ["hsbt@ruby-lang.org"] - spec.summary = %q{TODO: Write a short summary, because RubyGems requires one.} - spec.description = %q{TODO: Write a longer description or delete this line.} - spec.homepage = "TODO: Put your gem's website or public repo URL here." - - spec.metadata["allowed_push_host"] = "TODO: Set to 'http://mygemserver.com'" + spec.summary = %q{Simple Mail Transfer Protocol client library for Ruby.} + spec.description = %q{Simple Mail Transfer Protocol client library for Ruby.} + spec.homepage = "https://github.com/ruby/net-smtp" 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." + spec.metadata["source_code_uri"] = spec.homepage - # 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. spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) } end spec.bindir = "exe" spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } spec.require_paths = ["lib"] - - spec.add_development_dependency "bundler", "~> 2.0" - spec.add_development_dependency "rake", "~> 10.0" - spec.add_development_dependency "minitest", "~> 5.0" end