[前][次][番号順一覧][スレッド一覧]

ruby-changes:58613

From: Hiroshi <ko1@a...>
Date: Thu, 7 Nov 2019 16:47:58 +0900 (JST)
Subject: [ruby-changes:58613] 77c94e0dd8 (master): Promote benchmark to default gems

https://git.ruby-lang.org/ruby.git/commit/?id=77c94e0dd8

From 77c94e0dd80019fe78e299dd1981ba9992ad7a46 Mon Sep 17 00:00:00 2001
From: Hiroshi SHIBATA <hsbt@r...>
Date: Thu, 7 Nov 2019 13:53:05 +0900
Subject: Promote benchmark to default gems


diff --git a/doc/maintainers.rdoc b/doc/maintainers.rdoc
index 32d6296..b6b3615 100644
--- a/doc/maintainers.rdoc
+++ b/doc/maintainers.rdoc
@@ -44,8 +44,6 @@ Zachary Scott (zzak) https://github.com/ruby/ruby/blob/trunk/doc/maintainers.rdoc#L44
   Akinori MUSHA (knu)
 [lib/base64.rb]
   Yusuke Endoh (mame)
-[lib/benchmark.rb]
-  _unmaintained_
 [lib/cgi.rb, lib/cgi/*]
   Takeyuki Fujioka (xibbar)
 [lib/drb.rb, lib/drb/*]
@@ -160,6 +158,10 @@ Zachary Scott (zzak) https://github.com/ruby/ruby/blob/trunk/doc/maintainers.rdoc#L158
 
 === Libraries
 
+[lib/benchmark.rb]
+  _unmaintained_
+  https://github.com/bundler/benchmark
+  https://rubygems.org/gems/benchmark
 [lib/bundler.rb, lib/bundler/*]
   Hiroshi SHIBATA (hsbt)
   https://github.com/bundler/bundler
diff --git a/doc/standard_library.rdoc b/doc/standard_library.rdoc
index 3e4c7de..d38570e 100644
--- a/doc/standard_library.rdoc
+++ b/doc/standard_library.rdoc
@@ -10,7 +10,6 @@ description. https://github.com/ruby/ruby/blob/trunk/doc/standard_library.rdoc#L10
 
 Abbrev:: Calculates a set of unique abbreviations for a given set of strings
 Base64:: Support for encoding and decoding binary data using a Base64 representation
-Benchmark:: Provides methods to measure and report the time used to execute code
 CGI:: Support for the Common Gateway Interface protocol
 DEBUGGER__:: Debugging functionality for Ruby
 DRb:: Distributed object system for Ruby
@@ -66,6 +65,7 @@ WIN32OLE:: Provides an interface for OLE Automation in Ruby https://github.com/ruby/ruby/blob/trunk/doc/standard_library.rdoc#L65
 
 == Libraries
 
+Benchmark:: Provides methods to measure and report the time used to execute code
 Bundler:: Manage your Ruby application's gem dependencies
 CSV:: Provides an interface to read and write CSV files and data
 Delegator:: Provides three abilities to delegate method calls to an object
diff --git a/lib/benchmark/benchmark.gemspec b/lib/benchmark/benchmark.gemspec
new file mode 100644
index 0000000..aad5205
--- /dev/null
+++ b/lib/benchmark/benchmark.gemspec
@@ -0,0 +1,29 @@ https://github.com/ruby/ruby/blob/trunk/lib/benchmark/benchmark.gemspec#L1
+begin
+  require_relative "lib/benchmark/version"
+rescue LoadError # Fallback to load version file in ruby core repository
+  require_relative "version"
+end
+
+Gem::Specification.new do |spec|
+  spec.name          = "benchmark"
+  spec.version       = Benchmark::VERSION
+  spec.authors       = ["Yukihiro Matsumoto"]
+  spec.email         = ["matz@r..."]
+
+  spec.summary       = %q{a performance benchmarking library}
+  spec.description   = spec.summary
+  spec.homepage      = "https://github.com/ruby/benchmark"
+  spec.license       = "BSD-2-Clause"
+
+  spec.metadata["homepage_uri"] = spec.homepage
+  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"]
+end
diff --git a/lib/benchmark/version.rb b/lib/benchmark/version.rb
new file mode 100644
index 0000000..d74cc74
--- /dev/null
+++ b/lib/benchmark/version.rb
@@ -0,0 +1,3 @@ https://github.com/ruby/ruby/blob/trunk/lib/benchmark/version.rb#L1
+module Benchmark
+  VERSION = "0.1.0"
+end
diff --git a/tool/sync_default_gems.rb b/tool/sync_default_gems.rb
index 31dd664..363f53c 100644
--- a/tool/sync_default_gems.rb
+++ b/tool/sync_default_gems.rb
@@ -38,6 +38,7 @@ https://github.com/ruby/ruby/blob/trunk/tool/sync_default_gems.rb#L38
 # * https://github.com/ruby/getoptlong
 # * https://github.com/ruby/pstore
 # * https://github.com/ruby/delegate
+# * https://github.com/ruby/benchmark
 #
 
 require 'fileutils'
@@ -83,6 +84,7 @@ $repositories = { https://github.com/ruby/ruby/blob/trunk/tool/sync_default_gems.rb#L84
   getoptlong: "ruby/getoptlong",
   pstore: "ruby/pstore",
   delegate: "ruby/delegate",
+  benchmark: "ruby/benchmark",
 }
 
 def sync_default_gems(gem)
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]