# Generated from strategic-1.1.0.gem by gem2rpm -*- rpm-spec -*- %global gem_name strategic Name: rubygem-%{gem_name} Version: 1.1.0 Release: 1%{?dist} Summary: Painless Strategy Pattern for Ruby and Rails License: MIT URL: http://github.com/AndyObtiva/strategic Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem BuildRequires: ruby(release) BuildRequires: rubygems-devel BuildRequires: ruby # BuildRequires: rubygem(rspec) >= 3.5.0 # BuildRequires: rubygem(rspec) < 3.6 # BuildRequires: rubygem(rspec-mocks) >= 3.5.0 # BuildRequires: rubygem(rspec-mocks) < 3.6 # BuildRequires: rubygem(jeweler) >= 2.3.0 # BuildRequires: rubygem(jeweler) < 2.4 # BuildRequires: rubygem(simplecov) >= 0.16.1 # BuildRequires: rubygem(simplecov) < 0.17 # BuildRequires: rubygem(coveralls) >= 0.8.23 # BuildRequires: rubygem(coveralls) < 0.9 # BuildRequires: rubygem(puts_debuggerer) >= 0.8.1 BuildArch: noarch %description if/case conditionals can get really hairy in highly sophisticated business domains. Domain model inheritance can help remedy the problem, but you don't want to dump all logic variations in the same domain models. Strategy Pattern solves that problem by externalizing logic variations to separate classes outside the domain models. One difficulty with implementing Strategy Pattern is making domain models aware of newly added strategies without touching their code (Open/Closed Principle). Strategic solves that problem by supporting Strategy Pattern with automatic discovery of strategies and ability fetch the right strategy without conditionals. This allows you to make any domain model "strategic" by simply following a convention in the directory/namespace structure you create your strategies under so that the domain model automatically discovers all available strategies. %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} %license %{gem_instdir}/LICENSE.txt %{gem_libdir} %exclude %{gem_cache} %{gem_spec} %files doc %doc %{gem_docdir} %doc %{gem_instdir}/CHANGELOG.md %doc %{gem_instdir}/README.md %changelog * Wed Sep 15 2021 mockbuilder - 1.1.0-1 - Initial package