diff --git a/rubygem-wikicloth-0.8.0-minitest.patch b/rubygem-wikicloth-0.8.0-minitest.patch new file mode 100644 index 0000000..c439cd5 --- /dev/null +++ b/rubygem-wikicloth-0.8.0-minitest.patch @@ -0,0 +1,27 @@ +From 68aecc6c01addbb03086c55c6e35c7baaca678f6 Mon Sep 17 00:00:00 2001 +From: Ken Dreyer +Date: Thu, 10 Jul 2014 17:17:34 -0600 +Subject: [PATCH] tests: switch to minitest + +Switch from Test::Unit to Minitest. +--- + test/test_helper.rb | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/test/test_helper.rb b/test/test_helper.rb +index 17e95cc..e096773 100644 +--- a/test/test_helper.rb ++++ b/test/test_helper.rb +@@ -1,8 +1,7 @@ + + require 'rubygems' +-gem "test-unit", ">= 2.0.5" ++require 'minitest/autorun' + require 'active_support' + require 'active_support/test_case' +-require 'test/unit' + I18n.load_path << File.join(File.dirname(__FILE__),'locales.yml') + require File.join(File.dirname(__FILE__),'../init') +-- +1.9.0 + diff --git a/rubygem-wikicloth.spec b/rubygem-wikicloth.spec new file mode 100644 index 0000000..f4391ae --- /dev/null +++ b/rubygem-wikicloth.spec @@ -0,0 +1,69 @@ +%global gem_name wikicloth +Name: rubygem-%{gem_name} +Version: 0.8.0 +Release: 1 +Summary: Mediawiki parser +License: MIT +URL: https://github.com/nricciar/wikicloth +Source0: https://rubygems.org/gems/wikicloth-%{version}.gem +Patch0: rubygem-wikicloth-0.8.0-minitest.patch +Requires: ruby(release) ruby(rubygems) rubygem(builder) rubygem(expression_parser) +BuildRequires: ruby(release) rubygems-devel rubygem(activesupport) rubygem(builder) +BuildRequires: rubygem(expression_parser) +BuildArch: noarch +Provides: rubygem(%{gem_name}) = %{version} +%description +An implementation of the mediawiki markup in Ruby. + +%package doc +Summary: Documentation for %{name} +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 +%patch0 -p1 +for f in .gitignore .travis.yml Gemfile Rakefile run_tests.rb tasks/wikicloth_tasks.rake; do + rm $f + sed -i "s|\"$f\".freeze,||g" %{gem_name}.gemspec +done + +%build +gem build %{gem_name}.gemspec +%gem_install +rm .%{gem_instdir}/%{gem_name}.gemspec + +%install +mkdir -p %{buildroot}%{gem_dir} +cp -pa .%{gem_dir}/* \ + %{buildroot}%{gem_dir}/ + +%check +pushd .%{gem_instdir} + ruby -Ilib test/*_test.rb +popd + +%files +%dir %{gem_instdir} +%doc %{gem_instdir}/README +%doc %{gem_instdir}/README.textile +%doc %{gem_instdir}/MIT-LICENSE +%{gem_libdir} +%exclude %{gem_cache} +%{gem_spec} +%{gem_instdir}/init.rb +%{gem_instdir}/lang + +%files doc +%doc %{gem_docdir} +%exclude %{gem_instdir}/test +%{gem_instdir}/examples +%{gem_instdir}/sample_documents + +%changelog +* Sat Aug 8 2020 yanan li - 0.8.0-1 +- Package init diff --git a/rubygem-wikicloth.yaml b/rubygem-wikicloth.yaml new file mode 100644 index 0000000..9be9c35 --- /dev/null +++ b/rubygem-wikicloth.yaml @@ -0,0 +1,5 @@ +git_url: https://github.com/nricciar/wikicloth.git +version_control: github +src_repo: nricciar/wikicloth +tag_prefix: "^v" +seperator: "." diff --git a/wikicloth-0.8.0.gem b/wikicloth-0.8.0.gem new file mode 100644 index 0000000..2f8dd27 Binary files /dev/null and b/wikicloth-0.8.0.gem differ