# Generated from conjugatefr-1.0.5.gem by gem2rpm -*- rpm-spec -*- %global gem_name conjugatefr Name: rubygem-%{gem_name} Version: 1.0.5 Release: 1%{?dist} Summary: ConjugateFR French Conjugation License: Unlicense URL: http://rubygems.org/gems/conjugatefr Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem BuildRequires: ruby(release) BuildRequires: rubygems-devel BuildRequires: ruby BuildArch: noarch %description == ABOUT A simple program and library to conjugate french verbs. Parses responses to requests to an online reference site. === Executable ConjugateFR comes with the executable binary +conjugatefr+. To view information about it's supported arguments, run conjugatefr --help === Custom Renderers To make a custom renderer, just type require conjugatefr/renderer and then make a class that extends +Renderer+. An example is as follows: require 'conjugatefr/renderer' class ExampleRenderer < Renderer def pre puts "This goes before the words." end def word (name, words) print "#{name}:" words.each do |word| print " #{word}" end end def post puts "This goes after the words." end def description; "Renders an example format."; end end # Add to the Renderers list (For CLI and other programs that use it.) $renderers["Example"] = ExampleRenderer.new To try this out, save it as +erend.rb+ and then run: conjugatefr -R ./erend.rb -r Example It will produce the output: This goes before the words. someword: someconjugation etc etc ... (more words will be here) This goes after the words. === The Library The library can be included with +require conjugatefr+. It includes the +ConjugateFR+ class. %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}/conjugatefr %{gem_instdir}/bin %{gem_libdir} %exclude %{gem_cache} %{gem_spec} %files doc %doc %{gem_docdir} %changelog * Mon Apr 18 2022 mockbuilder - 1.0.5-1 - Initial package