Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
1749aac2f3
!6 升级至2.6.1修复sdoc --webcvs命令执行失败
From: @wk333 
Reviewed-by: @lyn1001 
Signed-off-by: @lyn1001
2023-06-02 01:17:51 +00:00
wk333
243a07eade Upgrade to 2.6.1 for fix sdoc --webcvs fail 2023-06-01 17:25:42 +08:00
openeuler-ci-bot
3a55cad22b
!4 升级到2.5
From: @json-book 
Reviewed-by: @small_leek 
Signed-off-by: @small_leek
2023-03-06 12:33:04 +00:00
zhuwenshuo
fdbe05f56e fix bug 2023-02-20 17:24:19 +08:00
zhuwenshuo
e8ba11a681 update to 2.5 2023-02-03 16:11:48 +08:00
openeuler-ci-bot
6d4babd755
!2 Upgrade to 2.4.0
From: @starlet-dx 
Reviewed-by: @small_leek 
Signed-off-by: @small_leek
2022-07-06 01:56:34 +00:00
starlet-dx
7f83cf8894 Upgrade to 2.4.0 2022-07-05 18:18:11 +08:00
openeuler-ci-bot
4aee332a1a !1 package init
Merge pull request !1 from lyn/master
2020-08-20 10:55:59 +08:00
lyn1001
fd1fbc36f5 package init 2020-08-19 16:49:06 +08:00
lyn1001
f834a9e727 Package init 2020-08-12 19:44:53 +08:00
7 changed files with 263 additions and 0 deletions

View 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

View 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
View 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
View 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

Binary file not shown.

57
sdoc-merge.1 Normal file
View 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
View 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\&.