summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans de Graaff <hans@degraaff.org>2023-02-11 09:33:53 +0100
committerHans de Graaff <hans@degraaff.org>2023-02-11 09:34:10 +0100
commitbac283a117c462728e7c942fc39ce694955bf840 (patch)
treed30448acd26d8e191165e82ffe6e8cc9890096d9 /app-forensics
parentapp-forensics/brakeman: drop 5.1.2, 5.2.3 (diff)
downloadgraaff-bac283a117c462728e7c942fc39ce694955bf840.tar.gz
graaff-bac283a117c462728e7c942fc39ce694955bf840.tar.bz2
graaff-bac283a117c462728e7c942fc39ce694955bf840.zip
app-forensics/brakeman: add ruby30 without safe_yaml
This works for me since I don't need a custom configuration. Signed-off-by: Hans de Graaff <hans@degraaff.org>
Diffstat (limited to 'app-forensics')
-rw-r--r--app-forensics/brakeman/brakeman-5.4.0-r1.ebuild62
1 files changed, 62 insertions, 0 deletions
diff --git a/app-forensics/brakeman/brakeman-5.4.0-r1.ebuild b/app-forensics/brakeman/brakeman-5.4.0-r1.ebuild
new file mode 100644
index 00000000..aa14987b
--- /dev/null
+++ b/app-forensics/brakeman/brakeman-5.4.0-r1.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+USE_RUBY="ruby27 ruby30"
+
+RUBY_FAKEGEM_DOCDIR="docs"
+RUBY_FAKEGEM_EXTRADOC="CHANGES.md FEATURES OPTIONS.md README.md"
+
+RUBY_FAKEGEM_GEMSPEC="brakeman.gemspec"
+
+inherit ruby-fakegem
+
+DESCRIPTION="Static analysis tool which checks RoR applications for security vulnerabilities"
+HOMEPAGE="https://brakemanscanner.org/"
+SRC_URI="https://github.com/presidentbeef/brakeman/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BPUL"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+ruby_add_rdepend "
+ >=dev-ruby/erubis-2.6
+ >=dev-ruby/haml-5.1:5
+ dev-ruby/highline:2
+ >=dev-ruby/parallel-1.20:1
+ dev-ruby/rexml:3
+ >=dev-ruby/ruby2ruby-2.4.0 =dev-ruby/ruby2ruby-2.4*
+ >=dev-ruby/ruby_parser-3.19.0 =dev-ruby/ruby_parser-3*
+ >=dev-ruby/sexp_processor-4.7:4
+ >=dev-ruby/slim-1.3.6:*
+ >=dev-ruby/terminal-table-1.4.5 =dev-ruby/terminal-table-1*"
+
+ruby_add_bdepend "test? ( dev-ruby/bundler )"
+
+all_ruby_prepare() {
+ # Avoid seemingly harmless test failure
+ sed -i -e '/test_number_of_warnings/askip "gentoo"' test/test.rb || die
+
+ sed -e '/ruby_parser-legacy/ s:^:#:' \
+ -e '/minitest-ci/ s:^:#:' \
+ -e '/simplecov/ s:^:#:' \
+ -i gem_common.rb || die
+
+ sed -i -e '/rake/ s/,.*$// ; /codeclimate/ s:^:#: ; /json/ s:^:#:' Gemfile || die
+
+ # Avoid support for obsolete ruby versions
+ sed -i -e '/ruby_parser\/legacy/ s:^:#:' lib/brakeman/scanner.rb || die
+ rm -f test/tests/{markdown_output,rails2}.rb || die
+}
+
+each_ruby_test() {
+ case ${RUBY} in
+ *ruby27)
+ each_fakegem_test
+ ;;
+ *ruby30)
+ ewarn "Skipping tests due to missing safe_yaml dependency."
+ ;;
+ esac
+}