]> git.pld-linux.org Git - SPECS.git/blob - ruby-minitest.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / ruby-minitest.spec
1 #
2 # Conditional build:
3 %bcond_with     tests           # build without tests
4
5 %define pkgname minitest
6 Summary:        Small and fast replacement for ruby's huge and slow test/unit
7 Name:           ruby-%{pkgname}
8 Version:        4.7.5
9 Release:        1
10 License:        MIT/Ruby License
11 Group:          Development/Languages
12 Source0:        http://gems.rubyforge.org/gems/%{pkgname}-%{version}.gem
13 # Source0-md5:  be309582bddb3eb5be9d4fe34bb63a0f
14 URL:            http://rubyforge.org/projects/bfts
15 BuildRequires:  rpm-rubyprov
16 BuildRequires:  rpmbuild(macros) >= 1.656
17 BuildArch:      noarch
18 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
19
20 %description
21 minitest/unit is a small and fast replacement for ruby's huge and slow
22 test/unit. This is meant to be clean and easy to use both as a regular
23 test writer and for language implementors that need a minimal set of
24 methods to bootstrap a working unit test suite. mini/spec is a
25 functionally complete spec engine. mini/mock, by Steven Baker, is a
26 beautifully tiny mock object framework. (This package was called
27 miniunit once upon a time)
28
29 %package rdoc
30 Summary:        Documentation files for %{pkgname}
31 Group:          Documentation
32 Requires:       ruby >= 1:1.8.7-4
33
34 %description rdoc
35 Documentation files for %{pkgname}.
36
37 %prep
38 %setup -q -n %{pkgname}-%{version}
39
40 find lib -type f | xargs sed -i -e '/^#!\/usr\/bin\/ruby.*/d'
41
42 %build
43 # write .gemspec
44 %__gem_helper spec
45
46 %if %{with tests}
47 # spec test suite is unstable.
48 # https://github.com/seattlerb/minitest/issues/257
49 mv test/minitest/test_minitest_spec.rb{,.ignore}
50
51 for f in test/minitest/test_*.rb; do
52         ruby -Ilib:.:./test $f
53 done
54 %endif
55
56 rdoc --ri --op ri lib
57 rdoc --op rdoc lib
58 rm -rf ri/{PrideIO,ParallelEach,PrideLOL,Kernel,MockExpectationError,Module,Object,Test}
59 rm ri/created.rid
60 rm ri/cache.ri
61
62 %install
63 rm -rf $RPM_BUILD_ROOT
64 install -d $RPM_BUILD_ROOT{%{ruby_vendorlibdir},%{ruby_ridir},%{ruby_rdocdir}}
65 cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir}
66 cp -a ri/* $RPM_BUILD_ROOT%{ruby_ridir}
67 cp -a rdoc $RPM_BUILD_ROOT%{ruby_rdocdir}/%{name}-%{version}
68
69 # install gemspec
70 install -d $RPM_BUILD_ROOT%{ruby_specdir}
71 cp -p %{pkgname}-%{version}.gemspec $RPM_BUILD_ROOT%{ruby_specdir}
72
73 %clean
74 rm -rf $RPM_BUILD_ROOT
75
76 %files
77 %defattr(644,root,root,755)
78 %doc History.txt README.txt
79 %dir %{ruby_vendorlibdir}/hoe
80 %{ruby_vendorlibdir}/hoe/minitest.rb
81 %{ruby_vendorlibdir}/minitest
82 %{ruby_specdir}/%{pkgname}-%{version}.gemspec
83
84 %files rdoc
85 %defattr(644,root,root,755)
86 %{ruby_rdocdir}/%{name}-%{version}
87 %{ruby_ridir}/MiniTest
88 %{ruby_ridir}/Minitest
89 %{ruby_ridir}/Hoe
This page took 5.068571 seconds and 3 git commands to generate.