Blame SPECS/rubygem-web-console.spec

f835a9
%{?scl:%scl_package rubygem-%{gem_name}}
f835a9
%{!?scl:%global pkg_name %{name}}
f835a9
f835a9
# Generated from web-console-2.0.0.gem by gem2rpm -*- rpm-spec -*-
f835a9
%global gem_name web-console
f835a9
f835a9
Name: %{?scl_prefix}rubygem-%{gem_name}
f835a9
Version: 3.4.0
f835a9
Release: 2%{?dist}
f835a9
Summary: A debugging tool for your Ruby on Rails applications
f835a9
Group: Development/Languages
f835a9
License: MIT
f835a9
URL: https://github.com/rails/web-console
f835a9
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
f835a9
# git clone https://github.com/rails/web-console.git && cd web-console
f835a9
# git checkout v3.4.0 && tar czvf web-console-3.4.0-tests.tgz test/
f835a9
Source1: %{gem_name}-%{version}-tests.tgz
f835a9
f835a9
Requires:      %{?scl_prefix_ruby}ruby(release)
f835a9
Requires:      %{?scl_prefix_ruby}ruby(rubygems)
f835a9
Requires:      %{?scl_prefix}rubygem(actionview) >= 5.0
f835a9
Requires:      %{?scl_prefix}rubygem(activemodel) >= 5.0
f835a9
Requires:      %{?scl_prefix}rubygem(debug_inspector)
f835a9
Requires:      %{?scl_prefix}rubygem(railties) >= 5.0
f835a9
BuildRequires: %{?scl_prefix_ruby}ruby(release)
f835a9
BuildRequires: %{?scl_prefix_ruby}ruby(rubygems)
f835a9
BuildRequires: %{?scl_prefix_ruby}ruby
f835a9
BuildRequires: %{?scl_prefix_ruby}rubygems-devel
f835a9
BuildRequires: %{?scl_prefix_ruby}rubygem(bundler)
f835a9
BuildRequires: %{?scl_prefix}rubygem(debug_inspector)
f835a9
BuildRequires: %{?scl_prefix}rubygem(mocha)
f835a9
# The web-console 3.3.1 dropped support for RoR 4.2.
f835a9
BuildRequires: %{?scl_prefix}rubygem(rails) >= 5.0.0
f835a9
BuildArch:     noarch
f835a9
Provides:      %{?scl_prefix}rubygem(%{gem_name}) = %{version}
f835a9
f835a9
# Explicitly require runtime subpackage, as long as older scl-utils do not generate it
f835a9
%{?scl:Requires: %{?scl_prefix}runtime}
f835a9
f835a9
%description
f835a9
A debugging tool for your Ruby on Rails applications.
f835a9
f835a9
%package doc
f835a9
Summary: Documentation for %{pkg_name}
f835a9
Group: Documentation
f835a9
Requires: %{?scl_prefix}%{pkg_name} = %{version}-%{release}
f835a9
BuildArch: noarch
f835a9
f835a9
%description doc
f835a9
Documentation for %{pkg_name}.
f835a9
f835a9
%prep
f835a9
%{?scl:scl enable %{scl} - << \EOF}
f835a9
set -e
f835a9
gem unpack %{SOURCE0}
f835a9
f835a9
%setup -q -D -T -n  %{gem_name}-%{version}
f835a9
f835a9
gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
f835a9
%{?scl:EOF}
f835a9
f835a9
%build
f835a9
# Create the gem as gem install only works on a gem file
f835a9
%{?scl:scl enable %{scl} - << \EOF}
f835a9
set -e
f835a9
gem build %{gem_name}.gemspec
f835a9
%gem_install
f835a9
%{?scl:EOF}
f835a9
f835a9
%install
f835a9
mkdir -p %{buildroot}%{gem_dir}
f835a9
cp -a .%{gem_dir}/* \
f835a9
        %{buildroot}%{gem_dir}/
f835a9
f835a9
%check
f835a9
pushd .%{gem_instdir}
f835a9
tar xzvf %{SOURCE1}
f835a9
f835a9
# We don't care about code coverage.
f835a9
sed -i '/imple.ov/ s/^/#/' test/test_helper.rb
f835a9
f835a9
# Couldn't find a way how to execute the test suite without Bundler,
f835a9
# so give it some reasonable Gemfile.
f835a9
cat << \EOF > Gemfile
f835a9
source 'https://rubygems.org'
f835a9
f835a9
gem 'debug_inspector'
f835a9
gem 'mocha', require: false
f835a9
gem 'rails'
f835a9
EOF
f835a9
f835a9
%{?scl:scl enable %{scl} - << \EOF}
f835a9
ruby -Itest -e 'Dir.glob "./test/**/*_test.rb", &method(:require)'
f835a9
%{?scl:EOF}
f835a9
popd
f835a9
f835a9
%files
f835a9
%dir %{gem_instdir}
f835a9
%{gem_instdir}/MIT-LICENSE
f835a9
%{gem_libdir}
f835a9
%exclude %{gem_cache}
f835a9
%{gem_spec}
f835a9
f835a9
%files doc
f835a9
%doc %{gem_docdir}
f835a9
%doc %{gem_instdir}/CHANGELOG.markdown
f835a9
%doc %{gem_instdir}/README.markdown
f835a9
%{gem_instdir}/Rakefile
f835a9
f835a9
%changelog
f835a9
* Wed Feb 15 2017 Jun Aruga <jaruga@redhat.com> - 3.4.0-2
f835a9
- Add "set -e".
f835a9
f835a9
* Tue Jan 03 2017 Jun Aruga <jaruga@redhat.com> - 3.4.0-1
f835a9
- Update to web-console 3.4.0.
f835a9
f835a9
* Thu Mar 03 2016 Pavel Valena <pvalena@redhat.com> - 2.2.1-3
f835a9
- Add scl macros
f835a9
  - Resolves: rhbz#1317080
f835a9
f835a9
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.1-2
f835a9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
f835a9
f835a9
* Tue Sep 22 2015 Vít Ondruch <vondruch@redhat.com> - 2.2.1-1
f835a9
- Update to web-console 2.2.1.
f835a9
f835a9
* Fri Jun 19 2015 Vít Ondruch <vondruch@redhat.com> - 2.1.3-1
f835a9
- Update to web-console 2.1.3.
f835a9
f835a9
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.0-2
f835a9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
f835a9
f835a9
* Tue Jan 27 2015 Vít Ondruch <vondruch@redhat.com> - 2.0.0-1
f835a9
- Initial package