summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans de Graaff <graaff@gentoo.org>2023-08-26 08:52:30 +0200
committerHans de Graaff <graaff@gentoo.org>2023-08-26 08:53:03 +0200
commite0bf42b92a695d28fdd53ddc1595b50dc27ba414 (patch)
tree29f64e103b55a9628d25b9447baa7e9e66b8a2c2 /dev-ruby/oauth
parentdev-ruby/commonmarker: add 0.23.10 (diff)
downloadgentoo-e0bf42b92a695d28fdd53ddc1595b50dc27ba414.tar.gz
gentoo-e0bf42b92a695d28fdd53ddc1595b50dc27ba414.tar.bz2
gentoo-e0bf42b92a695d28fdd53ddc1595b50dc27ba414.zip
dev-ruby/oauth: fix tests
Add missing test dependency. Fix minitest deprecation. Closes: https://bugs.gentoo.org/911962 Signed-off-by: Hans de Graaff <graaff@gentoo.org>
Diffstat (limited to 'dev-ruby/oauth')
-rw-r--r--dev-ruby/oauth/oauth-0.6.2-r1.ebuild56
1 files changed, 56 insertions, 0 deletions
diff --git a/dev-ruby/oauth/oauth-0.6.2-r1.ebuild b/dev-ruby/oauth/oauth-0.6.2-r1.ebuild
new file mode 100644
index 000000000000..29b7d4397a7d
--- /dev/null
+++ b/dev-ruby/oauth/oauth-0.6.2-r1.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+USE_RUBY="ruby30 ruby31 ruby32"
+
+RUBY_FAKEGEM_BINWRAP="oauth"
+RUBY_FAKEGEM_EXTRADOC="CHANGELOG.md README.md TODO"
+
+RUBY_FAKEGEM_GEMSPEC="oauth.gemspec"
+
+inherit ruby-fakegem
+
+DESCRIPTION="A RubyGem for implementing both OAuth clients and servers"
+HOMEPAGE="https://github.com/oauth-xx/oauth-ruby"
+SRC_URI="https://github.com/oauth-xx/oauth-ruby/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+RUBY_S="${PN}-ruby-${PV}"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+ruby_add_rdepend "
+ dev-ruby/snaky_hash:1
+ >=dev-ruby/version_gem-1.1:1
+"
+
+ruby_add_bdepend "test? (
+ dev-ruby/bundler
+ dev-ruby/test-unit:2
+ dev-ruby/mocha:2
+ dev-ruby/webmock
+ dev-ruby/rack
+ dev-ruby/rest-client
+ dev-ruby/actionpack:6.1
+ dev-ruby/railties:6.1
+)"
+
+all_ruby_prepare() {
+ sed -i -e 's:_relative ": "./:' ${RUBY_FAKEGEM_GEMSPEC} || die
+
+ # Require compatible versions of dependencies
+ sed -i -e '1igem "railties", "~>6.1.0" ; gem "actionpack", "~>6.1.0"; require "action_dispatch"' \
+ -e '/mocha/ s/mini_test/minitest/' \
+ -e 's/if RUN_COVERAGE/if false/' test/test_helper.rb || die
+
+ # Avoid test tripped up by kwargs confusion
+ sed -e '/test_authorize/askip "kwargs confusion"' \
+ -e 's/MiniTest/Minitest/' \
+ -i test/units/cli_test.rb || die
+}
+
+each_ruby_test() {
+ ${RUBY} -Ilib:test:. -e 'Dir["test/**/*test*.rb"].each {|f| require f}' || die
+}