diff options
| -rw-r--r-- | debian/changelog | 10 | ||||
| -rw-r--r-- | debian/control | 4 | ||||
| -rw-r--r-- | debian/gbp.conf | 4 | ||||
| -rw-r--r-- | debian/patches/fix-ruby-3.0-argumenterror.patch | 24 | ||||
| -rw-r--r-- | debian/patches/series | 1 | ||||
| -rw-r--r-- | debian/salsa-ci.yml | 3 | ||||
| -rw-r--r-- | lib/packable.rb | 2 | ||||
| -rw-r--r-- | lib/packable/extensions/array.rb | 3 | ||||
| -rw-r--r-- | lib/packable/extensions/io.rb | 11 | ||||
| -rw-r--r-- | lib/packable/extensions/string.rb | 3 | ||||
| -rw-r--r-- | lib/packable/version.rb | 2 | ||||
| -rw-r--r-- | packable.gemspec | 1 |
12 files changed, 30 insertions, 38 deletions
diff --git a/debian/changelog b/debian/changelog index 6a326d3..c31271b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,13 @@ +ruby-packable (1.3.18-1) unstable; urgency=medium + + * Team upload. + * New upstream release. + * Drop {XS,XB}-Ruby-Versions from control. + * Update Standards-Version to 4.7.2, no changes needed. + * Remove reverse-applicable fix-ruby-3.0-argumenterror.patch. + + -- Simon Quigley <tsimonq2@debian.org> Sun, 16 Nov 2025 10:34:26 -0600 + ruby-packable (1.3.14-2) unstable; urgency=medium * Team upload. diff --git a/debian/control b/debian/control index 0721013..cf9fa6f 100644 --- a/debian/control +++ b/debian/control @@ -9,12 +9,11 @@ Build-Depends: debhelper-compat (= 13), ruby-minitest, ruby-mocha, ruby-shoulda -Standards-Version: 4.6.0 +Standards-Version: 4.7.2 Vcs-Browser: https://salsa.debian.org/ruby-team/ruby-packable Vcs-Git: https://salsa.debian.org/ruby-team/ruby-packable.git Homepage: https://github.com/marcandre/packable Testsuite: autopkgtest-pkg-ruby -XS-Ruby-Versions: all Rules-Requires-Root: no Package: ruby-packable @@ -26,4 +25,3 @@ Description: extensive packing and unpacking capabilities for Ruby The packable Ruby library provides a nicer, smarter and more powerful alternative to Ruby's Array::pack and String::unpack methods to read and write binary data. -XB-Ruby-Versions: ${ruby:Versions} diff --git a/debian/gbp.conf b/debian/gbp.conf new file mode 100644 index 0000000..6b65fe0 --- /dev/null +++ b/debian/gbp.conf @@ -0,0 +1,4 @@ +[DEFAULT] +debian-branch = debian/latest +upstream-branch = upstream/latest +pristine-tar = True diff --git a/debian/patches/fix-ruby-3.0-argumenterror.patch b/debian/patches/fix-ruby-3.0-argumenterror.patch deleted file mode 100644 index 08049dc..0000000 --- a/debian/patches/fix-ruby-3.0-argumenterror.patch +++ /dev/null @@ -1,24 +0,0 @@ -From: Daniel Leidert <dleidert@debian.org> -Date: Thu, 25 Nov 2021 15:36:47 +0100 -Subject: Fix Ruby 3.0 ArgumentError - -Bug: https://github.com/marcandre/packable/issues/15 -Bug-Debian: https://bugs.debian.org/996345 -Forwarded: https://github.com/marcandre/packable/issues/15 ---- - lib/packable/extensions/io.rb | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/lib/packable/extensions/io.rb b/lib/packable/extensions/io.rb -index c8f7e89..75dd99f 100644 ---- a/lib/packable/extensions/io.rb -+++ b/lib/packable/extensions/io.rb -@@ -73,7 +73,7 @@ module Packable - - def each_with_packing(*options, &block) - return each_without_packing(*options, &block) if options.empty? || (Integer === options.first) || (String === options.first) || !seekable? -- return Enumerator.new(self, :each_with_packing, *options) unless block_given? -+ return self.to_enum(__method__, *options) unless block_given? - yield read(*options) until eof? - end - diff --git a/debian/patches/series b/debian/patches/series index 13d812f..c674712 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,4 +1,3 @@ remove_rubygems.patch remove-git-from-gemfile.patch deprecated-fixnum.patch -fix-ruby-3.0-argumenterror.patch diff --git a/debian/salsa-ci.yml b/debian/salsa-ci.yml new file mode 100644 index 0000000..7b5d2f7 --- /dev/null +++ b/debian/salsa-ci.yml @@ -0,0 +1,3 @@ +--- +include: + - https://salsa.debian.org/ruby-team/meta/raw/master/salsa-ci.yml diff --git a/lib/packable.rb b/lib/packable.rb index 46046af..a15e015 100644 --- a/lib/packable.rb +++ b/lib/packable.rb @@ -1,6 +1,4 @@ require "packable/version" -require 'backports/tools/alias_method_chain' -require 'backports/rails/module' require_relative 'packable/packers' require_relative 'packable/mixin' [Object, Array, String, Integer, Float, IO, Proc].each do |klass| diff --git a/lib/packable/extensions/array.rb b/lib/packable/extensions/array.rb index e48e1d1..eb851ca 100644 --- a/lib/packable/extensions/array.rb +++ b/lib/packable/extensions/array.rb @@ -5,7 +5,8 @@ module Packable module Array #:nodoc: def self.included(base) base.class_eval do - alias_method_chain :pack, :long_form + alias_method :pack_without_long_form, :pack + alias_method :pack, :pack_with_long_form include Packable extend ClassMethods end diff --git a/lib/packable/extensions/io.rb b/lib/packable/extensions/io.rb index c8f7e89..52b74da 100644 --- a/lib/packable/extensions/io.rb +++ b/lib/packable/extensions/io.rb @@ -5,9 +5,12 @@ module Packable module Extensions #:nodoc: module IO def self.included(base) #:nodoc: - base.alias_method_chain :read, :packing - base.alias_method_chain :write, :packing - base.alias_method_chain :each, :packing + base.__send__(:alias_method, :read_without_packing, :read) + base.__send__(:alias_method, :read, :read_with_packing) + base.__send__(:alias_method, :write_without_packing, :write) + base.__send__(:alias_method, :write, :write_with_packing) + base.__send__(:alias_method, :each_without_packing, :each) + base.__send__(:alias_method, :each, :each_with_packing) end # Methods supported by seekable streams. @@ -73,7 +76,7 @@ module Packable def each_with_packing(*options, &block) return each_without_packing(*options, &block) if options.empty? || (Integer === options.first) || (String === options.first) || !seekable? - return Enumerator.new(self, :each_with_packing, *options) unless block_given? + return self.to_enum(__method__, *options) unless block_given? yield read(*options) until eof? end diff --git a/lib/packable/extensions/string.rb b/lib/packable/extensions/string.rb index 2d4f4ea..8b89fe6 100644 --- a/lib/packable/extensions/string.rb +++ b/lib/packable/extensions/string.rb @@ -8,7 +8,8 @@ module Packable base.class_eval do include Packable extend ClassMethods - alias_method_chain :unpack, :long_form + alias_method :unpack_without_long_form, :unpack + alias_method :unpack, :unpack_with_long_form packers.set :merge_all, :fill => " " end end diff --git a/lib/packable/version.rb b/lib/packable/version.rb index e6c0f2c..d524005 100644 --- a/lib/packable/version.rb +++ b/lib/packable/version.rb @@ -1,3 +1,3 @@ module Packable - VERSION = "1.3.14" + VERSION = '1.3.18' end diff --git a/packable.gemspec b/packable.gemspec index 9d83da7..cb5c52f 100644 --- a/packable.gemspec +++ b/packable.gemspec @@ -18,7 +18,6 @@ Gem::Specification.new do |gem| gem.test_files = gem.files.grep(%r{^(test|spec|features)/}) gem.require_paths = ["lib"] gem.required_ruby_version = '>= 1.8.7' - gem.add_runtime_dependency 'backports' gem.add_development_dependency 'minitest' gem.add_development_dependency 'shoulda' gem.add_development_dependency 'mocha' |
