# Generated from peml-0.1.1.gem by gem2rpm -*- rpm-spec -*-
%global gem_name peml

Name: rubygem-%{gem_name}
Version: 0.1.1
Release: 1%{?dist}
Summary: Provides parsing of PEML, the Programming Exercise Markup Language. Also provides for parsing of PEMLtest, the testing DSL provided as part of PEML, as well as transformers to convert PEMLtest descriptions into executable tests for Java and other programming languages
License: Apache License 2.0
URL: https://cssplice.github.io/peml/
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
BuildRequires: ruby(release)
BuildRequires: rubygems-devel
BuildRequires: ruby
# BuildRequires: rubygem(minitest) >= 5.0
# BuildRequires: rubygem(minitest) < 6
BuildArch: noarch

%description
The Programming Exercise Markup Language (PEML)
is intended to be a simple, easy format for CS and IT instructors of all kinds
(college, community college, high school, whatever) to describe programming
assignments and activities. We want it to be so easy (and obvious) to use that
instructors won't see it as a technological or notational barrier to
expressing their assignments.
We intend for this format to be something that authors of automated grading
tools can adopt, so they can provide a very easy, low-energy onboarding path
for existing instructors to get programming activities into such tools. As a
result, this notation leans heavily on supporting authors and streamlining
common cases, even if this may require more work on the part of tool
developers--the goal is to make it super easy for authors of programming
activities, not to fit into a specific auto-grader or simplify tasks for
tool writers.
For more details, see the PEML website.


%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}
# ruby -e 'Dir.glob "./test/**/*_test.rb", &method(:require)'
popd

%files
%dir %{gem_instdir}
%{_bindir}/console
%{_bindir}/peml
%{_bindir}/setup
%exclude %{gem_instdir}/.gitignore
%{gem_instdir}/.idea
%exclude %{gem_instdir}/.travis.yml
%license %{gem_instdir}/LICENSE
%{gem_instdir}/bin
%{gem_libdir}
%exclude %{gem_cache}
%{gem_spec}

%files doc
%doc %{gem_docdir}
%{gem_instdir}/Gemfile
%{gem_instdir}/Gemfile.lock
%doc %{gem_instdir}/README.md
%{gem_instdir}/Rakefile
%{gem_instdir}/peml.gemspec

%changelog
* Tue Sep 14 2021 mockbuilder - 0.1.1-1
- Initial package