summaryrefslogtreecommitdiff
blob: 20ff7958c0b423e9ad0d4294c9bb12ebde8d2e81 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

USE_RUBY="ruby31 ruby32"

RUBY_FAKEGEM_RECIPE_DOC=""
RUBY_FAKEGEM_EXTRADOC="CHANGELOG.md README.md"

RUBY_FAKEGEM_GEMSPEC="${PN}.gemspec"

inherit ruby-fakegem

DESCRIPTION="A clean, simple, and unobtrusive ruby authentication solution."
HOMEPAGE="https://github.com/binarylogic/authlogic"
SRC_URI="https://github.com/binarylogic/authlogic/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="Ruby"

KEYWORDS="~amd64"
SLOT="$(ver_cut 1)"
IUSE=""

ruby_add_rdepend "
	>=dev-ruby/activerecord-5.2:*   <dev-ruby/activerecord-7.1:*
	>=dev-ruby/activesupport-5.2:*  <dev-ruby/activesupport-7.1:*
	>=dev-ruby/request_store-1.0.5:*
"

ruby_add_bdepend "test? ( dev-ruby/scrypt:0 dev-ruby/sqlite3 dev-ruby/timecop )"

all_ruby_prepare() {
	sed -i -e '/\(bundler\|coverall\|rubocop\)/I s:^:#:' Rakefile || die
	sed -e '/byebug/ s:^:#: ; /reporters/I s:^:#:' \
		-e '/coveralls/,/SimpleCov.start/ s:^:#:' \
		-e '2igem "activerecord", "< 7.1"; gem "railties", "< 7.1"' \
		-i test/test_helper.rb || die

	# https://github.com/binarylogic/authlogic/issues/766
	sed -e 's/MiniTest/Minitest/g' \
		-i lib/authlogic/test_case.rb || die
}