diff -Nru ruby-gitlab-4.17.0/debian/changelog ruby-gitlab-4.17.0/debian/changelog --- ruby-gitlab-4.17.0/debian/changelog 2021-01-25 11:21:59.000000000 +0000 +++ ruby-gitlab-4.17.0/debian/changelog 2021-11-05 12:55:28.000000000 +0000 @@ -1,3 +1,16 @@ +ruby-gitlab (4.17.0-3) unstable; urgency=medium + + * Team upload. + + [ Debian Janitor ] + * Remove constraints unnecessary since buster + + [ Lucas Kanashiro ] + * Add patch to support ruby3.0 (Closes: #996236) + * Declare compliance with Debian Policy 4.6.0 + + -- Lucas Kanashiro Fri, 05 Nov 2021 09:55:28 -0300 + ruby-gitlab (4.17.0-2) unstable; urgency=medium * Team upload diff -Nru ruby-gitlab-4.17.0/debian/control ruby-gitlab-4.17.0/debian/control --- ruby-gitlab-4.17.0/debian/control 2021-01-25 11:21:59.000000000 +0000 +++ ruby-gitlab-4.17.0/debian/control 2021-11-05 12:55:02.000000000 +0000 @@ -11,9 +11,9 @@ ruby, ruby-httparty (>= 0.18), ruby-rspec, - ruby-terminal-table (>= 1.5.1), + ruby-terminal-table, ruby-webmock -Standards-Version: 4.5.0 +Standards-Version: 4.6.0 Vcs-Git: https://salsa.debian.org/ruby-team/ruby-gitlab.git Vcs-Browser: https://salsa.debian.org/ruby-team/ruby-gitlab Homepage: https://github.com/NARKOZ/gitlab diff -Nru ruby-gitlab-4.17.0/debian/gbp.conf ruby-gitlab-4.17.0/debian/gbp.conf --- ruby-gitlab-4.17.0/debian/gbp.conf 1970-01-01 00:00:00.000000000 +0000 +++ ruby-gitlab-4.17.0/debian/gbp.conf 2021-11-05 12:48:25.000000000 +0000 @@ -0,0 +1,7 @@ +[DEFAULT] +debian-branch = master +upstream-branch = upstream +pristine-tar = True + +[buildpackage] +compression = gz diff -Nru ruby-gitlab-4.17.0/debian/patches/0003-Ruby-3-support-615.patch ruby-gitlab-4.17.0/debian/patches/0003-Ruby-3-support-615.patch --- ruby-gitlab-4.17.0/debian/patches/0003-Ruby-3-support-615.patch 1970-01-01 00:00:00.000000000 +0000 +++ ruby-gitlab-4.17.0/debian/patches/0003-Ruby-3-support-615.patch 2021-11-05 12:52:51.000000000 +0000 @@ -0,0 +1,116 @@ +From: Koen Van der Auwera +Date: Mon, 17 May 2021 17:43:56 +0200 +Subject: Ruby 3 support (#615) + +* Remove warning: instance variable @json_output not initialized + +* Ruby 3 support. + +More specific for method_missing: Keyword arguments are separated from other argument +https://www.ruby-lang.org/en/news/2020/12/25/ruby-3-0-0-released/ + +* Need to remove the original one, duh. + +* Remove trailing whitespace + +* Use normalcase for variable numbers. + +* Prefer single-quoted strings when you don't need string interpolation or special symbols. + +* Do not use parentheses for method calls with no arguments + +* Refactored out use of `eval`. + +* Add empty line after guard clause + +* As suggested, use Gem::Version to compare Ruby version numbers. + +Origin: backport, https://github.com/NARKOZ/gitlab/commit/6fc4203d2e02 +Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=996236 +Reviewed-By: Lucas Kanashiro +--- + lib/gitlab.rb | 17 ++++++++++++----- + lib/gitlab/cli.rb | 2 +- + lib/gitlab/help.rb | 10 +++++----- + spec/gitlab/client/build_variables_spec.rb | 2 +- + 4 files changed, 19 insertions(+), 12 deletions(-) + +diff --git a/lib/gitlab.rb b/lib/gitlab.rb +index 0a875bb..b87ba95 100644 +--- a/lib/gitlab.rb ++++ b/lib/gitlab.rb +@@ -21,11 +21,18 @@ module Gitlab + Gitlab::Client.new(options) + end + +- # Delegate to Gitlab::Client +- def self.method_missing(method, *args, &block) +- return super unless client.respond_to?(method) +- +- client.send(method, *args, &block) ++ if Gem::Version.new(RUBY_VERSION).release >= Gem::Version.new('3.0.0') ++ def self.method_missing(method, *args, **keywargs, &block) ++ return super unless client.respond_to?(method) ++ ++ client.send(method, *args, **keywargs, &block) ++ end ++ else ++ def self.method_missing(method, *args, &block) ++ return super unless client.respond_to?(method) ++ ++ client.send(method, *args, &block) ++ end + end + + # Delegate to Gitlab::Client +diff --git a/lib/gitlab/cli.rb b/lib/gitlab/cli.rb +index 5819bff..fb8be25 100644 +--- a/lib/gitlab/cli.rb ++++ b/lib/gitlab/cli.rb +@@ -79,7 +79,7 @@ class Gitlab::CLI + # Helper method that checks whether we want to get the output as json + # @return [nil] + def self.render_output(cmd, args, data) +- if @json_output ++ if defined?(@json_output) && @json_output + output_json(cmd, args, data) + else + output_table(cmd, args, data) +diff --git a/lib/gitlab/help.rb b/lib/gitlab/help.rb +index f7ed37b..5469655 100644 +--- a/lib/gitlab/help.rb ++++ b/lib/gitlab/help.rb +@@ -81,15 +81,15 @@ module Gitlab::Help + # Massage output from 'ri'. + def change_help_output!(cmd, output_str) + output_str = +output_str +- output_str.gsub!(/#{cmd}\((.*?)\)/m, "#{cmd} \1") +- output_str.gsub!(/,\s*/, ' ') ++ output_str.gsub!(/#{cmd}(\(.*?\))/m, "#{cmd}\\1") ++ output_str.gsub!(/,\s*/, ', ') + + # Ensure @option descriptions are on a single line + output_str.gsub!(/\n\[/, " \[") + output_str.gsub!(/\s(@)/, "\n@") +- output_str.gsub!(/(\])\n(:)/, '\1 \2') +- output_str.gsub!(/(:.*)(\n)(.*\.)/, '\1 \3') +- output_str.gsub!(/\{(.+)\}/, '"{\1}"') ++ output_str.gsub!(/(\])\n(:)/, '\\1 \\2') ++ output_str.gsub!(/(:.*)(\n)(.*\.)/, '\\1 \\3') ++ output_str.gsub!(/\{(.+)\}/, '"{\\1}"') + end + end + end +diff --git a/spec/gitlab/client/build_variables_spec.rb b/spec/gitlab/client/build_variables_spec.rb +index 77672f5..d09f8e0 100644 +--- a/spec/gitlab/client/build_variables_spec.rb ++++ b/spec/gitlab/client/build_variables_spec.rb +@@ -38,7 +38,7 @@ describe Gitlab::Client do + + describe '.create_variable' do + before do +- stub_post('/projects/3/variables', 'variable') ++ stub_post('/projects/3/variables', 'variable', { masked: true }) + @variable = Gitlab.create_variable(3, 'NEW_VARIABLE', 'new value') + end + diff -Nru ruby-gitlab-4.17.0/debian/patches/series ruby-gitlab-4.17.0/debian/patches/series --- ruby-gitlab-4.17.0/debian/patches/series 2021-01-25 11:21:59.000000000 +0000 +++ ruby-gitlab-4.17.0/debian/patches/series 2021-11-05 12:52:51.000000000 +0000 @@ -1,2 +1,3 @@ use-installed-libraries.patch relax-dependency-terminal-table.patch +0003-Ruby-3-support-615.patch diff -Nru ruby-gitlab-4.17.0/debian/salsa-ci.yml ruby-gitlab-4.17.0/debian/salsa-ci.yml --- ruby-gitlab-4.17.0/debian/salsa-ci.yml 1970-01-01 00:00:00.000000000 +0000 +++ ruby-gitlab-4.17.0/debian/salsa-ci.yml 2021-11-05 12:48:25.000000000 +0000 @@ -0,0 +1,4 @@ +--- +include: + - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/salsa-ci.yml + - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/pipeline-jobs.yml