# Generated from tworingtools-6.0.0.gem by gem2rpm -*- rpm-spec -*-
%global gem_name tworingtools

Name: rubygem-%{gem_name}
Version: 6.0.0
Release: 1%{?dist}
Summary: A collection of command line tools
License: MIT
URL: https://github.com/TwoRingSoft/tools
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
BuildRequires: ruby(release)
BuildRequires: rubygems-devel
BuildRequires: ruby
BuildArch: noarch

%description
- xcsims: Delete all simulators and recreate one for each compatible
platform and device type pairing.
- sync-git-remotes: Make sure all your GitHub repos are cloned into a given
directory and keep them synced with upstream. Forks are maintained with a
remote for both the fork and upstream, both remotes' default branches are
tracked in local counterparts, and the upstream default branch is also pushed
to the fork.
- changetag: Extract changelog entries to write into git tag annotation
messages.
- prerelease-podspec: Branch and create/push a release candidate tag, modify
the podspec to use that version tag, and try linting it.
- release-podspec: Create a tag with the version and push it to repo origin,
push podspec to CocoaPods trunk.
- revert-failed-release-tag: In case `release-podspec` fails, make sure the
tag it may have created/pushed is destroyed before trying to run it again
after fixing, so it doesn't break due to the tag already existing the second
time around.
- bumpr: Increment the desired part of a version number
(major/minor/patch/build) and write the change to a git commit.
- clean-rc-tags: deletes any release candidate tags leftover after prerelease
testing.
- migrate-changelog: for a changelog adhering to [Keep a
Changelog](https://keepachangelog.com/en/1.0.0/), move any contents under
Unreleased to a new section for a new version with the current date.


%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}/


mkdir -p %{buildroot}%{_bindir}
cp -a .%{_bindir}/* \
        %{buildroot}%{_bindir}/

find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x

%check
pushd .%{gem_instdir}
# Run the test suite.
popd

%files
%dir %{gem_instdir}
%{_bindir}/clean-rc-tags
%{_bindir}/xcsims
%{_bindir}/sync-git-remotes
%{_bindir}/changetag
%{_bindir}/prerelease-podspec
%{_bindir}/release-podspec
%{_bindir}/revert-failed-release-tag
%{_bindir}/bumpr
%{_bindir}/migrate-changelog
%{gem_instdir}/bin
%{gem_libdir}
%exclude %{gem_cache}
%{gem_spec}

%files doc
%doc %{gem_docdir}


%changelog
* Thu Sep 16 2021 mockbuilder - 6.0.0-1
- Initial package