# Generated from school_year-0.2.0.gem by gem2rpm -*- rpm-spec -*- %global gem_name school_year Name: rubygem-%{gem_name} Version: 0.2.0 Release: 1%{?dist} Summary: School Year Logic License: MIT URL: http://www.puzzlesandwich.com Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem BuildRequires: ruby(release) BuildRequires: rubygems-devel BuildRequires: ruby BuildArch: noarch %description # School Year Simple logic for translating between academic year and grade for a student ## Sample Usage `SchoolYear.grade_to_graduation_year(grade, academic_year)` determines the graduation year for a student based on their grade and the academic year `SchoolYear.grade_to_year(grade, graduation_year)` determines the calendar year from the student's grade based on the graduation year `SchoolYear.year_to_grade(year, graduation_year)` determines the student's grade from the calendar year based on the graduation year `SchoolYear.default_first_day_of_school(academic_year_or_date)` determines the first day of school (as September 1st) based on an integer representing the academic year (e.g., 1998), or a date (e.g., '1998-04-04'.to_date) `SchoolYear.default_last_day_of_school(academic_year_or_date)` determines the last day of school (as June 15th) based on an integer representing the academic year (e.g., 1998), or a date (e.g., '1998-04-04'.to_date) `SchoolYear.school_days_elapsed(date, first_attendace_day)` determines the approximate number of days elapsed from the first_attendance_day to the date. Both arguments can be blank: if date is blank, the approximate number of total days in the 1901 school year will be returned. . %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} # Run the test suite. popd %files %dir %{gem_instdir} %{gem_libdir} %exclude %{gem_cache} %{gem_spec} %files doc %doc %{gem_docdir} %changelog * Wed Sep 15 2021 mockbuilder - 0.2.0-1 - Initial package