# Generated from diffable_yaml-0.0.2.gem by gem2rpm -*- rpm-spec -*- %global gem_name diffable_yaml Name: rubygem-%{gem_name} Version: 0.0.2 Release: 1%{?dist} Summary: dump YAML in Ruby with hash keys ordered to make text diffs easier License: BSD URL: https://github.com/nrser/DiffableYAML Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem BuildRequires: ruby(release) BuildRequires: rubygems-devel BuildRequires: ruby # BuildRequires: rubygem(rspec) # BuildRequires: rubygem(nrser) BuildArch: noarch %description this is a little chunck of code i use to dump Ruby objects to YAML with Hash keys in a some-what consistent order. i do this because i often find myself using YAML files as data storage and this makes it a lot easier to compare versions with text-based diff toolspec. this lib is horribly alpha and has no tests what-so-ever. i'm sure it's as full or bugs and bad ideas as 100 lines of code can be. i just put it here so it's easier for me to use across projectspec. but you're welcome to take it for a spin too if you really want. this relies on Psych internals, so it has a dependency on pysch ~> 2.0. it might work fine with other versions; that's just all i've tested it against at the moment. %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} # rspec spec popd %files %dir %{gem_instdir} %exclude %{gem_instdir}/.gitignore %license %{gem_instdir}/LICENSE %{gem_libdir} %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}/diffable_yaml.gemspec %changelog * Mon Apr 18 2022 mockbuilder - 0.0.2-1 - Initial package