[packages/rubocop] new, version 0.18.1
glen
glen at pld-linux.org
Mon Feb 17 08:56:57 CET 2014
commit f9adf763d9654f4ac086b973c791df6459dbc9aa
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Mon Feb 17 09:56:27 2014 +0200
new, version 0.18.1
rpmpath.patch | 11 ++++++++++
rubocop.spec | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 75 insertions(+)
---
diff --git a/rubocop.spec b/rubocop.spec
new file mode 100644
index 0000000..7c906f1
--- /dev/null
+++ b/rubocop.spec
@@ -0,0 +1,64 @@
+#
+# Conditional build:
+%bcond_with tests # build without tests
+
+Summary: A robust Ruby code analyzer, based on the community Ruby style guide
+Name: rubocop
+Version: 0.18.1
+Release: 1
+License: MIT
+Group: Development/Languages
+Source0: http://rubygems.org/downloads/%{name}-%{version}.gem
+# Source0-md5: a265af5e5e3272e03c854b3c1635770c
+Patch0: rpmpath.patch
+URL: http://github.com/bbatsov/rubocop
+BuildRequires: rpm-rubyprov
+BuildRequires: rpmbuild(macros) >= 1.656
+BuildRequires: sed >= 4.0
+%if %{with tests}
+BuildRequires: ruby-bundler < 2
+BuildRequires: ruby-bundler >= 1.3
+BuildRequires: ruby-rake < 11
+BuildRequires: ruby-rake >= 10.1
+BuildRequires: ruby-rspec < 3
+BuildRequires: ruby-rspec >= 2.14
+BuildRequires: ruby-simplecov < 1
+BuildRequires: ruby-simplecov >= 0.7
+BuildRequires: ruby-yard < 1
+BuildRequires: ruby-yard >= 0.8
+%endif
+Requires: ruby-json < 2
+Requires: ruby-json >= 1.7.7
+Requires: ruby-parser < 2.2
+Requires: ruby-parser >= 2.1.3
+Requires: ruby-powerpack < 0.1
+Requires: ruby-powerpack >= 0.0.6
+Requires: ruby-rainbow < 3.0
+Requires: ruby-rainbow >= 1.99.1
+BuildArch: noarch
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+Automatic Ruby code style checking tool. Aims to enforce the
+community-driven Ruby Style Guide.
+
+%prep
+%setup -q
+%{__sed} -i -e '1 s,#!.*ruby,#!%{__ruby},' bin/*
+%patch0 -p1
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT{%{ruby_vendorlibdir},%{_bindir}}
+cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir}
+cp -a bin/* $RPM_BUILD_ROOT%{_bindir}
+cp -a config $RPM_BUILD_ROOT%{ruby_vendorlibdir}/%{name}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/rubocop
+%{ruby_vendorlibdir}/%{name}.rb
+%{ruby_vendorlibdir}/%{name}
diff --git a/rpmpath.patch b/rpmpath.patch
new file mode 100644
index 0000000..1781fd1
--- /dev/null
+++ b/rpmpath.patch
@@ -0,0 +1,11 @@
+--- rubocop-0.18.1/lib/rubocop/config_loader.rb~ 2014-02-17 09:12:45.000000000 +0200
++++ rubocop-0.18.1/lib/rubocop/config_loader.rb 2014-02-17 09:51:48.673259129 +0200
+@@ -11,7 +11,7 @@
+ # directories are inspected.
+ class ConfigLoader
+ DOTFILE = '.rubocop.yml'
+- RUBOCOP_HOME = File.realpath(File.join(File.dirname(__FILE__), '..', '..'))
++ RUBOCOP_HOME = File.realpath(File.dirname(__FILE__))
+ DEFAULT_FILE = File.join(RUBOCOP_HOME, 'config', 'default.yml')
+ AUTO_GENERATED_FILE = 'rubocop-todo.yml'
+
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/rubocop.git/commitdiff/f9adf763d9654f4ac086b973c791df6459dbc9aa
More information about the pld-cvs-commit
mailing list