diff --git a/.gitignore b/.gitignore index 30f1e5c..b69ecaa 100644 --- a/.gitignore +++ b/.gitignore @@ -3,7 +3,6 @@ /_yardoc/ /coverage/ /doc/ -/lib/ /logs/ /pkg/ /spec/reports/ diff --git a/Gemfile b/Gemfile index 901188a..c38b903 100644 --- a/Gemfile +++ b/Gemfile @@ -5,8 +5,6 @@ gemspec group :development do gem "rake" - gem "rake-compiler" gem "test-unit" gem "test-unit-ruby-core" - gem 'ruby-maven', :platforms => :jruby end diff --git a/README.md b/README.md index a8f04f4..dca9f48 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ This gem provides the feature for waiting until IO is readable or writable without blocking. +**Note:** This gem is empty and deprecated. All functionality was moved into core Ruby as of version 3.2. + ## Installation Add this line to your application's Gemfile: diff --git a/Rakefile b/Rakefile index f5a711b..12996aa 100644 --- a/Rakefile +++ b/Rakefile @@ -1,37 +1,11 @@ require "bundler/gem_tasks" require "rake/testtask" -name = "io/wait" - -case -when RUBY_ENGINE == "jruby" - require 'rake/javaextensiontask' - Rake::JavaExtensionTask.new("wait") do |ext| - require 'maven/ruby/maven' - ext.source_version = '1.8' - ext.target_version = '1.8' - ext.ext_dir = 'ext/java' - ext.lib_dir = 'lib/io' - end - task "build" => "lib/io/wait.jar" - task "lib/io/wait.jar" => "compile" - libs = ["ext/java/lib", "lib"] -else - require 'rake/extensiontask' - extask = Rake::ExtensionTask.new(name) do |x| - x.lib_dir.sub!(%r[(?=/|\z)], "/#{RUBY_VERSION}/#{x.platform}") - end - libs = ["lib/#{RUBY_VERSION}/#{extask.platform}"] -end - Rake::TestTask.new(:test) do |t| - t.libs = libs - t.libs << "test/lib" + t.libs = ["lib", "test/lib"] t.ruby_opts << "-rhelper" t.options = "--ignore-name=/ungetc_in_text/" t.test_files = FileList["test/**/test_*.rb"] end -task :test => :compile - task :default => :test diff --git a/ext/io/wait/depend b/ext/io/wait/depend deleted file mode 100644 index bbf1266..0000000 --- a/ext/io/wait/depend +++ /dev/null @@ -1,18 +0,0 @@ -# AUTOGENERATED DEPENDENCIES START -wait.o: $(RUBY_EXTCONF_H) -wait.o: $(arch_hdrdir)/ruby/config.h -wait.o: $(hdrdir)/ruby.h -wait.o: $(hdrdir)/ruby/assert.h -wait.o: $(hdrdir)/ruby/backward.h -wait.o: $(hdrdir)/ruby/defines.h -wait.o: $(hdrdir)/ruby/encoding.h -wait.o: $(hdrdir)/ruby/intern.h -wait.o: $(hdrdir)/ruby/io.h -wait.o: $(hdrdir)/ruby/missing.h -wait.o: $(hdrdir)/ruby/onigmo.h -wait.o: $(hdrdir)/ruby/oniguruma.h -wait.o: $(hdrdir)/ruby/ruby.h -wait.o: $(hdrdir)/ruby/st.h -wait.o: $(hdrdir)/ruby/subst.h -wait.o: wait.c -# AUTOGENERATED DEPENDENCIES END diff --git a/ext/io/wait/extconf.rb b/ext/io/wait/extconf.rb deleted file mode 100644 index 00c455a..0000000 --- a/ext/io/wait/extconf.rb +++ /dev/null @@ -1,4 +0,0 @@ -# frozen_string_literal: false -require 'mkmf' - -create_makefile("io/wait") diff --git a/ext/io/wait/wait.c b/ext/io/wait/wait.c deleted file mode 100644 index f757519..0000000 --- a/ext/io/wait/wait.c +++ /dev/null @@ -1,23 +0,0 @@ -/* -*- c-file-style: "ruby"; indent-tabs-mode: t -*- */ -/********************************************************************** - - io/wait.c - - - $Author$ - created at: Tue Aug 28 09:08:06 JST 2001 - - All the files in this distribution are covered under the Ruby's - license (see the file COPYING). - -**********************************************************************/ - -#include "ruby.h" /* abi_version */ - -/* - * IO wait methods are built in ruby now, just for backward compatibility. - */ - -void -Init_wait(void) -{ -} diff --git a/ext/java/lib/io/wait.rb b/ext/java/lib/io/wait.rb deleted file mode 100644 index de3ae75..0000000 --- a/ext/java/lib/io/wait.rb +++ /dev/null @@ -1,2 +0,0 @@ -require 'io/wait.jar' -JRuby::Util.load_ext("org.jruby.ext.io.wait.IOWaitLibrary") diff --git a/ext/java/org/jruby/ext/io/wait/IOWaitLibrary.java b/ext/java/org/jruby/ext/io/wait/IOWaitLibrary.java deleted file mode 100644 index 14ef2b5..0000000 --- a/ext/java/org/jruby/ext/io/wait/IOWaitLibrary.java +++ /dev/null @@ -1,43 +0,0 @@ -/***** BEGIN LICENSE BLOCK ***** - * Version: EPL 2.0/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Eclipse Public - * License Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.eclipse.org/legal/epl-v20.html - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * Copyright (C) 2006 Nick Sieger - * - * Alternatively, the contents of this file may be used under the terms of - * either of the GNU General Public License Version 2 or later (the "GPL"), - * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the EPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the EPL, the GPL or the LGPL. - ***** END LICENSE BLOCK *****/ - -package org.jruby.ext.io.wait; - -import org.jruby.Ruby; -import org.jruby.runtime.load.Library; - -/** - * IO wait methods are built in JRuby now, just for backward compatibility. - * - * @author Nick Sieger - */ -public class IOWaitLibrary implements Library { - - public void load(Ruby runtime, boolean wrap) { - } -} diff --git a/io-wait.gemspec b/io-wait.gemspec index c1c6172..3ba8a0b 100644 --- a/io-wait.gemspec +++ b/io-wait.gemspec @@ -6,8 +6,8 @@ Gem::Specification.new do |spec| spec.authors = ["Nobu Nakada", "Charles Oliver Nutter"] spec.email = ["nobu@ruby-lang.org", "headius@headius.com"] - spec.summary = %q{Waits until IO is readable or writable without blocking.} - spec.description = %q{Waits until IO is readable or writable without blocking.} + spec.summary = %q{Deprecated: All functionality ships with Ruby 3.2 and higher.} + spec.description = %q{Deprecated: All functionality ships with Ruby 3.2 and higher.} spec.homepage = "https://github.com/ruby/io-wait" spec.licenses = ["Ruby", "BSD-2-Clause"] spec.required_ruby_version = Gem::Requirement.new(">= 3.2") @@ -15,11 +15,9 @@ Gem::Specification.new do |spec| spec.metadata["homepage_uri"] = spec.homepage spec.metadata["source_code_uri"] = spec.homepage - jruby = true if Gem::Platform.new('java') =~ spec.platform or RUBY_ENGINE == 'jruby' dir, gemspec = File.split(__FILE__) excludes = [ - *%w[:^/.git* :^/Gemfile* :^/Rakefile* :^/bin/ :^/test/ :^/rakelib/ :^*.java], - *(jruby ? %w[:^/ext/io] : %w[:^/ext/java]), + *%w[:^/.git* :^/Gemfile* :^/Rakefile* :^/bin/ :^/test/ :^/rakelib/], ":(exclude,literal,top)#{gemspec}" ] files = IO.popen(%w[git ls-files -z --] + excludes, chdir: dir, &:read).split("\x0") @@ -28,12 +26,4 @@ Gem::Specification.new do |spec| spec.bindir = "exe" spec.executables = [] spec.require_paths = ["lib"] - - if jruby - spec.platform = 'java' - spec.files << "lib/io/wait.jar" - spec.require_paths += ["ext/java/lib"] - else - spec.extensions = %w[ext/io/wait/extconf.rb] - end end diff --git a/lib/io/wait.rb b/lib/io/wait.rb new file mode 100644 index 0000000..eab059d --- /dev/null +++ b/lib/io/wait.rb @@ -0,0 +1 @@ +warn "The io-wait gem is deprecated; all functionality ships with Ruby 3.2 and higher."