aboutsummaryrefslogtreecommitdiffstats
path: root/community/ruby-rspec-mocks
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2017-12-25 23:50:25 +0100
committerJakub Jirutka <jakub@jirutka.cz>2017-12-25 23:50:25 +0100
commit3297d634f4371b930eba14293bc829b9c4a5150e (patch)
tree2198f7bd88fa2d064f4a92746f7f46fdd065fb03 /community/ruby-rspec-mocks
parent94f91d25906569a622b1bdbd61766449230daa27 (diff)
downloadaports-3297d634f4371b930eba14293bc829b9c4a5150e.tar.bz2
aports-3297d634f4371b930eba14293bc829b9c4a5150e.tar.xz
community/ruby-rspec*: move from testing
Diffstat (limited to 'community/ruby-rspec-mocks')
-rw-r--r--community/ruby-rspec-mocks/APKBUILD40
-rw-r--r--community/ruby-rspec-mocks/gemspec.patch12
2 files changed, 52 insertions, 0 deletions
diff --git a/community/ruby-rspec-mocks/APKBUILD b/community/ruby-rspec-mocks/APKBUILD
new file mode 100644
index 0000000000..a96924f9af
--- /dev/null
+++ b/community/ruby-rspec-mocks/APKBUILD
@@ -0,0 +1,40 @@
+# Contributor: Jakub Jirutka <jakub@jirutka.cz>
+# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
+pkgname=ruby-rspec-mocks
+_gemname=${pkgname#ruby-}
+pkgver=3.7.0
+pkgrel=0
+pkgdesc="RSpec's 'test double' framework, with support for stubbing and mocking"
+url="https://relishapp.com/rspec/rspec-mocks/"
+arch="noarch"
+license="MIT"
+depends="ruby ruby-diff-lcs ruby-rspec-support>=${pkgver%.*}.0"
+options="!check" # rspec's tests are written in rspec
+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 -rubygems -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="8673726571ccf8a901281e44faeb25ffcb59579dc380138f0557cd9310192cd340081e5e8ad65ae281777727b502cca2f6877134b0fb48f2e0ea40b133002aff ruby-rspec-mocks-3.7.0.tar.gz
+6fd7ab08b20a93f806a8d3c42da5da0a99162793079ecb1695341a04dff2a7cefdb12592d1798fb844dfbdf8ead6ad0b8729e461d3cd5af46d853b182d15228d gemspec.patch"
diff --git a/community/ruby-rspec-mocks/gemspec.patch b/community/ruby-rspec-mocks/gemspec.patch
new file mode 100644
index 0000000000..5d4f6e7753
--- /dev/null
+++ b/community/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"