# Generated from github-linguist-5.0.0.gem by gem2rpm -*- rpm-spec -*- %global gem_name github-linguist Name: rubygem-%{gem_name} Version: 5.0.0 Release: 1%{?dist} Summary: GitHub Language detection Group: Development/Languages License: MIT URL: https://github.com/github/linguist Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem # This is how we are getting the tests (Source1) # git clone https://github.com/github/linguist.git && cd linguist # export VERSION=5.0.0; git checkout v${VERSION} # sed -i 's|^require "bundler/setup"|#require "bundler/setup"|g' test/helper.rb # sed -i "s|^require 'color-proximity'|#require 'color-proximity'|g" test/helper.rb # sed -i "s|^require 'licensee'|#require 'licensee'|g" test/helper.rb # mv test/test_samples.rb test/test_samples.rb_ # tar cfz github-linguist-${VERSION}-test.tgz test/ samples/ script/ grammars.yml package.json Rakefile lib/linguist/languages.yml lib/linguist/popular.yml #Source1: %{gem_name}-%{version}-test.tgz BuildRequires: ruby(release) BuildRequires: rubygems-devel BuildRequires: ruby # BuildRequires: rubygem(yajl-ruby) <-- missing, but not mandatory # For tests: BuildRequires: rubygem(minitest) >= 5.0 BuildRequires: rubygem(mocha) BuildRequires: rubygem(plist) => 3.1 BuildRequires: rubygem(plist) < 4 BuildRequires: rubygem(pry) BuildRequires: rubygem(escape_utils) BuildRequires: rubygem(charlock_holmes) BuildRequires: rubygem(rugged) BuildRequires: rubygem(mime-types) BuildRequires: git # BuildRequires: rubygem(color-proximity) => 0.2.1 <-- missing # BuildRequires: rubygem(color-proximity) < 0.3 <-- missing # BuildRequires: rubygem(licensed) <-- missing # BuildRequires: rubygem(licensee) >= 8.6.0 <-- missing BuildArch: noarch %description Library to detect blob languages, highlight code, ignore binary files, suppress generated files in diffs, and generate language breakdown graphs. %package doc Summary: Documentation for %{name} Group: Documentation Requires: %{name} = %{version}-%{release} BuildArch: noarch %description doc Documentation for %{name}. %prep gem unpack %{SOURCE0} %setup -q -D -T -n %{gem_name}-%{version} gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec %build # Create the gem as gem install only works on a gem file gem build %{gem_name}.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 -pa .%{_bindir}/* \ %{buildroot}%{_bindir}/ find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x # no idea why it's executable chmod -x %{buildroot}%{gem_libdir}/linguist/languages.yml # Run the test suite %check pushd .%{gem_instdir} #tar xfz %{SOURCE1} #export LANG="en_US.UTF-8" # we expect exactly 4 failures, 15 errors #ruby -Ilib -e 'Dir.glob "./test/test_*.rb", &method(:require)' | grep '4 failures, 15 errors' popd %files %dir %{gem_instdir} %{_bindir}/linguist %{_bindir}/git-linguist %license %{gem_instdir}/LICENSE %{gem_instdir}/bin %{gem_instdir}/grammars %{gem_libdir} %exclude %{gem_cache} %{gem_spec} %files doc %doc %{gem_docdir} %changelog * Tue Jan 03 2017 Jiri Popelka - 5.0.0-1 - Updated to 5.0.0 * Thu Dec 08 2016 Jiri Popelka - 4.8.18-1 - Updated to 4.8.18 * Thu Nov 03 2016 Jiri Popelka - 4.8.17-1 - Updated to 4.8.17 * Fri Oct 28 2016 Jiri Popelka - 4.8.16-1 - Updated to 4.8.16 * Mon Sep 26 2016 Jiri Popelka - 4.8.15-1 - Updated to 4.8.15 * Fri Sep 23 2016 Jiri Popelka - 4.8.14-1 - Updated to 4.8.14 * Thu Sep 22 2016 Jiri Popelka - 4.8.13-1 - Updated to 4.8.13 * Thu Sep 15 2016 Jiri Popelka - 4.8.12-1 - Updated to 4.8.12 * Wed Sep 14 2016 Jiri Popelka - 4.8.11-1 - Updated to 4.8.11 * Tue Sep 13 2016 Jiri Popelka - 4.8.10-1 - Updated to 4.8.10 * Mon Aug 29 2016 Jiri Popelka - 4.8.9-1 - Updated to 4.8.9 * Tue Jul 19 2016 Jiri Popelka - 4.8.8-1 - Updated to 4.8.8 * Wed Jun 22 2016 Jiri Popelka - 4.8.7-1 - Updated to 4.8.7 * Fri Jun 03 2016 Jiri Popelka - 4.8.6-1 - Updated to 4.8.6 * Mon May 09 2016 Jiri Popelka - 4.8.5-1 - Updated to 4.8.5 * Mon May 02 2016 Jiri Popelka - 4.8.4-1 - Updated to 4.8.4 * Fri Apr 15 2016 Jiri Popelka - 4.8.3-1 - Updated to 4.8.3 * Wed Mar 30 2016 Jiri Popelka - 4.8.2-2 - workaround still failing tests by not running them for now :) * Wed Mar 30 2016 Jiri Popelka - 4.8.2-1 - Updated to 4.8.2 * Tue Mar 29 2016 Jiri Popelka - 4.8.1-1 - Updated to 4.8.1 * Thu Mar 17 2016 Jiri Popelka - 4.8.0-1 - Updated to 4.8.0 * Thu Mar 10 2016 Jiri Popelka - 4.7.6-4 - rebuild * Fri Mar 04 2016 Jiri Popelka - 4.7.6-3 - fixes from review (#1310674) * Wed Mar 02 2016 Jiri Popelka - 4.7.6-2 - tests * Mon Feb 29 2016 Jiri Popelka - 4.7.6-1 - Updated to 4.7.6 * Mon Feb 22 2016 Jiri Popelka - 4.7.5-2 - %%check section * Thu Feb 18 2016 Jiri Popelka - 4.7.5-1 - Initial package