rubygem-sdoc/Resolve-the-check-failure.patch

54 lines
1.4 KiB
Diff
Raw Permalink Normal View History

2022-07-05 18:14:41 +08:00
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