[rubygem-sdoc] Update to sdoc 0.4.0

Josef Stribny jstribny at fedoraproject.org
Thu Jan 23 16:26:42 UTC 2014


commit bc2bdd2141cac66433bbea52c53b29fef737109b
Author: Josef Stribny <jstribny at redhat.com>
Date:   Thu Jan 23 17:26:53 2014 +0100

    Update to sdoc 0.4.0

 .gitignore                              |    1 +
 rubygem-sdoc-0.4.0-relax-json-dep.patch |   28 ++
 rubygem-sdoc-rdoc-4.0-support.patch     |  650 -------------------------------
 rubygem-sdoc-version-option-fix.patch   |   19 +-
 rubygem-sdoc.spec                       |   49 ++--
 sources                                 |    2 +-
 6 files changed, 58 insertions(+), 691 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 97123b0..cd9970a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
 /sdoc-0.3.20.gem
+/sdoc-0.4.0.gem
diff --git a/rubygem-sdoc-0.4.0-relax-json-dep.patch b/rubygem-sdoc-0.4.0-relax-json-dep.patch
new file mode 100644
index 0000000..0edbe63
--- /dev/null
+++ b/rubygem-sdoc-0.4.0-relax-json-dep.patch
@@ -0,0 +1,28 @@
+diff --git a/sdoc.gemspec b/sdoc.gemspec
+index 45b2d54..19ffaf7 100644
+--- a/sdoc.gemspec
++++ b/sdoc.gemspec
+@@ -26,20 +26,20 @@ Gem::Specification.new do |s|
+ 
+     if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
+       s.add_runtime_dependency(%q<rdoc>, ["< 5.0", "~> 4.0"])
+-      s.add_runtime_dependency(%q<json>, ["~> 1.8"])
++      s.add_runtime_dependency(%q<json>, [">= 1.7.7"])
+       s.add_development_dependency(%q<bundler>, ["~> 1.3"])
+       s.add_development_dependency(%q<rake>, [">= 0"])
+       s.add_development_dependency(%q<minitest>, ["~> 4.0"])
+     else
+       s.add_dependency(%q<rdoc>, ["< 5.0", "~> 4.0"])
+-      s.add_dependency(%q<json>, ["~> 1.8"])
++      s.add_dependency(%q<json>, [">= 1.7.7"])
+       s.add_dependency(%q<bundler>, ["~> 1.3"])
+       s.add_dependency(%q<rake>, [">= 0"])
+       s.add_dependency(%q<minitest>, ["~> 4.0"])
+     end
+   else
+     s.add_dependency(%q<rdoc>, ["< 5.0", "~> 4.0"])
+-    s.add_dependency(%q<json>, ["~> 1.8"])
++    s.add_dependency(%q<json>, [">= 1.7.7"])
+     s.add_dependency(%q<bundler>, ["~> 1.3"])
+     s.add_dependency(%q<rake>, [">= 0"])
+     s.add_dependency(%q<minitest>, ["~> 4.0"])
diff --git a/rubygem-sdoc-version-option-fix.patch b/rubygem-sdoc-version-option-fix.patch
index 8bf3b1c..da661f2 100644
--- a/rubygem-sdoc-version-option-fix.patch
+++ b/rubygem-sdoc-version-option-fix.patch
@@ -6,27 +6,14 @@ index 78640fe..0ba391d 100755
  #!/usr/bin/env ruby -KU
  require 'sdoc'
  
-+if (ARGV[0] == '--version')
++if ARGV.include? '--version'
 +  puts "sdoc #{SDoc::VERSION}"
 +  exit 0
 +end
 +
  begin
-   ARGV.push('--format=sdoc') if ARGV.grep(/\A(-f|--fmt|--format|-r|-R|--ri|--ri-site)\b/).empty?
+   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/lib/sdoc.rb b/lib/sdoc.rb
-index daf080e..dab6e9f 100644
---- a/lib/sdoc.rb
-+++ b/lib/sdoc.rb
-@@ -2,6 +2,8 @@ $:.unshift File.dirname(__FILE__)
- require "rubygems"
- gem 'rdoc', '~> 4.0.0'
- 
--module SDoc end
-+module SDoc
-+  VERSION = '0.4.0.rc1'
-+end
- 
- require 'sdoc/generator'
+
 
diff --git a/rubygem-sdoc.spec b/rubygem-sdoc.spec
index 6d20acf..9353153 100644
--- a/rubygem-sdoc.spec
+++ b/rubygem-sdoc.spec
@@ -1,19 +1,9 @@
 # Generated from sdoc-0.3.20.gem by gem2rpm -*- rpm-spec -*-
 %global gem_name sdoc
 
-%global mainver 0.4.0
-%global prever .rc1
-%global release 2
-%{?prever:
-%global gem_instdir %{gem_dir}/gems/%{gem_name}-%{mainver}%{?prever}
-%global gem_docdir %{gem_dir}/doc/%{gem_name}-%{mainver}%{?prever}
-%global gem_cache %{gem_dir}/cache/%{gem_name}-%{mainver}%{?prever}.gem
-%global gem_spec %{gem_dir}/specifications/%{gem_name}-%{mainver}%{?prever}.gemspec
-}
-
 Name: rubygem-%{gem_name}
-Version: %{mainver}
-Release: %{?prever:0.}%{release}%{?prever}%{?dist}
+Version: 0.4.0
+Release: 1
 Summary: RDoc generator to build searchable HTML documentation for Ruby code
 Group: Development/Languages
 # License needs to take RDoc and Darkfish into account apparantly
@@ -22,24 +12,22 @@ Group: Development/Languages
 License: MIT and GPLv2 and BSD
 URL: http://github.com/voloko/sdoc
 # Let's build the gem on the latest stable release to avoid confusion
-Source0: https://rubygems.org/gems/%{gem_name}-0.3.20.gem
+Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
 # Man pages
 # https://github.com/voloko/sdoc/pull/49
 Source1: sdoc.1
 Source2: sdoc-merge.1
-# Work with RDoc 4.0; this makes it a 0.4.0 pre-release
-# Patches taken from zzak's sdoc rdoc4 branch including my fixes
-# https://github.com/voloko/sdoc/pull/48
-# https://github.com/zzak/sdoc/blob/rdoc-4/
-Patch0: rubygem-sdoc-rdoc-4.0-support.patch
 # Fix sdoc --version to return the correct version
-Patch1: rubygem-sdoc-version-option-fix.patch
+Patch0: rubygem-sdoc-version-option-fix.patch
+# Relax JSON gem dep
+Patch1: rubygem-sdoc-0.4.0-relax-json-dep.patch
 Requires: ruby(release)
 Requires: ruby(rubygems)
 Requires: rubygem(rdoc) => 4.0
 Requires: rubygem(rdoc) < 4.1
 Requires: rubygem(json) >= 1.1.3
 BuildRequires: ruby(release)
+BuildRequires: rubygem(minitest)
 BuildRequires: rubygems-devel
 BuildRequires: ruby 
 BuildArch: noarch
@@ -61,7 +49,7 @@ Documentation for %{name}.
 %prep
 gem unpack %{SOURCE0}
 
-%setup -q -D -T -n  %{gem_name}-0.3.20
+%setup -q -D -T -n  %{gem_name}-%{version}
 
 gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
 
@@ -70,7 +58,7 @@ gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
 
 %build
 gem build %{gem_name}.gemspec
-%gem_install -n %{gem_name}-%{version}%{prever}.gem
+%gem_install
 
 %install
 mkdir -p %{buildroot}%{gem_dir}
@@ -89,6 +77,13 @@ mv %{SOURCE2} %{buildroot}%{_mandir}/man1
 find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x
 find %{buildroot}%{gem_instdir}/lib/rdoc/generator/template -type f | xargs chmod a-x
 
+%check
+pushd .%{gem_instdir}
+# Get rid of Bundler
+sed -i "s/require 'bundler\/setup'//" ./spec/spec_helper.rb
+testrb -Ilib spec/*
+popd
+
 %files
 %dir %{gem_instdir}
 %{_bindir}/sdoc
@@ -96,7 +91,7 @@ find %{buildroot}%{gem_instdir}/lib/rdoc/generator/template -type f | xargs chmo
 %{gem_instdir}/bin
 %{gem_libdir}
 %exclude %{gem_cache}
-%exclude %{gem_instdir}/.rake_tasks~
+%exclude %{gem_instdir}/.travis.yml
 %exclude %{gem_instdir}/.gitignore
 %{gem_spec}
 %doc %{gem_instdir}/LICENSE
@@ -109,12 +104,18 @@ find %{buildroot}%{gem_instdir}/lib/rdoc/generator/template -type f | xargs chmo
 %{gem_instdir}/Gemfile
 %{gem_instdir}/%{gem_name}.gemspec
 %{gem_instdir}/Rakefile
+%{gem_instdir}/spec
 
 %changelog
-* Mon Nov 25 2013 Josef Stribny <jstribny at redhat.com> - 0.4.0-2
+* Thu Jan 23 2014 Josef Stribny <jstribny at redhat.com> - 0.4.0-1
+- Update to sdoc 0.4.0
+- Run tests
+- Fix changelog
+
+* Mon Nov 25 2013 Josef Stribny <jstribny at redhat.com> - 0.4.0-2.rc1
 - sdoc 0.4.0 git pre-release to support RDoc 4.0
 
-* Wed Nov 06 2013 Josef Stribny <jstribny at redhat.com> - 0.4.0-1
+* Wed Nov 06 2013 Josef Stribny <jstribny at redhat.com> - 0.4.0-1.rc1
 - sdoc 0.4.0 git pre-release to support RDoc 4.0
 
 * Tue Aug 06 2013 Josef Stribny <jstribny at redhat.com> - 0.3.20-2
diff --git a/sources b/sources
index 58e09cc..25d7e81 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-93e0c7376f58f85097f260f79db73601  sdoc-0.3.20.gem
+6ef8c6831dbb84ddfa4ea7da63b9adb7  sdoc-0.4.0.gem


More information about the scm-commits mailing list