From 8d884d94aa4f0b8e7b23fb420fc43580b3cfc8b8 Mon Sep 17 00:00:00 2001 From: hsbt Date: Wed, 25 Jul 2018 12:28:17 +0000 Subject: [PATCH] Promote Mutex_m to Default gems. * lib/mutex_m.gemspec: Added initial gemspec. * lib/mutex_m.rb: Added Mutex_m::VERSION for gemspec. * tool/sync_default_gems.rb: Support Mutex_m. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64048 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/mutex_m.gemspec | 22 ++++++++++++++++++++++ lib/mutex_m.rb | 3 +++ tool/sync_default_gems.rb | 6 ++++-- 3 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 lib/mutex_m.gemspec diff --git a/lib/mutex_m.gemspec b/lib/mutex_m.gemspec new file mode 100644 index 0000000000..73ed183b85 --- /dev/null +++ b/lib/mutex_m.gemspec @@ -0,0 +1,22 @@ +require_relative "mutex_m" + +Gem::Specification.new do |spec| + spec.name = "mutex_m" + spec.version = Mutex_m::VERSION + spec.authors = ["Keiju ISHITSUKA"] + spec.email = ["keiju@ruby-lang.org"] + + spec.summary = %q{Mixin to extend objects to be handled like a Mutex.} + spec.description = %q{Mixin to extend objects to be handled like a Mutex.} + spec.homepage = "https://github.com/ruby/mutex_m" + spec.license = "BSD-2-Clause" + + spec.files = [".gitignore", ".travis.yml", "Gemfile", "LICENSE.txt", "README.md", "Rakefile", "bin/console", "bin/setup", "lib/mutex_m.rb", "mutex_m.gemspec"] + spec.bindir = "exe" + spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } + spec.require_paths = ["lib"] + + spec.add_development_dependency "bundler" + spec.add_development_dependency "rake" + spec.add_development_dependency "test-unit" +end diff --git a/lib/mutex_m.rb b/lib/mutex_m.rb index 592e3842c8..19fe85b81c 100644 --- a/lib/mutex_m.rb +++ b/lib/mutex_m.rb @@ -35,6 +35,9 @@ # # this obj can be handled like Mutex # module Mutex_m + + VERSION = "0.1.0" + def Mutex_m.define_aliases(cl) # :nodoc: cl.module_eval %q{ alias locked? mu_locked? diff --git a/tool/sync_default_gems.rb b/tool/sync_default_gems.rb index 0bf1867062..ee347be084 100644 --- a/tool/sync_default_gems.rb +++ b/tool/sync_default_gems.rb @@ -34,6 +34,7 @@ # * https://github.com/ruby/forwardable # * https://github.com/ruby/thwait # * https://github.com/ruby/e2mmap +# * https://github.com/ruby/mutex_m # $repositories = { @@ -70,7 +71,8 @@ $repositories = { shell: 'ruby/shell', forwardable: "ruby/forwardable", thwait: "ruby/thwait", - e2mmap: "ruby/e2mmap" + e2mmap: "ruby/e2mmap", + mutex_m: "ruby/mutex_m" } def sync_default_gems(gem) @@ -196,7 +198,7 @@ def sync_default_gems(gem) `cp -rf ../sync/lib/* lib` `cp -rf ../sync/test/thread test` `cp -f ../sync/sync.gemspec lib` - when "rexml", "rss", "matrix", "irb", "csv", "shell", "logger", "ostruct", "scanf", "webrick", "fileutils", "forwardable", "prime", "tracer", "ipaddr", "cmath" + when "rexml", "rss", "matrix", "irb", "csv", "shell", "logger", "ostruct", "scanf", "webrick", "fileutils", "forwardable", "prime", "tracer", "ipaddr", "cmath", "mutex_m" sync_lib gem else end