Compare commits
10 Commits
c2ab24a370
...
1749aac2f3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1749aac2f3 | ||
|
|
243a07eade | ||
|
|
3a55cad22b | ||
|
|
fdbe05f56e | ||
|
|
e8ba11a681 | ||
|
|
6d4babd755 | ||
|
|
7f83cf8894 | ||
|
|
4aee332a1a | ||
|
|
fd1fbc36f5 | ||
|
|
f834a9e727 |
53
Resolve-the-check-failure.patch
Normal file
53
Resolve-the-check-failure.patch
Normal file
@ -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
|
||||||
|
|
||||||
17
rubygem-sdoc-version-option-fix.patch
Normal file
17
rubygem-sdoc-version-option-fix.patch
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
diff --git a/bin/sdoc b/bin/sdoc
|
||||||
|
index 32a210f..59a62dc 100755
|
||||||
|
--- a/bin/sdoc
|
||||||
|
+++ b/bin/sdoc
|
||||||
|
@@ -1,6 +1,12 @@
|
||||||
|
#!/usr/bin/env ruby
|
||||||
|
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
|
||||||
87
rubygem-sdoc.spec
Normal file
87
rubygem-sdoc.spec
Normal file
@ -0,0 +1,87 @@
|
|||||||
|
%global gem_name sdoc
|
||||||
|
Name: rubygem-%{gem_name}
|
||||||
|
Version: 2.6.1
|
||||||
|
Release: 1
|
||||||
|
Summary: RDoc generator to build searchable HTML documentation for Ruby code
|
||||||
|
License: MIT and (GPLv2 or Ruby) and BSD
|
||||||
|
URL: https://github.com/zzak/sdoc
|
||||||
|
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
|
||||||
|
Source1: sdoc.1
|
||||||
|
Source2: sdoc-merge.1
|
||||||
|
Patch0: Resolve-the-check-failure.patch
|
||||||
|
Patch1: rubygem-sdoc-version-option-fix.patch
|
||||||
|
Requires: rubygem(json)
|
||||||
|
BuildRequires: ruby(release) rubygems-devel ruby rubygem(minitest) zlib-devel
|
||||||
|
BuildArch: noarch
|
||||||
|
%description
|
||||||
|
SDoc is simply a wrapper for the rdoc command line tool.
|
||||||
|
|
||||||
|
%package doc
|
||||||
|
Summary: Documentation for %{name}
|
||||||
|
Requires: %{name} = %{version}-%{release}
|
||||||
|
BuildArch: noarch
|
||||||
|
%description doc
|
||||||
|
Documentation for %{name}.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%autosetup -n %{gem_name}-%{version} -p1
|
||||||
|
|
||||||
|
%build
|
||||||
|
gem build ../%{gem_name}-%{version}.gemspec
|
||||||
|
%gem_install
|
||||||
|
|
||||||
|
%install
|
||||||
|
mkdir -p %{buildroot}%{gem_dir}
|
||||||
|
cp -a .%{gem_dir}/* \
|
||||||
|
%{buildroot}%{gem_dir}/
|
||||||
|
mkdir -p %{buildroot}%{_bindir}
|
||||||
|
cp -a .%{_bindir}/* \
|
||||||
|
%{buildroot}%{_bindir}/
|
||||||
|
mkdir -p %{buildroot}%{_mandir}/man1
|
||||||
|
cp %{SOURCE1} %{buildroot}%{_mandir}/man1
|
||||||
|
cp %{SOURCE2} %{buildroot}%{_mandir}/man1
|
||||||
|
find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x
|
||||||
|
|
||||||
|
%check
|
||||||
|
pushd .%{gem_instdir}
|
||||||
|
sed -i "/require 'bundler\/setup'/ s/^/#/" ./spec/spec_helper.rb
|
||||||
|
ruby -Ilib:spec -e 'Dir.glob "./spec/*.rb", &method(:require)'
|
||||||
|
popd
|
||||||
|
|
||||||
|
%files
|
||||||
|
%dir %{gem_instdir}
|
||||||
|
%{_bindir}/sdoc
|
||||||
|
%{_bindir}/sdoc-merge
|
||||||
|
%exclude %{gem_instdir}/.gitignore
|
||||||
|
%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}
|
||||||
|
%doc %{_mandir}/man1/sdoc-merge.1*
|
||||||
|
%doc %{_mandir}/man1/sdoc.1*
|
||||||
|
|
||||||
|
%files doc
|
||||||
|
%doc %{gem_docdir}
|
||||||
|
%doc %{gem_instdir}/CHANGELOG.md
|
||||||
|
%{gem_instdir}/Gemfile
|
||||||
|
%doc %{gem_instdir}/README.md
|
||||||
|
%{gem_instdir}/Rakefile
|
||||||
|
%{gem_instdir}/sdoc.gemspec
|
||||||
|
%{gem_instdir}/spec
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Thu Jun 01 2023 wangkai <13474090681@163.com> - 2.6.1-1
|
||||||
|
- Upgrade to 2.6.1 for fix sdoc --webcvs fail
|
||||||
|
|
||||||
|
* Tue Feb 20 2023 wenchaofan <349464272@qq.com> - 2.5.0-1
|
||||||
|
- Upgrade to 2.5.0
|
||||||
|
|
||||||
|
* Tue Jul 05 2022 yaoxin <yaoxin30@h-partners.com> - 2.4.0-1
|
||||||
|
- Upgrade to 2.4.0
|
||||||
|
|
||||||
|
* Wed Jul 29 2020 yanan li <liyanan032@huawei.com> - 1.0.0-1
|
||||||
|
- Package init
|
||||||
5
rubygem-sdoc.yaml
Normal file
5
rubygem-sdoc.yaml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
git_url: https://github.com/zzak/sdoc.git
|
||||||
|
version_control: github
|
||||||
|
src_repo: zzak/sdoc
|
||||||
|
tag_prefix: "^v"
|
||||||
|
seperator: "."
|
||||||
BIN
sdoc-2.6.1.gem
Normal file
BIN
sdoc-2.6.1.gem
Normal file
Binary file not shown.
57
sdoc-merge.1
Normal file
57
sdoc-merge.1
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
'\" t
|
||||||
|
.\" Title: sdoc-merge
|
||||||
|
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
|
||||||
|
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
|
||||||
|
.\" Date: 08/06/2013
|
||||||
|
.\" Manual: \ \&
|
||||||
|
.\" Source: \ \&
|
||||||
|
.\" Language: English
|
||||||
|
.\"
|
||||||
|
.TH "SDOC\-MERGE" "1" "08/06/2013" "\ \&" "\ \&"
|
||||||
|
.\" -----------------------------------------------------------------
|
||||||
|
.\" * Define some portability stuff
|
||||||
|
.\" -----------------------------------------------------------------
|
||||||
|
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
.\" http://bugs.debian.org/507673
|
||||||
|
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
|
||||||
|
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
.ie \n(.g .ds Aq \(aq
|
||||||
|
.el .ds Aq '
|
||||||
|
.\" -----------------------------------------------------------------
|
||||||
|
.\" * set default formatting
|
||||||
|
.\" -----------------------------------------------------------------
|
||||||
|
.\" disable hyphenation
|
||||||
|
.nh
|
||||||
|
.\" disable justification (adjust text to left margin only)
|
||||||
|
.ad l
|
||||||
|
.\" -----------------------------------------------------------------
|
||||||
|
.\" * MAIN CONTENT STARTS HERE *
|
||||||
|
.\" -----------------------------------------------------------------
|
||||||
|
.SH "NAME"
|
||||||
|
sdoc-merge \- a command line tool to merge multiple sdoc folders into a single documentation site
|
||||||
|
.SH "SYNOPSIS"
|
||||||
|
.sp
|
||||||
|
\fBsdoc\-merge\fR [\fIOPTIONS\fR] \fIDIRECTORIES\fR
|
||||||
|
.SH "DESCRIPTION"
|
||||||
|
.sp
|
||||||
|
sdoc\-merge is a command line tool to merge multiple sdoc folders into a single documentation site\&. It\(cqs part of SDoc, see "man sdoc" for more details\&.
|
||||||
|
.sp
|
||||||
|
Example:
|
||||||
|
.sp
|
||||||
|
sdoc\-merge \-\-title "Ruby v1\&.9, Rails v2\&.3\&.2\&.1" \-\-op merged \-\-names "Ruby,Rails" ruby\-v1\&.9 rails\-v2\&.3\&.2\&.1
|
||||||
|
.SH "OPTIONS"
|
||||||
|
.PP
|
||||||
|
\fB\-n, \-\-names\fR \fI[NAMES]\fR
|
||||||
|
.RS 4
|
||||||
|
Set the output directory
|
||||||
|
.RE
|
||||||
|
.PP
|
||||||
|
\fB\-o, \-\-op\fR \fI[DIRECTORY]\fR
|
||||||
|
.RS 4
|
||||||
|
Set the output directory
|
||||||
|
.RE
|
||||||
|
.PP
|
||||||
|
\fB\-t, \-\-title\fR \fI[TITLE]\fR
|
||||||
|
.RS 4
|
||||||
|
Set the title of merged file
|
||||||
|
.RE
|
||||||
44
sdoc.1
Normal file
44
sdoc.1
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
'\" t
|
||||||
|
.\" Title: sdoc
|
||||||
|
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
|
||||||
|
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
|
||||||
|
.\" Date: 08/06/2013
|
||||||
|
.\" Manual: \ \&
|
||||||
|
.\" Source: \ \&
|
||||||
|
.\" Language: English
|
||||||
|
.\"
|
||||||
|
.TH "SDOC" "1" "08/06/2013" "\ \&" "\ \&"
|
||||||
|
.\" -----------------------------------------------------------------
|
||||||
|
.\" * Define some portability stuff
|
||||||
|
.\" -----------------------------------------------------------------
|
||||||
|
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
.\" http://bugs.debian.org/507673
|
||||||
|
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
|
||||||
|
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
.ie \n(.g .ds Aq \(aq
|
||||||
|
.el .ds Aq '
|
||||||
|
.\" -----------------------------------------------------------------
|
||||||
|
.\" * set default formatting
|
||||||
|
.\" -----------------------------------------------------------------
|
||||||
|
.\" disable hyphenation
|
||||||
|
.nh
|
||||||
|
.\" disable justification (adjust text to left margin only)
|
||||||
|
.ad l
|
||||||
|
.\" -----------------------------------------------------------------
|
||||||
|
.\" * MAIN CONTENT STARTS HERE *
|
||||||
|
.\" -----------------------------------------------------------------
|
||||||
|
.SH "NAME"
|
||||||
|
sdoc \- RDoc generator to build searchable HTML documentation for Ruby code
|
||||||
|
.SH "SYNOPSIS"
|
||||||
|
.sp
|
||||||
|
\fBsdoc\fR [\fIOPTIONS\fR] \fIPROJECTDIR\fR
|
||||||
|
.SH "DESCRIPTION"
|
||||||
|
.sp
|
||||||
|
SDoc is simply a wrapper for the rdoc command line tool\&. See "sdoc \-\-help" for more details\&. \fI\-\-fmt\fR is set to shtml by default\&. The default template \fI\-T\fR is shtml, but you can also use the direct template\&.
|
||||||
|
.sp
|
||||||
|
Example:
|
||||||
|
.sp
|
||||||
|
sdoc \-o doc/rails \-T direct rails
|
||||||
|
.SH "OPTIONS"
|
||||||
|
.sp
|
||||||
|
See "sdoc \-\-help" to see all the available options\&.
|
||||||
Loading…
x
Reference in New Issue
Block a user