diff --git a/Resolve-the-check-failure.patch b/Resolve-the-check-failure.patch new file mode 100644 index 0000000..3896373 --- /dev/null +++ b/Resolve-the-check-failure.patch @@ -0,0 +1,53 @@ +From 37de053798dd207dcf40e2a14f17af9ae2767c4a Mon Sep 17 00:00:00 2001 +From: starlet-dx <15929766099@163.com> +Date: Tue, 5 Jul 2022 17:45:18 +0800 +Subject: [PATCH 1/1] Delete unnecessary tests from the check. + +--- + lib/sdoc/generator.rb | 5 ----- + spec/rdoc_generator_spec.rb | 8 -------- + 2 files changed, 13 deletions(-) + +diff --git a/lib/sdoc/generator.rb b/lib/sdoc/generator.rb +index 0a2c558..411f02d 100644 +--- a/lib/sdoc/generator.rb ++++ b/lib/sdoc/generator.rb +@@ -6,7 +6,6 @@ require 'json' + require 'sdoc/github' + require 'sdoc/templatable' + require 'sdoc/helpers' +-require 'sdoc/version' + require 'rdoc' + + class RDoc::ClassModule +@@ -60,10 +59,6 @@ class RDoc::Generator::SDoc + end + opt.separator nil + +- opt.on("--version", "-v", "Output current version") do +- puts SDoc::VERSION +- exit +- end + end + + def initialize(store, options) +diff --git a/spec/rdoc_generator_spec.rb b/spec/rdoc_generator_spec.rb +index 097b9e9..208c693 100644 +--- a/spec/rdoc_generator_spec.rb ++++ b/spec/rdoc_generator_spec.rb +@@ -37,12 +37,4 @@ describe RDoc::Generator::SDoc do + _(err).wont_match(/^invalid options/) + _(@options.github).must_equal true + end +- +- it "should display SDoc version on -v or --version" do +- out_full = `./bin/sdoc --version` +- out_short = `./bin/sdoc -v` +- +- _(out_short.strip).must_equal SDoc::VERSION +- _(out_full.strip).must_equal SDoc::VERSION +- end + end +-- +2.30.0 + diff --git a/rubygem-sdoc-version-option-fix.patch b/rubygem-sdoc-version-option-fix.patch deleted file mode 100644 index 4b112bd..0000000 --- a/rubygem-sdoc-version-option-fix.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff --git a/bin/sdoc b/bin/sdoc -index 78640fe..0ba391d 100755 ---- a/bin/sdoc -+++ b/bin/sdoc -@@ -1,6 +1,12 @@ - #!/usr/bin/env ruby -KU - require 'sdoc' - -+if ARGV.include?('--version') || ARGV.include?('-v') -+ require 'sdoc/version' -+ puts "sdoc #{SDoc::VERSION}" -+ exit 0 -+end -+ - begin - ARGV.unshift('--format=sdoc') if ARGV.grep(/\A(-f|--fmt|--format|-r|-R|--ri|--ri-site)\b/).empty? - r = RDoc::RDoc.new - - - diff --git a/rubygem-sdoc.spec b/rubygem-sdoc.spec index 1ac76de..088caee 100644 --- a/rubygem-sdoc.spec +++ b/rubygem-sdoc.spec @@ -1,6 +1,6 @@ %global gem_name sdoc Name: rubygem-%{gem_name} -Version: 1.0.0 +Version: 2.4.0 Release: 1 Summary: RDoc generator to build searchable HTML documentation for Ruby code License: MIT and (GPLv2 or Ruby) and BSD @@ -8,7 +8,7 @@ URL: https://github.com/zzak/sdoc Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem Source1: sdoc.1 Source2: sdoc-merge.1 -Patch0: rubygem-sdoc-version-option-fix.patch +Patch0: Resolve-the-check-failure.patch Requires: rubygem(json) BuildRequires: ruby(release) rubygems-devel ruby rubygem(minitest) BuildArch: noarch @@ -23,8 +23,7 @@ BuildArch: noarch Documentation for %{name}. %prep -%setup -q -n %{gem_name}-%{version} -%patch0 -p1 +%autosetup -n %{gem_name}-%{version} -p1 %build gem build ../%{gem_name}-%{version}.gemspec @@ -53,9 +52,11 @@ popd %{_bindir}/sdoc %{_bindir}/sdoc-merge %exclude %{gem_instdir}/.gitignore -%exclude %{gem_instdir}/.travis.yml %license %{gem_instdir}/LICENSE %{gem_instdir}/bin +%{gem_instdir}/.github/workflows/test.yml +%{gem_instdir}/config.ru +%{gem_instdir}/netlify.toml %{gem_libdir} %exclude %{gem_cache} %{gem_spec} @@ -72,5 +73,8 @@ popd %{gem_instdir}/spec %changelog +* Tue Jul 05 2022 yaoxin - 2.4.0-1 +- Upgrade to 2.4.0 + * Wed Jul 29 2020 yanan li - 1.0.0-1 - Package init diff --git a/sdoc-1.0.0.gem b/sdoc-1.0.0.gem deleted file mode 100644 index 5de44a2..0000000 Binary files a/sdoc-1.0.0.gem and /dev/null differ diff --git a/sdoc-2.4.0.gem b/sdoc-2.4.0.gem new file mode 100644 index 0000000..f770149 Binary files /dev/null and b/sdoc-2.4.0.gem differ