%global gem_name recaptcha Name: rubygem-%{gem_name} Version: 5.7.0 Release: 1%{?dist} Summary: Helpers for the reCAPTCHA API License: MIT URL: http://github.com/ambethia/recaptcha Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem # git clone https://github.com/ambethia/recaptcha.git && cd recaptcha # git archive -v -o recaptcha-5.7.0-tests.tgz v5.7.0 test/ Source1: %{gem_name}-%{version}-tests.tgz BuildRequires: ruby(release) BuildRequires: rubygems-devel BuildRequires: ruby BuildRequires: rubygem(i18n) BuildRequires: rubygem(minitest) BuildRequires: rubygem(mocha) BuildRequires: rubygem(webmock) BuildArch: noarch %description This gem adds helpers for the reCAPTCHA API. In your views you can use the recaptcha_tags method to embed the needed JavaScript, and you can validate in your controllers with verify_recaptcha. Beforehand you need to configure Recaptcha with your custom private and public key. You may find detailed examples below. Exceptions will be raised if you call these methods and the keys can’t be found. %package doc Summary: Documentation for %{name} Requires: %{name} = %{version}-%{release} BuildArch: noarch %description doc Documentation for %{name}. %prep %setup -q -n %{gem_name}-%{version} -b 1 %build # Create the gem as gem install only works on a gem file gem build ../%{gem_name}-%{version}.gemspec # %%gem_install compiles any C extensions and installs the gem into ./%%gem_dir # by default, so that we can move it into the buildroot in %%install %gem_install %install mkdir -p %{buildroot}%{gem_dir} cp -a .%{gem_dir}/* \ %{buildroot}%{gem_dir}/ %check pushd .%{gem_instdir} ln -s %{_builddir}/test . # Get rid of Bundler and Byebug dependencies sed -i '/bundler/ s/^/#/' test/helper.rb sed -i '/byebug/ s/^/#/' test/helper.rb # We don't have Maxitest in Fedora yet. # Actually minitest-around should be enough to get this working (rhbz#1267340). sed -i '/maxitest\/autorun/ s/maxi/mini/' test/helper.rb sed -i '/^ describe "when default hostname validation /,/^ end$/ s/^/#/' test/verify_test.rb ruby -Ilib -e 'Dir.glob "./test/**/*_test.rb", &method(:require)' popd %files %dir %{gem_instdir} %license %{gem_instdir}/LICENSE %{gem_libdir} %{gem_instdir}/rails %exclude %{gem_cache} %{gem_spec} %files doc %doc %{gem_docdir} %doc %{gem_instdir}/CHANGELOG.md %doc %{gem_instdir}/README.md %changelog * Thu Mar 11 2021 Vít Ondruch - 5.7.0-1 - Update to reCAPTCHA 5.7.0. Resolves: rhbz#1395002 * Wed Jan 27 2021 Fedora Release Engineering - 3.4.0-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Wed Jul 29 2020 Fedora Release Engineering - 3.4.0-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Thu Jan 30 2020 Fedora Release Engineering - 3.4.0-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild * Fri Jul 26 2019 Fedora Release Engineering - 3.4.0-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild * Sat Feb 02 2019 Fedora Release Engineering - 3.4.0-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild * Sat Jul 14 2018 Fedora Release Engineering - 3.4.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild * Fri Feb 09 2018 Fedora Release Engineering - 3.4.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild * Thu Jul 27 2017 Fedora Release Engineering - 3.4.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild * Sat Feb 11 2017 Fedora Release Engineering - 3.4.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Mon Oct 31 2016 Vít Ondruch - 3.4.0-1 - Update to reCAPTCHA 3.4.0. * Thu Feb 04 2016 Fedora Release Engineering - 0.4.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Fri Jun 26 2015 Vít Ondruch - 0.4.0-1 - Update to reCAPTCHA 0.4.0. * Thu Jun 18 2015 Fedora Release Engineering - 0.3.5-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Sun Jun 08 2014 Fedora Release Engineering - 0.3.5-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Sun Aug 04 2013 Fedora Release Engineering - 0.3.5-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Tue Mar 19 2013 Josef Stribny - 0.3.5-2 - Rebuild for https://fedoraproject.org/wiki/Features/Ruby_2.0.0 * Fri Mar 15 2013 Akira TAGOH - 0.3.5-1 - New upstream release. - spec file clean up. * Thu Feb 14 2013 Fedora Release Engineering - 0.3.1-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild * Sat Jul 21 2012 Fedora Release Engineering - 0.3.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild * Fri Feb 03 2012 Vít Ondruch - 0.3.1-3 - Rebuilt for Ruby 1.9.3. * Sat Jan 14 2012 Fedora Release Engineering - 0.3.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild * Tue Apr 19 2011 Akira TAGOH - 0.3.1-1 - Initial package