summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Theisen <djt@hxx.in>2019-05-02 11:21:30 +0000
committerDan Theisen <djt@hxx.in>2019-05-03 11:26:27 +0000
commite32828cbc51a9a77a432e6cbff86c94e0f907d9c (patch)
tree4d773c3404a00048f3ca96976385ed23d6d7644b
parent4e5e413eb54ecdd4087ae193123660ef73b8d98f (diff)
downloadpackages-e32828cbc51a9a77a432e6cbff86c94e0f907d9c.tar.gz
packages-e32828cbc51a9a77a432e6cbff86c94e0f907d9c.tar.bz2
packages-e32828cbc51a9a77a432e6cbff86c94e0f907d9c.tar.xz
packages-e32828cbc51a9a77a432e6cbff86c94e0f907d9c.zip
user/ruby-rspec-mocks: new package
-rw-r--r--user/ruby-rspec-mocks/APKBUILD40
-rw-r--r--user/ruby-rspec-mocks/gemspec.patch12
2 files changed, 52 insertions, 0 deletions
diff --git a/user/ruby-rspec-mocks/APKBUILD b/user/ruby-rspec-mocks/APKBUILD
new file mode 100644
index 000000000..70a6b801c
--- /dev/null
+++ b/user/ruby-rspec-mocks/APKBUILD
@@ -0,0 +1,40 @@
+# Contributor: Jakub Jirutka <jakub@jirutka.cz>
+# Maintainer: Dan Theisen <djt@hxx.in>
+pkgname=ruby-rspec-mocks
+_gemname=${pkgname#ruby-}
+pkgver=3.8.0
+pkgrel=0
+pkgdesc="RSpec's 'test double' framework, with support for stubbing and mocking"
+url="https://relishapp.com/rspec/rspec-mocks/"
+arch="noarch"
+options="!check" # rspec's tests are written in rspec
+license="MIT"
+depends="ruby ruby-diff-lcs ruby-rspec-support~=${pkgver%.*}"
+source="$pkgname-$pkgver.tar.gz::https://github.com/rspec/$_gemname/archive/v$pkgver.tar.gz
+ gemspec.patch"
+builddir="$srcdir/$_gemname-$pkgver"
+
+build() {
+ cd "$builddir"
+ gem build $_gemname.gemspec
+}
+
+package() {
+ local gemdir="$pkgdir/$(ruby -e 'puts Gem.default_dir')"
+
+ cd "$builddir"
+ gem install --local \
+ --install-dir "$gemdir" \
+ --ignore-dependencies \
+ --no-document \
+ --verbose \
+ $_gemname
+
+ # Clean-up...
+ rm -r "$gemdir"/cache \
+ "$gemdir"/build_info \
+ "$gemdir"/doc
+}
+
+sha512sums="0649c3722479013aa1a20f750b3a83a9b426e5f79cb0edff995b09d1e2fa674fb8e91c0c94e7f9513f338c3c2e9c5b824a9473e91955cf928542324b8b1463ba ruby-rspec-mocks-3.8.0.tar.gz
+6fd7ab08b20a93f806a8d3c42da5da0a99162793079ecb1695341a04dff2a7cefdb12592d1798fb844dfbdf8ead6ad0b8729e461d3cd5af46d853b182d15228d gemspec.patch"
diff --git a/user/ruby-rspec-mocks/gemspec.patch b/user/ruby-rspec-mocks/gemspec.patch
new file mode 100644
index 000000000..5d4f6e775
--- /dev/null
+++ b/user/ruby-rspec-mocks/gemspec.patch
@@ -0,0 +1,12 @@
+--- a/rspec-mocks.gemspec
++++ b/rspec-mocks.gemspec
+@@ -13,8 +13,7 @@
+ s.summary = "rspec-mocks-#{RSpec::Mocks::Version::STRING}"
+ s.description = "RSpec's 'test double' framework, with support for stubbing and mocking"
+
+- s.files = `git ls-files -- lib/*`.split("\n")
+- s.files += %w[README.md LICENSE.md Changelog.md .yardopts .document]
++ s.files = Dir["lib/**/*"]
+ s.test_files = []
+ s.rdoc_options = ["--charset=UTF-8"]
+ s.require_path = "lib"