]>
Commit | Line | Data |
---|---|---|
f9adf763 ER |
1 | # |
2 | # Conditional build: | |
3 | %bcond_with tests # build without tests | |
4 | ||
5 | Summary: A robust Ruby code analyzer, based on the community Ruby style guide | |
6 | Name: rubocop | |
f441e627 JR |
7 | # NOTE: check chefstyle -> ohai reqs before updating |
8 | Version: 0.55.0 | |
c4d76604 | 9 | Release: 4 |
f9adf763 ER |
10 | License: MIT |
11 | Group: Development/Languages | |
12 | Source0: http://rubygems.org/downloads/%{name}-%{version}.gem | |
f441e627 | 13 | # Source0-md5: d6c0d5172db7d5c98ff5959b38e4e55a |
f9adf763 ER |
14 | Patch0: rpmpath.patch |
15 | URL: http://github.com/bbatsov/rubocop | |
16 | BuildRequires: rpm-rubyprov | |
17 | BuildRequires: rpmbuild(macros) >= 1.656 | |
18 | BuildRequires: sed >= 4.0 | |
19 | %if %{with tests} | |
20 | BuildRequires: ruby-bundler < 2 | |
21 | BuildRequires: ruby-bundler >= 1.3 | |
22 | BuildRequires: ruby-rake < 11 | |
23 | BuildRequires: ruby-rake >= 10.1 | |
24 | BuildRequires: ruby-rspec < 3 | |
25 | BuildRequires: ruby-rspec >= 2.14 | |
26 | BuildRequires: ruby-simplecov < 1 | |
27 | BuildRequires: ruby-simplecov >= 0.7 | |
28 | BuildRequires: ruby-yard < 1 | |
29 | BuildRequires: ruby-yard >= 0.8 | |
30 | %endif | |
f441e627 JR |
31 | Requires: ruby-parallel < 2.0 |
32 | Requires: ruby-parallel >= 1.10 | |
33 | Requires: ruby-parser >= 2.5 | |
34 | Requires: ruby-powerpack < 1 | |
35 | Requires: ruby-powerpack >= 0.1 | |
36 | Requires: ruby-progressbar < 2 | |
37 | Requires: ruby-progressbar >= 1.7 | |
f441e627 JR |
38 | Requires: ruby-rainbow >= 2.2.2 |
39 | Requires: ruby-unicode-display_width < 2 | |
40 | Requires: ruby-unicode-display_width >= 1.0.1 | |
f9adf763 ER |
41 | BuildArch: noarch |
42 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
43 | ||
44 | %description | |
45 | Automatic Ruby code style checking tool. Aims to enforce the | |
46 | community-driven Ruby Style Guide. | |
47 | ||
48 | %prep | |
49 | %setup -q | |
50 | %{__sed} -i -e '1 s,#!.*ruby,#!%{__ruby},' bin/* | |
51 | %patch0 -p1 | |
52 | ||
53 | %install | |
54 | rm -rf $RPM_BUILD_ROOT | |
55 | install -d $RPM_BUILD_ROOT{%{ruby_vendorlibdir},%{_bindir}} | |
56 | cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir} | |
57 | cp -a bin/* $RPM_BUILD_ROOT%{_bindir} | |
58 | cp -a config $RPM_BUILD_ROOT%{ruby_vendorlibdir}/%{name} | |
59 | ||
60 | %clean | |
61 | rm -rf $RPM_BUILD_ROOT | |
62 | ||
63 | %files | |
64 | %defattr(644,root,root,755) | |
65 | %attr(755,root,root) %{_bindir}/rubocop | |
66 | %{ruby_vendorlibdir}/%{name}.rb | |
67 | %{ruby_vendorlibdir}/%{name} |