# Generated from torid-1.3.0.gem by gem2rpm -*- rpm-spec -*- %global gem_name torid Name: rubygem-%{gem_name} Version: 1.3.0 Release: 1%{?dist} Summary: Temporally Ordered IDs. Generate universally unique identifiers (UUID) that sort lexically in time order License: ISC URL: http://github.com/copiousfreetime/torid Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem BuildRequires: ruby(release) BuildRequires: rubygems-devel BuildRequires: ruby >= 1.9.3 # BuildRequires: rubygem(minitest) >= 5.0 # BuildRequires: rubygem(minitest) < 6 # BuildRequires: rubygem(simplecov) >= 0.9 # BuildRequires: rubygem(simplecov) < 1 BuildArch: noarch %description Temporally Ordered IDs. Generate universally unique identifiers (UUID) that sort lexically in time order. Torid exists to solve the problem of generating UUIDs that when ordered lexically, they are also ordered temporally. I needed a way to generate ids for events that are entering a system with the following criteria: 1. Fast ID generation 2. No central coordinating server/system 3. No local storage 4. Library code, that is multiple apps on the same machine can use the same code and they will not generate duplicate ids 5. Eventually stored in a UUID field in a database. So 128bit ids are totally fine. The IDs that Torid generates are 128bit IDs made up of 2, 64bit parts. * 64bit microsecond level UNIX timestamp * 64bit hash of the system hostname, process id and a random value. %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} # ruby -e 'Dir.glob "./test/**/*_test.rb", &method(:require)' popd %files %dir %{gem_instdir} %license %{gem_instdir}/LICENSE %{gem_instdir}/Manifest.txt %{gem_libdir} %{gem_instdir}/tasks %exclude %{gem_cache} %{gem_spec} %files doc %doc %{gem_docdir} %doc %{gem_instdir}/CONTRIBUTING.md %doc %{gem_instdir}/HISTORY.md %doc %{gem_instdir}/README.md %{gem_instdir}/Rakefile %{gem_instdir}/test %changelog * Thu Sep 16 2021 mockbuilder - 1.3.0-1 - Initial package