New Upstream Snapshot - ruby-open4
Ready changes
Summary
Merged new upstream version: 1.3.4+git20140313.1.2bc3782 (was: 1.3.4).
Resulting package
Built on 2022-10-21T09:52 (took 17m39s)
The resulting binary packages can be installed (if you have the apt repository enabled) by running one of:
apt install -t fresh-snapshots ruby-open4
Lintian Result
Diff
diff --git a/Rakefile b/Rakefile
new file mode 100644
index 0000000..5ac6212
--- /dev/null
+++ b/Rakefile
@@ -0,0 +1,360 @@
+This.rubyforge_project = 'codeforpeople'
+This.author = "Ara T. Howard"
+This.email = "ara.t.howard@gmail.com"
+This.homepage = "https://github.com/ahoward/#{ This.lib }"
+
+
+task :default do
+ puts((Rake::Task.tasks.map{|task| task.name.gsub(/::/,':')} - ['default']).sort)
+end
+
+task :test do
+ test_dir = File.join(This.dir, "test")
+ test_glob ||= File.join(test_dir, "/**_test.rb")
+ test_rbs = Dir.glob(test_glob).sort
+
+ div = ('=' * 119)
+ line = ('-' * 119)
+
+ test_rbs.each_with_index do |test_rb, index|
+ testno = index + 1
+ command = "#{ This.ruby } -rubygems -I ./lib -I ./test/support #{ test_rb }"
+
+ puts
+ say(div, :color => :cyan, :bold => true)
+ say("@#{ testno } => ", :bold => true, :method => :print)
+ say(command, :color => :cyan, :bold => true)
+ say(line, :color => :cyan, :bold => true)
+
+ system(command)
+
+ say(line, :color => :cyan, :bold => true)
+
+ status = $?.exitstatus
+
+ if status.zero?
+ say("@#{ testno } <= ", :bold => true, :color => :white, :method => :print)
+ say("SUCCESS", :color => :green, :bold => true)
+ else
+ say("@#{ testno } <= ", :bold => true, :color => :white, :method => :print)
+ say("FAILURE", :color => :red, :bold => true)
+ end
+ say(line, :color => :cyan, :bold => true)
+
+ exit(status) unless status.zero?
+ end
+end
+
+
+task :gemspec do
+ ignore_extensions = ['git', 'svn', 'tmp', /sw./, 'bak', 'gem']
+ ignore_directories = ['pkg']
+ ignore_files = ['test/log']
+
+ shiteless =
+ lambda do |list|
+ list.delete_if do |entry|
+ next unless test(?e, entry)
+ extension = File.basename(entry).split(%r/[.]/).last
+ ignore_extensions.any?{|ext| ext === extension}
+ end
+ list.delete_if do |entry|
+ next unless test(?d, entry)
+ dirname = File.expand_path(entry)
+ ignore_directories.any?{|dir| File.expand_path(dir) == dirname}
+ end
+ list.delete_if do |entry|
+ next unless test(?f, entry)
+ filename = File.expand_path(entry)
+ ignore_files.any?{|file| File.expand_path(file) == filename}
+ end
+ end
+
+ lib = This.lib
+ object = This.object
+ version = This.version
+ files = shiteless[Dir::glob("**/**")]
+ executables = shiteless[Dir::glob("bin/*")].map{|exe| File.basename(exe)}
+ #has_rdoc = true #File.exist?('doc')
+ test_files = "test/#{ lib }.rb" if File.file?("test/#{ lib }.rb")
+ summary = object.respond_to?(:summary) ? object.summary : "summary: #{ lib } kicks the ass"
+ description = object.respond_to?(:description) ? object.description : "description: #{ lib } kicks the ass"
+
+ if This.extensions.nil?
+ This.extensions = []
+ extensions = This.extensions
+ %w( Makefile configure extconf.rb ).each do |ext|
+ extensions << ext if File.exists?(ext)
+ end
+ end
+ extensions = [extensions].flatten.compact
+
+ template =
+ if test(?e, 'gemspec.erb')
+ Template{ IO.read('gemspec.erb') }
+ else
+ Template {
+ <<-__
+ ## #{ lib }.gemspec
+ #
+
+ Gem::Specification::new do |spec|
+ spec.name = #{ lib.inspect }
+ spec.version = #{ version.inspect }
+ spec.platform = Gem::Platform::RUBY
+ spec.summary = #{ lib.inspect }
+ spec.description = #{ description.inspect }
+
+ spec.files =\n#{ files.sort.pretty_inspect }
+ spec.executables = #{ executables.inspect }
+
+ spec.require_path = "lib"
+
+ spec.test_files = #{ test_files.inspect }
+
+ ### spec.add_dependency 'lib', '>= version'
+ #### spec.add_dependency 'map'
+
+ spec.extensions.push(*#{ extensions.inspect })
+
+ spec.rubyforge_project = #{ This.rubyforge_project.inspect }
+ spec.author = #{ This.author.inspect }
+ spec.email = #{ This.email.inspect }
+ spec.homepage = #{ This.homepage.inspect }
+ end
+ __
+ }
+ end
+
+ Fu.mkdir_p(This.pkgdir)
+ gemspec = "#{ lib }.gemspec"
+ open(gemspec, "w"){|fd| fd.puts(template)}
+ This.gemspec = gemspec
+end
+
+task :gem => [:clean, :gemspec] do
+ Fu.mkdir_p(This.pkgdir)
+ before = Dir['*.gem']
+ cmd = "gem build #{ This.gemspec }"
+ `#{ cmd }`
+ after = Dir['*.gem']
+ gem = ((after - before).first || after.first) or abort('no gem!')
+ Fu.mv(gem, This.pkgdir)
+ This.gem = File.join(This.pkgdir, File.basename(gem))
+end
+
+task :readme do
+ samples = ''
+ prompt = '~ > '
+ lib = This.lib
+ version = This.version
+
+ Dir['sample*/*'].sort.each do |sample|
+ samples << "\n" << " <========< #{ sample } >========>" << "\n\n"
+
+ cmd = "cat #{ sample }"
+ samples << Util.indent(prompt + cmd, 2) << "\n\n"
+ samples << Util.indent(`#{ cmd }`, 4) << "\n"
+
+ cmd = "ruby #{ sample }"
+ samples << Util.indent(prompt + cmd, 2) << "\n\n"
+
+ cmd = "ruby -e'STDOUT.sync=true; exec %(ruby -I ./lib #{ sample })'"
+ samples << Util.indent(`#{ cmd } 2>&1`, 4) << "\n"
+ end
+
+ template =
+ if test(?e, 'readme.erb')
+ Template{ IO.read('readme.erb') }
+ else
+ Template {
+ <<-__
+ NAME
+ #{ lib }
+
+ DESCRIPTION
+
+ INSTALL
+ gem install #{ lib }
+
+ SAMPLES
+ #{ samples }
+ __
+ }
+ end
+
+ open("README", "w"){|fd| fd.puts template}
+end
+
+
+task :clean do
+ Dir[File.join(This.pkgdir, '**/**')].each{|entry| Fu.rm_rf(entry)}
+end
+
+
+task :release => [:clean, :gemspec, :gem] do
+ gems = Dir[File.join(This.pkgdir, '*.gem')].flatten
+ raise "which one? : #{ gems.inspect }" if gems.size > 1
+ raise "no gems?" if gems.size < 1
+
+ cmd = "gem push #{ This.gem }"
+ puts cmd
+ puts
+ system(cmd)
+ abort("cmd(#{ cmd }) failed with (#{ $?.inspect })") unless $?.exitstatus.zero?
+
+ cmd = "rubyforge login && rubyforge add_release #{ This.rubyforge_project } #{ This.lib } #{ This.version } #{ This.gem }"
+ puts cmd
+ puts
+ system(cmd)
+ abort("cmd(#{ cmd }) failed with (#{ $?.inspect })") unless $?.exitstatus.zero?
+end
+
+
+
+
+
+BEGIN {
+# support for this rakefile
+#
+ $VERBOSE = nil
+
+ require 'ostruct'
+ require 'erb'
+ require 'fileutils'
+ require 'rbconfig'
+ require 'pp'
+
+# fu shortcut
+#
+ Fu = FileUtils
+
+# cache a bunch of stuff about this rakefile/environment
+#
+ This = OpenStruct.new
+
+ This.file = File.expand_path(__FILE__)
+ This.dir = File.dirname(This.file)
+ This.pkgdir = File.join(This.dir, 'pkg')
+
+# grok lib
+#
+ lib = ENV['LIB']
+ unless lib
+ lib = File.basename(Dir.pwd).sub(/[-].*$/, '')
+ end
+ This.lib = lib
+
+# grok version
+#
+ version = ENV['VERSION']
+ unless version
+ require "./lib/#{ This.lib }"
+ This.name = lib.capitalize
+ This.object = eval(This.name)
+ version = This.object.send(:version)
+ end
+ This.version = version
+
+# we need to know the name of the lib an it's version
+#
+ abort('no lib') unless This.lib
+ abort('no version') unless This.version
+
+# discover full path to this ruby executable
+#
+ c = Config::CONFIG
+ bindir = c["bindir"] || c['BINDIR']
+ ruby_install_name = c['ruby_install_name'] || c['RUBY_INSTALL_NAME'] || 'ruby'
+ ruby_ext = c['EXEEXT'] || ''
+ ruby = File.join(bindir, (ruby_install_name + ruby_ext))
+ This.ruby = ruby
+
+# some utils
+#
+ module Util
+ def indent(s, n = 2)
+ s = unindent(s)
+ ws = ' ' * n
+ s.gsub(%r/^/, ws)
+ end
+
+ def unindent(s)
+ indent = nil
+ s.each_line do |line|
+ next if line =~ %r/^\s*$/
+ indent = line[%r/^\s*/] and break
+ end
+ indent ? s.gsub(%r/^#{ indent }/, "") : s
+ end
+ extend self
+ end
+
+# template support
+#
+ class Template
+ def initialize(&block)
+ @block = block
+ @template = block.call.to_s
+ end
+ def expand(b=nil)
+ ERB.new(Util.unindent(@template)).result((b||@block).binding)
+ end
+ alias_method 'to_s', 'expand'
+ end
+ def Template(*args, &block) Template.new(*args, &block) end
+
+# colored console output support
+#
+ This.ansi = {
+ :clear => "\e[0m",
+ :reset => "\e[0m",
+ :erase_line => "\e[K",
+ :erase_char => "\e[P",
+ :bold => "\e[1m",
+ :dark => "\e[2m",
+ :underline => "\e[4m",
+ :underscore => "\e[4m",
+ :blink => "\e[5m",
+ :reverse => "\e[7m",
+ :concealed => "\e[8m",
+ :black => "\e[30m",
+ :red => "\e[31m",
+ :green => "\e[32m",
+ :yellow => "\e[33m",
+ :blue => "\e[34m",
+ :magenta => "\e[35m",
+ :cyan => "\e[36m",
+ :white => "\e[37m",
+ :on_black => "\e[40m",
+ :on_red => "\e[41m",
+ :on_green => "\e[42m",
+ :on_yellow => "\e[43m",
+ :on_blue => "\e[44m",
+ :on_magenta => "\e[45m",
+ :on_cyan => "\e[46m",
+ :on_white => "\e[47m"
+ }
+ def say(phrase, *args)
+ options = args.last.is_a?(Hash) ? args.pop : {}
+ options[:color] = args.shift.to_s.to_sym unless args.empty?
+ keys = options.keys
+ keys.each{|key| options[key.to_s.to_sym] = options.delete(key)}
+
+ color = options[:color]
+ bold = options.has_key?(:bold)
+
+ parts = [phrase]
+ parts.unshift(This.ansi[color]) if color
+ parts.unshift(This.ansi[:bold]) if bold
+ parts.push(This.ansi[:clear]) if parts.size > 1
+
+ method = options[:method] || :puts
+
+ Kernel.send(method, parts.join)
+ end
+
+# always run out of the project dir
+#
+ Dir.chdir(This.dir)
+}
diff --git a/checksums.yaml.gz b/checksums.yaml.gz
deleted file mode 100644
index 701551f..0000000
Binary files a/checksums.yaml.gz and /dev/null differ
diff --git a/debian/changelog b/debian/changelog
index bd7d070..701c50a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+ruby-open4 (1.3.4+git20140313.1.2bc3782-1) UNRELEASED; urgency=low
+
+ * New upstream snapshot.
+
+ -- Debian Janitor <janitor@jelmer.uk> Fri, 21 Oct 2022 09:43:46 -0000
+
ruby-open4 (1.3.4-2) unstable; urgency=medium
* Team upload.
diff --git a/debian/patches/0001-Use-relative-require-in-tests.patch b/debian/patches/0001-Use-relative-require-in-tests.patch
index c0d2dbd..02e1fca 100644
--- a/debian/patches/0001-Use-relative-require-in-tests.patch
+++ b/debian/patches/0001-Use-relative-require-in-tests.patch
@@ -8,30 +8,30 @@ Subject: Use relative require in tests
test/popen4ext_test.rb | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
-diff --git a/test/pfork4_test.rb b/test/pfork4_test.rb
-index 6574b89..42a3f02 100644
---- a/test/pfork4_test.rb
-+++ b/test/pfork4_test.rb
+Index: ruby-open4.git/test/pfork4_test.rb
+===================================================================
+--- ruby-open4.git.orig/test/pfork4_test.rb
++++ ruby-open4.git/test/pfork4_test.rb
@@ -1,4 +1,4 @@
-require 'test_case'
+require_relative './lib/test_case'
module Open4
-diff --git a/test/popen4_test.rb b/test/popen4_test.rb
-index 550fe53..601c067 100644
---- a/test/popen4_test.rb
-+++ b/test/popen4_test.rb
+Index: ruby-open4.git/test/popen4_test.rb
+===================================================================
+--- ruby-open4.git.orig/test/popen4_test.rb
++++ ruby-open4.git/test/popen4_test.rb
@@ -1,4 +1,4 @@
-require 'test_case'
+require_relative './lib/test_case'
module Open4
-diff --git a/test/popen4ext_test.rb b/test/popen4ext_test.rb
-index 5d5d0d5..c22bc37 100644
---- a/test/popen4ext_test.rb
-+++ b/test/popen4ext_test.rb
+Index: ruby-open4.git/test/popen4ext_test.rb
+===================================================================
+--- ruby-open4.git.orig/test/popen4ext_test.rb
++++ ruby-open4.git/test/popen4ext_test.rb
@@ -1,4 +1,4 @@
-require 'test_case'
+require_relative './lib/test_case'
diff --git a/debian/patches/0002-Skip-failing-tests.patch b/debian/patches/0002-Skip-failing-tests.patch
index 1864730..d582733 100644
--- a/debian/patches/0002-Skip-failing-tests.patch
+++ b/debian/patches/0002-Skip-failing-tests.patch
@@ -8,10 +8,10 @@ They need further investigation
test/popen4ext_test.rb | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
-diff --git a/test/popen4_test.rb b/test/popen4_test.rb
-index 601c067..bbc3618 100644
---- a/test/popen4_test.rb
-+++ b/test/popen4_test.rb
+Index: ruby-open4.git/test/popen4_test.rb
+===================================================================
+--- ruby-open4.git.orig/test/popen4_test.rb
++++ ruby-open4.git/test/popen4_test.rb
@@ -27,7 +27,8 @@ class POpen4Test < TestCase
assert_equal 0, wait_status(cid)
end
@@ -22,10 +22,10 @@ index 601c067..bbc3618 100644
cmd = %{ruby -e "STDOUT.print Process.pid"}
cid_in_block = nil
cid_in_fun = nil
-diff --git a/test/popen4ext_test.rb b/test/popen4ext_test.rb
-index c22bc37..e3f8064 100644
---- a/test/popen4ext_test.rb
-+++ b/test/popen4ext_test.rb
+Index: ruby-open4.git/test/popen4ext_test.rb
+===================================================================
+--- ruby-open4.git.orig/test/popen4ext_test.rb
++++ ruby-open4.git/test/popen4ext_test.rb
@@ -28,7 +28,8 @@ class POpen4Test < TestCase
assert_equal 0, wait_status(cid)
end
diff --git a/metadata.yml b/metadata.yml
deleted file mode 100644
index 66d0a44..0000000
--- a/metadata.yml
+++ /dev/null
@@ -1,64 +0,0 @@
---- !ruby/object:Gem::Specification
-name: open4
-version: !ruby/object:Gem::Version
- version: 1.3.4
-platform: ruby
-authors:
-- Ara T. Howard
-autorequire:
-bindir: bin
-cert_chain: []
-date: 2014-05-15 00:00:00.000000000 Z
-dependencies: []
-description: ! 'open child process with handles on pid, stdin, stdout, and stderr:
- manage child processes and their io handles easily.'
-email: ara.t.howard@gmail.com
-executables: []
-extensions: []
-extra_rdoc_files: []
-files:
-- LICENSE
-- README
-- README.erb
-- lib/open4.rb
-- open4.gemspec
-- rakefile
-- samples/bg.rb
-- samples/block.rb
-- samples/exception.rb
-- samples/jesse-caldwell.rb
-- samples/pfork4.rb
-- samples/simple.rb
-- samples/spawn.rb
-- samples/stdin_timeout.rb
-- samples/timeout.rb
-- test/lib/test_case.rb
-- test/pfork4_test.rb
-- test/popen4_test.rb
-- test/popen4ext_test.rb
-- white_box/leak.rb
-homepage: https://github.com/ahoward/open4
-licenses:
-- Ruby
-metadata: {}
-post_install_message:
-rdoc_options: []
-require_paths:
-- lib
-required_ruby_version: !ruby/object:Gem::Requirement
- requirements:
- - - ! '>='
- - !ruby/object:Gem::Version
- version: '0'
-required_rubygems_version: !ruby/object:Gem::Requirement
- requirements:
- - - ! '>='
- - !ruby/object:Gem::Version
- version: '0'
-requirements: []
-rubyforge_project: codeforpeople
-rubygems_version: 2.0.3
-signing_key:
-specification_version: 4
-summary: open4
-test_files: []
diff --git a/open4.gemspec b/open4.gemspec
index b208175..b71edf0 100644
--- a/open4.gemspec
+++ b/open4.gemspec
@@ -13,10 +13,10 @@ Gem::Specification::new do |spec|
["LICENSE",
"README",
"README.erb",
+ "Rakefile",
"lib",
"lib/open4.rb",
"open4.gemspec",
- "rakefile",
"samples",
"samples/bg.rb",
"samples/block.rb",
diff --git a/pkg/open4-1.3.4.gem b/pkg/open4-1.3.4.gem
new file mode 100644
index 0000000..bdb7aee
Binary files /dev/null and b/pkg/open4-1.3.4.gem differ