# Generated from rails-prg-0.1.1.gem by gem2rpm -*- rpm-spec -*-
%global gem_name rails-prg

Name: rubygem-%{gem_name}
Version: 0.1.1
Release: 1%{?dist}
Summary: Allow Rails to use full POST-REDIRECT-GET pattern on errors
License: MIT
URL: https://github.com/tommeier/rails-prg
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
BuildRequires: ruby(release)
BuildRequires: rubygems-devel
BuildRequires: ruby
# BuildRequires: rubygem(activerecord)
# BuildRequires: rubygem(cane)
# BuildRequires: rubygem(capybara)
# BuildRequires: rubygem(database_cleaner)
# BuildRequires: rubygem(rspec-rails)
# BuildRequires: rubygem(sauce) >= 3.1.1
# BuildRequires: rubygem(sauce) < 3.2
# BuildRequires: rubygem(sauce-connect)
# BuildRequires: rubygem(selenium-webdriver)
# BuildRequires: rubygem(simplecov)
# BuildRequires: rubygem(sqlite3)
# BuildRequires: rubygem(sprockets-rails)
BuildArch: noarch

%description
Secure applications disable browser history and internal cache.
Unfortunately, this causes problems with most browsers when following
the standard Rails pattern for displaying errors.
For full protection from ERR_CACHE_MISS (in Chrome with no-cache, no-store),
and equivalent in other browsers, the pattern should be altered to follow
a full POST-REDIRECT-GET patten.
This way the browser will always have a consistent back-button history to
traverse without triggering browser errors.
.


%package doc
Summary: Documentation for %{name}
Requires: %{name} = %{version}-%{release}
BuildArch: noarch

%description doc
Documentation for %{name}.

%prep
%setup -q -n %{gem_name}-%{version}

%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}
# Run the test suite.
popd

%files
%dir %{gem_instdir}
%{gem_instdir}/.cane
%exclude %{gem_instdir}/.gitignore
%exclude %{gem_instdir}/.travis.yml
%license %{gem_instdir}/LICENSE.txt
%{gem_libdir}
%{gem_instdir}/script
%exclude %{gem_cache}
%{gem_spec}

%files doc
%doc %{gem_docdir}
%exclude %{gem_instdir}/.rspec
%{gem_instdir}/Gemfile
%doc %{gem_instdir}/README.md
%{gem_instdir}/Rakefile
%{gem_instdir}/rails-prg.gemspec
%{gem_instdir}/spec

%changelog
* Wed Apr 20 2022 mockbuilder - 0.1.1-1
- Initial package